﻿.hero {
    position: relative;
    width: 100%;
    height: clamp(420px, 55vh, 720px);
    color: #fff;
    overflow: hidden;
    background: #08110d;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .16);
}

    .hero .carousel,
    .hero .carousel-inner,
    .hero .carousel-item {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

        /* ===== IMAGE ===== */
        .hero .carousel-item > img,
        .hero .carousel-item .banner-img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: center;
            opacity: 0;
            transform: scale(1.05);
            transition: opacity 1.8s ease-in-out, transform 5.5s ease-out, filter .35s ease;
            animation: emeraldBreath 14s ease-in-out infinite;
            z-index: 0;
            display: block;
        }

        .hero .carousel-item.active > img,
        .hero .carousel-item.active .banner-img {
            opacity: 1;
            transform: scale(1);
        }

        /* ===== GREEN/BLUE GLASS OVERLAY ===== */
        .hero .carousel-item::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: 1;
            background: linear-gradient( 180deg, rgba(5, 22, 29, 0.18) 0%, rgba(7, 28, 33, 0.28) 28%, rgba(6, 30, 38, 0.42) 65%, rgba(3, 12, 18, 0.56) 100% );
            backdrop-filter: blur(1.2px);
            transition: background .35s ease, opacity .35s ease;
        }

        /* ===== LIGHT SWEEP ON WHOLE SLIDE ===== */
        .hero .carousel-item::after {
            content: "";
            position: absolute;
            top: 0;
            left: -34%;
            width: 9%;
            height: 100%;
            filter: blur(1.6px);
            background: linear-gradient( 120deg, rgba(255,255,255,0.00) 0%, rgba(255,255,255,0.12) 16%, rgba(255,255,255,0.58) 48%, rgba(255,255,255,0.18) 72%, rgba(255,255,255,0.00) 100% );
            opacity: 0;
            z-index: 2;
            animation: none;
            pointer-events: none;
        }

        .hero .carousel-item.active::after {
            animation: lightSweepBanner 4.2s ease-in-out;
            animation-delay: .08s;
        }

    /* ===== MOUSE HOVER LÀM BANNER SÁNG NHẸ ===== */
    .hero:hover .carousel-item.active::before {
        background: linear-gradient( 180deg, rgba(5, 22, 29, 0.10) 0%, rgba(7, 28, 33, 0.18) 28%, rgba(6, 30, 38, 0.28) 65%, rgba(3, 12, 18, 0.40) 100% );
    }

    .hero:hover .carousel-item.active > img,
    .hero:hover .carousel-item.active .banner-img {
        filter: brightness(1.06) saturate(1.08);
    }

    /* ===== LINK ===== */
    .hero .banner-slide-link,
    .hero .banner-slide-link:hover,
    .hero .banner-slide-link:focus,
    .hero .banner-slide-link:active {
        display: block;
        width: 100%;
        height: 100%;
        color: inherit;
        text-decoration: none;
        position: relative;
        z-index: 3;
    }

    /* ===== CAPTION ===== */
    .hero .carousel-caption {
        position: absolute;
        z-index: 3;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: min(92%, 1120px);
        text-align: center;
        opacity: 0;
        animation: captionFadeIn 1.7s ease-out forwards;
        animation-delay: 1.55s;
        background: none;
        padding: 0;
    }

    .hero .carousel-item.active .carousel-caption {
        animation: captionFadeIn 1.7s ease-out forwards;
        animation-delay: 1.55s;
    }

    /* Không dùng box */
    .hero .banner-caption-box {
        display: block;
        max-width: min(92%, 1020px);
        margin: 0 auto;
        padding: 0;
        background: none;
        border: 0;
        box-shadow: none;
        backdrop-filter: none;
    }

    /* ===== TITLE ===== */
    .hero .banner-caption-title,
    .hero .carousel-caption h1,
    .hero .carousel-caption h2,
    .hero .carousel-caption h3 {
        font-size: clamp(1.45rem, 1.95vw + .40rem, 3.15rem);
        font-weight: 900;
        color: #fff;
        line-height: 1.18;
        letter-spacing: -0.015em;
        margin: 0;
        position: relative;
        overflow: visible;
        text-shadow: 0 4px 10px rgba(0,0,0,0.52), 0 0 18px rgba(9, 42, 52, 0.34), 0 0 28px rgba(0, 0, 0, 0.12);
        transition: transform .28s ease, text-shadow .28s ease, opacity .28s ease;
        will-change: transform;
        padding-bottom: .12em;
    }

    .hero .banner-slide-link:hover .banner-caption-title,
    .hero .banner-slide-link:focus-visible .banner-caption-title {
        transform: none;
        text-shadow: 0 5px 12px rgba(0,0,0,0.54), 0 0 18px rgba(18, 92, 118, 0.26), 0 0 24px rgba(0, 0, 0, 0.14);
    }

    /* ===== LIGHT REFLECTION ON TITLE ===== */
    .hero .banner-caption-title::after,
    .hero .carousel-caption h1::after,
    .hero .carousel-caption h2::after,
    .hero .carousel-caption h3::after {
        content: "";
        position: absolute;
        top: -10%;
        left: -30%;
        width: 20%;
        height: 120%;
        transform: skewX(-14deg);
        background: linear-gradient( 120deg, rgba(255,255,255,0.00) 0%, rgba(255,255,255,0.10) 18%, rgba(255,255,255,0.42) 50%, rgba(255,255,255,0.10) 82%, rgba(255,255,255,0.00) 100% );
        opacity: 0;
        filter: blur(.8px);
        pointer-events: none;
        will-change: transform, left, opacity;
    }

    .hero .carousel-item.active .banner-caption-title::after,
    .hero .carousel-item.active .carousel-caption h1::after,
    .hero .carousel-item.active .carousel-caption h2::after,
    .hero .carousel-item.active .carousel-caption h3::after {
        animation: titleLightSweep 4.8s cubic-bezier(.22, .61, .36, 1) forwards;
        animation-delay: 2.55s;
    }

    /* ===== INDICATORS ===== */
    .hero .carousel-indicators {
        z-index: 4;
        bottom: 14px;
    }

        .hero .carousel-indicators [data-bs-target] {
            width: 12px;
            height: 12px;
            margin: 0 6px;
            border-radius: 50%;
            background-color: rgba(255,255,255,0.42);
            border: 1px solid rgba(255,255,255,0.28);
            opacity: 1;
            transition: transform .3s ease, background-color .3s ease, box-shadow .3s ease;
        }

        .hero .carousel-indicators .active {
            background-color: #fff;
            box-shadow: 0 0 10px rgba(180, 230, 255, 0.72);
            transform: scale(1.28);
        }

    /* ===== NAV ===== */
    .hero .carousel-control-prev,
    .hero .carousel-control-next {
        z-index: 4;
        width: 8%;
        opacity: .92;
    }

    .hero .carousel-control-prev-icon,
    .hero .carousel-control-next-icon {
        width: 2.7rem;
        height: 2.7rem;
        border-radius: 50%;
        background-color: rgba(0,0,0,.20);
        backdrop-filter: blur(2px);
        background-size: 52% 52%;
    }

    /* ===== ORANGE ACCENT LINES ===== */
    .hero::before,
    .hero::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient( 90deg, rgba(255,140,0,0.25) 0%, rgba(255,94,0,0.9) 45%, rgba(255,160,0,0.25) 100% );
        box-shadow: 0 1px 3px rgba(255,140,0,0.45), 0 0 10px rgba(255,100,0,0.30);
        z-index: 5;
    }

    .hero::before {
        top: 0;
    }

    .hero::after {
        bottom: 0;
    }

/* ===== ANIMATION ===== */
@keyframes captionFadeIn {
    0% {
        opacity: 0;
        transform: translate(-50%, -46%);
    }

    50% {
        opacity: .52;
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes emeraldBreath {
    0%, 100% {
        filter: brightness(100%) saturate(108%);
    }

    50% {
        filter: brightness(110%) saturate(120%);
    }
}

@keyframes lightSweepBanner {
    0% {
        left: -34%;
        opacity: 0;
        transform: scaleX(1.02);
    }

    8% {
        opacity: 0.12;
    }

    22% {
        left: -6%;
        opacity: 0.32;
    }

    38% {
        left: 18%;
        opacity: 0.56;
    }

    50% {
        left: 36%;
        opacity: 0.82;
        transform: scaleX(1);
    }

    60% {
        left: 48%;
        opacity: 0.92;
    }

    72% {
        left: 64%;
        opacity: 0.62;
    }

    86% {
        left: 86%;
        opacity: 0.24;
    }

    100% {
        left: 112%;
        opacity: 0;
        transform: scaleX(1.03);
    }
}

@keyframes titleLightSweep {
    0% {
        left: -30%;
        opacity: 0;
        transform: skewX(-14deg);
    }

    12% {
        opacity: 0.08;
    }

    28% {
        left: 2%;
        opacity: 0.20;
    }

    48% {
        left: 34%;
        opacity: 0.34;
    }

    64% {
        left: 56%;
        opacity: 0.26;
    }

    82% {
        left: 82%;
        opacity: 0.10;
    }

    100% {
        left: 112%;
        opacity: 0;
        transform: skewX(-14deg);
    }
}

/* ===== TABLET ===== */
@media (max-width: 992px) {
    .hero {
        height: clamp(280px, 46vh, 500px);
    }

        .hero .carousel-caption {
            width: min(92%, 900px);
        }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .hero {
        height: clamp(240px, 42vh, 360px);
    }

        .hero .carousel-caption {
            top: 50%;
            width: 92%;
        }

            .hero .banner-caption-title,
            .hero .carousel-caption h1,
            .hero .carousel-caption h2,
            .hero .carousel-caption h3 {
                font-size: clamp(1rem, 2.4vw + .3rem, 1.55rem);
                font-weight: 800;
                line-height: 1.24;
            }

        .hero .carousel-control-prev,
        .hero .carousel-control-next {
            width: 12%;
        }

        .hero .carousel-control-prev-icon,
        .hero .carousel-control-next-icon {
            width: 2rem;
            height: 2rem;
        }
}

@media (max-height: 800px) {
    .hero {
        height: min(52vh, 520px);
    }
}

@media (min-width: 1200px) {
    .hero {
        height: clamp(520px, 62vh, 860px);
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    .hero {
        height: auto;
        aspect-ratio: 16 / 9;
        max-height: 46vh;
    }

        .hero .carousel,
        .hero .carousel-inner,
        .hero .carousel-item {
            height: 100%;
        }

            .hero .carousel-item > img,
            .hero .carousel-item .banner-img {
                object-fit: contain;
                transform: none;
                animation: none;
                background: #09110d;
            }

            .hero .carousel-item.active > img,
            .hero .carousel-item.active .banner-img {
                transform: none;
            }
}
