/* ==========================================================================
   FIRST CHOICE DENTAL CLINIC - RESPONSIVE LAYOUT BREAKPOINTS
   Mobile-First Architecture to Ultra-Wide Monitors
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ULTRA WIDE MONITORS (1536px+)
   -------------------------------------------------------------------------- */
@media (min-width: 1536px) {
  html {
    font-size: 17px;
  }
  .container {
    max-width: 1480px;
  }
  .hero-title {
    font-size: 4.8rem !important;
  }
}

/* --------------------------------------------------------------------------
   2. DESKTOP & LARGE LAPTOPS (1025px - 1440px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .section-title {
    font-size: 2.6rem;
  }
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 2rem;
  }
}

/* --------------------------------------------------------------------------
   3. TABLETS & SMALL LAPTOPS (769px - 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root {
    --navbar-height: 80px;
  }
  
  .nav-menu, .nav-actions .btn-primary {
    display: none;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .section-padding {
    padding: 70px 0;
  }
  
  .section-title {
    font-size: 2.3rem;
  }
  
  /* Hero section tablet grid adjust */
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center !important;
  }
  
  .hero-stats-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  
  /* Footer responsive grid */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .treatment-card-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .doctor-profile-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .appointment-section-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  .gallery-masonry {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* --------------------------------------------------------------------------
   4. MOBILES & SMALL TABLETS (481px - 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .section-padding {
    padding: 55px 0;
  }
  
  .section-title {
    font-size: 2.0rem;
  }

  .hero-title {
    font-size: 2.8rem !important;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }
  
  .treatment-card-grid {
    grid-template-columns: 1fr !important;
  }

  .appointment-section-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .site-footer {
    padding-bottom: 90px !important;
  }

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

  .footer-bottom {
    flex-direction: column !important;
    gap: 0.6rem !important;
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    padding-right: 0 !important;
  }

  .footer-credit {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .gallery-masonry {
    grid-template-columns: 1fr !important;
  }

  .floating-actions-bar {
    bottom: 16px;
    right: 16px;
  }
  
  .floating-action-btn {
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
  }

  /* Form layouts */
  .form-row {
    grid-template-columns: 1fr !important;
  }

  /* Hero image floating badges layout on mobile screens */
  .clinic-status-badge {
    top: 12px !important;
    right: 12px !important;
    padding: 0.55rem 0.85rem !important;
    box-shadow: var(--shadow-md) !important;
  }

  .glass-panel[style*="bottom: -20px"] {
    bottom: 12px !important;
    left: 12px !important;
    padding: 0.55rem 0.85rem !important;
    box-shadow: var(--shadow-md) !important;
  }

  .glass-panel[style*="bottom: 30px"] {
    display: none !important; /* Prevents badge overlapping with floating action buttons on mobile */
  }

  /* Interactive Before/After slider height adjust for smartphones */
  .before-after-container {
    height: 260px !important;
    margin-bottom: 2rem !important;
  }

  /* Prevent iOS Safari automatic input zoom */
  input[type="text"],
  input[type="tel"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* --------------------------------------------------------------------------
   5. COMPACT MOBILES & SMARTPHONES (320px - 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
    -webkit-tap-highlight-color: transparent;
  }

  .container {
    padding: 0 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .nav-brand-title {
    font-size: 1.15rem;
  }

  .hero-title {
    font-size: 2.1rem !important;
  }

  .section-title {
    font-size: 1.7rem !important;
  }

  .doctor-profile-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    text-align: center;
  }

  .doctor-credential-cards {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .mobile-drawer {
    width: 85% !important;
    max-width: 320px !important;
    padding: 1.5rem 1.25rem !important;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-nav-links {
    gap: 1rem !important;
  }

  .mobile-nav-link {
    font-size: 1.05rem !important;
    padding: 0.35rem 0;
  }
  
  .stats-card {
    padding: 1.25rem 0.85rem !important;
  }

  .gallery-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.4rem !important;
  }

  .gallery-filter-btn {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.8rem !important;
  }

  .clinic-status-badge h4, 
  .glass-panel[style*="bottom: 12px"] h4 {
    font-size: 0.82rem !important;
  }

  .glass-panel[style*="bottom: 12px"] p {
    font-size: 0.7rem !important;
  }

  .before-after-container {
    height: 220px !important;
  }

  /* Adjust hero operatory image height for compact smartphones */
  .hero-grid img {
    height: 280px !important;
  }

  /* Universal Mobile Centering & Tab Content Alignment */
  .section-header {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .section-subtitle {
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .gold-badge,
  .hero-badge {
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  /* Gallery filter tabs centered pill layout */
  .gallery-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin: 0 auto 2rem auto !important;
    width: 100% !important;
    padding: 0 0.25rem !important;
    box-sizing: border-box !important;
  }

  .gallery-filter-btn {
    text-align: center !important;
    flex: 0 1 auto !important;
    margin: 0 !important;
    border-radius: var(--radius-full) !important;
    white-space: nowrap !important;
    padding: 0.4rem 0.85rem !important;
    font-size: 0.82rem !important;
  }

  /* Doctor bio details, registration badges, and credentials cards */
  .doctor-profile-grid {
    text-align: center !important;
  }

  .doctor-profile-grid p[style*="font-weight: 700"],
  section p[style*="font-weight: 700"] {
    justify-content: center !important;
    text-align: center !important;
  }

  /* Footer grid centering on mobile */
  .footer-grid > div {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .footer-contact-info,
  .footer-links-list {
    align-items: center !important;
    text-align: center !important;
  }

  .footer-contact-item {
    justify-content: center !important;
    text-align: center !important;
  }

  /* Contact Page Mobile Cards Centering & Alignment */
  .contact-details-col h2,
  .contact-details-col h4,
  .section-padding h2 {
    text-align: center !important;
  }

  .contact-info-card-flex {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 1rem !important;
  }

  .contact-info-card-flex > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .contact-info-card-flex .btn-group {
    justify-content: center !important;
    width: 100% !important;
  }

  .contact-card-btn {
    margin-top: 0.85rem !important;
    display: inline-flex !important;
    justify-content: center !important;
    align-self: center !important;
  }

  /* About Page Mobile Story & Mission Centering */
  .about-story-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
    text-align: center !important;
  }

  .about-story-grid img {
    height: 300px !important;
    width: 100% !important;
    object-fit: cover !important;
  }

  .about-mission-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
  }
}
