/* ===================================
   HERO.CSS - HERO СЕКЦИЯ (ADAPTIVE)
   =================================== */

/* ===================================
   1. ОСНОВНАЯ СЕКЦИЯ
   =================================== */
.hero {
    position: relative;
    padding: 120px 0 80px;
    background: var(--gradient-dark);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
            radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(251, 191, 36, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* ===================================
   2. РАМКА "ТЕЛЕВИЗОРА" (ТОЛЬКО ДЕСКТОП)
   =================================== */
.hero__tv-frame {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    background: linear-gradient(145deg, #2D3748 0%, #1A202C 100%);
    border-radius: 32px;
    box-shadow:
            0 0 0 2px rgba(255, 255, 255, 0.1),
            0 30px 60px rgba(0, 0, 0, 0.5),
            inset 0 2px 4px rgba(255, 255, 255, 0.1),
            inset 0 -2px 4px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.05);
}

.hero__tv-frame::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    pointer-events: none;
    z-index: 1;
}

.hero__tv-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 32px;
    background: linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.1) 0%,
            transparent 30%,
            transparent 70%,
            rgba(255, 255, 255, 0.05) 100%
    );
    pointer-events: none;
    z-index: 10;
}

.hero__tv-frame:hover {
    box-shadow:
            0 0 0 2px rgba(255, 255, 255, 0.15),
            0 30px 60px rgba(0, 0, 0, 0.6),
            inset 0 2px 4px rgba(255, 255, 255, 0.15),
            inset 0 -2px 4px rgba(0, 0, 0, 0.3),
            0 0 80px rgba(251, 191, 36, 0.1);
    transition: box-shadow 0.4s ease;
}

/* ===================================
   3. СЛАЙДЕР (ДЕСКТОП)
   =================================== */
.hero__slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    aspect-ratio: 16 / 9;
    min-height: 600px;
}

.hero__slider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.03) 50%,
            transparent 100%
    );
    z-index: 3;
    pointer-events: none;
    animation: scan 8s linear infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===================================
   4. СЛАЙДЫ
   =================================== */
.hero__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 1;
}

.hero__slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero__slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__slide-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero__slide-bg img:not(.loaded) {
    filter: blur(2px);
    transform: scale(1.1);
}

.hero__slide-bg img.loaded {
    filter: blur(0);
    transform: scale(1);
    transition: filter 0.6s ease, transform 0.6s ease;
}

.hero__slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
            135deg,
            rgba(15, 23, 42, 0.85) 0%,
            rgba(30, 41, 59, 0.75) 50%,
            rgba(51, 65, 85, 0.65) 100%
    );
    z-index: 1;
}

/* ===================================
   5. КОНТЕНТ СЛАЙДА - GRID LAYOUT (ДЕСКТОП)
   =================================== */
.hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 60px 80px;
    max-width: 800px;

    /* Grid структура для фиксированной высоты */
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    grid-template-areas:
        "badge"
        "title"
        "subtitle"
        "actions"
        "features";
    gap: 0;
    align-content: center;
}

.hero__badge {
    grid-area: badge;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(255, 107, 0, 0.15);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 50px;
    color: #FF8C00;
    font-size: 14px;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    animation: fadeInDown 0.8s ease 0.2s both;
}

.hero__badge--red {
    background: rgba(0, 166, 232, 0.15);
    border-color: rgba(0, 166, 232, 0.3);
    color: #00D4FF;
}

.hero__badge svg {
    flex-shrink: 0;
}

.hero__title {
    grid-area: title;
    font-family: var(--font-secondary), serif;
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    color: white;
    margin: 0 0 24px;
    animation: fadeInUp 0.8s ease 0.3s both;
    word-wrap: break-word;
    overflow-wrap: break-word;

    /* Фиксированная высота для 2 строк */
    min-height: 123px; /* 56px * 1.1 * 2 линии */
}

.hero__title-accent {
    display: block;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    grid-area: subtitle;
    font-size: 20px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 40px;
    max-width: 600px;
    animation: fadeInUp 0.8s ease 0.4s both;

    /* Фиксированная высота для 3 строк */
    min-height: 96px; /* 20px * 1.6 * 3 линии */
    overflow: hidden;
}

.hero__actions {
    grid-area: actions;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease 0.5s both;
}

.hero__features {
    grid-area: features;
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
    min-height: 28px; /* Фиксированная высота для features */
}

.hero__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 500;
}

.hero__feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 107, 0, 0.2);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 50%;
    color: #FF8C00;
    font-size: 14px;
    flex-shrink: 0;
}

/* ===================================
   6. УПРАВЛЕНИЕ СЛАЙДЕРОМ (ДЕСКТОП)
   =================================== */
.hero__slider-controls {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 32px;
    padding: 0 20px;
    z-index: 10;
}

.hero__arrow {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.hero__arrow:hover {
    background: var(--color-gold);
    border-color: var(--color-gold);
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3);
}

.hero__arrow:active {
    transform: scale(0.95);
}

.hero__arrow svg {
    width: 24px;
    height: 24px;
}

.hero__dots {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hero__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero__dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.hero__dot.active {
    background: var(--color-gold);
    border-color: rgba(251, 191, 36, 0.3);
    width: 32px;
    border-radius: 6px;
}

/* ===================================
   7. АДАПТИВНОСТЬ - ПЛАНШЕТЫ И УЗКИЕ ДЕСКТОПЫ
   =================================== */

/* Узкие десктопы и большие планшеты */
@media (max-width: 1400px) {
    .hero__tv-frame {
        max-width: calc(100% - 40px);
        margin: 0 20px;
    }
}

@media (max-width: 1200px) {
    .hero__tv-frame {
        max-width: 100%;
        padding: 20px;
        border-radius: 24px;
        margin: 0;
    }

    .hero__slider {
        min-height: 500px;
    }

    .hero__content {
        padding: 50px 60px;
    }

    .hero__title {
        font-size: 48px;
        min-height: 105px; /* 48px * 1.1 * 2 */
    }

    .hero__subtitle {
        font-size: 18px;
        min-height: 86px; /* 18px * 1.6 * 3 */
    }
}

/* КРИТИЧЕСКИЙ BREAKPOINT */
@media (max-width: 992px) {
    .hero {
        padding: 100px 0 40px;
    }

    .hero__tv-frame {
        padding: 12px;
        border-radius: 20px;
        box-shadow:
                0 0 0 1px rgba(255, 255, 255, 0.08),
                0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .hero__slider {
        min-height: 450px;
        border-radius: 12px;
    }

    .hero__content {
        padding: 40px;
    }

    .hero__title {
        font-size: 42px;
        min-height: 92px; /* 42px * 1.1 * 2 */
    }

    .hero__subtitle {
        font-size: 17px;
        min-height: 82px; /* 17px * 1.6 * 3 */
    }

    .hero__features {
        gap: 24px;
    }
}

/* ПОЛНОЕ ОТКЛЮЧЕНИЕ TV FRAME для небольших планшетов */
@media (max-width: 900px) {
    .hero {
        padding: 90px 0 0;
    }

    .hero__tv-frame {
        padding: 0;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }

    .hero__tv-frame::before,
    .hero__tv-frame::after {
        display: none;
    }

    .hero__tv-frame:hover {
        box-shadow: none;
    }

    .hero__slider {
        border-radius: 0;
        /* ВАЖНО: Фиксируем минимальную высоту для всех слайдов */
        min-height: 600px;
        height: auto;
        aspect-ratio: unset;
        background: transparent;
    }

    .hero__slider::before {
        display: none;
    }

    .hero__slide {
        position: relative;
        /* ВАЖНО: Фиксируем высоту слайда */
        height: 600px;
        min-height: 600px;
        display: none;
    }

    .hero__slide.active {
        display: block;
    }

    .hero__slide-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

    .hero__slide-overlay {
        background: linear-gradient(
                to bottom,
                rgba(15, 23, 42, 0.75) 0%,
                rgba(15, 23, 42, 0.85) 40%,
                rgba(15, 23, 42, 0.90) 100%
        );
    }

    .hero__content {
        padding: 40px 32px 100px;
        /* Grid настройка для планшета */
        min-height: 500px;
    }

    .hero__title {
        font-size: 38px;
        min-height: 84px; /* 38px * 1.1 * 2 */
    }

    .hero__subtitle {
        font-size: 16px;
        min-height: 77px; /* 16px * 1.6 * 3 */
    }

    .hero__slider-controls {
        position: absolute;
        bottom: 32px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(15, 23, 42, 0.9);
        backdrop-filter: blur(16px);
        border-radius: 50px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        padding: 12px 24px;
    }

    .hero__arrow {
        width: 40px;
        height: 40px;
    }

    .hero__arrow svg {
        width: 20px;
        height: 20px;
    }
}

/* ===================================
   8. МОБИЛЬНАЯ ВЕРСИЯ (ФИКСИРОВАННАЯ ВЫСОТА)
   =================================== */

@media (max-width: 768px) {
    .hero {
        padding: 90px 0 0;
    }

    .hero__slider {
        /* ВАЖНО: Фиксированная высота для мобильных */
        min-height: 560px;
    }

    .hero__slide {
        /* ВАЖНО: Фиксированная высота слайда */
        height: 560px;
        min-height: 560px;
    }

    .hero__content {
        padding: 32px 20px 100px;
        /* Grid настройка для мобильных */
        min-height: 460px;
        gap: 0;
    }

    .hero__badge {
        padding: 8px 16px;
        font-size: 12px;
        margin-bottom: 16px;
        background: rgba(255, 107, 0, 0.25);
        backdrop-filter: blur(12px);
    }

    .hero__title {
        font-size: 32px;
        margin-bottom: 16px;
        /* ВАЖНО: Фиксированная высота */
        min-height: 70px; /* 32px * 1.1 * 2 */
        max-height: 70px;
        overflow: hidden;
    }

    .hero__subtitle {
        font-size: 15px;
        margin-bottom: 24px;
        /* ВАЖНО: Фиксированная высота */
        min-height: 72px; /* 15px * 1.6 * 3 */
        max-height: 72px;
        overflow: hidden;
    }

    .hero__actions {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 28px;
        width: 100%;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 14px;
    }

    .hero__features {
        flex-direction: column;
        gap: 14px;
        margin-bottom: 0;
        min-height: auto;
    }

    .hero__feature {
        font-size: 13px;
        gap: 10px;
    }

    /* СКРЫТЬ СТРЕЛКИ НА МОБИЛЬНЫХ */
    .hero__arrow {
        display: none !important;
    }

    .hero__slider-controls {
        bottom: 24px;
        padding: 10px 20px;
    }

    .hero__dots {
        padding: 0;
        gap: 10px;
    }

    .hero__dot {
        width: 8px;
        height: 8px;
    }

    .hero__dot.active {
        width: 24px;
        height: 8px;
        border-radius: 4px;
    }
}

/* ===================================
   9. МАЛЫЕ СМАРТФОНЫ
   =================================== */

@media (max-width: 576px) {
    .hero {
        padding: 80px 0 0;
    }

    .hero__slider {
        /* ВАЖНО: Фиксированная высота */
        min-height: 520px;
    }

    .hero__slide {
        /* ВАЖНО: Фиксированная высота */
        height: 520px;
        min-height: 520px;
    }

    .hero__content {
        padding: 24px 16px 90px;
        min-height: 420px;
    }

    .hero__badge {
        padding: 6px 12px;
        font-size: 11px;
        margin-bottom: 12px;
    }

    .hero__title {
        font-size: 28px;
        margin-bottom: 14px;
        /* ВАЖНО: Фиксированная высота */
        min-height: 62px; /* 28px * 1.1 * 2 */
        max-height: 62px;
    }

    .hero__subtitle {
        font-size: 14px;
        margin-bottom: 20px;
        /* ВАЖНО: Фиксированная высота */
        min-height: 67px; /* 14px * 1.6 * 3 */
        max-height: 67px;
    }

    .hero__actions {
        gap: 10px;
        margin-bottom: 24px;
    }

    .hero__actions .btn {
        padding: 12px 20px;
        font-size: 13px;
    }

    .hero__features {
        gap: 12px;
    }

    .hero__feature {
        font-size: 12px;
        gap: 8px;
    }

    .hero__feature-icon {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }

    .hero__slider-controls {
        bottom: 20px;
        padding: 8px 16px;
    }

    .hero__dot {
        width: 7px;
        height: 7px;
    }

    .hero__dot.active {
        width: 20px;
    }
}

/* ===================================
   10. ОЧЕНЬ МАЛЫЕ ЭКРАНЫ
   =================================== */

@media (max-width: 400px) {
    .hero__slider {
        min-height: 500px;
    }

    .hero__slide {
        height: 500px;
        min-height: 500px;
    }

    .hero__content {
        padding: 20px 14px 90px;
        min-height: 400px;
    }

    .hero__title {
        font-size: 26px;
        min-height: 57px;
        max-height: 57px;
    }

    .hero__subtitle {
        font-size: 13px;
        min-height: 62px;
        max-height: 62px;
    }

    .hero__actions .btn {
        font-size: 12px;
        padding: 11px 18px;
    }

    .hero__slider-controls {
        bottom: 20px;
        padding: 8px 16px;
        gap: 12px;
    }

    .hero__arrow {
        width: 34px;
        height: 34px;
    }
}

/* ===================================
   11. LANDSCAPE НА МОБИЛЬНЫХ
   =================================== */

@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 0;
    }

    .hero__slider {
        /* Уменьшаем высоту в ландшафте */
        min-height: 400px;
    }

    .hero__slide {
        height: 400px;
        min-height: 400px;
    }

    .hero__content {
        padding: 20px 32px 70px;
        min-height: 300px;
        gap: 8px;
    }

    .hero__title {
        font-size: 26px;
        margin-bottom: 10px;
        min-height: 57px;
        max-height: 57px;
    }

    .hero__subtitle {
        font-size: 13px;
        margin-bottom: 14px;
        min-height: 62px;
        max-height: 62px;
    }

    .hero__actions {
        flex-direction: row;
        gap: 12px;
        margin-bottom: 14px;
    }

    .hero__actions .btn {
        width: auto;
        flex: 1;
        padding: 10px 18px;
        font-size: 12px;
    }

    .hero__features {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
        margin-bottom: 0;
    }

    .hero__slider-controls {
        bottom: 16px;
        padding: 8px 18px;
    }
}

/* ===================================
   12. БЕЗОПАСНЫЕ ЗОНЫ (NOTCH/PUNCH-HOLE)
   =================================== */

@supports (padding: env(safe-area-inset-top)) {
    @media (max-width: 768px) {
        .hero {
            padding-top: max(90px, calc(env(safe-area-inset-top) + 70px));
        }

        .hero__content {
            padding-left: max(20px, env(safe-area-inset-left));
            padding-right: max(20px, env(safe-area-inset-right));
        }

        .hero__slider-controls {
            bottom: max(32px, calc(env(safe-area-inset-bottom) + 32px));
            left: max(50%, env(safe-area-inset-left));
            right: env(safe-area-inset-right);
        }
    }

    @media (max-width: 576px) {
        .hero {
            padding-top: max(80px, calc(env(safe-area-inset-top) + 60px));
        }

        .hero__content {
            padding-left: max(16px, env(safe-area-inset-left));
            padding-right: max(16px, env(safe-area-inset-right));
        }

        .hero__slider-controls {
            bottom: max(24px, calc(env(safe-area-inset-bottom) + 24px));
        }
    }
}

/* ===================================
   13. iOS SAFARI FIXES
   =================================== */

@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .hero__slide {
            min-height: -webkit-fill-available;
        }

        .hero__content {
            -webkit-overflow-scrolling: touch;
        }

        .hero__slider-controls {
            position: fixed;
            bottom: max(32px, env(safe-area-inset-bottom, 32px));
        }
    }
}

/* ===================================
   14. ОПТИМИЗАЦИЯ ДЛЯ ПРОИЗВОДИТЕЛЬНОСТИ
   =================================== */

@media (max-width: 768px) {
    .hero__actions .btn--primary {
        box-shadow: 0 4px 12px rgba(255, 107, 0, 0.35);
    }

    .hero__actions .btn--outline-light {
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(8px);
    }

    .hero__slide-bg img {
        image-rendering: auto;
        image-rendering: -webkit-optimize-contrast;
        will-change: auto;
    }

    .hero__content {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .hero__slider::before {
        animation: none;
    }
}

/* ===================================
   15. ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .hero__slide,
    .hero__badge,
    .hero__title,
    .hero__subtitle,
    .hero__actions,
    .hero__features {
        animation: none !important;
        transition: none !important;
    }

    .hero__arrow,
    .hero__dot {
        transition: none !important;
    }

    .hero__slider::before {
        animation: none !important;
    }
}

.hero__arrow:focus-visible,
.hero__dot:focus-visible {
    outline: 3px solid var(--color-gold);
    outline-offset: 4px;
    border-radius: 50%;
}

@media (prefers-contrast: more) {
    @media (max-width: 768px) {
        .hero__slide-overlay {
            background: linear-gradient(
                    to bottom,
                    rgba(0, 0, 0, 0.85) 0%,
                    rgba(0, 0, 0, 0.95) 100%
            );
        }

        .hero__badge {
            border-width: 2px;
            background: rgba(255, 107, 0, 0.35);
        }

        .hero__arrow {
            border-width: 2px;
            background: rgba(255, 255, 255, 0.2);
        }

        .hero__title,
        .hero__subtitle {
            text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
        }
    }
}

/* ===================================
   16. ТЕМНАЯ ТЕМА
   =================================== */

@media (prefers-color-scheme: dark) {
    .hero::before {
        opacity: 0.8;
    }

    @media (max-width: 768px) {
        .hero__slide-overlay {
            background: linear-gradient(
                    to bottom,
                    rgba(0, 0, 0, 0.80) 0%,
                    rgba(0, 0, 0, 0.90) 100%
            );
        }

        .hero__slider-controls {
            background: rgba(0, 0, 0, 0.95);
            border-color: rgba(255, 255, 255, 0.2);
        }
    }
}

/* ===================================
   17. PRINT СТИЛИ
   =================================== */

@media print {
    .hero {
        padding: 20px 0;
        background: white;
        page-break-after: always;
    }

    .hero::before {
        display: none;
    }

    .hero__tv-frame {
        padding: 0;
        border: 2px solid #333;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .hero__tv-frame::before,
    .hero__tv-frame::after {
        display: none;
    }

    .hero__slider {
        min-height: 400px;
        border-radius: 0;
        background: white;
    }

    .hero__slider::before {
        display: none;
    }

    .hero__slider-controls {
        display: none;
    }

    .hero__slide-bg {
        filter: grayscale(30%);
    }

    .hero__slide-overlay {
        background: rgba(255, 255, 255, 0.7);
    }

    .hero__content {
        color: #000 !important;
        padding: 30px 20px;
    }

    .hero__title,
    .hero__subtitle,
    .hero__feature {
        color: #000 !important;
        text-shadow: none !important;
    }

    .hero__badge {
        border: 2px solid #FF8C00;
        background: transparent;
    }

    .hero__actions {
        display: none;
    }

    .hero__features {
        border-top: 2px solid #ccc;
        padding-top: 20px;
        margin-top: 20px;
    }
}

/* ===================================
   18. NO-JS FALLBACK
   =================================== */

.no-js .hero__slider {
    overflow: visible;
}

.no-js .hero__slide {
    position: relative;
    opacity: 1;
    visibility: visible;
    margin-bottom: 40px;
}

.no-js .hero__slider-controls {
    display: none;
}

@media (max-width: 768px) {
    .no-js .hero__slide {
        display: block;
        height: auto;
        min-height: auto;
    }
}

/* ===================================
   19. РЕЗЕРВНЫЕ СТИЛИ
   =================================== */

@supports not (backdrop-filter: blur(8px)) {
    .hero__badge {
        background: rgba(255, 107, 0, 0.35);
    }

    @media (max-width: 768px) {
        .hero__slider-controls {
            background: rgba(15, 23, 42, 0.98);
        }

        .hero__actions .btn--outline-light {
            background: rgba(255, 255, 255, 0.18);
        }
    }
}

@supports not (aspect-ratio: 16 / 9) {
    .hero__slider {
        height: 600px;
    }

    @media (max-width: 1200px) {
        .hero__slider {
            height: 500px;
        }
    }

    @media (max-width: 992px) {
        .hero__slider {
            height: 450px;
        }
    }
}

/* ===================================
   20. ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ
   =================================== */

@media (max-width: 768px) {
    .hero__desktop-only {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hero__mobile-only {
        display: none !important;
    }
}

@media (hover: hover) and (pointer: fine) {
    .hero__arrow:hover {
        background: var(--color-gold);
        border-color: var(--color-gold);
        transform: scale(1.1);
        box-shadow: 0 8px 24px rgba(251, 191, 36, 0.3);
    }

    .hero__dot:hover {
        background: rgba(255, 255, 255, 0.5);
        transform: scale(1.2);
    }
}

@media (hover: none) {
    .hero__arrow:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: none;
    }

    .hero__dot:hover {
        transform: none;
    }
}

/* ===================================
   21. ФИНАЛЬНЫЕ ОПТИМИЗАЦИИ
   =================================== */

@media (max-width: 768px) {
    .hero__slide.active {
        transform: translateZ(0);
        will-change: opacity;
    }

    .hero__content {
        transform: translateZ(0);
    }

    .hero__slider-controls {
        transform: translate(-50%, 0) translateZ(0);
    }
}

@media (max-width: 768px) {
    .hero__content {
        scroll-behavior: smooth;
    }
}

.hero__title,
.hero__subtitle {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   22. УЛУЧШЕННАЯ АНИМАЦИЯ СЛАЙДОВ (МОБИЛЬНЫЕ)
   =================================== */

@media (max-width: 900px) {
    .hero__slide {
        transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hero__slide.active {
        animation: slideIn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes slideIn {
        0% {
            opacity: 0;
            transform: scale(1.05);
        }
        100% {
            opacity: 1;
            transform: scale(1);
        }
    }

    /* Плавное появление контента */
    .hero__slide.active .hero__badge {
        animation: fadeInDown 0.8s ease 0.3s both;
    }

    .hero__slide.active .hero__title {
        animation: fadeInUp 0.8s ease 0.4s both;
    }

    .hero__slide.active .hero__subtitle {
        animation: fadeInUp 0.8s ease 0.5s both;
    }

    .hero__slide.active .hero__actions {
        animation: fadeInUp 0.8s ease 0.6s both;
    }

    .hero__slide.active .hero__features {
        animation: fadeInUp 0.8s ease 0.7s both;
    }

    /* Плавное изменение фона */
    .hero__slide-bg {
        transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hero__slide.active .hero__slide-bg {
        animation: zoomIn 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    @keyframes zoomIn {
        0% {
            transform: scale(1.1);
        }
        100% {
            transform: scale(1);
        }
    }

    /* Плавное изменение overlay */
    .hero__slide-overlay {
        transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hero__slide:not(.active) .hero__slide-overlay {
        opacity: 0;
    }

    .hero__slide.active .hero__slide-overlay {
        opacity: 1;
    }
}

/* Отключить резкие переходы при смене слайда */
@media (max-width: 768px) {
    .hero__slide:not(.active) {
        pointer-events: none;
    }
}

/* ===================================
   23. УЗКИЕ ВЫСОКИЕ ЭКРАНЫ (ВЫСОКОЕ СООТНОШЕНИЕ)
   =================================== */

@media (max-width: 768px) and (min-height: 700px) {
    .hero__slider {
        min-height: 640px;
    }

    .hero__slide {
        height: 640px;
        min-height: 640px;
    }

    .hero__content {
        min-height: 540px;
        padding: 40px 20px 110px;
    }

    .hero__title {
        font-size: 34px;
        /* Увеличиваем высоту для полного отображения */
        min-height: 82px; /* 34px * 1.1 * 2.2 (с запасом) */
        max-height: 82px;
        line-height: 1.2;
    }
}

/* Специально для экранов около 720px ширины */
@media (min-width: 700px) and (max-width: 768px) {
    .hero__title {
        font-size: 36px;
        min-height: 87px;
        max-height: 87px;
    }

    .hero__subtitle {
        font-size: 16px;
        min-height: 77px;
        max-height: 77px;
    }

    .hero__content {
        padding: 42px 24px 110px;
    }
}

/* Для очень высоких узких экранов (соотношение > 2:1) */
@media (max-width: 768px) and (min-aspect-ratio: 9/19) {
    .hero__slider {
        min-height: 660px;
    }

    .hero__slide {
        height: 660px;
        min-height: 660px;
    }

    .hero__content {
        min-height: 560px;
        justify-content: flex-start;
        padding-top: 50px;
    }

    .hero__title {
        font-size: 35px;
        min-height: 85px;
        max-height: none; /* Убираем ограничение */
        margin-bottom: 18px;
    }

    .hero__subtitle {
        min-height: 80px;
        max-height: none;
    }
}

/* ===================================
   24. FADE-OUT ЭФФЕКТ ПРИ СМЕНЕ СЛАЙДА
   =================================== */

@media (max-width: 900px) {
    .hero__slide.fade-out {
        animation: fadeOut 0.4s ease forwards;
    }

    @keyframes fadeOut {
        0% {
            opacity: 1;
        }
        100% {
            opacity: 0;
        }
    }

    /* Убираем анимацию контента у исчезающего слайда */
    .hero__slide.fade-out .hero__badge,
    .hero__slide.fade-out .hero__title,
    .hero__slide.fade-out .hero__subtitle,
    .hero__slide.fade-out .hero__actions,
    .hero__slide.fade-out .hero__features {
        animation: none !important;
    }
}

/* ===================================
   КОНЕЦ HERO.CSS
   =================================== */
