/* Blog hub — gradient controls + slider layout. Cards keep the theme's original static look. */

:root {
    --blog-gradient: linear-gradient(91.91deg, #092b96 0%, #086cdc 100%);
}

/* Category filters — active pill uses the brand gradient, no animation */
.blog-wrap__top .item {
    position: relative;
    border-radius: 100px;
    border: 1px solid #dce6f2;
    background: #fff;
    color: #131313;
}

.blog-wrap__top .item.active {
    border-color: transparent;
    color: #fff !important;
    background: var(--blog-gradient) !important;
}

/* Section header */
.blog-wrap__head {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
}

.blog-wrap__head .blog-wrap__title,
.blog-wrap__head h2 {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}

.blog-wrap__nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.blog-wrap__nav.is-hidden {
    display: none;
}

/* Slider arrows — round, gradient */
.blog-wrap__arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--blog-gradient);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transform: none !important;
}

.blog-wrap__arrow svg {
    transform: none !important;
}

.blog-wrap__arrow.slick-disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* See-all + card buttons — expert "О компании" style with shine slash */
.blog-wrap__flex > .btn,
.blog-wrap__list .item .btn,
.loadMoreBtn {
    position: relative;
    overflow: hidden;
    z-index: 0;
    border: 0 !important;
    color: #fff !important;
    background: linear-gradient(145deg, #2a8ef0 0%, #2380eb 45%, #092b96 100%) !important;
    box-shadow: 0 10px 24px rgba(35, 128, 235, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.28s ease, box-shadow 0.28s ease, background 0.28s ease, color 0.28s ease;
}

.blog-wrap__flex > .btn::before,
.blog-wrap__list .item .btn::before {
    content: none;
    display: none;
}

.blog-wrap__flex > .btn::after,
.blog-wrap__list .item .btn::after,
.loadMoreBtn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.34) 48%, transparent 100%);
    transform: translateX(-130%);
    transition: transform 0.55s ease;
    pointer-events: none;
}

.blog-wrap__flex > .btn:hover::after,
.blog-wrap__flex > .btn:focus-visible::after,
.blog-wrap__list .item .btn:hover::after,
.blog-wrap__list .item .btn:focus-visible::after,
.loadMoreBtn:hover::after,
.loadMoreBtn:focus-visible::after {
    transform: translateX(130%);
}

.blog-wrap__flex > .btn:hover,
.blog-wrap__flex > .btn:focus-visible,
.blog-wrap__list .item .btn:hover,
.blog-wrap__list .item .btn:focus-visible,
.loadMoreBtn:hover,
.loadMoreBtn:focus-visible {
    background: linear-gradient(145deg, #3b9af5 0%, #2a8ef0 45%, #0a349f 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(35, 128, 235, 0.34), 0 0 0 4px rgba(35, 128, 235, 0.16);
}

.blog-wrap__list .item .btn svg {
    position: relative;
    z-index: 1;
}

/* Load more — compact pill that never stretches into a card, even as a flex item */
.loadMoreBtn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto !important;
    align-self: center !important;
    margin: 40px auto 0 !important;
    min-width: 0 !important;
    width: -moz-fit-content !important;
    width: fit-content !important;
    max-width: 320px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 16px 36px !important;
    border-radius: 999px !important;
    font-weight: 700;
}

/* Force the button onto its own full-width row so it centers below the cards */
.blog-wrap__list--flex > .loadMoreBtn,
.blog-wrap__list > .loadMoreBtn {
    order: 999;
}

.blog-wrap__list--flex::after {
    content: "";
    flex-basis: 100%;
    height: 0;
    order: 998;
}

/* Date badge — gradient */
.blog-wrap__list .item-image__date {
    color: #fff;
    background: var(--blog-gradient);
}

/* Slider layout only — no card animation. Each card sits inside a .blog-slide
   wrapper so the gutter (padding) shows between cards instead of merging them. */
.blog-wrap__slider {
    margin-top: 20px;
}

.blog-wrap__list--slider {
    display: block;
    margin: 20px 0 0;
}

.blog-wrap__list--slider:not(.slick-initialized) {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin: 20px -8px 0;
}

.blog-wrap__list--slider:not(.slick-initialized)::-webkit-scrollbar {
    display: none;
}

.blog-wrap__list--slider:not(.slick-initialized) > .blog-slide {
    flex: 0 0 33.333%;
}

.blog-wrap__list--slider .slick-list {
    margin: 0 -8px;
}

.blog-wrap__list--slider .slick-track {
    display: flex;
    align-items: stretch;
}

.blog-wrap__list--slider .slick-slide {
    height: auto;
}

.blog-slide {
    padding: 0 8px;
    height: 100%;
    box-sizing: border-box;
}

.blog-wrap__list--slider .item {
    width: 100%;
    margin: 0;
    height: 100%;
}

@media (max-width: 1100px) {
    .blog-wrap__head .blog-wrap__title,
    .blog-wrap__head h2 {
        font-size: 26px;
    }

    .blog-wrap__arrow {
        width: 36px;
        height: 36px;
    }

    .blog-wrap__list--slider:not(.slick-initialized) > .blog-slide {
        flex-basis: 50%;
    }
}

@media (max-width: 640px) {
    .blog-wrap__flex {
        flex-wrap: wrap;
        gap: 12px;
    }

    .blog-wrap__head {
        width: 100%;
        justify-content: space-between;
    }

    .blog-wrap__flex > .btn {
        width: 100%;
        text-align: center;
    }

    .blog-wrap__list--slider:not(.slick-initialized) > .blog-slide {
        flex-basis: 88%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .blog-wrap__flex > .btn,
    .blog-wrap__list .item .btn,
    .blog-wrap__flex > .btn::after,
    .blog-wrap__list .item .btn::after,
    .loadMoreBtn,
    .loadMoreBtn::after {
        transition: none;
    }

    .blog-wrap__flex > .btn:hover,
    .blog-wrap__list .item .btn:hover,
    .loadMoreBtn:hover {
        transform: none;
    }
}
