/* ============================================ */
/*              Hero Carousel                   */
/* Component: template-parts/components/hero-carousel.php
/* ============================================ */

/* Mobile - 360px */
@media only screen and (min-width: 0px) {
    .hero-carousel {
        position: relative;
        width: 100%;
        height: 100vh;
        min-height: 50rem;
        display: flex;
        align-items: flex-end;
        overflow: hidden;
    }

    .hero-carousel::before {
        content: "";
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1;
        background:
            linear-gradient(
                to right,
                rgba(10, 22, 40, 0.88) 0%,
                rgba(10, 22, 40, 0.65) 45%,
                rgba(10, 22, 40, 0.15) 75%,
                rgba(10, 22, 40, 0.05) 100%
            ),
            linear-gradient(
                to top,
                rgba(10, 22, 40, 0.6) 0%,
                transparent 50%
            );
    }

    .hero-carousel .cs-container {
        width: 100%;
        max-width: 100%;
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0 1.5rem 4.5rem;
        gap: 2rem;
    }

    .hero-carousel .cs-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        max-width: 47.5rem;
    }

    .hero-carousel .cs-lia-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.375rem;
        background: rgba(201, 168, 76, 0.12);
        border: 0.0625rem solid rgba(201, 168, 76, 0.35);
        border-radius: 100px;
        padding: 0.3125rem 0.75rem 0.3125rem 0.5rem;
        margin-bottom: 0.75rem;
    }

    .hero-carousel .cs-lia-dot {
        width: 0.375rem;
        height: 0.375rem;
        border-radius: 50%;
        background: var(--signingGold);
        flex-shrink: 0;
    }

    .hero-carousel .cs-lia-text {
        font-family: var(--headerFont);
        font-size: 0.625rem;
        font-weight: 500;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.7);
    }

    .hero-carousel .cs-title {
        font-family: var(--headerFont);
        font-size: clamp(2.4rem, 8vw, 5.5rem);
        line-height: 1.05em;
        color: var(--white);
        margin: 0 0 1rem;
    }

    .hero-carousel .cs-title em {
        font-style: normal;
        color: var(--signingGold);
    }

    .hero-carousel .cs-text {
        font-family: var(--bodyFont);
        font-size: clamp(0.9rem, 1.4vw, 1.05rem);
        font-weight: 300;
        line-height: 1.65;
        color: rgba(255, 255, 255, 0.75);
        max-width: 30rem;
        margin: 0;
    }

    .hero-carousel .cs-cta-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .hero-carousel .cs-stats {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.25rem;
    }

    .hero-carousel .cs-stat {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .hero-carousel .cs-stat-number {
        font-family: var(--headerFont);
        font-size: clamp(2.5rem, 6vw, 5rem);
        font-weight: 600;
        color: var(--white);
        line-height: 1em;
    }

    .hero-carousel .cs-stat-label {
        font-family: var(--headerFont);
        font-size: 0.625rem;
        font-weight: 400;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.4);
    }

    .hero-carousel .cs-stat-divider {
        width: 2.5rem;
        height: 0.0625rem;
        background: rgba(255, 255, 255, 0.15);
    }

    .hero-carousel .cs-scroll {
        display: none;
    }

    .hero-carousel .cs-backgrounds {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 0;
    }

    .hero-carousel .cs-bg {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        visibility: hidden;
        transition:
            opacity 1s cubic-bezier(0.4, 0, 0.2, 1),
            visibility 1s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .hero-carousel .cs-bg.active {
        opacity: 1;
        visibility: visible;
    }

    .hero-carousel .cs-bg.active img {
        transform: scale(1.05);
    }

    .hero-carousel .cs-bg img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
        display: block;
        transform: scale(1);
        transition: transform 7s ease-out;
    }

    .hero-carousel .cs-progress-track {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 0.1875rem;
        background: rgba(255, 255, 255, 0.12);
        z-index: 10;
    }

    .hero-carousel .cs-progress-bar {
        height: 100%;
        width: 0%;
        background: linear-gradient(
            to right,
            rgba(201, 168, 76, 0.5),
            rgba(201, 168, 76, 1)
        );
    }
}

/* Tablet - 768px */
@media only screen and (min-width: 48rem) {
    .hero-carousel .cs-container {
        padding: 0 2.5rem 4.5rem;
    }

    .hero-carousel .cs-stats {
        flex-direction: row;
        align-items: flex-start;
        gap: 2.5rem;
    }

    .hero-carousel .cs-stat-divider {
        width: 0.0625rem;
        height: 3.75rem;
        align-self: center;
    }
}

/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
    .hero-carousel::before {
        background:
            linear-gradient(
                to right,
                rgba(10, 22, 40, 0.88) 0%,
                rgba(10, 22, 40, 0.65) 45%,
                rgba(10, 22, 40, 0.45) 75%,
                rgba(10, 22, 40, 0.75) 100%
            ),
            linear-gradient(
                to top,
                rgba(10, 22, 40, 0.6) 0%,
                transparent 50%
            );
    }

    .hero-carousel .cs-container {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        padding: 0 6vw 5rem;
        gap: 5rem;
    }

    .hero-carousel .cs-content {
        flex: 1;
    }

    .hero-carousel .cs-stats {
        flex-direction: column;
        align-items: flex-end;
        text-align: right;
        gap: 1.75rem;
        flex-shrink: 0;
        padding-bottom: 0.25rem;
    }

    .hero-carousel .cs-stat {
        align-items: flex-end;
    }

    .hero-carousel .cs-stat-divider {
        width: 100%;
        height: 0.0625rem;
    }

    .hero-carousel .cs-scroll {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        position: absolute;
        bottom: 2.5rem;
        left: 50%;
        transform: translateX(-50%);
        z-index: 3;
    }

    .hero-carousel .cs-scroll-label {
        font-family: var(--headerFont);
        font-size: 0.5625rem;
        font-weight: 500;
        letter-spacing: 0.22em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.4);
    }

    .hero-carousel .cs-scroll-line {
        width: 0.0625rem;
        height: 2.5rem;
        background: rgba(255, 255, 255, 0.2);
        position: relative;
        overflow: hidden;
    }

    .hero-carousel .cs-scroll-line::after {
        content: "";
        position: absolute;
        top: -100%;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.7);
        animation: hero-scroll-drop 1.8s ease infinite;
        animation-delay: 1.2s;
    }

    @keyframes hero-scroll-drop {
        0%   { top: -100%; }
        100% { top: 100%;  }
    }
}

/* Mobile only — max 480px */
@media only screen and (max-width: 30rem) {
    .hero-carousel {
        min-height: 100svh;
    }

    .hero-carousel .cs-container {
        padding: 0 1rem 4rem;
    }

    .hero-carousel .cs-title {
        font-size: clamp(2rem, 9vw, 2.6rem);
    }

    .hero-carousel .cs-stats {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.75rem;
    }

    .hero-carousel .cs-stat-number {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .hero-carousel .cs-stat-label {
        font-size: 0.5rem;
        white-space: nowrap;
    }

    .hero-carousel .cs-stat-divider {
        display: block;
        width: 0.0625rem;
        height: 1.75rem;
        align-self: center;
    }
}