/*
 * FIFE Hero Carousel — Elementor widget styles.
 * Scoped entirely under .fife-elementor-hero so it never touches the
 * legacy .hero-carousel-centered rules in style.css and is safe to run
 * alongside them, including multiple widget instances on one page.
 */

.fife-elementor-hero,
.fife-elementor-hero *,
.fife-elementor-hero *::before,
.fife-elementor-hero *::after {
    box-sizing: border-box;
}

.fife-elementor-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    background: #120411;
    padding: 6rem 0 5rem;
}

/*
 * ROOT-CAUSE FIX for the hairline white border previously seen around
 * this widget's slide images. The old markup chained THREE independently
 * -sized boxes: .fife-hero__bg (inset:0) > .fife-hero__bg-slide (inset:0)
 * > <img width:100% height:100%> — three separate percentage-relative
 * size computations, each capable of rounding to a different device
 * pixel during paint on a hero whose height is content-driven/viewport-
 * relative (fractional CSS px). That chained divergence is the actual
 * gap, not padding/display/object-fit in isolation.
 *
 * Fix: the .fife-hero__bg wrapper is removed entirely (.fife-hero__bg-
 * slide is now a direct child of .fife-elementor-hero, see render() in
 * class-fife-widget-hero-carousel.php), and the <img> itself is now
 * position:absolute; inset:0 instead of width:100%/height:100% — down
 * from three chained roundings to two, with no overscan/hack anywhere.
 */
.fife-hero__bg-slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fife-hero__bg-slide.is-active {
    opacity: 1;
}

.fife-hero__bg-slide-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.fife-hero__overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(180deg, rgba(17, 4, 17, 0.55) 0%, rgba(17, 4, 17, 0.35) 28%, rgba(17, 4, 17, 0.72) 100%);
}

.fife-hero__content {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.fife-hero__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(24px);
    pointer-events: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fife-hero__slide.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.fife-hero__slide-inner {
    --fife-hero-align: center;
    --fife-hero-gap: 1rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: var(--fife-hero-align, center);
    display: flex;
    flex-direction: column;
    gap: var(--fife-hero-gap, 1rem);
}

.fife-elementor-hero__breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    align-self: var(--fife-hero-align, center);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.72);
}

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

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

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

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

.fife-hero__eyebrow {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: hsla(310, 58%, 35%, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    align-self: var(--fife-hero-align, center);
}

.fife-hero__heading {
    margin: 0;
    font-size: clamp(2rem, 5vw, 4.75rem);
    line-height: 1.05;
    color: #fff;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.fife-hero__description {
    margin: 0;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.fife-hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: var(--fife-hero-align, center);
}

.fife-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    padding: 0.75rem 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 9999px;
    border: 2px solid transparent;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.fife-hero__btn--primary {
    background: #933183;
    border-color: #933183;
    color: #fff;
}

.fife-hero__btn--primary:hover,
.fife-hero__btn--primary:focus-visible {
    background: #7a2a6d;
    border-color: #7a2a6d;
    transform: scale(1.05);
}

.fife-hero__btn--outline {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.fife-hero__btn--outline:hover,
.fife-hero__btn--outline:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.fife-hero__btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.fife-hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 9999px;
    color: #fff;
    cursor: pointer;
    z-index: 20;
    transition: background-color 0.2s ease, transform 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.fife-hero__nav:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-50%) scale(1.08);
}

.fife-hero__nav:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.fife-hero__nav svg {
    width: 14px;
    height: 14px;
}

.fife-hero__nav--prev {
    left: 1rem;
}

.fife-hero__nav--next {
    right: 1rem;
}

@media (min-width: 1023px) {
    .fife-hero__nav--prev {
        left: 1.5rem;
    }

    .fife-hero__nav--next {
        right: 1.5rem;
    }
}

.fife-hero__dots {
    position: absolute;
    left: 50%;
    bottom: 1.75rem;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.fife-hero__dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.3s ease, background-color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.fife-hero__dot.is-active {
    width: 34px;
    background: #fff;
}

.fife-hero__dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

@media (max-width: 767px) {
    .fife-elementor-hero {
        padding: 0;
    }

    .fife-hero__heading {
        font-size: clamp(1.75rem, 7.5vw, 2.5rem);
    }

    .fife-hero__cta {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .fife-hero__btn {
        width: auto;
        min-width: 160px;
        max-width: 220px;
    }
}

/*
 * Transition modes — additive, opt-in via .fife-elementor-hero--transition-*
 * (see class-fife-widget-hero-carousel.php's render(); default is
 * "fade", which matches the existing .fife-hero__bg-slide crossfade
 * rules above exactly, so existing instances are completely unaffected).
 */

/* Slide: horizontal translateX instead of opacity crossfade. */
.fife-elementor-hero--transition-slide .fife-hero__bg-slide {
    opacity: 1;
    transform: translateX(100%);
    transition: transform ease;
}

.fife-elementor-hero--transition-slide .fife-hero__bg-slide.is-active {
    transform: translateX(0);
}

.fife-elementor-hero--transition-slide .fife-hero__bg-slide.is-prev {
    transform: translateX(-100%);
}

/* Ken Burns: slow continuous zoom+pan on the active slide's image. */
.fife-elementor-hero--transition-kenburns .fife-hero__bg-slide.is-active .fife-hero__bg-slide-img {
    animation: fife-hero-kenburns 12s ease-in-out infinite alternate;
}

@keyframes fife-hero-kenburns {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.12) translate(-1.5%, -1.5%); }
}

/* Zoom: a one-time zoom-out on becoming active, distinct from Ken Burns' continuous pan. */
.fife-elementor-hero--transition-zoom .fife-hero__bg-slide-img {
    transform: scale(1.15);
    transition: transform 1.2s ease-out;
}

.fife-elementor-hero--transition-zoom .fife-hero__bg-slide.is-active .fife-hero__bg-slide-img {
    transform: scale(1);
}

/* Progress bar — off by default (no markup rendered unless enabled). */
.fife-hero__progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 4;
}

.fife-hero__progress-bar {
    height: 100%;
    width: 0%;
    background: #fff;
    transform-origin: left;
}

.fife-hero__progress-bar.is-animating {
    transition: width linear;
    width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .fife-hero__bg-slide,
    .fife-hero__bg-slide-img,
    .fife-hero__slide,
    .fife-hero__dot,
    .fife-hero__btn,
    .fife-hero__nav,
    .fife-hero__progress-bar {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .fife-hero__slide {
        transform: none !important;
    }

    .fife-elementor-hero--transition-kenburns .fife-hero__bg-slide.is-active .fife-hero__bg-slide-img,
    .fife-elementor-hero--transition-zoom .fife-hero__bg-slide-img {
        animation: none !important;
        transform: none !important;
    }
}
