/* ============================================================
   Legacy web layout — mobile navigation + responsive polish
   common.css hides .nav-links below 980px with nothing in its
   place, which leaves phones with no way to navigate. This adds
   a burger + drawer and tightens a few small-screen details.
   ============================================================ */

.nav-burger { display: none; }

/* The drawer carries its own "Talk to us" only where the header CTA
   is hidden (below 560px) — otherwise it would show twice. */
.nav-drawer-cta { display: none; }

@media (max-width: 980px) {
  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    z-index: 210;
    flex-shrink: 0;
  }
  .nav-burger span {
    display: block;
    width: 24px;
    height: 2px;
    border-radius: 2px;
    background: var(--cream-100, #F7F1E6);
    transition: transform .3s ease, opacity .3s ease;
  }
  nav.top.scrolled .nav-burger span { background: var(--cream-100, #F7F1E6); }
  .nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Drawer — sits below the header (z-index 100) so the burger stays
     tappable to close it. */
  .nav-links.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 95;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 96px 24px calc(40px + env(safe-area-inset-bottom));
    background: #0A2E26;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.is-open li { width: 100%; max-width: 360px; }
  .nav-links.is-open a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    width: 100%;
    font-size: 1.15rem;
    color: var(--cream-100, #F7F1E6);
  }

  html.nav-open, html.nav-open body { overflow: hidden; }

  /* nav.top.scrolled sets backdrop-filter, which makes the header the
     containing block for its position:fixed children — the drawer would
     be clipped to the header's height. Drop it while the menu is open. */
  html.nav-open nav.top,
  html.nav-open nav.top.scrolled {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* Opaque cream, not translucent: the header paints over the dark drawer
       and the logo artwork is drawn for a light ground. */
    background: #F7F1E6 !important;
  }
  html.nav-open .nav-burger span { background: #0A2E26 !important; }

  /* The logo is drawn oversized and pulled back with negative margins;
     scale it down proportionally so it doesn't crowd the burger. */
  .logo img { height: 104px !important; margin: -24px 0 !important; }
  .nav-inner { gap: 12px; }
  .nav-cta .btn-sm { padding: 10px 14px; font-size: 13px; }
}

@media (max-width: 560px) {
  .logo img { height: 92px !important; margin: -21px 0 !important; }
  /* Keep the enquiry CTA on screen — compact rather than hidden, so it is
     reachable without opening the menu first. */
  .nav-cta .btn-sm { padding: 9px 11px; font-size: 12px; }
  .nav-cta .btn-sm .arrow { display: none; }
  .nav-links.is-open .nav-drawer-cta { display: block; }
}

/* Prevent iOS zoom-on-focus in the legacy enquiry forms. */
@media (max-width: 980px) {
  input, select, textarea { font-size: 16px !important; }

  /* Comfortable hit areas for the card call-to-actions. */
  .delivery-card .more, .course-card .more, .blog-card .more {
    min-height: 44px;
    align-items: center;
  }
  /* The legacy footer uses bare <footer> + .foot-col, not .footer. */
  footer .foot-col li a,
  footer .foot-bottom .legal a {
    display: inline-block;
    padding: 10px 0;
  }
  footer .foot-col li { margin-bottom: 0; }
  footer .foot-bottom .legal { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .crumbs a { display: inline-block; padding: 6px 0; }
}
