/**
 * EBA Hero Slider — modern auto-play hero with multiple slides.
 */

.eba-wrapper.eba-hslider {
    position: relative;
    width: 100%;
    /* Min-height only — overridable via Elementor control. Hero grows if content is taller. */
    min-height: 820px;
    height: auto;
    overflow: hidden;
    isolation: isolate;
    background: var(--eba-charcoal);
    color: #ffffff;
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .eba-wrapper.eba-hslider {
        min-height: 720px;
    }
}

@media (max-width: 768px) {
    .eba-wrapper.eba-hslider {
        min-height: 620px;
    }
}

/* ========== Slide track (background images) ========== */
.eba-hslider__track {
    position: absolute;
    inset: 0;
}

.eba-hslider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.9s ease, visibility 0s 0.9s;
    margin: 0;
}

.eba-hslider__slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.9s ease, visibility 0s 0s;
}

/* Slide variant */
.eba-hslider--slide .eba-hslider__slide {
    transform: translateX(40px);
    transition: opacity 0.7s ease, transform 0.9s var(--eba-ease-out), visibility 0s 0.9s;
}
.eba-hslider--slide .eba-hslider__slide.is-active {
    transform: translateX(0);
    transition: opacity 0.7s ease, transform 0.9s var(--eba-ease-out), visibility 0s 0s;
}

/* Zoom (Ken Burns) variant */
.eba-hslider--zoom .eba-hslider__slide.is-active .eba-hslider__bg {
    animation: eba-hslider-zoom 12s ease-out forwards;
}

@keyframes eba-hslider-zoom {
    0%   { transform: scale(1); }
    100% { transform: scale(1.12); }
}

.eba-hslider__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 8s ease-out;
}

/* Overlay — matches reference vercel.app gradient: from-charcoal/95 via-charcoal/80 to-charcoal/40
   Dark on the left where text sits, fading to image-visible on the right. */
.eba-hslider__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(15, 23, 42, 0.80) 50%,
        rgba(15, 23, 42, 0.40) 100%
    );
    pointer-events: none;
}

/* ========== Content ========== */
/* Outer flex shell — full width, centers content via container below */
.eba-hslider__content {
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    /* No horizontal padding here — container handles it */
    padding: 6rem 0 8rem;
}

/* Container — boxed width, matches reference Tailwind .container.mx-auto.px-4
   max-width: 1280px (Tailwind xl breakpoint container default).
   This is the wrapper that stays centered on large monitors instead of stretching. */
.eba-hslider__container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;       /* px-4 — Tailwind reference */
    position: relative;
}
@media (min-width: 640px)  { .eba-hslider__container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .eba-hslider__container { padding: 0 2rem; } }

.eba-hslider__content-inner {
    max-width: 768px;       /* matches reference .max-w-3xl */
    width: 100%;
    margin: 0;
    position: relative;
}

.eba-hslider--align-center .eba-hslider__content { justify-content: center; text-align: center; }
.eba-hslider--align-center .eba-hslider__content-inner { margin: 0 auto; }
.eba-hslider--align-center .eba-hslider__actions { justify-content: center; }
.eba-hslider--align-center .eba-hslider__trust { justify-content: center; }

.eba-hslider--align-right .eba-hslider__content { justify-content: flex-end; text-align: right; }
.eba-hslider--align-right .eba-hslider__content-inner { margin-left: auto; }
.eba-hslider--align-right .eba-hslider__actions { justify-content: flex-end; }

/* Copy block — only one visible at a time */
.eba-hslider__copy {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity 0.6s var(--eba-ease-out), transform 0.7s var(--eba-ease-out), visibility 0s 0.7s;
    pointer-events: none;
}

.eba-hslider__copy.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.6s var(--eba-ease-out) 0.15s, transform 0.7s var(--eba-ease-out) 0.15s;
    pointer-events: auto;
}

/* ========== Eyebrow Badge ========== */
.eba-hslider__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--eba-radius-full);
    background: rgba(212, 162, 76, 0.15);
    border: 1.5px solid rgba(212, 162, 76, 0.4);
    color: #e0b96b;
    font-family: var(--eba-font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: none;
    margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: eba-fade-up 0.6s var(--eba-ease-out) 0.2s both;
}

.eba-hslider__eyebrow svg { color: currentColor; flex-shrink: 0; }

/* ========== Heading ========== */
/* Matches reference vercel.app: Cormorant Garamond 700 (font-bold), responsive
   text-3xl → 4xl → 5xl → 6xl scale (30/36/48/60px). Width respects container
   so text wraps naturally at .max-w-3xl (768px) just like the reference. */
.eba-hslider__heading {
    font-family: var(--eba-font-heading);
    font-size: 1.875rem;       /* 30px — text-3xl mobile */
    line-height: 1.1;
    color: #ffffff;
    font-weight: 700;          /* matches reference font-bold */
    letter-spacing: -0.02em;
    margin: 0 0 clamp(1.25rem, 2vw, 1.75rem);
    animation: eba-fade-up 0.7s var(--eba-ease-out) 0.3s both;
    /* Auto-balance lines (Chrome 114+, Firefox 121+, Safari 17.5+).
       Fallback for older browsers: heading wraps greedily — admin can press
       Enter in the heading textarea to force a specific break point. */
    text-wrap: balance;
    text-wrap-style: balance;
    width: 100%;
    max-width: 100%;
    white-space: normal;
    /* Ensure block-level for balance to work */
    display: block;
}
@media (min-width: 640px)  { .eba-hslider__heading { font-size: 2.25rem; } }   /* sm:text-4xl 36px */
@media (min-width: 768px)  { .eba-hslider__heading { font-size: 3rem; } }      /* md:text-5xl 48px */
@media (min-width: 1024px) { .eba-hslider__heading { font-size: 3.75rem; } }   /* lg:text-6xl 60px */

/* Content stays boxed at .eba-hslider__container (max 1280px centered).
   Inner copy max-width is independently controllable via Elementor Layout control. */

.eba-hslider__accent {
    font-style: italic;
    background: linear-gradient(135deg, #e0b96b 0%, #d4a24c 50%, #b58834 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    font-weight: 700;            /* matches heading bold so accent doesn't appear thinner */
    position: relative;
    /* Keep multi-word accents together as one unbreakable token.
       Example: "Emotional Clarity" stays on one line — the natural wrap
       happens AFTER the accent block, not inside it. */
    white-space: nowrap;
    display: inline-block;
}

/* ========== Description ========== */
.eba-hslider__description {
    font-size: clamp(1.0625rem, 1vw + 0.5rem, 1.25rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
    max-width: 56ch;
    animation: eba-fade-up 0.7s var(--eba-ease-out) 0.4s both;
}

.eba-hslider--align-center .eba-hslider__description { margin-left: auto; margin-right: auto; }

/* ========== Buttons ========== */
.eba-hslider__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    animation: eba-fade-up 0.7s var(--eba-ease-out) 0.5s both;
}

/* Reference button spec from emotionalacademy.vercel.app DevTools:
   h-12 (48px) · rounded-lg (8px) · px-8 (32px) · gap-2 (8px) · font-medium (500)
   shadow-sm · transition-all duration-200 · text-sm md:text-base
   bg-primary text-charcoal · hover:bg-primary/90 · [&_svg]:size-4 */
.eba-wrapper .eba-hslider__btn,
a.eba-hslider__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;                              /* gap-2 */
    height: 48px;                          /* h-12 */
    padding: 0 32px;                       /* px-8 — no vertical padding, height handles it */
    border-radius: 8px;                    /* rounded-lg */
    font-family: var(--eba-font-body);
    font-size: 0.875rem;                   /* text-sm — bumps to text-base at md */
    font-weight: 500;                      /* font-medium */
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;             /* duration-200 */
    border: 1px solid transparent;
    letter-spacing: 0.01em;
    white-space: nowrap;
    background-image: none;
    line-height: 1;
}
@media (min-width: 768px) {
    .eba-wrapper .eba-hslider__btn,
    a.eba-hslider__btn { font-size: 1rem; }  /* md:text-base */
}

.eba-wrapper .eba-hslider__btn--primary,
a.eba-hslider__btn--primary {
    background: #d4a24c;                   /* bg-primary (gold) */
    color: #0f172a;                        /* text-charcoal */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);  /* shadow-sm */
}

.eba-wrapper .eba-hslider__btn--primary:hover,
a.eba-hslider__btn--primary:hover {
    /* Darker gold on hover so the button doesn't appear to lighten */
    background: #b58834;                   /* gold-dark — visually richer than transparency */
    color: #0f172a;
    box-shadow: 0 4px 12px rgba(212, 162, 76, 0.35);
}

.eba-hslider__btn--primary svg {
    transition: transform 0.2s ease;
    color: currentColor;
    stroke: currentColor;
    width: 16px;                           /* size-4 */
    height: 16px;
    flex-shrink: 0;
}
.eba-hslider__btn--primary:hover svg { transform: translateX(4px); }

.eba-wrapper .eba-hslider__btn--secondary,
a.eba-hslider__btn--secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

.eba-wrapper .eba-hslider__btn--secondary:hover,
a.eba-hslider__btn--secondary:hover {
    /* Subtle white overlay — readable but not washed out */
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.85);
    color: #ffffff;
}

.eba-hslider__btn--secondary svg {
    color: currentColor;
    stroke: currentColor;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentColor;
}

/* ========== Trust Badges ========== */
.eba-hslider__trust {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 2.5rem);
    margin-top: clamp(2rem, 4vw, 3rem);
    padding-top: clamp(1.5rem, 3vw, 2rem);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    animation: eba-fade-up 0.7s var(--eba-ease-out) 0.6s both;
    align-items: center;
}

.eba-hslider__trust-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.01em;
}

.eba-hslider__trust-item svg {
    color: #e0b96b;
    flex-shrink: 0;
}

/* ========== Arrows ========== */
.eba-hslider__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: var(--eba-radius-full);
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.2s var(--eba-ease);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0;
}

.eba-hslider__arrow svg { color: currentColor; }

.eba-hslider__arrow:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.eba-hslider__arrow:focus-visible {
    outline: 2px solid #e0b96b;
    outline-offset: 4px;
}

.eba-hslider__arrow--prev { left: clamp(1rem, 2.5vw, 2rem); }
.eba-hslider__arrow--next { right: clamp(1rem, 2.5vw, 2rem); }

/* ========== Pagination Dots ========== */
.eba-hslider__dots {
    position: absolute;
    bottom: clamp(1.5rem, 3vw, 2.5rem);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    align-items: center;
    padding: 8px 14px;
    background: rgba(15, 23, 42, 0.25);
    border-radius: var(--eba-radius-full);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.eba-hslider__dot {
    width: 10px;
    height: 10px;
    border-radius: var(--eba-radius-full);
    background: rgba(255, 255, 255, 0.4);
    border: 0;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s var(--eba-ease);
}

.eba-hslider__dot:hover { background: rgba(255, 255, 255, 0.7); }

.eba-hslider__dot.is-active {
    background: #e0b96b;
    width: 32px;
    border-radius: var(--eba-radius-full);
}

/* ========== Progress Bar ========== */
.eba-hslider__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 5;
    overflow: hidden;
}

.eba-hslider__progress-fill {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #e0b96b 0%, #d4a24c 100%);
    width: 0%;
    transition: width 0.1s linear;
    transform-origin: left;
    box-shadow: 0 0 8px rgba(212, 162, 76, 0.4);
}

.eba-hslider.is-paused .eba-hslider__progress-fill {
    transition: none;
}

/* Mobile vertical position — applied only on mobile via media query */
@media (max-width: 768px) {
    .eba-hslider--mvp-flex-start .eba-hslider__content { align-items: flex-start !important; }
    .eba-hslider--mvp-center      .eba-hslider__content { align-items: center !important; }
    .eba-hslider--mvp-flex-end    .eba-hslider__content { align-items: flex-end !important; }
}

/* ========== Responsive ========== */
/* TABLET + MOBILE — force center alignment regardless of desktop setting */
@media (max-width: 1024px) {
    .eba-hslider__arrow { width: 44px; height: 44px; }

    .eba-hslider__content {
        justify-content: center !important;
        text-align: center !important;
    }
    .eba-hslider__content-inner {
        margin: 0 auto !important;
        text-align: center !important;
    }
    .eba-hslider__copy.is-active {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .eba-hslider__heading {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100%;
    }
    .eba-hslider__description {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .eba-hslider__actions {
        justify-content: center !important;
    }
    .eba-hslider__trust {
        justify-content: center !important;
        align-items: center !important;
    }
    .eba-hslider__trust-item { justify-content: center; }
}

@media (max-width: 768px) {
    .eba-hslider__heading {
        font-size: clamp(1.875rem, 6vw + 0.5rem, 3rem);
    }
    .eba-hslider__description {
        font-size: 1rem;
    }
    /* Mobile button — keeps 48px height but slightly tighter padding */
    .eba-hslider__btn { padding: 0 24px; font-size: 0.875rem; }
    .eba-hslider__trust {
        gap: 0.5rem;
        flex-direction: column;
        max-width: 100%;
    }
    .eba-hslider__trust-item { font-size: 0.8125rem; }

    /* Hide arrows on mobile — dots + swipe handle navigation */
    .eba-hslider__arrow {
        display: none !important;
    }

    /* Stack buttons full-width */
    .eba-hslider__actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 14px;
    }
    .eba-hslider__btn {
        width: 100%;
        justify-content: center;
        padding: 0 20px;
    }

    /* Trust badges divider line — full width */
    .eba-hslider__trust {
        width: 100%;
        padding-top: 1.5rem;
        margin-top: 1.5rem;
    }

    /* Hide pagination dots placement — keep visible at bottom */
    .eba-hslider__dots { bottom: 1rem; }
}

@media (max-width: 480px) {
    .eba-hslider__btn { font-size: 0.8125rem; padding: 0 18px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
    .eba-hslider__bg,
    .eba-hslider__copy,
    .eba-hslider__heading,
    .eba-hslider__description,
    .eba-hslider__actions,
    .eba-hslider__trust,
    .eba-hslider__eyebrow {
        animation: none !important;
        transition: opacity 0.2s !important;
    }
}
