.carousel-shell {
    width: 100%;
    margin: 0 auto;
    padding: 0 10px;
}

/* Banner area */
.banner-carousel {
    aspect-ratio: 1024 / 360;
    position: relative;
    overflow: hidden;
    background: #f2f2f2;
}

.banner-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;

    opacity: 0;
    transition: opacity 900ms ease;
    will-change: opacity;
    user-select: none;
    pointer-events: none;
}

.banner-layer.is-visible {
    opacity: 1;
}

/* =========================
   Bottom row (MOBILE FIRST)
   ========================= */
.carousel-bottom {
    display: grid;
    grid-template-columns: 1fr; /* 1 item per row on mobile */
    gap: 2px;
    height: 220px;
}

/* by default show only the active item on mobile */
.carousel-item {
    min-height: 56px;
    border: 1px solid #f1f1f1;
    background: #e8e9ea;
    padding: 25px;
    display: none;
    text-align: left;
    position: relative;
    transition: all 300ms ease;
}

.carousel-item.is-active {
    display: block; /* only one visible on mobile */
    border: none;
    background-color: black;
    color: #fff;
}

.carousel-item:not(.is-active):hover {
    background-color: #cdd0d2;
    cursor: pointer;
}

.carousel-item h3 {
    text-transform: uppercase;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 700;
    min-height: 0; /* mobile: don't force heights */
}

.carousel-item p {
    font-size: 16px;
    min-height: 0; /* mobile: don't force heights */
}

.btn-banner {
    background-color: inherit;
    cursor: pointer;
    color: var(--dark);
    border-radius: 4px;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 0px;
    width: 100%;
    border: 1px solid var(--dark);
    text-transform: uppercase;
    margin-top: 18px;
    max-width: 300px;
    transition: all 300ms ease;
}

.carousel-item.is-active .btn-banner {
    background-color: black;
    color: white;
    border: 1px solid white;
}

.carousel-item.is-active::after {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid black; /* same as bubble bg */
    filter: drop-shadow(0px -3px 3px white);
}

.carousel-item:not(.is-active):hover .btn-banner {
    background-color: black;
    color: white;
}

/* =========================
   >= 600px (optional step)
   ========================= */
@media (min-width: 600px) {
    .btn-banner {
        margin-top: 26px;
    }
}

/* =========================
   >= 900px (DESKTOP)
   ========================= */
@media (min-width: 900px) {
    .carousel-bottom {
        grid-template-columns: repeat(4, 1fr);
    }

    .carousel-bottom {
        height: auto;
    }
    .carousel-item {
        display: block; /* show all 4 cards on desktop */
        padding: 25px 35px;
    }

    .carousel-item h3 {
        min-height: 55px;
        margin-bottom: 0;
    }

    .carousel-item p {
        min-height: 95px;
    }

    .btn-banner {
        margin-top: 40px;
    }

    .carousel-item-content {
        text-align: left;
    }
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;

    width: 44px;
    height: 44px;
    border-radius: 999px;

    border: 1px solid rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;

    display: grid;
    place-items: center;
    cursor: pointer;

    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.carousel-prev {
    left: 14px;
}
.carousel-next {
    right: 14px;
}

/* Make sure shell is positioning context */
.carousel-shell {
    position: relative;
}

/* Hide arrows on desktop */
@media (min-width: 900px) {
    .carousel-nav {
        display: none;
    }
}

/* Better touch behavior */
.banner-carousel {
    touch-action: pan-y; /* allow vertical scroll, we handle horizontal */
}
