/* ---------- mobile ---------- */

.carousel-module-wrap {
    margin-bottom: var(--space-xxxl);
}

.carousel-module-wrap .carousel-display {
    --carousel-gap: 16px;

    position: relative;
    width: 100%;
    margin: 0 auto;
    overflow: hidden; 
}

.carousel-module-wrap .carousel-track {
    display: flex;
    gap: var(--carousel-gap);
    transition: transform 0.4s ease-in-out;
    width: max-content; 
    will-change: transform;
}

.carousel-module-wrap .carousel-slide {
    flex: 0 0 calc(100vw - 64px); 
    width: calc(100vw - 64px);
    max-width: calc(100vw - 64px);
    background: #a6eeff;
    color: #000000;
    padding: 32px 24px;
    border-radius: 32px;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
    transition: opacity 0.4s ease;
}

.carousel-slide:not(.active) { opacity: 0.5; }
.carousel-slide.active { opacity: 1; }

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.carousel-controls button {
    padding: 1rem;
    cursor: pointer;
    background: #333333;
    color: white;
    border: none;
    border-radius: 4px;
}

.carousel-module-wrap .carousel-module-grid h2 {
    margin-bottom: 48px;
    text-align: center;
}

/* ---------- tablet ---------- */

@media screen and (min-width: 48rem) {
    .carousel-module-wrap .carousel-display {
        --carousel-gap: 32px;
    }

    .carousel-module-wrap .carousel-slide {
        flex: 0 0 calc(100vw - 256px); 
        width: calc(100vw - 256px);
        max-width: calc(100vw - 256px);
    }
}

/* ---------- laptop ---------- */

@media screen and (min-width: 80rem) {
    .carousel-module-wrap .carousel-display {
        --carousel-gap: 128px; 
    }

    .carousel-module-wrap .carousel-slide {
        flex: 0 0 calc(100vw - 66.66666vw + 64px); 
        width: calc(100vw - 66.66666vw + 64px);
        max-width: calc(100vw - 66.66666vw + 64px);
        padding: 3rem 6rem;
        row-gap: 2rem;
    }

    .carousel-controls {
        max-width: calc(33.33333vw + 128px + 32px + 4.5rem);
        display: flex;
        justify-content: space-between;
        position: absolute;
        top: calc(50% - 1.5rem);
        width: 100%;
        left: 0;
        right: 0;
        margin: 0 auto;
    }

    .carousel-controls button {
        width: 3rem;
        height: 3rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
}