/* ===================================================
   Amenities Carousel Section
   =================================================== */

body {
    font-family: polymath-display, sans-serif;
}

/* Section */
.amenities-section {
    background-color: var(--color-primary-dark, #3d1a1a);
    padding: 24px 0;
    overflow: hidden;
}

/* Carousel Wrapper */
.amenities-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Track */
.amenities-carousel__track {
    display: flex;
    gap: 32px;
    padding: 0 24px;
    min-width: max-content;
    /* Ping-pong marquee: scroll to the end, then reverse back.
       --marquee-distance is the overflow width, set by script.js. */
    --marquee-distance: 0px;
    animation: amenities-marquee var(--marquee-duration, 30s) ease-in-out infinite alternate;
    will-change: transform;
}

/* Pause the drift on hover (desktop) */
.amenities-carousel:hover .amenities-carousel__track {
    animation-play-state: paused;
}

@keyframes amenities-marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-1 * var(--marquee-distance))); }
}

/* Respect users who prefer no motion */
@media (prefers-reduced-motion: reduce) {
    .amenities-carousel__track {
        animation: none;
    }
}

/* Individual Item */
.amenities-carousel__item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-width: 100px;
    flex-shrink: 0;
}

/* Icon Container */
.amenities-carousel__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FAFAFA;
    opacity: 80%;
}

/* Icon Image */
.amenities-carousel__icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

/* Label */
.amenities-carousel__label {
    color: #FAFAFA;
    opacity: 80%;
    font-size: 1rem;
    font-weight: 300;
    text-align: center;
    white-space: nowrap;
}

/* ===================================================
   Tablet and up (min-width: 768px)
   =================================================== */
@media (min-width: 768px) {
    .amenities-carousel__track {
        gap: 48px;
        padding: 0 40px;
    }

    .amenities-carousel__item {
        flex-direction: column;
        min-width: 120px;
    }

    .amenities-carousel__icon img {
        width: 40px;
        height: 40px;
    }

    .amenities-carousel__label {
        font-size: 1.2rem;
    }
}

/* ===================================================
   Desktop and up (min-width: 992px)
   =================================================== */
@media (min-width: 992px) {
    .amenities-section {
        padding: 32px 0;
    }

    .amenities-carousel {
        overflow: hidden;
    }

    .amenities-carousel__track {
        gap: 200px;
        padding: 0 60px;
    }

    .amenities-carousel__item {
        min-width: 140px;
    }

    .amenities-carousel__icon img {
        width: 44px;
        height: 44px;
    }

    .amenities-carousel__label {
        font-size: 1.75rem;
    }
}
