/* ── Ayurveda global variables ───────────────────────────── */
:root {
    --heading-color: #1a2b3c;
    --text-color: #4a5568;
    --accent: #8da290;
}

/* ── Dark mode ───────────────────────────────────────────── */
[data-theme="dark"] {
    --heading-color: #f3f4f6;
    --text-color: #cbd5e1;
    --accent: #a3b8a5;
    background-color: #0f172a;
}

body {
    font-family: 'Inter', 'Helvetica Neue', sans-serif;
}

h2, h3, h4 {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 700;
}

[data-theme="dark"] .wellbeing,
[data-theme="dark"] .health-packages {
    background: #0f172a;
}

[data-theme="dark"] .panchakarma {
    background: #1e293b;
}

[data-theme="dark"] .objective-card,
[data-theme="dark"] .treatment-card {
    background: #1e293b;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.1);
}

[data-theme="dark"] .treatment-card-content {
    background: transparent !important;
    box-shadow: none !important;
}

[data-theme="dark"] .treatment-card:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.4), 0 10px 22px rgba(0,0,0,0.2);
    outline: 1px solid rgba(163,184,165,0.15);
}

/* ── Wellbeing section ───────────────────────────────────── */
.wellbeing {
    padding: 100px 0;
    background: #fff;
    text-align: center;
}

.wellbeing h2 {
    font-size: 3.2rem;
    margin-bottom: 25px;
    color: var(--heading-color);
    letter-spacing: -0.5px;
}

.wellbeing p {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.05rem;
}

.ayur-intro__lead       { margin-bottom: 30px; }
.ayur-objectives__preamble { margin-top: 25px !important; margin-bottom: 20px; }

.objective-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 950px;
    margin: 45px auto;
}

.objective-card {
    background: #fff;
    padding: 40px 35px;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.02);
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
                opacity 0.7s ease,
                box-shadow 0.4s ease;
}
.objective-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.07);
}
.objective-card h4 {
    color: var(--heading-color);
    font-size: 1.25rem;
    margin-top: 0;
    margin-bottom: 10px;
}
.objective-card p {
    margin: 0;
    font-size: 0.98rem;
    color: var(--text-color);
    line-height: 1.6;
}

.ayur-objectives__close {
    margin-top: 40px !important;
    font-size: 1.05rem;
}

/* ── Panchakarma section ─────────────────────────────────── */
.panchakarma {
    padding: 100px 0;
    background: #faf8f4;
    text-align: center;
}

.panchakarma h2 {
    font-size: 3.2rem;
    margin-bottom: 45px;
    color: var(--heading-color);
}

.treatment-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.treatment-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    flex: 0 1 calc(33.333% - 20px);
    min-width: 300px;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
                box-shadow 0.4s ease,
                background-color 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.01);
}

.treatment-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.treatment-card-content {
    padding: 35px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
}

.treatment-card-content h3 {
    font-size: 1.45rem;
    color: var(--heading-color);
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.treatment-card-content .treatment-divider {
    display: block;
    width: 35px;
    height: 2px;
    background: var(--accent);
    margin: 15px 0 18px;
    border-radius: 2px;
}

.treatment-card-content p {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--text-color);
    margin: 0;
    max-width: 260px;
}

.treatment-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(26,43,60,0.08), 0 8px 20px rgba(0,0,0,0.02);
}

/* ── Health packages — Mosaic ────────────────────────────── */
.health-packages {
    padding: 100px 0;
    text-align: center;
    background: #fff;
}

.health-packages h2 {
    font-size: 3.2rem;
    margin-bottom: 45px;
    color: var(--heading-color);
}

/* Desktop mosaic: 2-row, mixed column spans */
.ayurveda-mosaic {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 300px);
    gap: 20px;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.mosaic-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    width: 100%;
    height: 100%;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25,1,0.5,1);
}

/* Desktop span assignments */
.mosaic-item:nth-child(1) { grid-column: span 2; }
.mosaic-item:nth-child(2) { grid-column: span 1; }
.mosaic-item:nth-child(3) { grid-column: span 1; }
.mosaic-item:nth-child(4) { grid-column: span 2; }

/* Overlay */
.mosaic-item .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

[data-theme="dark"] .mosaic-item .overlay {
    background: rgba(0,0,0,0.65);
}

.overlay-content {
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25,1,0.5,1);
}

.overlay-content h3 {
    color: #fff;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.mosaic-item:hover img        { transform: scale(1.05); }
.mosaic-item:hover .overlay   { opacity: 1; }
.mosaic-item:hover .overlay-content { transform: translateY(0); }

.learn-more-btn {
    display: inline-block;
    padding: 10px 26px;
    color: #ffffff;
    text-decoration: none;
    border: 1.5px solid #ffffff;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 500;
    background: transparent;
    transition: all 0.3s ease;
}
.learn-more-btn:hover {
    background: #ffffff;
    color: #1a2b3c;
}

/* ── Scroll animations ───────────────────────────────────── */
.objective-card,
.treatment-card,
.mosaic-item {
    transition: transform 0.8s cubic-bezier(0.16,1,0.3,1), opacity 0.8s ease;
}

.js-reveal {
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
}
.js-reveal.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* ============================================================
   RESPONSIVE — clean, non-conflicting breakpoints
   ============================================================ */

/* ── ≤992px — tablet ─────────────────────────────────────── */
@media (max-width: 992px) {
    .wellbeing h2,
    .panchakarma h2,
    .health-packages h2 {
        font-size: 2.5rem;
    }

    .objective-grid {
        max-width: 90%;
    }

    .treatment-card {
        flex: 0 1 calc(50% - 30px);
    }

    /* Mosaic: 2-col equal grid, auto row height, no span overrides */
    .ayurveda-mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
        gap: 16px;
    }

    /* Reset all span assignments so every card is equal width */
    .mosaic-item:nth-child(1),
    .mosaic-item:nth-child(2),
    .mosaic-item:nth-child(3),
    .mosaic-item:nth-child(4) {
        grid-column: span 1;
        height: 260px;    /* explicit height since rows are now auto */
    }
}

/* ── ≤768px — mobile ─────────────────────────────────────── */
@media (max-width: 768px) {
    .wellbeing,
    .panchakarma,
    .health-packages {
        padding: 70px 20px;
    }

    .objective-grid {
        grid-template-columns: 1fr;
    }

    .treatment-card {
        flex: 0 1 100%;
        min-width: 0;
    }

    /* Mosaic: single column, fixed height per card */
    .ayurveda-mosaic {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 15px;
        padding: 0;
    }

    .mosaic-item:nth-child(1),
    .mosaic-item:nth-child(2),
    .mosaic-item:nth-child(3),
    .mosaic-item:nth-child(4) {
        grid-column: span 1;
        height: 220px;
    }

    /* Show overlays always on touch devices (no hover) */
    .mosaic-item .overlay {
        opacity: 1;
        background: rgba(0,0,0,0.38);
    }
    .overlay-content {
        transform: translateY(0);
    }
}

/* ── ≤480px — small phones ───────────────────────────────── */
@media (max-width: 480px) {
    .wellbeing,
    .panchakarma,
    .health-packages {
        padding: 56px 1rem;
    }

    .wellbeing h2,
    .panchakarma h2,
    .health-packages h2 {
        font-size: clamp(1.9rem, 10vw, 2.35rem);
    }

    .objective-grid,
    .treatment-grid,
    .ayurveda-mosaic {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .objective-card,
    .treatment-card {
        min-width: 0;
        width: 100%;
    }

    .objective-card {
        padding: 1.5rem 1.25rem;
    }

    .treatment-card-content {
        padding: 1.5rem 1.15rem;
    }

    .mosaic-item:nth-child(1),
    .mosaic-item:nth-child(2),
    .mosaic-item:nth-child(3),
    .mosaic-item:nth-child(4) {
        height: 200px;
    }

    .overlay-content h3 {
        font-size: clamp(1.35rem, 8vw, 1.8rem);
    }

    .learn-more-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}