/* =========================================================
   spaServicesPage.css — SPA SERVICES PAGE (Unified Format)
   Intent:
   - Services section uses ONE consistent component style
   - Page uses a responsive SQUARE GRID (1 → 2 → 3)
   - Overlay look preserved (image + gradient + corner text)
   - All text/actions aligned BL (bottom-left)
   - Mobile: content panel on top + image bottom (same component)
   - Scoped to: html[data-brand="spa"][data-spa-page="services"]
   ========================================================= */


/* =========================================================
   1) SERVICES SECTION WRAPPER (matches spa vibe)
   ========================================================= */

html[data-brand="spa"][data-spa-page="services"] .spa-services-v2 {
    position: relative;
    padding: clamp(78px, 7vw, 120px) 0;
    overflow: hidden;
}

html[data-brand="spa"][data-spa-page="services"] .spa-services-v2::before {
    content: "";
    position: absolute;
    inset: -140px -140px auto -140px;
    height: 520px;
    background:
        radial-gradient(900px 520px at 18% 30%, rgba(214, 163, 107, .14), transparent 60%),
        radial-gradient(800px 520px at 80% 10%, rgba(214, 163, 107, .10), transparent 62%);
    pointer-events: none;
}


/* =========================================================
   2) SERVICES GRID (SQUARE CARDS)
   ========================================================= */

html[data-brand="spa"][data-spa-page="services"] .services-stack {
    display: grid;
    gap: clamp(16px, 2vw, 24px);
    grid-template-columns: 1fr;
    /* default */
}

@media (min-width: 860px) {
    html[data-brand="spa"][data-spa-page="services"] .services-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1400px) {
    html[data-brand="spa"][data-spa-page="services"] .services-stack {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* =========================================================
   3) SERVICE CARD (static “slide” look, BL only)
   ========================================================= */

html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static {
    position: relative;
    overflow: hidden;

    /* keep tiles square-ish */
    aspect-ratio: 1 / 1;
    height: auto;
    min-height: 0;
    max-height: 620px;

    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, .12);
    background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
    box-shadow: var(--shadow-soft);
    isolation: isolate;
}

/* Background image layer */
html[data-brand="spa"][data-spa-page="services"] .services-item-static {
    position: absolute;
    inset: 0;
    z-index: 1;

    background-image: var(--bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

/* Overlay readability */
html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg,
            rgba(0, 0, 0, .74) 0%,
            rgba(0, 0, 0, .46) 40%,
            rgba(0, 0, 0, .18) 70%,
            rgba(0, 0, 0, .06) 100%),
        linear-gradient(180deg,
            rgba(0, 0, 0, .06) 0%,
            rgba(0, 0, 0, .44) 100%);
}


/* =========================================================
   4) CARD CONTENT (BL alignment, always visible)
   ========================================================= */

html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static .services-content {
    position: absolute;
    z-index: 3;

    bottom: clamp(18px, 2.4vw, 30px);
    left: clamp(16px, 2.4vw, 28px);
    right: auto;

    width: min(78%, 520px);
    max-width: 520px;

    text-align: left;
    color: rgba(255, 255, 255, .96);
    text-shadow: 0 10px 26px rgba(0, 0, 0, .70);

    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Kill any slider-only “active” animations */
html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static .services-title,
html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static .services-desc,
html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static .services-actions,
html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static .services-content * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* Title/desc */
html[data-brand="spa"][data-spa-page="services"] .services-title {
    margin: 0 0 10px;
    font-size: clamp(1.5rem, 2.1vw, 2.05rem);
    line-height: 1.05;
    letter-spacing: -.02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .98);
}

html[data-brand="spa"][data-spa-page="services"] .services-desc {
    margin: 0 0 14px;
    line-height: 1.65;
    font-size: 1.02rem;
    color: rgba(255, 255, 255, .86);

    /* keep tiles concise */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 56ch;
}


/* =========================================================
   5) ACTIONS (Learn More outline, Book gold) — BL only
   ========================================================= */

html[data-brand="spa"][data-spa-page="services"] .services-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
}

html[data-brand="spa"][data-spa-page="services"] .services-actions .btn {
    box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}

/* Learn More (outline) */
html[data-brand="spa"][data-spa-page="services"] .services-actions .btn.btn-outline {
    border-color: rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .95);
}

html[data-brand="spa"][data-spa-page="services"] .services-actions .btn.btn-outline:hover {
    border-color: rgba(255, 255, 255, .55);
    background: rgba(255, 255, 255, .16);
}

/* Book Now (gold) */
html[data-brand="spa"][data-spa-page="services"] .services-actions .btn.btn-accent {
    background: var(--accent);
    border-color: rgba(214, 163, 107, .60);
    color: #141312;
}

html[data-brand="spa"][data-spa-page="services"] .services-actions .btn.btn-accent:hover {
    background: rgba(214, 163, 107, .92);
    border-color: rgba(214, 163, 107, .85);
}


/* =========================================================
   6) CTA STRIP (shared spa usage)
   ========================================================= */

html[data-brand="spa"][data-spa-page="services"] .clinic-cta {
    padding: clamp(70px, 6vw, 110px) 0;
}

html[data-brand="spa"][data-spa-page="services"] .clinic-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;

    padding: clamp(20px, 3vw, 28px);
    border-radius: var(--radius-xl);

    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(255, 255, 255, .04);
    box-shadow: var(--shadow-soft);
}

html[data-brand="spa"][data-spa-page="services"] .clinic-cta h2 {
    margin: 0 0 8px;
}

html[data-brand="spa"][data-spa-page="services"] .clinic-cta p {
    margin: 0;
    color: rgba(0, 0, 0, 0.72);
    max-width: 60ch;
}

html[data-brand="spa"][data-spa-page="services"] .clinic-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}


/* =========================================================
   MOBILE — KEEP OVERLAY FORMAT (NO WHITE PANEL)
   - Same look as desktop (text over image)
   - Just tighter spacing + type so it fits
   ========================================================= */
@media (max-width: 720px) {

    /* keep grid as-is (1 column), just keep spacing comfy */
    html[data-brand="spa"][data-spa-page="services"] .services-stack {
        gap: 18px;
    }

    /* keep card as a “tile” (not 2-row panel) */
    html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static {
        display: block;
        /* IMPORTANT: prevents panel layout */
        aspect-ratio: 4 / 5;
        /* more vertical for phones (still “square-ish”) */
        max-height: none;

        border-radius: var(--radius-lg);
        overflow: hidden;
    }

    /* keep the background image as full-cover underlay */
    html[data-brand="spa"][data-spa-page="services"] .services-item-static {
        position: absolute !important;
        inset: 0 !important;
        grid-row: auto !important;
        /* no grid */
        min-height: 0 !important;
        background-position: var(--bg-pos-m, 50% 60%);
    }

    /* remove the extra image-bottom gradient used by panel mode */
    html[data-brand="spa"][data-spa-page="services"] .services-item-static::after {
        content: none !important;
    }

    /* KEEP overlay gradient on mobile for readability */
    html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 2;
        pointer-events: none;
        background:
            linear-gradient(180deg,
                rgba(0, 0, 0, .08) 0%,
                rgba(0, 0, 0, .52) 100%),
            linear-gradient(90deg,
                rgba(0, 0, 0, .72) 0%,
                rgba(0, 0, 0, .35) 55%,
                rgba(0, 0, 0, .12) 100%);
    }

    /* content stays bottom-left overlay */
    html[data-brand="spa"][data-spa-page="services"] .services-v2-shell--static .services-content {
        position: absolute !important;
        z-index: 3;

        left: 16px !important;
        right: 16px !important;
        /* allow wrapping on small screens */
        bottom: 16px !important;

        width: auto !important;
        max-width: none !important;

        padding: 0 !important;
        text-align: left !important;

        background: none !important;
        color: rgba(255, 255, 255, .96);
        text-shadow: 0 10px 26px rgba(0, 0, 0, .70);
    }

    /* tighten type so it fits */
    html[data-brand="spa"][data-spa-page="services"] .services-title {
        font-size: clamp(1.15rem, 5.2vw, 1.55rem);
        margin: 0 0 8px;
    }

    html[data-brand="spa"][data-spa-page="services"] .services-desc {
        font-size: .94rem;
        line-height: 1.5;
        margin: 0 0 12px;

        display: -webkit-box;
        -webkit-line-clamp: 3;
        /* tighter for mobile */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* buttons stay left; shrink a touch */
    html[data-brand="spa"][data-spa-page="services"] .services-actions {
        justify-content: flex-start !important;
        gap: 10px;
    }

    html[data-brand="spa"][data-spa-page="services"] .services-actions .btn {
        padding: 9px 13px;
        font-size: .90rem;
        border-radius: 999px;
        box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
    }
}