/* =============================================================
   ACF Section 2 Slider
   ============================================================= */

/* -- Section wrapper ----------------------------------------- */
.acf-slider-section {
    width: 100%;
    overflow: hidden;
}

/* -- Outer carousel shell ------------------------------------ */
.acf-slider {
    position: relative;
    width: 100%;
}

/* -- Viewport: clips the track ------------------------------ */
.acf-slider__viewport {
    overflow: hidden;
    width: 100%;
}

/* -- Track: holds all slides side-by-side ------------------- */
.acf-slider__track {
    display: flex;
    gap: 10px;
    transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* -- Individual slide --------------------------------------- */
.acf-slider__slide {
    flex-shrink: 0;
    min-width: 0;
    box-sizing: border-box;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #222;
}

/*
   The background image lives on a pseudo-element so we can zoom it
   with transform: scale() — transitioning background-size from 'cover'
   to a percentage value does not work reliably across browsers.
*/
.acf-slider__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: inherit;      /* picks up the inline style set in PHP */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform 0.5s ease;
    z-index: 0;
}

.acf-slider__slide.has-bg-image:hover::before {
    transform: scale(1.08);         /* zoom IN — adjust to taste */
}

/* -- Slide body --------------------------------------------- */
.acf-slider__body {
    position: relative;             /* sit above the bg */
    z-index: 1;
    width: 100%;
    padding: 32px 24px;
    text-align: center;
    color: #fff;
}

.acf-slider__headline {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.3;
    color: #fff;
}

.acf-slider__content {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 14px;
    color: #fff;
}

.acf-slider__content p:last-child {
    margin-bottom: 0;
}

.acf-slider__content * {
    color: #fff;                    /* override any inline WYSIWYG colours */
}

.acf-slider__link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    text-decoration: underline;
}

/* -- Prev / Next buttons ------------------------------------ */
.acf-slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
    line-height: 1;
    font-size: 1.2rem;
    padding: 0;
}

.acf-slider__btn:hover,
.acf-slider__btn:focus-visible {
    background: rgba(0, 0, 0, 0.8);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.acf-slider__btn--prev {
    left: 10px;
}

.acf-slider__btn--next {
    right: 10px;
}

/* -- Pagination dots ---------------------------------------- */
.acf-slider__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 0 0 8px;
    flex-wrap: wrap;
}

.acf-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid currentColor;
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.2s ease;
    opacity: 0.45;
}

.acf-slider__dot.is-active,
.acf-slider__dot:hover {
    background: currentColor;
    opacity: 1;
    transform: scale(1.2);
}

.acf-slider__dot:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* =============================================================
   Responsive overrides
   ============================================================= */

/* Tablet / Mobile: JS handles flex-basis; these are fallback hints only */
@media (max-width: 600px) {
    .acf-slider__btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
}
