﻿/* ==========================================================================
   EndoBrace Dental Clinic — Comprehensive Mobile Responsiveness
   Covers ALL pages: index, about, treatments, fees, contact,
   appointment, reviews, medical-tourism, gallery
   Breakpoints: 1100px  900px  768px  640px  480px  380px
   ========================================================================== */

/* ============================================================
   0. ROOT TWEAKS FOR MOBILE
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --navbar-height: 68px;
  }
}

/* ============================================================
   1. NAVIGATION — MOBILE HEADER
   ============================================================ */
@media (max-width: 1100px) {
  .nav-menu { display: none !important; }
  .menu-toggle-btn { display: inline-flex !important; }
}

@media (max-width: 1240px) {
  .navbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
  }
  .nav-actions {
    margin-left: auto;
    flex-shrink: 0;
    gap: 10px;
  }
}

@media (max-width: 768px) {
  .site-header {
    box-shadow: 0 2px 16px rgba(6, 17, 32, 0.3);
  }
  .navbar-main { padding-block: 8px; }
  .navbar-inner { gap: 10px; }
  .brand-link { gap: 8px; min-width: 0; }
  .brand-logo-img { width: 34px !important; height: 34px !important; flex-shrink: 0; }
  .brand-name { font-size: 1.2rem !important; }
  .brand-slogan { font-size: 0.58rem !important; letter-spacing: 0.08em !important; }
  .nav-actions { gap: 8px; flex-shrink: 0; }
  .nav-pill-btn { padding: 7px 13px !important; font-size: 0.78rem !important; flex-shrink: 0; white-space: nowrap !important; }
  .menu-toggle-btn { padding: 7px 10px !important; font-size: 0.78rem !important; min-height: 36px; min-width: 36px; flex-shrink: 0; }
  .menu-toggle-btn span { display: none !important; }
}

@media (max-width: 480px) {
  .navbar-main { padding-block: 6px; }
  .navbar-inner { gap: 6px !important; }
  .brand-link { gap: 6px !important; min-width: 0; }
  .brand-logo-img { width: 30px !important; height: 30px !important; flex-shrink: 0; }
  .brand-name { font-size: 1.08rem !important; white-space: nowrap; }
  .brand-slogan { display: none !important; }
  .nav-actions { gap: 6px !important; flex-shrink: 0; }
  .nav-pill-btn { 
    padding: 6px 10px !important; 
    font-size: 0.74rem !important; 
    white-space: nowrap !important;
    letter-spacing: 0.01em !important;
    flex-shrink: 0;
  }
  .menu-toggle-btn { 
    padding: 6px 8px !important; 
    min-height: 32px !important; 
    min-width: 32px !important;
    flex-shrink: 0;
  }
}

/* ============================================================
   2. FULLSCREEN MOBILE DRAWER IMPROVEMENTS
   ============================================================ */
@media (max-width: 768px) {
  .fullscreen-menu {
    padding: max(68px, calc(env(safe-area-inset-top, 0px) + 54px)) 16px max(32px, env(safe-area-inset-bottom, 24px)) !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
  .menu-drawer-inner {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .menu-drawer-left { display: none !important; }
  .menu-nav-links { gap: 6px !important; }
  .menu-nav-link {
    font-size: 1.22rem !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    width: 100% !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .menu-nav-link .menu-link-icon-wrap {
    width: 32px !important;
    height: 32px !important;
  }
  .menu-nav-link .menu-link-icon-wrap svg {
    width: 18px !important;
    height: 18px !important;
  }
  .menu-drawer-close {
    top: max(14px, env(safe-area-inset-top, 14px)) !important;
    right: max(14px, env(safe-area-inset-right, 14px)) !important;
    min-height: 44px !important;
    min-width: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 10px !important;
  }
  .menu-drawer-mobile-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
  .menu-mobile-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: var(--transition-fast);
  }
  .menu-mobile-action-btn.phone {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
  }
  .menu-mobile-action-btn.book {
    background: linear-gradient(135deg, #D4AF37 0%, #C5A880 100%);
    color: #061120;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  }
}

@media (max-width: 480px) {
  .menu-nav-link { font-size: 1.15rem !important; padding: 9px 10px !important; }
}

/* ============================================================
   3. HERO SECTION — ALL PAGES
   ============================================================ */
@media (max-width: 768px) {
  .hero-section {
    min-height: 70vh;
    padding-block-start: calc(var(--navbar-height) + 40px);
    padding-block-end: 50px;
  }
  .hero-compact {
    min-height: 38vh !important;
    padding-block-start: calc(var(--navbar-height) + 30px) !important;
    padding-block-end: 36px !important;
  }
  .hero-content { padding-inline: 16px; }
  .hero-title { font-size: clamp(1.8rem, 6vw, 2.6rem) !important; line-height: 1.2 !important; }
  .hero-description { font-size: clamp(0.92rem, 3vw, 1.05rem) !important; margin-block-end: 28px !important; }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-inline: 8px;
  }
  .hero-actions .button { width: 100%; justify-content: center; padding: 14px 20px; font-size: 0.85rem; }
  .hero-eyebrow-wrapper { gap: 10px; margin-block-end: 14px; }
  .hero-badge { font-size: 0.72rem !important; letter-spacing: 0.14em !important; padding: 5px 14px !important; }
  .hero-line { width: 32px !important; }
  .hero-subtitle-bar {
    font-size: 0.7rem !important;
    letter-spacing: 0.1em !important;
    padding: 5px 14px !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px !important;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-section { min-height: 65vh; }
  .hero-title { font-size: clamp(1.6rem, 7.5vw, 2.2rem) !important; }
}

/* ============================================================
   4. METRICS COUNTER BAR
   ============================================================ */
@media (max-width: 900px) {
  .metrics-section { margin-top: -20px; margin-bottom: 28px; }
  .metrics-grid { padding: 20px 14px !important; gap: 12px !important; }
  .metric-counter { font-size: clamp(1.8rem, 4.5vw, 2.5rem) !important; }
  .metric-label { font-size: 0.75rem !important; }
}

@media (max-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px 12px !important;
    border-radius: 14px !important;
    padding: 18px 12px !important;
  }
  .metric-item {
    border-right: none !important;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(10, 25, 47, 0.07);
  }
  .metric-item:nth-child(3),
  .metric-item:nth-child(4) { border-bottom: none; }
}

@media (max-width: 480px) {
  .metrics-section { margin-top: -10px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; padding: 14px 10px !important; }
  .metric-counter { font-size: clamp(1.6rem, 6vw, 2rem) !important; }
  .metric-label { font-size: 0.68rem !important; letter-spacing: 0.04em !important; }
}

/* ============================================================
   5. SECTION HEADERS AND TYPOGRAPHY
   ============================================================ */
@media (max-width: 768px) {
  .section-header h2 { font-size: clamp(1.6rem, 5.5vw, 2.2rem) !important; margin-block-end: 10px !important; }
  .section-header p { font-size: clamp(0.88rem, 2.8vw, 1rem) !important; }
  .section-header { margin-block-end: clamp(24px, 5vw, 40px) !important; }
  .section-padding { padding-block: clamp(44px, 8vw, 72px) !important; }
  h2 { font-size: clamp(1.6rem, 5.5vw, 2.3rem) !important; }
  h3 { font-size: clamp(1.15rem, 3.5vw, 1.5rem) !important; }
}

@media (max-width: 480px) {
  h1 { font-size: clamp(1.6rem, 7vw, 2.2rem) !important; }
  h2 { font-size: clamp(1.4rem, 6vw, 1.8rem) !important; }
  h3 { font-size: clamp(1.05rem, 4vw, 1.3rem) !important; }
  .section-padding { padding-block: clamp(36px, 7vw, 56px) !important; }
}

/* ============================================================
   6. TREATMENT CARDS GRID
   ============================================================ */
@media (max-width: 900px) {
  .treatments-grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
}

@media (max-width: 580px) {
  .treatments-grid-4 { grid-template-columns: 1fr !important; gap: 16px !important; }
  .treatment-card-img-wrap { aspect-ratio: 16 / 9 !important; }
  .treatment-card-body { padding: 18px !important; }
  .treatment-card-title { font-size: 1.1rem !important; }
}

/* ============================================================
   7. DOCTOR / FOUNDER PORTRAIT SECTIONS
   ============================================================ */
@media (max-width: 900px) {
  .founder-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .founder-img-wrapper .founder-img { height: clamp(440px, 80vw, 560px) !important; object-position: center 56% !important; }
  .founder-quote { font-size: 1.1rem !important; }
}

@media (max-width: 768px) {
  .founder-img-wrapper .founder-img { height: clamp(380px, 86vw, 480px) !important; object-position: center 30% !important; }
  .founder-badge-pill { position: static !important; margin-top: 14px !important; padding: 14px 18px !important; width: 100% !important; }
  .founder-badge-title { font-size: 0.98rem !important; }
  .founder-badge-sub { font-size: 0.78rem !important; }
}

@media (max-width: 480px) {
  .founder-img-wrapper .founder-img { height: clamp(340px, 92vw, 440px) !important; object-position: center 30% !important; }
  .founder-img-wrapper { border-radius: 16px !important; }
  .founder-badge-pill { position: static !important; margin-top: 12px !important; padding: 12px 16px !important; width: 100% !important; }
  .founder-badge-title { font-size: 0.94rem !important; }
  .founder-badge-sub { font-size: 0.74rem !important; }
}

@media (max-width: 900px) {
  .doctors-duo-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .doctor-portrait-img { height: 380px !important; object-position: center 15% !important; }
}

@media (max-width: 640px) {
  .doctor-portrait-img { height: clamp(300px, 75vw, 360px) !important; object-position: center 15% !important; }
}

.doctor-profile-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
}
@media (max-width: 640px) {
  .doctor-profile-card { padding: 22px 18px !important; }
}

/* ============================================================
   8. PILLARS GRID (DIGITAL DENTISTRY)
   ============================================================ */
@media (max-width: 768px) {
  .pillars-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  .pillars-grid > .pillar-card { padding: 22px 18px !important; }
  .pillar-title { font-size: 1.1rem !important; }
  .pillar-desc { font-size: 0.86rem !important; }
}

@media (max-width: 520px) {
  .pillars-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .pillars-grid > .pillar-card {
    padding: 20px 18px !important;
  }
}

/* ============================================================
   9. SPECIALIST PANEL NOTICE
   ============================================================ */
@media (max-width: 640px) {
  .specialist-panel-notice { flex-direction: column; gap: 12px !important; padding: 18px 16px !important; }
  .specialist-panel-icon { width: 26px !important; height: 26px !important; min-width: 26px !important; max-width: 26px !important; }
}

/* ============================================================
   10. REVIEWS GRID
   ============================================================ */
@media (max-width: 900px) {
  .reviews-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  .google-review-card-highlight { grid-column: 1 / -1 !important; padding: 24px !important; }
}

@media (max-width: 640px) {
  .reviews-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .review-card { padding: 20px !important; }
  .review-quote { font-size: 0.92rem !important; }
  .review-author-avatar { width: 42px !important; height: 42px !important; }
  .review-author-name { font-size: 1rem !important; }
}

/* ============================================================
   11. FEES / PRICING TABLES
   ============================================================ */
@media (max-width: 900px) {
  .fees-table-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 14px !important; }
}

@media (max-width: 580px) {
  .fees-table-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .fee-card-item { padding: 16px !important; }
  .fees-category-title { font-size: 1.3rem !important; margin-bottom: 16px !important; }
}

/* ============================================================
   12. COMPARISON TABLE (Medical Tourism)
   ============================================================ */
@media (max-width: 768px) {
  .comparison-table-wrapper { border-radius: 10px !important; }
  .comparison-table { font-size: 0.84rem !important; }
  .comparison-table th, .comparison-table td { padding: 12px 14px !important; }
}

@media (max-width: 480px) {
  .comparison-table { font-size: 0.78rem !important; }
  .comparison-table th, .comparison-table td { padding: 10px 10px !important; }
}

/* ============================================================
   13. GALLERY GRID
   ============================================================ */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
}

@media (max-width: 580px) {
  .gallery-grid { grid-template-columns: 1fr !important; gap: 14px !important; }
  .gallery-item { aspect-ratio: 4/3 !important; border-radius: 12px !important; }
}

/* ============================================================
   14. CONTACT PAGE
   ============================================================ */
@media (max-width: 900px) {
  .contact-grid-2col,
  .contact-layout-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .contact-showcase-grid {
    grid-template-columns: 1fr !important;
    border-radius: 16px !important;
    margin-bottom: 36px !important;
  }
  .contact-primary-photo {
    height: 260px !important;
    min-height: 220px !important;
  }
  .contact-info-col {
    padding: 24px 20px !important;
  }
}

@media (max-width: 640px) {
  .contact-primary-photo {
    height: 220px !important;
  }
  .contact-info-col {
    padding: 20px 16px !important;
  }
}

/* ============================================================
   15. APPOINTMENT / FORMS
   ============================================================ */
@media (max-width: 768px) {
  .appointment-layout,
  .form-layout-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .form-grid-2col { grid-template-columns: 1fr !important; gap: 0 !important; }
  .form-input, .form-textarea, .form-select {
    font-size: 1rem !important;
    padding: 13px 14px !important;
    min-height: 44px;
  }
  .form-textarea { min-height: 120px !important; }
}

/* ============================================================
   16. FOOTER RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 28px !important; }
}

@media (max-width: 580px) {
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .site-footer { padding-top: 40px !important; }
}

@media (max-width: 480px) {
  .subfooter-inner { flex-direction: column; align-items: center; text-align: center; gap: 10px !important; }
  .subfooter-links { flex-wrap: wrap; justify-content: center; gap: 12px !important; }
}

/* ============================================================
   17. ACCREDITATION BADGES BAR
   ============================================================ */
@media (max-width: 768px) {
  .badges-flex { gap: 16px !important; justify-content: center; }
  .badge-item { font-size: 0.76rem !important; letter-spacing: 0.06em !important; }
}

@media (max-width: 480px) {
  .badges-flex { flex-direction: column; align-items: flex-start; gap: 14px !important; padding-inline: 8px; }
}

/* ============================================================
   18. VIDEO SHOWCASE
   ============================================================ */
@media (max-width: 768px) {
  .clinic-video-wrapper { border-radius: 14px !important; border-width: 1px !important; }
  .video-badge { top: 10px !important; left: 10px !important; font-size: 0.7rem !important; padding: 6px 12px !important; }
}

/* ============================================================
   19. ABOUT PAGE — CREDENTIALS BAR
   ============================================================ */
@media (max-width: 768px) {
  .credentials-bar-grid,
  .about-stats-row { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
}

@media (max-width: 480px) {
  .credentials-bar-grid,
  .about-stats-row { grid-template-columns: 1fr !important; gap: 12px !important; }
}

/* ============================================================
   20. GENERAL LAYOUT TWO-COLUMN OVERRIDES
   ============================================================ */
@media (max-width: 900px) {
  .grid-2col,
  .two-col-grid,
  .split-layout { grid-template-columns: 1fr !important; gap: 28px !important; }
}

/* ============================================================
   21. GLOBAL TOUCH TARGET AND SPACING POLISH
   ============================================================ */
@media (max-width: 768px) {
  a.button, button.button, .nav-pill-btn, .menu-nav-link, .topbar-link { min-height: 44px; }
  .container { padding-inline: clamp(14px, 4vw, 20px) !important; }
  .treatment-card:hover,
  .review-card:hover,
  .fee-card-item:hover,
  .pillar-card:hover { transform: none !important; }
}

/* ============================================================
   22. FLOATING WHATSAPP / CTA BUTTON
   ============================================================ */
@media (max-width: 768px) {
  .floating-whatsapp, .whatsapp-float, .sticky-cta {
    bottom: 16px !important;
    right: 16px !important;
    width: 52px !important;
    height: 52px !important;
  }
}

/* ============================================================
   23. MEDICAL TOURISM PAGE
   ============================================================ */
@media (max-width: 768px) {
  .medical-tourism-grid, .tourism-layout { grid-template-columns: 1fr !important; gap: 28px !important; }
  .tourism-package-card { padding: 20px !important; }
}

/* ============================================================
   24. PRIVACY / TERMS / POLICY PAGES
   ============================================================ */
@media (max-width: 768px) {
  .policy-content { padding: 28px 20px !important; border-radius: 14px !important; }
}

/* ============================================================
   25. SCROLL AND OVERFLOW FIXES
   ============================================================ */
html, body { overflow-x: hidden; max-width: 100vw; }

@media (max-width: 768px) {
  img { max-width: 100%; height: auto; }
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ============================================================
   26. HERO STATS BAR / TRUST INDICATORS
   ============================================================ */
@media (max-width: 640px) {
  .hero-trust-bar, .trust-indicators {
    flex-direction: column;
    align-items: center;
    gap: 12px !important;
    text-align: center;
  }
  .trust-divider { display: none; }
}

/* ============================================================
   27. LOCATION MAP / EMBED
   ============================================================ */
@media (max-width: 768px) {
  .map-embed-wrapper, .gmap-container { height: 280px !important; border-radius: 14px !important; }
}

@media (max-width: 480px) {
  .map-embed-wrapper, .gmap-container { height: 240px !important; }
}

/* ============================================================
   28. VISIBILITY HELPERS
   ============================================================ */
@media (max-width: 640px) {
  .tab-is-hide, .desktop-only { display: none !important; }
}

@media (min-width: 641px) {
  .mobile-only { display: none !important; }
}

/* ============================================================
   29. DARK SECTIONS ON MOBILE
   ============================================================ */
@media (max-width: 640px) {
  .accreditation-bar { padding-block: 20px !important; }
}

/* ============================================================
   30. ULTRA-COMPACT MOBILE SCREENS (320px – 360px)
   Hardened for narrow phones, outer folding screens & iPhone SE1
   ============================================================ */
@media (max-width: 360px) {
  .container { padding-inline: 10px !important; }
  .navbar-inner { gap: 4px !important; }
  .brand-logo-img { width: 28px !important; height: 28px !important; }
  .brand-name { font-size: 0.98rem !important; }
  .nav-actions { gap: 4px !important; }
  .nav-pill-btn {
    padding: 5px 8px !important;
    font-size: 0.70rem !important;
    letter-spacing: 0 !important;
  }
  .menu-toggle-btn {
    padding: 5px 6px !important;
    min-height: 30px !important;
    min-width: 30px !important;
  }
  .booking-wrapper {
    padding: 14px 8px !important;
  }
  .calendar-grid {
    gap: 3px !important;
  }
  .calendar-day {
    padding: 8px 1px !important;
    font-size: 0.76rem !important;
  }
  .calendar-day-header {
    font-size: 0.68rem !important;
  }
  .fee-card-item {
    padding: 14px 10px !important;
  }
  .metrics-grid {
    padding: 12px 8px !important;
    gap: 8px !important;
  }
  .menu-nav-link {
    font-size: 1.08rem !important;
    padding: 8px 10px !important;
  }
  .menu-mobile-action-btn {
    padding: 10px 8px !important;
    font-size: 0.82rem !important;
  }
}
