/* ==============================================================
   VEDVANA WELLNESS — MOBILE RESPONSIVE OVERRIDES
   Applied to all Tailwind CDN pages
============================================================== */

/* ---- Mobile Drawer ---- */
#mobileDrawer {
    transition: visibility 0.3s;
}
#mobileDrawer:not(.drawer-open) {
    visibility: hidden;
}
#mobileDrawer.drawer-open {
    visibility: visible;
}
#mobileDrawer .drawer-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}
#mobileDrawer.drawer-open .drawer-overlay {
    opacity: 1;
}
#mobileDrawer .drawer-panel {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}
#mobileDrawer.drawer-open .drawer-panel {
    transform: translateX(0);
}

/* ---- Mobile Breakpoint Overrides ---- */
@media (max-width: 767px) {

    /* Section vertical padding */
    .py-32 { padding-top: 3.5rem !important; padding-bottom: 3.5rem !important; }
    .py-24 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
    main.pt-32 { padding-top: 5rem !important; }
    main.pb-24 { padding-bottom: 2.5rem !important; }

    /* Section horizontal padding */
    section.px-8, header.px-8 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }

    /* Margins */
    .mb-20 { margin-bottom: 2.5rem !important; }
    section.mt-32 { margin-top: 3rem !important; }
    .mb-12 { margin-bottom: 2rem !important; }

    /* Gaps */
    .gap-16 { gap: 2rem !important; }

    /* Space-y-24 (programs stacking) */
    .space-y-24 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 3rem !important;
    }

    /* Card padding */
    .p-10 { padding: 1.5rem !important; }

    /* CTA banner padding */
    .bg-primary.p-12 { padding: 2rem 1.5rem !important; }

    /* Typography scaling */
    .text-5xl { font-size: 2.25rem !important; line-height: 1.15 !important; }
    .text-4xl { font-size: 1.75rem !important; line-height: 1.2 !important; }
    .text-3xl { font-size: 1.5rem !important; }

    /* Hide decorative absolute circles */
    [class*="-z-10"].absolute { display: none !important; }

    /* Footer */
    footer { gap: 2rem !important; padding: 3rem 1.5rem !important; }

    /* Modal */
    #globalContactModal > div:last-child {
        padding: 1.5rem !important;
        max-height: 85vh !important;
        border-radius: 1rem !important;
    }

    /* Programs multi-card grid */
    .grid.lg\:grid-cols-4 > div { padding: 1.25rem !important; }
    .grid.lg\:grid-cols-4 { gap: 1rem !important; }

    /* Hero section text */
    section.h-screen .max-w-4xl { padding-left: 1.25rem; padding-right: 1.25rem; }

    /* Bento grid - ensure stacking */
    .md\:col-span-2 { grid-column: span 1 !important; }
    .md\:col-span-1 { grid-column: span 1 !important; }

    /* Why Vedvana: hide bento card background images that overlap text */
    .md\:col-span-2.relative .absolute.bottom-0 { display: none !important; }
    div[class*="col-span-2"][class*="relative"][class*="overflow-hidden"] > .absolute.bottom-0 { display: none !important; }

    /* Expert page: reduce card padding on mobile */
    button.group.w-full { padding: 1rem 1.25rem !important; }

    /* Expert page: hide the right-side detail panel on mobile (lightbox replaces it) */
    .lg\:col-span-8 { display: none !important; }

    /* Expert page: lightbox popup for images */
    #expertLightbox {
        position: fixed;
        inset: 0;
        z-index: 200;
        background: rgba(0,0,0,0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1.5rem;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }
    #expertLightbox.active {
        opacity: 1;
        pointer-events: auto;
    }
    #expertLightbox .lightbox-content {
        background: #fcf9f4;
        border-radius: 1rem;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: 85vh;
        max-width: 340px;
        width: 100%;
        box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        display: block;
        overscroll-behavior: contain;
    }
    #expertLightbox .lightbox-img {
        width: 100%;
        aspect-ratio: 4/5;
        object-fit: cover;
        flex-shrink: 0;
    }
    #expertLightbox .lightbox-info {
        padding: 1.25rem;
        text-align: center;
    }
    #expertLightbox .lightbox-name {
        font-family: 'Newsreader', serif;
        font-size: 1.5rem;
        color: #334537;
        margin-bottom: 0.25rem;
    }
    #expertLightbox .lightbox-title {
        font-size: 0.75rem;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #715a3e;
    }
    #expertLightbox .lightbox-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: rgba(255,255,255,0.9);
        border: none;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1.25rem;
        color: #334537;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    /* Index hero CTA buttons */
    section.h-screen .flex.gap-6 { gap: 1rem !important; }
    section.h-screen .px-10 { padding-left: 2rem !important; padding-right: 2rem !important; }
    section.h-screen .px-12 { padding-left: 2rem !important; padding-right: 2rem !important; }
    section.h-screen .py-5 { padding-top: 0.875rem !important; padding-bottom: 0.875rem !important; }
}

/* ---- Tablet Breakpoint ---- */
@media (max-width: 1024px) and (min-width: 768px) {
    .py-32 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
    .py-24 { padding-top: 4rem !important; padding-bottom: 4rem !important; }
    .space-y-24 > :not([hidden]) ~ :not([hidden]) { margin-top: 4rem !important; }
    section.mt-32 { margin-top: 5rem !important; }
}
