/* =====================================================
   CAROUSEL CONTAINER
===================================================== */

.carousel {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    position: relative;
}


/* =====================================================
   TRACK
===================================================== */

.carousel-track {
    display: flex;
    height: 100%;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}


/* =====================================================
   SLIDES
===================================================== */

.slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    box-sizing: border-box;
    padding: 0 7px;

    display:flex;
    align-items:center;
    justify-content:center;

    overflow:hidden;
}


/* =====================================================
   IMAGES
===================================================== */

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 6px;

    transition: transform 0.35s ease;
    transform-origin: center;

    box-shadow: 0 6px 14px rgba(0,0,0,0.25);
}


/* =====================================================
   CINEMATIC HOVER OVERLAY
===================================================== */

.slide::after {

    content: "";
    position: absolute;
    inset: 0;
    border-radius: 6px;

    background:
        linear-gradient(
            to bottom,
            rgba(0,0,0,0.15),
            rgba(0,0,0,0.35)
        );

    opacity: 0;
    transition: opacity .35s ease;

}

.slide:hover::after {
    opacity: 1;
}

.slide:hover img {
    transform: scale(1.04);
}


/* =====================================================
   DOTS
===================================================== */

.carousel-dots {
    text-align: center;
    margin-top: -40px;
    margin-bottom: 50px;
    position: relative;
    z-index: 10;
}

.carousel-dots span {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    background: #8c8468;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.25s ease;
}

.carousel-dots span.active {
    background: #d2b48c;
    transform: scale(1.18);
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 768px) {

    .carousel {
        max-width: 100%;
        aspect-ratio: 16 / 9;
        margin-bottom: -8px;
    }

    .slide {
        flex: 0 0 100%;
        padding: 0;
    }

    .carousel-dots {
        margin-top: -40px;
        margin-bottom: 50px;
    }

}


/* =====================================================
   DESKTOP (3 IMAGES)
===================================================== */

@media (min-width: 1100px) {

    .carousel {
        aspect-ratio: 21 / 8;
        max-width: 1250px;
        margin-top: 0;

        box-shadow:
            0 18px 30px rgba(0,0,0,0.30),
            0 4px 10px rgba(0,0,0,0.20);
    }

    .slide {
        flex: 0 0 33.3333%;
        padding: 0 7px;
    }

    /* subtle edge fade */

    .carousel::before {

        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: 3;

        background:
            linear-gradient(
                to right,
                rgba(0,0,0,0.20) 0%,
                rgba(0,0,0,0.0) 12%,
                rgba(0,0,0,0.0) 88%,
                rgba(0,0,0,0.20) 100%
            );

    }

}


/* =====================================================
   FULLSCREEN MODAL
===================================================== */

.carousel-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.carousel-modal img {
    max-width: 92%;
    max-height: 92%;
    box-shadow: 0 0 40px rgba(0,0,0,0.6);
    border-radius: 8px;
}