/* ==========================================================================
   SMC Aesthetics - Responsive Styles
   Responsive breakpoints from 320px to 1920px
   ========================================================================== */

/* 1. TABLET BREAKPOINT (MAX-WIDTH: 1024px) */
@media (max-width: 1024px) {
    .mega-menu {
        width: 550px;
        left: -150px;
    }

    .mega-menu-skin {
        width: 650px;
        grid-template-columns: repeat(2, 1fr);
        left: -250px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* 2. MOBILE BREAKPOINT (MAX-WIDTH: 768px) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .section {
        padding: 3.5rem 0;
    }

    .section-soft {
        padding: 3.5rem 0;
    }

    /* Grids stack */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .grid-2 {
        align-items: stretch;
    }

    /* Nav Container Mobile Height */
    .nav-container {
        height: 70px;
        align-items: center;
    }

    /* Nav Menu Hide for slide-out drawer */
    .nav-menu {
        position: absolute;
        top: 100%;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgb(255 255 255);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.05);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 1001;
    }

    .nav-menu.active {
        display: flex;
        overflow-x: hidden; /* Fix horizontal scroll issue */
        right: 0;
    }

    .nav-item {
        width: 100%;
        padding: 0;
        border-bottom: 1px solid var(--color-border);
        display: block;
        height: auto;
    }

    .nav-item:last-child {
        border-bottom: 0;
    }

    .nav-link {
        padding: 1rem 0;
        font-size: 0.95rem;
        display: block;
        height: auto;
    }

    .menu-toggle {
        display: flex;
    }

    /* Disable hover dropdowns on mobile */
    .has-dropdown:hover .mega-menu {
        display: none;
    }

    /* Accordion style sub-menus for mobile nav (handled via JS classes) */




    .top-bar-content {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .top-bar-links {
        display: none;
        /* Hide helper topbar links on mobile */
    }

    /* Hero section layouts */
    .hero-section {
        padding: 4rem 0;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 2.5rem;
    }

    .hero-cta {
        justify-content: center;
    }

    /* Image grid galleries stack */
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-image-box {
        height: 280px;
    }

    /* Maps and layout sections */
    .maps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cost-factors-container {
        padding: 1.5rem;
    }

    /* Sticky Bottom Bar on mobile */



    .sticky-cta-bar {
        display: flex !important;
        /* Always show sticky bar on mobile */
        align-items: center;
        padding: 0;
        min-height: 60px;
    }

    .sticky-cta-bar .container {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }

    .sticky-cta-text {
        display: none;
        /* Hide text on mobile to fit CTA buttons */
    }

    .sticky-cta-content {
        justify-content: stretch;
        width: 100%;
        height: 100%;
    }

    .sticky-cta-buttons {
        width: 100%;
        display: flex;
        flex-direction: row;
        gap: 0;
    }

    /* WhatsApp button — green, fills left half */
    .sticky-cta-buttons .btn-whatsapp {
        flex: 1;
        padding: 1rem 0.5rem;
        font-size: 0.82rem;
        font-weight: 600;
        border-radius: 0;
        text-transform: none;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background-color: #25D366;
        color: #fff;
        border: none;
        border-right: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* Call Clinic button — white outline on dark bar */
    .sticky-cta-buttons .btn-dark {
        flex: 1;
        padding: 1rem 0.5rem;
        font-size: 0.82rem;
        font-weight: 600;
        border-radius: 0;
        text-transform: none;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background-color: rgba(255, 255, 255, 0.12);
        color: #fff;
        border: none;
        border-left: 1px solid rgba(255, 255, 255, 0.25);
    }

    .sticky-cta-buttons .btn svg {
        flex-shrink: 0;
        width: 15px;
        height: 15px;
        margin: 0 !important;
    }


    /* Mobile Sub-Menu Sliding Panel */
    .nav-item.has-dropdown {
        position: static;
        /* Let absolute children position relative to the main menu */
    }

    .submenu-icon {
        float: right;
        display: flex;
        align-items: center;
        height: 100%;
    }

    .mega-menu,
    .mega-menu-skin {
        position: absolute;
        top: 0;
        right: -100%;
        width: 100% !important;
        height: 100%;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 2rem 2rem !important;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1) !important;
        z-index: 1002 !important;
        display: flex !important;
        overflow-y: auto !important;
        visibility: hidden !important;
        opacity: 1 !important;
        left: auto !important;
        transform: none !important;
        box-shadow: none !important;
    }

    .mega-menu.slide-in,
    .mega-menu-skin.slide-in {
        right: 0 !important;
        visibility: visible !important;
    }

    .mobile-back-btn {
        display: flex;
        align-items: center;
        font-weight: 600;
        color: var(--color-primary);
        font-size: 1.1rem;
        cursor: pointer;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--color-border);
        width: 100%;
    }

    .mobile-back-btn svg {
        margin-right: 8px;
    }

    .mobile-view-all {
        margin-bottom: 1.5rem;
        font-weight: 600;
    }

    .mobile-view-all a {
        color: var(--color-accent-hover);
        text-decoration: underline;
    }

    .mega-menu-title {
        color: var(--color-text-muted);
        font-size: 0.9rem;
        text-transform: uppercase;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
        font-weight: 600;
    }

    .mega-menu-list {
        list-style: none;
        margin: 0 0 1.5rem 0;
        padding: 0;
        width: 100%;
    }

    .mega-menu-list li a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1rem;
        color: var(--color-text-dark);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        white-space: normal;
    }

    /* Menu Overlay for Mobile */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 36, 56, 0.5);
        backdrop-filter: blur(4px);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* 3. SMALL MOBILE DEVICES (MAX-WIDTH: 480px) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}