/**
 * Image slider — Figma "slider" 3286:3211.
 * Tokens mirror the Figma variables; height, speed and shadow come from the
 * Slider settings as CSS variables on the section.
 */
.bdfad-slider {
    --bdfad-slider-accent: #efb14d;              /* Text/Text Accent */
    --bdfad-slider-segment: rgba(255, 255, 255, 0.2); /* White/white-alpha-20 */
    --bdfad-slider-text: #fff;
    --bdfad-slider-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100%;
    height: var(--bdfad-slider-height, 721px);
    margin: 0;
    background: #000;
    color: var(--bdfad-slider-text);
    font-family: var(--bdfad-slider-font);
}

.bdfad-slider *,
.bdfad-slider *::before,
.bdfad-slider *::after {
    box-sizing: border-box;
}

.bdfad-slider__track {
    position: absolute;
    inset: 0;
}

.bdfad-slider__slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Cover the whole slide, centered both ways. Forced, because theme and
   builder image rules (height: auto, max-width, object-fit) otherwise win. */
.bdfad-slider .bdfad-slider__image {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: cover !important;
    object-position: 50% 50% !important;
    transform: none !important;
}

/* ── Fade ──────────────────────────────────────────────────────────────── */
.bdfad-slider--fade .bdfad-slider__slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--bdfad-slider-speed, 800ms) ease, visibility 0s linear var(--bdfad-slider-speed, 800ms);
}

.bdfad-slider--fade .bdfad-slider__slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transition: opacity var(--bdfad-slider-speed, 800ms) ease, visibility 0s linear 0s;
}

/* ── Slide ─────────────────────────────────────────────────────────────── */
.bdfad-slider--slide .bdfad-slider__track {
    display: flex;
    transition: transform var(--bdfad-slider-speed, 800ms) ease-in-out;
}

.bdfad-slider--slide .bdfad-slider__slide {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    height: 100%;
}

/* ── Content: the "shadow" gradient, indicator space and text ─────────── */
.bdfad-slider__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 40px;                                   /* Space/space-3xl */
    width: 880px;
    max-width: 100%;
    height: 100%;
    padding: 0 40px;
    background: linear-gradient(to right, rgba(0, 0, 0, var(--bdfad-slider-shadow, 0.8)), rgba(0, 0, 0, 0));
}

/* Reserves the indicator's column; the real indicator sits above all slides
   so it doesn't fade out and back in with each one. */
.bdfad-slider__indicator-space {
    flex: 0 0 auto;
    width: 5px;
    height: 230px;
    zoom: var(--bdfad-zoom, 1);
}

/* Desktop/Body/Large */
.bdfad-slider .bdfad-slider__text {
    width: 580px;
    max-width: 100%;
    margin: 0;
    padding: 0;
    color: var(--bdfad-slider-text) !important;
    font-family: var(--bdfad-slider-font);
    font-size: 30px;
    font-weight: 400;
    line-height: 1.5;
    text-box: trim-both cap alphabetic;
    zoom: var(--bdfad-zoom, 1);
}

/* ── Indicator ─────────────────────────────────────────────────────────── */
/* Offsets are divided by the zoom because CSS zoom scales an element's own
   offsets too; this keeps the bars exactly over the reserved 40px column. */
.bdfad-slider > .bdfad-slider__indicator {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: calc(40px / var(--bdfad-zoom, 1));
    transform: translateY(-50%);
}

.bdfad-slider__indicator {
    display: flex;
    flex-direction: column;
    gap: 8px;                                    /* Space/space-s */
    width: 5px;
    height: 230px;
    zoom: var(--bdfad-zoom, 1);
}

.bdfad-slider__segment {
    position: relative;
    flex: 1 0 0;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--bdfad-slider-segment);
    cursor: pointer;
    transition: background-color var(--bdfad-slider-speed, 800ms) ease;
}

/* Widen the click target without changing the 5px bar. */
.bdfad-slider__segment::before {
    content: "";
    position: absolute;
    inset: 0 -12px;
}

.bdfad-slider__segment.is-active {
    background: var(--bdfad-slider-accent);
}

.bdfad-slider__segment:focus-visible {
    outline: 2px solid var(--bdfad-slider-text);
    outline-offset: 4px;
}

.bdfad-slider-empty {
    padding: 16px;
    border: 1px dashed #aba9a6;
}

/* ── Mobile ────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .bdfad-slider {
        height: var(--bdfad-slider-height-mobile, 560px);
    }

    /* Text sits low over a bottom-up shadow, so faces in the photo stay clear. */
    .bdfad-slider__content {
        align-items: flex-end;
        gap: 24px;
        width: 100%;
        padding: 0 16px 40px;
        background: linear-gradient(to top, rgba(0, 0, 0, var(--bdfad-slider-shadow, 0.8)), rgba(0, 0, 0, 0) 70%);
    }

    .bdfad-slider__indicator-space,
    .bdfad-slider__indicator {
        height: 120px;
        zoom: var(--bdfad-zoom-mobile, 1);
    }

    .bdfad-slider > .bdfad-slider__indicator {
        top: auto;
        bottom: calc(40px / var(--bdfad-zoom-mobile, 1));
        left: calc(16px / var(--bdfad-zoom-mobile, 1));
        transform: none;
    }

    .bdfad-slider .bdfad-slider__text {
        font-size: 24px;                         /* Desktop/Body/Medium */
        zoom: var(--bdfad-zoom-mobile, 1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bdfad-slider--fade .bdfad-slider__slide,
    .bdfad-slider--fade .bdfad-slider__slide.is-active,
    .bdfad-slider--slide .bdfad-slider__track,
    .bdfad-slider__segment {
        transition: none;
    }
}
