/* layout.css */
.snap-container {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; 
    -ms-overflow-style: none; 
    -webkit-overflow-scrolling: touch;
}

.snap-container::-webkit-scrollbar { display: none; }

section {
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.container {
    max-width: var(--container-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    z-index: 5;
}

.site-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: url("../assets/images/manchester-3d-printer-farm-background.webp") center/cover no-repeat;
    opacity: 0.2; 
    transition: opacity var(--transition-smooth);
    pointer-events: none;
}

.site-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15,15,15,0.2), var(--bg-dark));
}

.site-bg.active { opacity: 0.6; }

@media (max-width: 768px) {
    .container { padding: 0 var(--space-md); }
}

/* ========================================= */
/* 🎯 GLOBAL CARD STYLING                    */
/* ========================================= */

.card-style {
    position: relative;
    z-index: 1; 
    border-radius: var(--radius-lg); 
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
    transform: translateZ(0); 
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.card-style:hover,
.card-style:focus-within {
    border-color: var(--primary);
    background: var(--glass-bg-hover);
}

.step-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: transparent;
    -webkit-text-stroke: 1px var(--glass-border);
    margin-bottom: var(--space-xs);
    transition: var(--transition-smooth);
    line-height: 1;
}

.card-style:hover .step-number,
.card-style:focus-within .step-number {
    -webkit-text-stroke: 1px var(--primary);
    text-shadow: 0 0 10px var(--primary), 0 0 25px var(--primary);
}

.carousel-dots {
    display: none; 
}

/* 📱 IPAD, FOLDABLE, & MOBILE CAROUSEL FIX */
@media (max-width: 1024px) {
    .swipe-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: var(--space-md, 20px);
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }

    .swipe-grid::-webkit-scrollbar { 
        display: none; 
    }

    .swipe-grid .card-style {
        scroll-snap-stop: always;
        scroll-snap-align: center;
        /* 🎯 THE FIX: Force the card to be exactly 100% of the viewport width */
        flex: 0 0 100%; 
        max-width: 100%;
    }

    .card-style.active {
        border-color: var(--primary);
        background: var(--glass-bg-hover);
    }

    .card-style.active .step-number {
        -webkit-text-stroke: 1px var(--primary);
        text-shadow: 0 0 10px var(--primary), 0 0 25px var(--primary);
    }

    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 15px;
        width: 100%;
    }

    .dot {
        width: 8px;
        height: 8px;
        background: var(--glass-border);
        border-radius: 50%;
        transition: var(--transition-smooth);
    }

    .dot.active {
        background: var(--primary);
        box-shadow: 0 0 10px var(--primary); 
        width: 24px;
        border-radius: var(--radius-pill);
    }
}