/* ==========================================================================
   home-banner.css
   Premium asymmetric-split hero (v2). Scoped under `.hero2` to guarantee
   no bleed into the rest of the site. RTL-aware via the page's dir="rtl".
   ========================================================================== */

.hero2 {
    --hero2-navy:        #14254A;
    --hero2-navy-2:      #0b1530;
    --hero2-gold:        #FFCD35;
    --hero2-gold-soft:   rgba(255, 205, 53, 0.18);

    /* Light scheme — mirrors the original template (smoke bg + dark navy text). */
    --hero2-bg:          #eeeeee;
    --hero2-text:        var(--hero2-navy);
    --hero2-text-muted:  rgba(20, 37, 74, 0.72);
    --hero2-line:        rgba(20, 37, 74, 0.14);

    --hero2-pad-y:       clamp(1rem, 1.5vw + 0.25rem, 2rem);
    --hero2-pad-x:       clamp(1rem,  2vw + 0.5rem, 3rem);
    --hero2-separator-h: 28px;
    --hero2-separator-gap: clamp(0.85rem, 1.1vw, 1.25rem);

    --hero2-ease:        cubic-bezier(.22, 1, .36, 1);
    --hero2-dur-slide:   520ms;
    --hero2-dur-burns:   6000ms;

    position: relative;
    isolation: isolate;
    color: var(--hero2-text);
    background: var(--hero2-bg);
    overflow: hidden;
}

/* Decorative pattern — same image the original hero used, rendered at full
   opacity over the smoke background for the same look as the old design. */
.hero2::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("/assets/img/new-image/banner-bg.webp");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
}

.hero2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    display: block;
    width: 100%;
    height: 28px;
    background-image: url("/assets/img/new-image/image-2.svg");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center center;
    z-index: 2;
    pointer-events: none;
}

/* ==========================================================================
   Track + slides (CSS scroll-snap powers the swipe; JS does autoplay/dots).
   ========================================================================== */

.hero2__viewport {
    position: relative;
    z-index: 1;
    overflow: hidden;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.hero2__track {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    /* All slides occupy the same grid cell -> track auto-sizes to the tallest slide. */
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
}

.hero2__slide {
    grid-column: 1 / -1;
    grid-row: 1 / -1;
    width: 100%;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 520ms cubic-bezier(.22, 1, .36, 1),
                visibility 0s linear 520ms;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(1rem, 3vw, 3rem);
    padding:
        var(--hero2-pad-y)
        var(--hero2-pad-x)
        calc(var(--hero2-pad-y) + var(--hero2-separator-h) + var(--hero2-separator-gap));
    overflow: hidden;
}

.hero2__slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 520ms cubic-bezier(.22, 1, .36, 1),
                visibility 0s linear 0s;
    z-index: 2;
}

/* ==========================================================================
   Image pane — full-bleed image with gradient overlay (option 2).
   On desktop sits in the right grid column; on mobile spans full width.
   ========================================================================== */

.hero2__image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    overflow: hidden;
    background: var(--hero2-navy-2);
}

.hero2__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Subtle Ken Burns — slow zoom while slide is active. */
    transform: scale(1);
    transition: transform var(--hero2-dur-burns) linear;
    will-change: transform;
}

.hero2__slide.is-active .hero2__image img {
    transform: scale(1.06);
}

/* Gradient overlay — subtle, just enough for depth on the light scheme. */
.hero2__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg,
            rgba(20, 37, 74, 0.25) 0%,
            rgba(20, 37, 74, 0.00) 45%,
            rgba(11, 21, 48, 0.20) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ==========================================================================
   Content stack — eyebrow + title + description + CTA.
   ========================================================================== */

.hero2__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(0.75rem, 1vw + 0.5rem, 1.25rem);
    text-align: start;
    /* Initial state for entrance animation. JS toggles .is-active. */
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition:
        opacity   var(--hero2-dur-slide) var(--hero2-ease),
        transform var(--hero2-dur-slide) var(--hero2-ease);
    transition-delay: 120ms;
}

.hero2__slide.is-active .hero2__content {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.hero2__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: clamp(0.75rem, 0.4vw + 0.7rem, 0.875rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--hero2-navy);
    opacity: 0.78;
}

.hero2__eyebrow::before {
    content: "";
    width: 28px;
    height: 2px;
    background: var(--hero2-gold);
    display: inline-block;
    border-radius: 2px;
}

.hero2__title {
    font-size: clamp(1.5rem, 2vw + 1rem, 2.75rem);
    line-height: 1.2;
    font-weight: 800;
    margin: 0;
    color: var(--hero2-text);
    text-wrap: balance;
}

.hero2__description {
    font-size: clamp(0.95rem, 0.4vw + 0.85rem, 1.0625rem);
    line-height: 1.7;
    color: var(--hero2-text-muted);
    margin: 0;
    max-width: 62ch;
}

/* ==========================================================================
   CTA button — adapts label/icon via the Razor helper.
   ========================================================================== */

.hero2__cta {
    --cta-bg: var(--hero2-navy);
    --cta-fg: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    background: var(--cta-bg);
    color: var(--cta-fg);
    font-weight: 700;
    font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1rem);
    text-decoration: none;
    line-height: 1;
    box-shadow: 0 12px 28px -14px rgba(20, 37, 74, 0.55);
    transition:
        transform 280ms var(--hero2-ease),
        box-shadow 280ms var(--hero2-ease),
        background 280ms var(--hero2-ease);
    margin-top: 0.5rem;
}

.hero2__cta:hover,
.hero2__cta:focus-visible {
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 18px 34px -12px rgba(20, 37, 74, 0.6);
    background: #1a2f5e;
    color: var(--cta-fg);
    text-decoration: none;
}

.hero2__cta:focus-visible {
    outline: 2px solid var(--hero2-gold);
    outline-offset: 3px;
}

.hero2__cta i {
    font-size: 0.9em;
}

/* ==========================================================================
   Controls — dots + arrows.
   ========================================================================== */

.hero2__controls {
    position: absolute;
    inset-inline-start: var(--hero2-pad-x);
    inset-block-end: calc(var(--hero2-separator-h) + var(--hero2-separator-gap));
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 4;
}

.hero2__dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hero2__dot {
    width: 32px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--hero2-line);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 240ms var(--hero2-ease);
}

.hero2__dot:hover { background: rgba(20, 37, 74, 0.22); }

.hero2__dot[aria-current="true"] {
    background: rgba(20, 37, 74, 0.18);
}

/* Progress fill on the active dot. */
.hero2__dot[aria-current="true"]::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block: 0;
    width: 100%;
    background: var(--hero2-navy);
    transform-origin: inset-inline-start center;
    animation: hero2-fill var(--hero2-autoplay, 6000ms) linear forwards;
}

.hero2.is-paused .hero2__dot[aria-current="true"]::after {
    animation-play-state: paused;
}

@keyframes hero2-fill {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* Compact "n / total" counter (mobile <400px). */
.hero2__counter {
    display: none;
    color: var(--hero2-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.hero2__arrows {
    display: inline-flex;
    gap: 0.5rem;
    margin-inline-start: auto;
}

.hero2__arrow {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--hero2-line);
    background: rgba(255, 255, 255, 0.6);
    color: var(--hero2-navy);
    cursor: pointer;
    transition: background 240ms var(--hero2-ease), border-color 240ms var(--hero2-ease);
    backdrop-filter: blur(4px);
}

.hero2__arrow:hover {
    background: var(--hero2-navy);
    color: #ffffff;
    border-color: var(--hero2-navy);
}

.hero2__arrow:focus-visible {
    outline: 2px solid var(--hero2-gold);
    outline-offset: 2px;
}

/* SR-only utility (live region). */
.hero2__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Responsive — stacked layout below 768px.
   ========================================================================== */

@media (max-width: 991.98px) {
    .hero2__slide {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding-block:
            clamp(1.25rem, 4vw, 2rem)
            calc(clamp(1.25rem, 4vw, 2rem) + var(--hero2-separator-h) + var(--hero2-separator-gap));
        align-content: start;
    }

    .hero2__image {
        aspect-ratio: 16 / 9;
        order: -1;
    }
}

@media (max-width: 575.98px) {
    .hero2__cta {
        width: 100%;
        justify-content: center;
    }

    .hero2__controls {
        position: static;
        margin-top: 1.25rem;
        padding: 0 var(--hero2-pad-x);
        justify-content: space-between;
    }
}

@media (max-width: 399.98px) {
    .hero2__dots { display: none; }
    .hero2__counter { display: inline-block; }
}

@media (max-width: 767.98px) {
    .hero2 {
        --hero2-separator-h: 19px;
    }

    .hero2::after {
        height: 19px;
    }
}

/* ==========================================================================
   Reduced motion — kill animations, leave layout intact.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .hero2__track { scroll-behavior: auto; }
    .hero2__image img { transition: none; transform: none !important; }
    .hero2__content {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero2__cta { transition: none; }
    .hero2__cta:hover { transform: none; }
    .hero2__dot[aria-current="true"]::after { animation: none; transform: scaleX(1); }
}
