/*
 * Phone layout (screens narrower than 576px).
 * Loaded with a matching media attribute, and every rule is also inside the
 * media query below, so tablet and desktop layouts are never affected.
 */
@media (max-width: 575.98px) {

  /* ---------- Top bar: one compact row (hours and badge appear elsewhere) ---------- */
  .topbar { font-size: 0.75rem; padding: 0.4rem 0; }
  .topbar .w { justify-content: center; gap: 0; }
  .topbar-info { justify-content: center; gap: 0.25rem 1rem; text-align: center; }
  .topbar-info a { padding: 0.3rem 0; }
  .topbar-info > span:last-child,
  .topbar .w > div:last-child { display: none; }

  /* ---------- Header: logo, round call button, menu button ---------- */
  .nav-container { padding: 0.55rem 0; gap: 0.75rem; }
  .brand-logo img { height: 44px; }
  .nav-actions { gap: 0.5rem; flex-shrink: 0; }
  .nav-tel {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--blue-tint);
    border: 1px solid var(--bd);
    align-items: center;
    justify-content: center;
  }
  .nav-tel span,
  .nav-tel strong {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .nav-tel::before {
    content: "\f095";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.05rem;
    color: var(--blue-brand);
  }
  .mobile-nav-toggle {
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ---------- Type and spacing ---------- */
  section { padding: 3rem 0; }
  h2 { font-size: 1.65rem; }
  .page-banner { padding: 2.5rem 0; }
  .page-banner h1 { font-size: 2rem; }
  .section-head { margin-bottom: 2.2rem; }
  .section-head p { font-size: 0.98rem; }

  /* ---------- Buttons: full width, text may wrap cleanly ---------- */
  .btn-custom { white-space: normal; text-align: center; line-height: 1.3; padding: 0.7rem 1.1rem; }

  /* ---------- Hero ---------- */
  .hero { padding: 2.75rem 0 5.5rem; }
  .hero h1 { font-size: 2.1rem; }
  .hero-lead { font-size: 1rem; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .hero-actions .btn-custom { width: 100%; }
  .hero-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem 1rem;
    margin-top: 1.8rem;
    padding-top: 1.4rem;
  }
  .trust-divider { display: none; }
  .trust-item strong { font-size: 1.1rem; }
  .hero-controls { bottom: 18px; right: 50%; transform: translateX(50%); }
  .slider-dot { position: relative; }
  .slider-dot::after { content: ""; position: absolute; inset: -12px -4px; }

  /* ---------- Card grids: one full-width column (no clipped cards) ---------- */
  .features-grid,
  .services-grid,
  .doctors-grid,
  .reviews-grid,
  .blogs-grid { grid-template-columns: 1fr; }
  .features-bar { padding: 1.4rem 0; }
  .features-grid { gap: 0.8rem; }

  /* ---------- Insurance banner and booking section ---------- */
  .insurance-banner,
  .booking-section { padding: 1.9rem 1.25rem; border-radius: var(--radius-md); }
  .insurance-banner .btn-custom,
  .booking-section .btn-custom { width: 100%; }
  .insurance-grid { grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 1.4rem; }
  .insurance-item { padding: 0.7rem 0.65rem; gap: 0.45rem; align-items: flex-start; }
  .insurance-item i { font-size: 1rem; margin-top: 2px; }
  .insurance-item strong { font-size: 0.86rem; line-height: 1.25; }
  .insurance-item span { font-size: 0.74rem; line-height: 1.3; display: block; }
  .booking-grid { gap: 1.6rem; }
  .booking-form-card { padding: 1.5rem 1.25rem; }

  /* Dark call-to-action boxes on service pages and blog posts */
  .sd-cta-banner { padding: 1.6rem 1.25rem !important; }
  .sd-cta-banner .btn-custom { width: 100%; }

  /* ---------- Forms: 16px text stops iPhones zooming in; bigger checkbox ---------- */
  .form-control-custom { font-size: 16px; }
  .form-check input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }

  /* ---------- Footer: links side by side, room for the floating buttons ---------- */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.2rem 1.25rem; margin-bottom: 2.5rem; }
  .footer-brand,
  .footer-grid > .footer-col:last-child { grid-column: 1 / -1; }
  .footer-links li { margin-bottom: 0.15rem; }
  .footer-links a { padding: 0.35rem 0; font-size: 0.9rem; }
  .footer-contact-item a { display: inline-block; padding: 0.3rem 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding-bottom: 4.5rem; }
  .footer-legal-links { gap: 0.25rem 1.25rem; }
  .footer-legal-links a { display: inline-block; padding: 0.4rem 0; }

  /* ---------- Floating buttons: compact so they don't cover content ---------- */
  .a11y-trigger {
    bottom: 16px;
    left: 16px;
    width: 46px;
    height: 46px;
    padding: 0;
    justify-content: center;
  }
  .a11y-trigger span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  #backToTopBtn { bottom: 16px !important; right: 16px !important; }

  /* ---------- Cookie banner: shorter, buttons in a grid, above the floating buttons ---------- */
  .consent-banner { padding: 0.9rem 0; z-index: 9999; }
  .consent-container { gap: 0.8rem; }
  .consent-text { font-size: 0.82rem; }
  .consent-text p { font-size: 0.76rem !important; line-height: 1.45; }
  .consent-buttons { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
  .btn-consent { text-align: center; padding: 0.6rem 0.5rem; }
  .btn-consent-pref { grid-column: 1 / -1; }
}
