/* ==========================================================================
   FRONTPAGE SPLIDE — view-scoped overrides for the .splide--view--frontpage
   carousel. Keep selectors scoped so article-page splide (article.css) and
   any other Splide instances are unaffected.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Allow the splide and its slides to shrink below the lead image's
   intrinsic 1200px width. Without this, CSS Grid's default min-width:auto
   on the 1fr column lets the image's natural width push the track (and
   the next arrow) past the viewport on narrower screens.
   -------------------------------------------------------------------------- */
.view-id-frontpage,
.view-id-frontpage .view-content,
.splide--view--frontpage,
.splide--view--frontpage .splide__track,
.splide--view--frontpage .splide__slide {
    min-width: 0;
}

/* --------------------------------------------------------------------------
   Lead image — uniform 8:5. Pairs with the `frontpage_lead` image style
   (focal_point_scale_and_crop @ 1200x750) on the article featured display.
   -------------------------------------------------------------------------- */
.splide--view--frontpage .splide__slide .image-container > a {
    display: block;
    aspect-ratio: 8 / 5;
    overflow: hidden;
}

.splide--view--frontpage .splide__slide .image-container > a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --------------------------------------------------------------------------
   Bigger, higher-contrast arrows.
   Vendor splide positions arrows absolutely with top:50% / translateY(-50%)
   and left/right:1em — leave that intact, only resize and restyle.
   -------------------------------------------------------------------------- */
.splide--view--frontpage .splide__arrow {
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    opacity: 1;
    transition: background-color 0.2s ease;
}

.splide--view--frontpage .splide__arrow:hover,
.splide--view--frontpage .splide__arrow:focus {
    background: rgba(0, 0, 0, 0.8);
}

.splide--view--frontpage .splide__arrow:disabled {
    opacity: 0.4;
}

.splide--view--frontpage .splide__arrow svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

/* --------------------------------------------------------------------------
   Pagination — give the dots breathing room below the slide.
   -------------------------------------------------------------------------- */
.splide--view--frontpage .splide__pagination {
    position: static;
    margin-top: 0.75rem;
    padding: 0;
}

.splide--view--frontpage .splide__pagination__page {
    width: 10px;
    height: 10px;
    margin: 0 4px;
}

.splide--view--frontpage .splide__pagination__page.is-active {
    background: var(--color-primary, #b22234);
    transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   Mobile — smaller but still tappable.
   -------------------------------------------------------------------------- */
@media screen and (max-width: 768px) {
    .splide--view--frontpage .splide__arrow {
        width: 44px;
        height: 44px;
    }

    .splide--view--frontpage .splide__arrow svg {
        width: 22px;
        height: 22px;
    }
}
