/* Card slider block */

.card-slider {
    padding-top: 0;
    padding-bottom: var(--section-spacing);
    overflow: hidden;
}

/* Navigation: prev arrow, counter, next arrow */
.card-slider__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.card-slider__counter {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    min-width: 60px;
    text-align: center;
}

.card-slider .swiper-button-disabled {
    opacity: .25;
    pointer-events: none;
}

/* Slides */
.card-slider__swiper {
    width: 100%;
}

.card-slider .swiper-slide {
    height: auto;
}

.card-slider__item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-slider__item-image {
    display: block;
    margin-bottom: 20px;
}

.card-slider__item-image .landscape {
    border-radius: 8px;
}

.card-slider__item-title {
    margin-top: 0;
    margin-bottom: 10px;
}

.card-slider__item-text {
    margin-top: 0;
    margin-bottom: 10px;
}

.card-slider__item-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.card-slider__item-link {
    align-self: flex-start;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--blue);
    text-decoration: none;
}

/* The shifting arrow is the hover affordance; no underline. */
.card-slider__item-link:hover,
.card-slider__item-link:focus {
    color: var(--blue);
    text-decoration: none;
}

.card-slider__item-link .material-symbols-outlined {
    font-size: 18px;
    transition: transform .25s ease;
}

.card-slider__item-link:hover .material-symbols-outlined {
    transform: translateX(3px);
}

@media (min-width: 768px) {
    .card-slider__nav {
        gap: 16px;
        margin-bottom: 40px;
    }
}

/* Block editor preview only (.acf-block-preview is ACF's wrapper). Swiper JS
   never runs in the editor, so the slides fall back to full width and only one
   is visible. Lay them out as a static 3-up row instead. */

/* The block is alignfull and bleeds past the editor canvas, which would clip
   the first card. Match the container so all three sit in view. */
.acf-block-preview .card-slider .card-slider__swiper {
    max-width: 1210px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.acf-block-preview .card-slider .swiper-wrapper {
    gap: 20px;
}

.acf-block-preview .card-slider .swiper-slide {
    flex: 0 0 auto;
    width: calc((100% - 40px) / 3);
}

/* Skip the loop clones so the preview starts at the first real card. */
.acf-block-preview .card-slider .swiper-slide[aria-hidden="true"] {
    display: none;
}
