/* ===== Slideshow containers ===== */
.slideshow-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Section A: centered rectangle slideshow */
.splide.featured {
    position: relative;
    overflow: hidden;
    max-width: 900px;
    margin: 30px auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

/* Hide inherited pseudo-element overlay from bundle.css */
.splide.featured::before,
.splide.featured::after {
    display: none !important;
}

.splide.featured .slideshow-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

/* Section B: match the original video area */
#video-fade .video-bg {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 66.67%;
    /* 720/1080 = 2:3 aspect ratio */
    overflow: hidden;
}

#video-fade .video-bg .slideshow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Force full width breakout */
/* Force full width breakout */
#video-fade {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    max-width: 100vw;
    /* Ensure slideshow stays behind footer and content but visible */
    z-index: 0;
}

/* Ensure footer and intermediate sections stay on top of the slideshow breakout */
footer,
#footer,
#small-cta {
    position: relative;
    z-index: 10;
}

/* ===== Individual slides ===== */
.slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 800ms ease-in-out;
}

.slideshow-slide.active {
    opacity: 1;
}

/* ===== Ensure slideshow is always visible (WOW.js can hide parents) ===== */
.splide.featured,
.splide.featured .slideshow-container,
.splide.featured .slideshow-slide,
#video-fade,
#video-fade .video-bg,
#video-fade .video-bg .slideshow-container,
#video-fade .video-bg .slideshow-slide {
    visibility: visible !important;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .splide.featured .slideshow-container {
        aspect-ratio: 16 / 9;
    }

    .splide.featured {
        margin-left: 20px;
        margin-right: 20px;
    }
}

/* ===== Navigation arrows ===== */
.slideshow-arrows {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 10;
    display: flex;
    gap: 2px;
    background: rgba(18, 30, 52, 0.85);
    border-radius: 8px;
    padding: 4px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.slideshow-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #b0bec5;
    cursor: pointer;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    padding: 0;
}

.slideshow-arrow:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}


.slideshow-arrow svg {
    display: block;
}

/* ===== Slideshow Image Support ===== */
/* ===== Slideshow Image Support ===== */
#video-fade .slideshow-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    max-width: none !important;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    .slideshow-slide {
        transition: none !important;
    }
}

/* ===== Card Slideshow (Build Page) ===== */
.build-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.card-slideshow {
    position: relative;
    width: 100%;
    max-width: 520px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    margin: 0 auto 16px;
}

.card-slideshow .slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1000ms ease-in-out;
    background-color: #f0f0f0;
}

.card-slideshow .slideshow-slide.active {
    opacity: 1;
}

.card-slideshow .slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fix label positioning */
.build-card-row figcaption {
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
    display: block;
}

/* Responsive Behaviour */
@media (max-width: 900px) {
    .build-card-row {
        grid-template-columns: 1fr;
    }
}