/* ==========================================================================
   Nandi IVF - Responsive Stylesheet
   ========================================================================== */

/* Large Tablets & Small Laptops (<= 1024px) */
@media (max-width: 1024px) {
    .header-top-bar {
        gap: 1rem;
        font-size: 0.8rem;
    }
    
    .nav-list {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.88rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .treatments-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .locations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

/* Desktop Navbar Fit (1025px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    .header-top-bar {
        gap: 1.15rem;
        font-size: 0.78rem;
    }
    .nav-list {
        gap: 0.85rem;
    }
    .nav-link {
        font-size: 0.86rem;
    }
    .header-btn {
        padding: 0.5rem 1rem;
        font-size: 0.84rem;
    }
    .brand-logo-img {
        height: 42px;
    }
}

/* Tablets & Mobile Navigation Breakpoint (<= 1024px) */
@media (max-width: 1024px) {
    .main-nav, 
    .header-top-bar {
        display: none !important;
    }
    
    .mobile-actions {
        display: flex !important;
        align-items: center;
        gap: 0.55rem;
    }
    
    .header-right {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0.5rem;
    }

    .header-wrapper {
        padding: 0.55rem 0;
    }

    .brand-logo-img {
        height: 42px;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-trust-badges {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .doctor-grid, .doctor-profile-grid {
        grid-template-columns: 1fr;
    }
    
    .doctor-img-container {
        max-height: 380px;
    }
}

/* Mobile Devices (<= 768px) */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 1rem;
    }

    .header-wrapper {
        padding: 0.5rem 0;
        gap: 0.75rem;
    }

    .brand-logo-img {
        height: 38px;
    }

    .mobile-phone-text {
        display: none;
    }

    .mobile-phone-btn {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
    }

    .mobile-quick-book-btn {
        height: 36px;
        padding: 0 0.85rem;
        font-size: 0.8rem;
    }
    
    .section-padding {
        padding: 3.5rem 0;
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .section-title {
        font-size: 1.85rem;
    }
    
    .features-grid, .treatments-grid, .locations-grid, .vision-mission-grid, .differentiators-grid, .team-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .about-hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cta-box {
        padding: 2.5rem 1.25rem;
    }
    
    .cta-title {
        font-size: 1.85rem;
    }
    
    .doctor-details {
        padding: 2rem 1.5rem;
    }
    
    .floating-card {
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
    }
}

/* Small Mobiles (<= 480px) */
@media (max-width: 480px) {
    .header-wrapper {
        padding: 0.4rem 0;
    }

    .brand-logo-img {
        height: 34px;
        max-width: 155px;
    }

    .mobile-actions {
        gap: 0.4rem;
    }

    .mobile-quick-book-btn {
        height: 34px;
        padding: 0 0.65rem;
        font-size: 0.78rem;
    }

    .mobile-phone-btn {
        width: 36px;
        height: 36px;
    }

    .mobile-toggle {
        width: 38px;
        height: 38px;
    }

    .mobile-nav-drawer {
        width: 310px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
    
    .hero-trust-badges {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
}

/* Extra Small Mobiles (<= 360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.75rem;
    }

    .brand-logo-img {
        height: 30px;
        max-width: 135px;
    }

    .mobile-quick-book-btn {
        display: none;
    }
}











/* ==========================================================================
   MOBILE NAVIGATION - OPEN / CLOSE / DROPDOWN FIX
   ========================================================================== */

@media (max-width: 1024px) {

    /* ---------------------------------------------------------
       MOBILE DRAWER
       --------------------------------------------------------- */

    .mobile-nav-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;

        width: min(380px, 90vw);
        height: 100vh;

        z-index: 99999;

        transform: translateX(100%);
        visibility: hidden;
        opacity: 0;

        transition:
            transform 0.35s ease,
            opacity 0.25s ease,
            visibility 0.35s ease;

        overflow-y: auto;
        overflow-x: hidden;

        background: #ffffff;

        -webkit-overflow-scrolling: touch;
    }


    /* OPEN DRAWER */
    .mobile-nav-drawer.is-open {
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }


    /* ---------------------------------------------------------
       MOBILE OVERLAY
       --------------------------------------------------------- */

    .mobile-overlay {
        position: fixed;
        inset: 0;

        z-index: 99998;

        background: rgba(0, 0, 0, 0.45);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition:
            opacity 0.3s ease,
            visibility 0.3s ease;
    }


    /* OPEN OVERLAY */
    .mobile-overlay.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }


    /* ---------------------------------------------------------
       HAMBURGER ACTIVE STATE
       --------------------------------------------------------- */

    .mobile-toggle {
        position: relative;
        z-index: 100000;

        cursor: pointer;
    }


    .mobile-toggle .hamburger-bar {
        display: block;

        transition:
            transform 0.25s ease,
            opacity 0.25s ease;
    }


    /* ---------------------------------------------------------
       MOBILE DROPDOWN
       --------------------------------------------------------- */

    .mobile-submenu {
        display: none;
        overflow: hidden;
    }


    /* Dropdown OPEN */
    .mobile-nav-item.has-dropdown.is-open > .mobile-submenu {
        display: block;
    }


    /* Chevron rotation */
    .mobile-nav-item.has-dropdown.is-open
    .chevron-icon {
        transform: rotate(180deg);
    }


    .chevron-icon {
        transition: transform 0.25s ease;
        flex-shrink: 0;
    }


    /* ---------------------------------------------------------
       DROPDOWN BUTTON
       --------------------------------------------------------- */

    .mobile-dropdown-toggle {
        width: 100%;
        border: 0;
        background: transparent;
        cursor: pointer;

        display: flex;
        align-items: center;
        justify-content: space-between;

        text-align: left;
    }


    /* ---------------------------------------------------------
       MOBILE SUBMENU LINKS
       --------------------------------------------------------- */

    .mobile-submenu a {
        display: block;
        width: 100%;
    }


    /* ---------------------------------------------------------
       BODY LOCK WHEN MENU OPEN
       --------------------------------------------------------- */

    body.mobile-menu-open {
        overflow: hidden;
    }

}


/* ==========================================================================
   HAMBURGER -> X ANIMATION
   ========================================================================== */

@media (max-width: 1024px) {

    .mobile-toggle.is-active
    .hamburger-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-toggle.is-active
    .hamburger-bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.is-active
    .hamburger-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

}


/* ==========================================================================
   MOBILE CLOSE BUTTON
   ========================================================================== */

.mobile-nav-close {
    cursor: pointer;
    border: 0;
    background: transparent;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    z-index: 100001;
}

/* ==========================================================================
   ENHANCED MOBILE RESPONSIVENESS & TOUCH TARGET POLISH
   ========================================================================== */

/* 1. Prevent Horizontal Viewport Overflow on all Devices */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

img, video, iframe, embed, object {
    max-width: 100% !important;
}

/* 2. Responsive Table Containment */
.table-responsive, 
.post-prose-content table,
.article-content table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* 3. Appointment Modal Full Mobile Optimization */
.appointment-modal-overlay {
    z-index: 1000000 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 1rem 0.75rem !important;
}

.appointment-modal-dialog {
    margin: auto !important;
    max-width: 100% !important;
}

@media (max-width: 768px) {
    .appointment-modal-overlay {
        align-items: flex-start !important;
        padding-top: 2rem !important;
        padding-bottom: 2.5rem !important;
    }

    .appointment-modal-card {
        border-radius: 18px !important;
    }

    .appointment-modal-body {
        padding: 1.5rem 1.25rem !important;
    }

    .appointment-modal-title {
        font-size: 1.35rem !important;
    }

    /* iOS Safari Auto-Zoom Jump Prevention (16px base on inputs) */
    input[type="text"],
    input[type="tel"],
    input[type="email"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Mobile Touch Usability & Minimum Tap Target */
    .mobile-nav-link {
        padding: 0.85rem 1rem !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
    }

    .btn, 
    .mobile-phone-btn, 
    .mobile-toggle,
    .modal-submit-btn {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
}

/* 4. Hide WhatsApp Floating Button when Modal or Mobile Menu is Open */
body.mobile-menu-open .whatsapp-float,
body[style*="hidden"] .whatsapp-float {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: scale(0.8) !important;
    transition: opacity 0.25s ease, transform 0.25s ease;
}




