/* ============================================================
   Home hero — fully responsive replacement for Revolution Slider.
   Media always covers its box (no gaps/letterboxing); typography is
   fluid via clamp() so nothing clips or leaves empty space at any width.
   ============================================================ */

.hero {
    position: relative;
    width: 100%;
    /* Sit behind the site's transparent header so the overlaid (white) logo + menu read
       against the hero instead of a blank bar. Media covers the full box (incl. behind the
       header); only the text content is padded down to clear it. */
    /* -2px overshoot: the header is ~1px taller than --cnvs-header-height (its border), so
       without this the body's white background shows as a 1px line above the hero. */
    margin-top: calc(-1 * var(--cnvs-header-height, 100px) - 2px);
    /* Fill the viewport on first load so the next section / white space isn't visible
       until the user scrolls (which is also when the header turns solid). */
    height: 100svh;
    min-height: 480px;
    padding-top: var(--cnvs-header-height, 100px);
    box-sizing: border-box;
    overflow: hidden;
    background-color: #0b2a4a;
    isolation: isolate;
    z-index: 0;
}

.hero__viewport {
    position: absolute;
    inset: 0;
}

/* Slides stacked; cross-fade between them */
.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .9s ease, visibility 0s linear .9s;
}

.hero__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    transition: opacity .9s ease;
}

/* Media: always cover the hero box */
.hero__media {
    position: absolute;
    inset: 0;
}

.hero__media-el {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Blue gradient overlay for text legibility (keeps the existing tinted look) */
.hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 38, 71, .35) 0%, rgba(8, 38, 71, .15) 35%, rgba(7, 31, 58, .72) 100%),
        linear-gradient(90deg, rgba(11, 64, 117, .55) 0%, rgba(11, 64, 117, .25) 100%);
}

/* Content: centered both axes, width-constrained so it never clips */
.hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(1.25rem, 5vw, 4rem);
}

.hero__content-inner {
    /* Definite width + stretched children so the heading and the description share the
       same left/right edges (otherwise the narrower description looks misaligned). */
    width: min(880px, 92%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: clamp(.6rem, 1.6vw, 1.15rem);
    color: #fff;
}

.hero__eyebrow {
    margin: 0;
    color: #fff;
    /* !important: override the theme's justify (centered by default; --tl overrides to left) */
    text-align: center !important;
    text-transform: uppercase;
    letter-spacing: .22em;
    font-size: clamp(.82rem, 1.5vw, 1.1rem);
    font-weight: 600;
    opacity: .92;
    text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

/* color set explicitly to override the theme's blue h1/heading colour.
   The heading text is always centered (within its block) even when the block itself
   sits bottom-right on large screens; the eyebrow/description keep their own alignment. */
.hero .hero__title {
    margin: 0;
    align-self: stretch;
    color: #fff;
    /* !important: the theme forces justify + a small font on content text (p) with higher
       specificity; the secondary slides render the heading as <p>, so force size too. */
    text-align: center !important;
    font-size: clamp(1.9rem, 4.8vw, 3.75rem) !important;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.01em;
    text-wrap: balance;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
}

.hero__desc {
    margin: 0;
    color: #fff;
    /* !important: override the theme's justify so the description is centered too */
    text-align: center !important;
    font-size: clamp(.95rem, 1.6vw, 1.18rem);
    line-height: 1.65;
    opacity: .95;
    text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}

/* Entrance animation for the active slide's content */
.hero__slide.is-active .hero__content-inner > * {
    animation: heroRise .7s cubic-bezier(.2, .7, .2, 1) both;
}

.hero__slide.is-active .hero__eyebrow { animation-delay: .05s; }
.hero__slide.is-active .hero__title { animation-delay: .15s; }
.hero__slide.is-active .hero__desc { animation-delay: .28s; }

@keyframes heroRise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Subtle Ken Burns zoom: the active slide's media eases from zoomed-in to out */
.hero__slide.is-active .hero__media-el {
    animation: heroKenBurns 9s ease-out both;
}

@keyframes heroKenBurns {
    from { transform: scale(1.1); }
    to { transform: scale(1); }
}

/* Prev / next arrows */
.hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: clamp(40px, 5vw, 56px);
    height: clamp(40px, 5vw, 56px);
    border: 0;
    border-radius: 50%;
    background: rgba(8, 38, 71, .35);
    backdrop-filter: blur(2px);
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.hero__nav:hover { background: rgba(8, 38, 71, .7); }
.hero__nav:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero__nav--prev { left: clamp(.5rem, 2vw, 1.5rem); }
.hero__nav--next { right: clamp(.5rem, 2vw, 1.5rem); }

.hero__nav::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 11px;
    border-top: 2px solid #fff;
    border-right: 2px solid #fff;
}

.hero__nav--prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.hero__nav--next::before { transform: translate(-70%, -50%) rotate(45deg); }

/* Dots */
.hero__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: clamp(1rem, 3vw, 2rem);
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: .6rem;
}

.hero__dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.hero__dot.is-active { background: #fff; transform: scale(1.15); }
.hero__dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Large screens: each slide gets its own position/alignment. Below this breakpoint the
   base rules keep everything centered (so it "ortalanır" when the site gets small). */
@media (min-width: 1200px) {
    .hero__content-inner { width: min(720px, 55%); }

    /* Statement slide (has a description): bottom-right corner, centered text */
    .hero__content--br {
        align-items: flex-end;
        justify-content: flex-end;
        padding-bottom: clamp(2.5rem, 8vh, 6rem);
        padding-right: clamp(2rem, 6vw, 6rem);
    }

    /* Eyebrow-led slide: top-left corner, left-aligned text, slides in from the right.
       Slides are absolutely positioned (full hero, behind the header), so the hero's
       padding-top doesn't apply here — clear the header with an explicit top padding. */
    .hero__content--tl {
        align-items: center;
        justify-content: flex-start;
        padding-left: clamp(2rem, 6vw, 6rem);
    }

    .hero__content--tl .hero__content-inner { text-align: left; }
    .hero .hero__content--tl .hero__eyebrow { text-align: left !important; }
    .hero .hero__content--tl .hero__title { text-align: left !important; }

    .hero__slide.is-active .hero__content--tl .hero__content-inner > * {
        animation: heroSlideInRight .8s cubic-bezier(.2, .7, .2, 1) both;
    }
}

@keyframes heroSlideInRight {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}

@media (max-width: 575.98px) {
    .hero__nav { display: none; }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .hero__slide,
    .hero__slide.is-active .hero__content-inner > *,
    .hero__slide.is-active .hero__media-el {
        transition: none;
        animation: none;
    }
}
