/**
 * FIFE Page Hero — Elementor widget styles.
 *
 * Scoped entirely under .fife-elementor-page-hero so this can never
 * collide with page-the-team.php's ".team-hero" (or any of the ~10
 * other near-identical per-page hero variants: .meal-hero, .impact-hero,
 * .projects-hero, .strategic-hero, .wwd-hero, .ev-hero, .research-hero,
 * .ow-hero, .eth-hero, .event-hero) — none of that markup or CSS is
 * touched. Literal values below are copied from page-the-team.php's own
 * inline <style> block (its real base styles — style.css only carries a
 * shared mobile-only override patch for all of those page heroes), not
 * computed from style.css custom properties, so this widget has no live
 * dependency on it.
 *
 * Full-bleed hero by design, same as the Hero Carousel widget — not
 * included in fife-elementor-common.css's max-width wrapper group.
 */

.fife-elementor-page-hero {
    --fife-page-hero-subtitle-width: 42rem;
    position: relative;
    overflow: hidden;
    min-height: 440px;
    padding: 8rem 1.5rem 5rem;
}

/*
 * ROOT-CAUSE FIX for the hairline white border previously seen around
 * this widget's background image (was masked with `inset: -1px` overscan
 * — a symptom cover-up, not a fix, and one that could still fail at
 * certain zoom levels/device pixel ratios since 1px of overscan doesn't
 * bound an arbitrary sub-pixel error).
 *
 * The old markup nested two independently-sized boxes: a wrapper div
 * (position:absolute; inset:0) containing an <img width:100% height:100%>.
 * Each box computes its own pixel size from the (often fractional, since
 * this hero's height is content-driven) parent height, and the two
 * computations can round to different device pixels during paint/
 * compositing — that divergence is the actual gap. The fix is structural:
 * the <img> itself is now the position:absolute; inset:0 element (see
 * class-fife-widget-page-hero.php's render()) — one rounding computation
 * instead of two chained ones, not a bigger overscan.
 */
.fife-elementor-page-hero__bg {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fife-elementor-page-hero__overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4), transparent);
}

.fife-elementor-page-hero__content {
    position: relative;
    z-index: 10;
    max-width: 1280px;
    margin-inline: auto;
}

.fife-elementor-page-hero--align-center .fife-elementor-page-hero__content {
    text-align: center;
}

.fife-elementor-page-hero__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
}

.fife-elementor-page-hero--align-center .fife-elementor-page-hero__breadcrumb {
    justify-content: center;
}

.fife-elementor-page-hero__breadcrumb a,
.fife-elementor-page-hero__breadcrumb span {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.fife-elementor-page-hero__breadcrumb a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.fife-elementor-page-hero__breadcrumb a:hover,
.fife-elementor-page-hero__breadcrumb a:focus-visible {
    color: #fff;
}

.fife-elementor-page-hero__breadcrumb a:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
    border-radius: 2px;
}

.fife-elementor-page-hero__breadcrumb-separator {
    color: rgba(255, 255, 255, 0.6);
}

.fife-elementor-page-hero__badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 0 1.5rem;
}

.fife-elementor-page-hero--align-center .fife-elementor-page-hero__badge {
    justify-content: center;
}

.fife-elementor-page-hero__badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.fife-elementor-page-hero__badge-icon svg {
    width: 2rem;
    height: 2rem;
    color: #fff;
}

.fife-elementor-page-hero__badge-label {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.875rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.fife-elementor-page-hero__heading {
    margin: 0 0 1.5rem;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .fife-elementor-page-hero__heading {
        font-size: 3.75rem;
    }
}

.fife-elementor-page-hero__subtitle {
    margin: 0;
    max-width: var(--fife-page-hero-subtitle-width);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    line-height: 1.625;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.fife-elementor-page-hero--align-center .fife-elementor-page-hero__subtitle {
    margin-inline: auto;
}

.fife-elementor-page-hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.fife-elementor-page-hero--align-center .fife-elementor-page-hero__buttons {
    justify-content: center;
}

.fife-elementor-page-hero__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fife-elementor-page-hero__button svg {
    width: 16px;
    height: 16px;
}

.fife-elementor-page-hero__button--primary {
    background-color: #933183;
    color: #fff;
    border: 2px solid #933183;
}

.fife-elementor-page-hero__button--primary:hover,
.fife-elementor-page-hero__button--primary:focus-visible {
    background-color: #7a2770;
    border-color: #7a2770;
    color: #fff;
}

.fife-elementor-page-hero__button--outline {
    background-color: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.fife-elementor-page-hero__button--outline:hover,
.fife-elementor-page-hero__button--outline:focus-visible {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    color: #fff;
}

/**
 * Tablet step, interpolated between the desktop default (min-height:440px,
 * padding:8rem/5rem) and the mobile override below (320px, 5.5rem/3rem) —
 * previously absent, so tablet viewports snapped straight to one or the
 * other. 380px matches this widget's own section_min_height_tablet default
 * (see class-fife-widget-page-hero.php).
 */
@media (max-width: 1023px) and (min-width: 768px) {
    .fife-elementor-page-hero {
        min-height: 380px;
        padding: 6rem 1.5rem 4rem;
    }
}

/**
 * Reproduces style.css's shared mobile-only override pass for this
 * hero family (search "team-hero" there) — same effective values,
 * self-contained here instead of depending on that global patch.
 */
@media (max-width: 767px) {
    .fife-elementor-page-hero {
        min-height: 320px;
        padding-top: 5.5rem;
        padding-bottom: 3rem;
    }

    .fife-elementor-page-hero__heading {
        font-size: clamp(1.5rem, 6vw, 2.25rem);
        line-height: 1.2;
        word-break: break-word;
    }

    .fife-elementor-page-hero__subtitle {
        font-size: 0.9rem;
        line-height: 1.6;
        max-width: 100%;
    }

    .fife-elementor-page-hero__badge-label {
        font-size: 0.72rem;
    }

    .fife-elementor-page-hero__badge {
        gap: 0.75rem;
    }

    .fife-elementor-page-hero__breadcrumb a,
    .fife-elementor-page-hero__breadcrumb span {
        font-size: 0.78rem;
    }
}

/*
 * Full Viewport Height / Entrance Animation — both purely additive,
 * opt-in modifier classes (see class-fife-widget-page-hero.php's
 * render()). Neither class is ever added unless the corresponding
 * control is explicitly turned on, so existing instances are unaffected.
 */
.fife-elementor-page-hero--full-height {
    min-height: 100vh;
    min-height: 100svh;
}

.fife-elementor-page-hero--anim-fade-in .fife-elementor-page-hero__content,
.fife-elementor-page-hero--anim-fade-up .fife-elementor-page-hero__content,
.fife-elementor-page-hero--anim-zoom-in .fife-elementor-page-hero__content {
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
    animation-fill-mode: both;
}

.fife-elementor-page-hero--anim-fade-in .fife-elementor-page-hero__content {
    animation-name: fife-page-hero-fade-in;
}

.fife-elementor-page-hero--anim-fade-up .fife-elementor-page-hero__content {
    animation-name: fife-page-hero-fade-up;
}

.fife-elementor-page-hero--anim-zoom-in .fife-elementor-page-hero__content {
    animation-name: fife-page-hero-zoom-in;
}

@keyframes fife-page-hero-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fife-page-hero-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fife-page-hero-zoom-in {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .fife-elementor-page-hero__breadcrumb a {
        transition-duration: 0.01ms !important;
    }

    .fife-elementor-page-hero--anim-fade-in .fife-elementor-page-hero__content,
    .fife-elementor-page-hero--anim-fade-up .fife-elementor-page-hero__content,
    .fife-elementor-page-hero--anim-zoom-in .fife-elementor-page-hero__content {
        animation: none !important;
    }
}
