/* ==========================================================================
   Al-SHIFA Dental Clinic — Responsive
   Breakpoints: 320 / 375 / 390 / 430 / 768 / 1024 / 1440 / 1920
   ========================================================================== */

@media (max-width: 1200px) {
  .hero__grid {
    gap: 2rem;
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1024px) {
  .nav {
    position: fixed;
    top: calc(var(--topbar-h) + var(--header-h));
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease), visibility 0.35s;
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--topbar-h) - var(--header-h));
    overflow-y: auto;
  }

  body.nav-open .nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .nav__link {
    padding: 0.85rem 1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header__call span {
    display: none;
  }

  .hero__grid,
  .split,
  .doctor-card,
  .contact-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero__title {
    max-width: none;
  }

  .hero__image-wrap {
    aspect-ratio: 16 / 11;
    max-width: 640px;
  }

  .hero__badge {
    left: 12px;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .doctor-card__photo {
    max-width: 360px;
    margin-inline: auto;
  }

  .sticky-cta {
    position: static;
  }

  .split__float {
    right: 12px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 68px;
  }

  body {
    padding-bottom: calc(var(--mobile-bar-h) + 0.5rem);
  }

  .top-bar__item--muted span,
  .top-bar__divider {
    display: none;
  }

  .section {
    padding: 3.5rem 0;
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }

  .services-grid,
  .team-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cta-band {
    padding: 2.25rem 1.35rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .whatsapp-float {
    bottom: calc(var(--mobile-bar-h) + 1rem);
    right: 1rem;
    width: 54px;
    height: 54px;
  }

  .mobile-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    background: #fff;
    border-top: 1px solid var(--border);
    box-shadow: 0 -6px 24px rgba(8, 107, 107, 0.1);
    min-height: var(--mobile-bar-h);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .mobile-bar__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.72rem;
    color: var(--text-secondary);
    padding: 0.55rem 0.35rem;
    min-height: 48px;
  }

  .mobile-bar__btn i {
    font-size: 1.15rem;
    color: var(--primary-deep);
  }

  .mobile-bar__btn--wa i {
    color: #25D366;
  }

  .mobile-bar__btn--book {
    background: var(--mint);
    color: var(--primary-deep);
  }

  .header__actions .btn--primary span {
    font-size: 0.8rem;
  }

  .rating-panel {
    padding: 1.75rem 1.25rem;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 1.5rem, var(--container));
  }

  .trust-grid,
  .services-grid,
  .why-grid,
  .gallery-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .btn-group {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-group .btn {
    width: 100%;
  }

  .hero__meta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__chip {
    justify-content: center;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-hero {
    padding: 2.5rem 0 2rem;
  }

  .appt-form,
  .contact-card {
    padding: 1.25rem;
  }

  .header__actions .btn--outline {
    display: none;
  }
}

@media (max-width: 375px) {
  .brand__sub {
    display: none;
  }

  .hero__title {
    font-size: 2.1rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }
}

@media (min-width: 1440px) {
  :root {
    --container: 1240px;
  }
}

@media (min-width: 1920px) {
  :root {
    --container: 1320px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
