/* Стили для слайдера — десктоп-first */
.slider-hero {
    margin-bottom: 150px;
    color: var(--color-text);
}

/* скрываем до инициализации */
.js-hero-slider:not(.swiper-initialized) {
    visibility: hidden;
}

.title--comfort {
    font-size: var(--font-size-xl);
    line-height: 1.05;
    margin: 0 0 60px 0;
    color: var(--color-text);
    font-weight: 700;
}

/* Подзаголовок */
.slider-hero__subtitle {
    font-size: var(--font-size-md);
    width: 40%;
    margin-bottom: 90px;
    font-weight: 400;
    line-height: var(--line-height-base);
}

.slider-hero__subtitle > strong:first-of-type {
    display: block;
    padding-bottom: 25px;
}

/* контейнер */
.slider-hero__slider {
    position: relative;

    /* 🔥 ГЛАВНЫЙ ФИКС ПЛАВНОСТИ */
    transition: height 0.4s cubic-bezier(.4, 0, .2, 1);
    will-change: height;
}

/* слайд */
.slider-hero__item {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-radius: var(--radius-lg);
    overflow: visible;
    transition: transform 0.45s cubic-bezier(.2,.8,.2,1), opacity 0.45s;
}

/* порядок (desktop) */
.slider-hero__media { order: 1; }
.slider-hero__type { order: 2; }
.slider-hero__content { order: 3; }

/* медиа */
.slider-hero__media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0));
    flex-shrink: 0;
    width: 100%;
}

/* картинка */
.slider-hero__picture {
    aspect-ratio: 478 / 265;
    overflow: hidden;
    border-radius: var(--radius-lg);
    width: 100%;
    display: block;
}

.slider-hero__picture img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

/* заголовок карточки */
.slider-hero__type {
    max-width: 80%;
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin: 60px 0 30px;
    line-height: var(--line-height-base);
    font-family: Inter-Bold;
}

/* текст */
.slider-hero__text {
    font-size: var(--font-size-base);
    line-height: var(--line-height-md);
    font-weight: 400;
    margin-bottom: 60px;
}

/* доктор */
.slider-hero__doctor {
    display: flex;
    align-items: center;
    margin-top: 12px;
    gap: 20px;
}

.slider-hero__doctor-photo img {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.slider-hero__doctor-name {
    font-size: var(--font-size-base);
    line-height: var(--line-height-md);
    font-weight: 400;
}

.slider-hero__doctor-desc {
    font-size: var(--font-size-base);
    line-height: var(--line-height-md);
    font-weight: 400;
    color: rgb(from var(--color-gray) r g b / 60%);
}

/* стрелки */
.slider-hero .swiper-button-prev,
.slider-hero .swiper-button-next {
    top: 143px;
    transform: translateY(-50%);
    width: 74px;
}

.icon.icon--arrow-next.icon-arrow-next,
.icon.icon--arrow-prev.icon-arrow-prev {
    padding-left: 0 !important;
}

.slider-hero .swiper-button-prev { left: 0; }
.slider-hero .swiper-button-next { right: 9.5%; }

/* крайний */
.slider-hero__item.is-edge {
    opacity: .32;
    filter: grayscale(.08);
    z-index: 1;
}

.slider-hero__item {
    transition: opacity 0.45s ease;
}

/* grab fix */
.js-hero-slider.swiper-grab,
.js-hero-slider.swiper-grab * {
    user-select: none;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {

    .slider-hero {
        position: relative;
        z-index: 2;
        margin-bottom: 30px;
    }

    .slider-hero__slider {
        padding-right: 20px;
    }

    .slider-hero__list {
        overflow: visible;
    }

    .slider-hero__item {
        width: 100% !important;
        overflow: visible;
        align-items: stretch;
    }

    .title--comfort {
        font-size: var(--font-size-lg);
        line-height: var(--line-height-base);
        margin: 0 0 30px 0;
    }

    .slider-hero__subtitle {
        font-size: var(--font-size-base);
        width: 100%;
        padding-bottom: 50px;
        border-bottom: 1px solid var(--cl-rebel-03);
        margin-bottom: 50px;
    }

    .slider-hero__type {
        max-width: 100%;
        font-size: var(--font-size-md);
        margin: 0 0 20px;
        order: 1;
    }

    .slider-hero__media {
        order: 2;
        flex-shrink: 0;
        min-height: 1px;
    }

    .slider-hero__content {
        order: 3;
    }

    .slider-hero__text {
        margin: 30px 0;
    }

    /* доктор */
    .slider-hero__doctor {
        margin: 0 0 30px;
        border-radius: var(--radius-md);
        background-color: rgb(from var(--color-primary) r g b / 10%);
        overflow: hidden;
    }

    .slider-hero__doctor-photo {
        flex: 0 0 110px;
    }

    .slider-hero__doctor-photo img {
        width: 110px;
        height: 110px;
        border-radius: 0;
    }

    .slider-hero__doctor-name {
        padding-bottom: 5px;
    }

    /* 🔥 ПЛАВНОЕ скрытие */
    .js-hero-slider .slider-hero__text,
    .js-hero-slider .slider-hero__doctor {
        transition: opacity .3s ease, transform .3s ease;
    }

    .js-hero-slider .swiper-slide:not(.swiper-slide-active) .slider-hero__text,
    .js-hero-slider .swiper-slide:not(.swiper-slide-active) .slider-hero__doctor {
        opacity: 0;
        pointer-events: none;

        /* ВАЖНО: вместо height */
        transform: translateY(-10px);
    }
}

/* desktop fix */
@media (min-width: 768px) {
    .slider-hero__slider {
        overflow: hidden;
        padding-left: 10px;
        margin-left: -10px;
    }
}

/* swiper fix */
.swiper-button-lock {
    display: none !important;
}


