/*
|--------------------------------------------------------------------------
| Qorezo Composable Rendering Layer
|--------------------------------------------------------------------------
| Component: Amenities Section Variants
| Scope: Marketing Homepage Composer Only (.home-composer)
|
| Contract Rules:
| - MUST declare explicit position: relative on the variant namespace root
|   prior to applying position: absolute on children.
| - MUST NOT declare raw aesthetic tokens (#hex, color names, literal fonts).
| - MUST NOT use bare HTML tag selectors.
| - MUST NOT use arbitrary !important declarations.
|--------------------------------------------------------------------------
*/

/* ==========================================================================
   1. VARIANT: Editorial (formerly royal)
   ========================================================================== */

.page-home .home-composer .section-amenities.section-amenities--editorial {
    position: relative;
    min-height: 95vh;
    margin: var(--margin-page);
    padding: var(--spacing-xl, 4rem) 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 2.5rem);
}

.page-home .home-composer .section-amenities--editorial .amenity__title {
    font-family: var(--font-family-primary);
    font-weight: var(--font-weight-bold);
    font-size: clamp(1.25rem, 1.8vw, 1.75rem);
    line-height: var(--line-height-relaxed);
    color: var(--text-primary);
}

.page-home .home-composer .section-amenities--editorial .amenity__desc {
    padding-top: 2rem;
}

.page-home .home-composer .section-amenities--editorial .amenity__underline {
    display: inline-block;
    width: 2.75rem;
    height: .25rem;
    background: var(--brand-primary-color);
    border-radius: 999px;
    margin-bottom: clamp(.5rem, 1vw, .75rem);
}

.page-home .home-composer .section-amenities--editorial .amenity-article {
    display: flex;
    flex-direction: column;
    margin-top: -3rem;
    margin-bottom: 5rem;
}

.page-home .home-composer .section-amenities--editorial .amenity {
    display: flex;
    position: relative;
    padding: 5rem 0rem;
}

.page-home .home-composer .section-amenities--editorial .amenity > * {
    margin-right: -6rem;
}

.page-home .home-composer .section-amenities--editorial .amenity__media {
    display: flex;
    position: relative;
    z-index: var(--z-above, 2);
    width: clamp(280px, 40vw, 450px);
    flex-shrink: 0;
}

.page-home .home-composer .section-amenities--editorial .amenity img {
    display: flex;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--border-radius-primary);
}

.page-home .home-composer .section-amenities--editorial .amenity__card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--background-primary);
    padding-left: 7rem;
    position: relative;
    transform: translateY(20%);
    width: 100%;
    min-height: 392px;
    border-radius: var(--border-radius-secondary);
    z-index: var(--z-above, 1);
}

.page-home .home-composer .section-amenities--editorial .amenity--right .amenity__card {
    padding-left: 2rem;
    padding-right: 7rem;
}

/* Editorial Variant Mobile Breakpoint */
@media screen and (max-width: 1024px) {
    .page-home .home-composer .section-amenities--editorial .amenity {
        display: flex;
        flex-direction: column;
        position: relative;
    }

    .page-home .home-composer .section-amenities--editorial .amenity > * {
        margin-right: 0rem;
    }

    .page-home .home-composer .section-amenities--editorial .amenity__media,
    .page-home .home-composer .section-amenities--editorial .amenity__media img {
        margin: 0;
        max-width: 100%;
        width: 100%;
    }

    .page-home .home-composer .section-amenities--editorial .amenity--left,
    .page-home .home-composer .section-amenities--editorial .amenity--right {
        margin: 0;
        padding: 1rem;
    }

    .page-home .home-composer .section-amenities--editorial .amenity--left .amenity__card,
    .page-home .home-composer .section-amenities--editorial .amenity--right .amenity__card {
        padding: 2rem;
        transform: translateY(0%);
        margin: 0;
    }

    .page-home .home-composer .section-amenities--editorial .amenity__desc {
        padding: 0;
    }

    .page-home .home-composer .section-amenities--editorial .amenity__card {
        padding: 0rem;
        width: 100%;
        min-height: 300px;
    }
}


/* ==========================================================================
   2. VARIANT: Cards — Grouped Category Grid

   Design: Amenities grouped by AmenityType with category headings.
   Compact inline icon + name cards. Fully token-driven.
   ========================================================================== */

.page-home .home-composer .section-amenities.section-amenities--cards {
    position: relative;
    min-height: 95vh;
    margin: var(--margin-page-negative);
    padding: var(--spacing-xl, 4rem) 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 2.5rem);


}

/* ── Shared: Category Group Styles (used by cards + carousel) ── */
.page-home .home-composer .section-amenities .amenities-cards__grouped,
.page-home .home-composer .section-amenities .amenities-carousel__category {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    margin: var(--margin-page);
    padding: 0;
}

.page-home .home-composer .section-amenities .amenities-cards__category-group {
    display: flex;
    flex-direction: column;
    gap: clamp(0.75rem, 1.5vw, 1rem);
}

.page-home .home-composer .section-amenities .amenities-cards__category-title {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    letter-spacing: var(--letter-spacing-wider);
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
    padding-bottom: clamp(0.25rem, 0.5vw, 0.5rem);
    border-bottom: var(--border-primary);
}

.page-home .home-composer .section-amenities .amenities-cards__category-label {
    color: var(--brand-primary-color);
}

/* ── Cards Variant: Grid Layout ── */
.page-home .home-composer .section-amenities--cards .amenities-cards__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 15vw, 180px), 1fr));
    gap: clamp(0.5rem, 1vw, 0.75rem);
}

.page-home .home-composer .section-amenities--cards .amenities-cards__card {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 0.75rem);
    padding: clamp(0.6rem, 1vw, 0.85rem) clamp(0.75rem, 1.5vw, 1rem);
    background: var(--background-tertiary);
    border: var(--border-primary);
    border-radius: var(--border-radius-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.page-home .home-composer .section-amenities--cards .amenities-cards__card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-elevated);
    border-color: var(--brand-primary-color);
}

.page-home .home-composer .section-amenities--cards .amenities-cards__card i {
    font-size: var(--font-size-lg);
    color: var(--brand-primary-color);
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.page-home .home-composer .section-amenities--cards .amenities-cards__card span {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-secondary);
    line-height: var(--line-height-tight);
}

/* ── Cards Variant: Mobile ── */
@media screen and (max-width: 1024px) {
    .page-home .home-composer .section-amenities.section-amenities--cards {
        min-height: auto;
        margin: var(--margin-page-negative-mobile);
        padding: 2rem 0;
    }

    .page-home .home-composer .section-amenities--cards .amenities-cards__grouped {
        padding: 0 1rem;
    }

    .page-home .home-composer .section-amenities--cards .amenities-cards__grid {
        grid-template-columns: 1fr 1fr;
    }
}



/* ==========================================================================
   3. VARIANT: Carousel (formerly nature)
   ========================================================================== */

.page-home .home-composer .section-amenities.section-amenities--carousel {
    position: relative;
    min-height: 85vh;
    margin: var(--margin-page-negative);
    padding: var(--spacing-xl, 4rem) 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 2.5rem);
    --amenities-gap: clamp(1rem, 2vw, 2.5rem);
    --amenity-width: clamp(220px, 22vw, 300px);
    --amenity-aspect: 3 / 4;


}

.page-home .home-composer .section-amenities--carousel .section-header,
.page-home .home-composer .section-amenities--carousel .amenities-carousel__category {
    padding-inline: var(--section-padding-x-desktop, 7.5rem);
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 15vw, 180px), 1fr));
    gap: clamp(0.5rem, 1vw, 0.75rem);
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__icon-card {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 0.75rem);
    padding: clamp(0.6rem, 1vw, 0.85rem) clamp(0.75rem, 1.5vw, 1rem);
    background: var(--background-tertiary);
    border: var(--border-primary);
    border-radius: var(--border-radius-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__icon-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-elevated);
    border-color: var(--brand-primary-color);
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__icon-card i {
    font-size: var(--font-size-lg);
    color: var(--brand-primary-color);
    flex-shrink: 0;
    width: 1.5rem;
    text-align: center;
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__icon-card h4 {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-secondary);
    line-height: var(--line-height-tight);
    margin: 0;
}

/* Amenities Carousel Styling */
.page-home .home-composer .section-amenities--carousel .amenities-carousel {
    padding: var(--section-padding-y, 5rem) var(--section-padding-x-desktop, 7.5rem);
    position: relative;
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__viewport {
    position: relative;
    overflow: hidden;
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__track {
    position: relative;
    z-index: var(--z-above, 1);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: var(--amenity-width);
    gap: var(--amenities-gap);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--amenities-gap);
    padding-inline: var(--amenities-gap);
    padding-block: .25rem 0;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, rgb(0,0,0) 4%, rgb(0,0,0) 96%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, rgb(0,0,0) 4%, rgb(0,0,0) 96%, transparent 100%);
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__track::-webkit-scrollbar {
    display: none;
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__card {
    scroll-snap-align: start;
    list-style: none;
    text-align: center;
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__card-figure {
    margin: 0;
    border-radius: var(--border-radius-secondary, .75rem);
    overflow: hidden;
    box-shadow: var(--box-shadow-primary, 0 10px 30px rgba(0, 0, 0, .1));
    background: var(--background-tertiary);
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__card-img {
    display: block;
    width: 100%;
    aspect-ratio: var(--amenity-aspect);
    object-fit: cover;
    transform: translateZ(0);
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__card-caption {
    margin-top: .9rem;
    color: var(--text-secondary);
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    inline-size: 42px;
    block-size: 42px;
    display: grid;
    place-items: center;
    background: var(--background-primary);
    border: var(--border-primary);
    border-radius: 999px;
    box-shadow: var(--box-shadow-elevated);
    color: var(--color-secondary);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    z-index: var(--z-overlay, 10);
    pointer-events: auto;
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__nav:hover {
    transform: translateY(-50%) scale(1.04);
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__nav[disabled] {
    opacity: .35;
    pointer-events: none;
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__nav--prev {
    left: min(1rem, 2vw);
}

.page-home .home-composer .section-amenities--carousel .amenities-carousel__nav--next {
    right: min(1rem, 2vw);
}

/* Accessibility visually-hidden helper */
.page-home .home-composer .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* Section header now handled by _shared/base/section-header.css */


/* ==========================================================================
   4. VARIANT: Interactive — Category-Tab Amenity Showcase

   Design: Horizontal category tabs (one per AmenityType), content panels
   with featured hero image + icon card grid. Marriott/Hilton pattern.
   ========================================================================== */

.page-home .home-composer .section-amenities.section-amenities--interactive {
    position: relative;
    padding: var(--spacing-xl, 4rem) 0;
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg, 2.5rem);
}

/* ── Content Panels ── */

/* ── Content Panels ── */
.page-home .home-composer .section-amenities--interactive .amenities-panel {
    display: none;
    margin: var(--margin-page);
    padding: 0;
    animation: amenityPanelFadeIn 0.35s ease;
}

.page-home .home-composer .section-amenities--interactive .amenities-panel--active {
    display: block;
}

@keyframes amenityPanelFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Featured Amenity Hero ── */
.page-home .home-composer .section-amenities--interactive .amenities-panel__hero {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-top: 2.5rem;

    border-radius: var(--border-radius-secondary, 0.5rem);
    overflow: hidden;
    box-shadow: var(--box-shadow-primary);
}

.page-home .home-composer .section-amenities--interactive .amenities-panel__hero-img {
    width: clamp(200px, 30%, 320px);
    height: auto;
    min-height: 220px;
    object-fit: cover;
    flex-shrink: 0;
}

.page-home .home-composer .section-amenities--interactive .amenities-panel__hero-content {
    padding: clamp(1.25rem, 3vw, 2rem);
    flex: 1;
}

.page-home .home-composer .section-amenities--interactive .amenities-panel__hero-title {
    font-family: var(--font-family-secondary);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: var(--font-weight-normal);
    color: var(--color-secondary);
    margin: 0 0 0.75rem 0;
    line-height: var(--line-height-tight);
}

.page-home .home-composer .section-amenities--interactive .amenities-panel__hero-desc {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    line-height: var(--line-height-relaxed);
    margin: 0;
}

/* ── Card Grid ── */
.page-home .home-composer .section-amenities--interactive .amenities-panel__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.page-home .home-composer .section-amenities--interactive .amenities-panel__card {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1vw, 0.75rem);
    padding: clamp(0.6rem, 1vw, 0.85rem) clamp(0.75rem, 1.5vw, 1rem);
    background: var(--background-tertiary);
    border: var(--border-primary);
    border-radius: var(--border-radius-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.page-home .home-composer .section-amenities--interactive .amenities-panel__card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-elevated);
    border-color: var(--brand-primary-color);
}

.page-home .home-composer .section-amenities--interactive .amenities-panel__card i {
    font-size: var(--font-size-lg);
    color: var(--brand-primary-color);
    width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.page-home .home-composer .section-amenities--interactive .amenities-panel__card-name {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-secondary);
    line-height: var(--line-height-tight);
}

/* ── Interactive Variant Mobile Breakpoint ── */
@media screen and (max-width: 1024px) {
    .page-home .home-composer .section-amenities.section-amenities--interactive {
        min-height: auto;
        padding: 1.5rem 0;
    }

    /* .amenities-tabs container now handles its own horizontal scroll natively */

    .page-home .home-composer .section-amenities--interactive .amenities-panel__hero {
        flex-direction: column;
    }

    .page-home .home-composer .section-amenities--interactive .amenities-panel__hero-img {
        width: 100%;
        min-height: 180px;
        max-height: 220px;
    }

    .page-home .home-composer .section-amenities--interactive .amenities-panel__grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .page-home .home-composer .section-amenities--interactive .amenities-panel__card {
        padding: 0.75rem;
    }
}

/* ── Carousel Variant Mobile Breakpoint ── */
@media screen and (max-width: 1024px) {
    .page-home .home-composer .section-amenities.section-amenities--carousel {
        --amenity-width: clamp(260px, 45vw, 320px);
    }
    .page-home .home-composer .section-amenities--carousel .amenities-carousel,
    .page-home .home-composer .section-amenities--carousel .amenities-carousel__category,
    .page-home .home-composer .section-amenities--carousel .section-header {
        padding-inline: var(--section-padding-x-tablet, 3rem);
    }
}

@media screen and (max-width: 640px) {
    .page-home .home-composer .section-amenities.section-amenities--carousel {
        --amenity-width: 85vw;
        --amenities-gap: 1rem;
    }
    .page-home .home-composer .section-amenities--carousel .amenities-carousel,
    .page-home .home-composer .section-amenities--carousel .amenities-carousel__category,
    .page-home .home-composer .section-amenities--carousel .section-header {
        padding-inline: var(--section-padding-x-mobile, 1rem);
    }
}

