/* v2026-04-23 — hamburger breakpoint 992px; desktop nav shows on laptops >=993px */
/* ==================== TABLET (1200px — nav collapses to hamburger) ==================== */
@media (max-width: 992px) {
  :root {
    --h1: 28px;
    --h2: 24px;
    --h3: 20px;
    --section-pad: 54px;
  }

  .grid-2 { grid-template-columns: 1fr; gap: 30px; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }

  /* Nav */
  .nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 80px 24px 32px;
    box-shadow: -4px 0 30px rgba(0,0,0,0.2);
    z-index: 999;
    align-items: flex-start;
    gap: 4px;
    overflow-y: auto;
  }
  .nav.open { display: flex; }
  .nav a { width: 100%; padding: 12px 16px; font-size: 15px; border-radius: var(--radius-sm); }
  .nav .btn-primary, .nav .btn-cyan { width: 100%; justify-content: center; margin-top: 16px; }

  .menu-toggle { display: block; z-index: 1001; }
  .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
  .menu-toggle.active span:nth-child(2) { opacity: 0; }
  .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: 0;
  }

  /* Hero */
  .hero { min-height: 80vh; }
  .hero-content h1 { font-size: 32px; }
  .hero-content p { font-size: 16px; }
  .hero-logo { max-width: 350px; }
  /* Hide hero video on mobile — static poster image only (saves ~12MB download) */
  .hero-video-bg video { display: none; }

  /* Promo */
  .promo-inner { flex-direction: column; text-align: center; }
  .promo-price { font-size: 42px; }

  /* 3-Pillar Highlights */
  .highlights-grid { grid-template-columns: 1fr; gap: 20px; }
  .highlight-card--braces { transform: none; order: -1; }
  .highlight-card--braces:hover { transform: translateY(-6px); }
  .highlight-price .price-amount { font-size: 54px; }

  /* Cherry Hero */
  .cherry-hero { grid-template-columns: 1fr; gap: 28px; padding: 28px; }
  .cherry-price { font-size: 56px; }

  /* Adults section */
  .adults-grid { grid-template-columns: 1fr; gap: 32px; }
  .adults-image img { max-height: 380px; }
  .adults-content h2 { font-size: 28px; }
  .adults-bullets { grid-template-columns: 1fr; }

  /* Floating pills — mobile: compact side-by-side above the mobile-cta bar.
     Braces on the left, Adults on the right. Locked to equal height so both
     pills line up perfectly with all 3 checkmarks visible. */
  .floating-braces,
  .floating-adults {
    display: flex;
    bottom: 120px;
    padding: 11px 32px 11px 10px;
    max-width: calc(50vw - 14px);
    height: 180px;
    gap: 8px;
    animation: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  }
  .floating-braces { left: 8px; right: auto; }
  .floating-adults { right: 8px; left: auto; display: flex; }

  /* Compact icons */
  .floating-braces-icon,
  .floating-adults-icon { font-size: 26px; }

  /* Tighter label + hide bullets beyond the top 2 to keep pills short */
  .floating-braces-label,
  .floating-adults-label {
    font-size: 11px;
    letter-spacing: 0.6px;
    margin-bottom: 2px;
    text-shadow: none;
  }
  .floating-braces-list,
  .floating-adults-list {
    font-size: 10.5px;
    line-height: 1.25;
    margin-top: 3px;
    font-weight: 700;
  }
  .floating-braces-list li,
  .floating-adults-list li {
    padding: 2px 0 2px 13px;
  }
  .floating-braces-list li::before,
  .floating-adults-list li::before {
    font-size: 9px;
    top: 3px;
  }
  /* Show all 3 bullets on mobile */

  /* More visible close buttons — larger, solid dark background for contrast */
  .floating-braces-close,
  .floating-adults-close {
    width: 26px;
    height: 26px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    right: 4px;
    top: 4px;
    transform: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  }

  /* Dentist cards */
  .dentist-card { flex-direction: column; text-align: center; }
  .dentist-photo, .dentist-placeholder { width: 140px; height: 140px; }

  /* Mobile CTA */
  .mobile-cta { display: block; }
  body { padding-bottom: 70px; }

  /* Topbar — clean 2-item layout on mobile: phone on left, language toggle on right.
     Hide "Se Habla Español" and hours/Book Now to avoid wrapping/overflow on small screens. */
  .topbar { font-size: 12px; height: 36px; }
  .topbar .container { padding: 0 14px; }
  .topbar-left, .topbar-right { gap: 0; }
  .topbar-left > span:not(:first-child) { display: none; }
  .topbar-left .phone-number { font-size: 13px; }
  .topbar-right { display: flex; align-items: center; gap: 0; }
  .topbar-right > *:not(.lang-toggle) { display: none; }
  .topbar-right .lang-toggle { display: inline-flex; padding: 2px; }
  .topbar-right .lang-toggle-option { padding: 3px 9px; font-size: 11px; }
  .topbar-right .lang-toggle-option .flag { font-size: 12px; }

  /* Mobile: hide Services dropdown submenu (Services link goes directly to services.html) */
  .nav .dropdown-menu { display: none; }
  .nav-dropdown > a::after { content: ''; }
}

/* ==================== MOBILE (767px) ==================== */
@media (max-width: 767px) {
  :root {
    --h1: 24px;
    --h2: 22px;
    --h3: 18px;
    --section-pad: 40px;
  }

  .container { padding: 0 20px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }

  .hero { min-height: 70vh; }
  .hero-content h1 { font-size: 28px; }
  .hero-logo { max-width: 280px; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; justify-content: center; }

  .card { padding: 24px; }
  .btn { padding: 12px 24px; font-size: 13px; }
  .btn-lg { padding: 14px 28px; font-size: 14px; }

  .promo-price { font-size: 36px; }
  .promo-details .price-breakdown { font-size: 18px; }

  /* Highlights — mobile */
  .highlight-card { padding: 26px 22px 22px; }
  .highlight-price .price-amount { font-size: 46px; }
  .highlight-card h3 { font-size: 22px; }
  .modal-dialog { padding: 28px 22px 22px; border-radius: 16px; }
  .modal-header h3 { font-size: 22px; }

  .cta-band .btn { display: block; width: 100%; margin: 8px 0; }

  .insurance-grid img { height: 36px; }
}

/* ==================== SPANISH MOBILE FLOATER OVERRIDES ==================== */
@media (max-width: 992px) {
  html[lang^="es"] .floating-braces,
  html[lang^="es"] .floating-adults {
    max-width: calc(50vw - 10px);
    height: auto;
    min-height: 200px;
    padding: 11px 30px 11px 8px;
  }
  html[lang^="es"] .floating-braces-label,
  html[lang^="es"] .floating-adults-label {
    font-size: 10px;
    letter-spacing: 0.4px;
  }
  html[lang^="es"] .floating-braces-list,
  html[lang^="es"] .floating-adults-list {
    font-size: 9.5px;
    line-height: 1.25;
  }
  html[lang^="es"] .floating-braces-list li,
  html[lang^="es"] .floating-adults-list li {
    padding: 2px 0 2px 11px;
  }
  html[lang^="es"] .floating-braces-list li::before,
  html[lang^="es"] .floating-adults-list li::before {
    font-size: 8px;
    top: 4px;
  }
}
