/* ============================================================
   ANUVANSH CLINIC — Mobile-First Optimization Layer
   Loaded after all other stylesheets. Targets ≤960/640/420px.
   ============================================================ */

/* ---------- Anchor offset under fixed nav (all sizes) ---------- */
section[id],
div[id] {
  scroll-margin-top: calc(var(--nav-h) + 14px);
}

/* ---------- Touch feedback & tap highlight ---------- */
a,
button,
.btn,
.card,
.accordion__btn,
.jump__link,
.accordion__icon {
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.card:active {
  transform: scale(0.99);
}

.jump__link:active {
  transform: scale(0.96);
}

/* Comfortable hit area for card links */
.card__link {
  min-height: 44px;
  align-items: center;
}

/* ---------- Fixed mobile action bar (Call + Book) ---------- */
.mobile-actionbar {
  display: none;
}

@media (max-width: 640px) {
  .mobile-actionbar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    gap: 10px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(251, 246, 248, 0.94);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--c-line);
    box-shadow: 0 -10px 28px rgba(67, 32, 46, 0.1);
  }

  .mobile-actionbar__btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    border-radius: var(--r-pill);
    font-weight: 700;
    font-size: 0.95rem;
    border: 1.5px solid var(--c-primary);
    color: var(--c-primary);
    background: transparent;
  }

  .mobile-actionbar__btn--primary {
    background: var(--c-primary-deep);
    border-color: var(--c-primary-deep);
    color: #fff;
    box-shadow: var(--shadow-md);
  }

  body {
    padding-bottom: 86px;
  }

  .footer {
    margin-bottom: 0;
  }
}

/* ============================================================
   Tablet & small laptop refinements (≤ 960px)
   ============================================================ */

@media (max-width: 960px) {
  .nav__inner {
    gap: 12px;
  }

  .nav__brand img {
    width: 40px;
    height: 40px;
  }

  .nav__brand-name {
    font-size: 1.04rem;
  }

  .mobile-menu {
    padding: calc(var(--nav-h) + 20px) 24px calc(28px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* ============================================================
   Phone (≤ 640px) — intentional mobile compositions
   ============================================================ */

@media (max-width: 640px) {
  /* --- Typography & spacing --- */
  .section-head {
    margin-bottom: 34px;
  }

  .page-hero {
    padding-top: calc(var(--nav-h) + 30px);
    padding-bottom: 38px;
  }

  .page-hero h1 {
    letter-spacing: -0.01em;
    margin-top: 14px;
  }

  .page-hero .lede {
    margin-top: 14px;
  }

  .breadcrumb {
    font-size: 0.8rem;
    flex-wrap: wrap;
  }

  .jump__link {
    padding: 11px 16px;
    font-size: 0.85rem;
  }

  /* --- Hero --- */
  .hero {
    padding-top: calc(var(--nav-h) + 22px);
    padding-bottom: 30px;
  }

  .hero__title {
    margin-top: 16px;
  }

  .hero__lede {
    margin-top: 16px;
  }

  .hero__actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 26px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__trust {
    gap: 12px 20px;
    margin-top: 24px;
    padding-top: 18px;
  }

  .hero__trust li {
    font-size: 0.84rem;
  }

  .hero__img-wrap {
    width: min(100%, 300px);
    margin-bottom: 6px;
  }

  .hero__float {
    padding: 9px 12px;
    gap: 9px;
  }

  .hero__float--a {
    top: 5%;
    left: 2%;
  }

  .hero__float--b {
    bottom: 7%;
    right: 2%;
  }

  .hero__float-icon {
    width: 34px;
    height: 34px;
  }

  .hero__float strong {
    font-size: 0.84rem;
  }

  .hero__float small {
    font-size: 0.72rem;
  }

  /* --- Buttons & banners --- */
  .btn-lg {
    width: 100%;
  }

  .cta-banner {
    padding: 32px 22px;
    border-radius: var(--r-md);
  }

  .cta-banner__actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-banner__actions .btn {
    width: 100%;
  }

  /* --- Cards & content blocks --- */
  .card {
    padding: 24px 20px;
  }

  .card__icon {
    width: 48px;
    height: 48px;
  }

  .testimonial {
    padding: 24px 20px;
  }

  .glance {
    padding: 24px 18px;
  }

  .form-card {
    padding: 22px 18px;
    border-radius: var(--r-md);
  }

  .field input,
  .field select,
  .field textarea {
    min-height: 54px;
    font-size: 1rem;
  }

  .field textarea {
    min-height: 130px;
  }

  .contact-row {
    padding-block: 16px;
    gap: 14px;
  }

  .contact-row__icon {
    width: 42px;
    height: 42px;
  }

  /* --- Programme spotlight --- */
  .prog {
    padding-block: 34px;
    gap: 24px;
  }

  .prog__card {
    padding: 24px 18px;
  }

  .prog__card-head {
    flex-wrap: wrap;
    gap: 12px;
  }

  .prog__acronym {
    font-size: 1.6rem;
    padding: 10px 12px;
  }

  .prog__score {
    grid-template-columns: 76px 1fr;
  }

  .apf-bar {
    grid-template-columns: 100px 1fr;
    gap: 10px;
  }

  .loc-card__hours {
    font-size: 0.86rem;
  }

  /* --- Steps --- */
  .step {
    grid-template-columns: 52px 1fr;
    gap: 14px;
    padding-bottom: 30px;
  }

  .step__num {
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
  }

  .step::before {
    left: 25px;
    top: 48px;
  }

  /* --- Locations --- */
  .loc-card__body {
    padding: 22px 18px;
  }

  .loc-card__actions .btn {
    flex: 1 1 45%;
    min-width: 0;
  }

  .map-frame {
    min-height: 300px;
  }

  /* --- Footer --- */
  .footer {
    padding: 48px 0 30px;
  }

  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    margin-top: 40px;
  }

  .socials a {
    width: 44px;
    height: 44px;
  }

  /* --- Accordion --- */
  .accordion__btn {
    padding: 18px 18px;
    font-size: 0.98rem;
  }
}

/* ============================================================
   Small phones (≤ 420px)
   ============================================================ */

@media (max-width: 420px) {
  .nav__brand-tag {
    display: none;
  }

  .nav__brand-name {
    font-size: 0.98rem;
  }

  .hero__float strong {
    font-size: 0.8rem;
  }

  .hero__float small {
    font-size: 0.68rem;
  }

  .mobile-menu__link {
    font-size: clamp(1.5rem, 7vw, 1.8rem);
    padding: 7px 0;
  }

  .stats .stat {
    padding: 22px 12px;
  }
}
