/* Shared marketing pages: phone/tablet menu and contact UX repairs.
   Loaded AFTER enterprise-design-system.css, never inside a product app. */
@media (max-width:1100px) {
  /* Enterprise CSS reintroduced display:flex after the original mobile
     display:none, unintentionally exposing navigation on smaller screens. */
  .nav .nav-inner {position:relative;min-width:0;}
  .nav .nav-links {
    display:none;
    min-width:0;
    margin:0;
    padding:0;
    list-style:none;
  }
  .nav .nav-links.open {
    display:flex;
    position:absolute;
    top:calc(100% + 8px);
    left:0;right:0;
    z-index:1001;
    width:100%;
    max-height:calc(100vh - 90px);
    max-height:calc(100dvh - 90px);
    overflow-y:auto;
    overscroll-behavior:contain;
    flex-direction:column;
    align-items:stretch;
    gap:0;
    padding:10px;
    border:1px solid var(--dh-line,#dbe5ee);
    border-radius:14px;
    background:var(--dh-paper,#fff);
    box-shadow:0 18px 36px rgba(18,38,63,.18);
    -webkit-overflow-scrolling:touch;
  }
  .nav .nav-links > li {flex:0 0 auto;width:100%;min-width:0;}
  .nav .nav-links > li > a {
    display:flex;align-items:center;min-height:44px;
    padding:11px 12px;white-space:normal;line-height:1.35;
    color:var(--dh-ink-2,#263f5b);
  }
  .nav .nav-links .nav-cta {
    justify-content:center;margin-top:8px;padding:11px 14px;
    white-space:normal;text-align:center;
  }
  .nav .nav-links .nav-has-drop {
    display:grid;grid-template-columns:minmax(0,1fr) 44px;
    align-items:center;gap:0;
  }
  .nav .nav-links .nav-has-drop > a {grid-column:1;grid-row:1;}
  .nav .nav-links .nav-has-drop > .nav-disclosure {
    display:inline-flex;align-items:center;justify-content:center;
    grid-column:2;grid-row:1;width:44px;height:44px;min-height:44px;
    margin:0;border:1px solid transparent;border-radius:10px;
    color:var(--dh-ink-2,#263f5b);background:transparent;
    touch-action:manipulation;
  }
  .nav .nav-links .nav-has-drop > .nav-drop {
    display:none;position:static;grid-column:1/-1;
    width:100%;min-width:0;margin:0 0 9px;
    padding:2px 0 4px 12px;border:0;
    border-left:2px solid var(--dh-line-strong,#ccd7e4);
    border-radius:0;box-shadow:none;background:transparent;
    -webkit-backdrop-filter:none;backdrop-filter:none;
  }
  .nav .nav-links .nav-has-drop.drop-open > .nav-drop {display:block;}
  .nav .nav-links .nav-drop a {
    min-height:44px;display:flex;align-items:center;
    padding:9px 12px;white-space:normal;overflow-wrap:anywhere;
    line-height:1.4;
  }
  .nav .hamburger,.nav .theme-toggle {
    display:inline-flex;align-items:center;justify-content:center;
    flex:0 0 44px;min-width:44px;min-height:44px;
    touch-action:manipulation;
  }
  .nav .theme-toggle {margin-left:auto;}

  /* Analytics consent is already inserted after the first section; at
     tablet/phone widths it should never cover the contact form. */
  #devheal-consent {
    position:relative;inset:auto;z-index:auto;
    width:min(720px,calc(100% - 36px));max-width:100%;
    margin:14px auto;box-shadow:0 6px 18px rgba(0,0,0,.12);
  }
}
@media (max-width:700px) {
  .nav .nav-inner {
    width:calc(100% - 20px);min-height:54px;padding:5px 8px;gap:7px;
  }
  .nav .nav-logo {min-width:0;font-size:13px;}
  .nav .nav-logo .logo-icon {width:36px;height:36px;flex-shrink:0;}
  .nav .nav-links.open {top:calc(100% + 6px);padding:8px;}
  .dh-home-hero .dh-btn-row {flex-direction:column;align-items:stretch;}
  .dh-home-hero .dh-btn-row .dh-btn {
    width:100%;min-height:48px;text-align:center;white-space:normal;
  }
  .dh-media-frame figcaption,.dh-theater-image figcaption {
    flex-wrap:wrap;overflow-wrap:anywhere;
  }
  .dh-media-tag {max-width:calc(100% - 26px);}
  .dh-theater-tabs {overscroll-behavior-x:contain;}
  .enquiry-form {padding:18px;max-width:100%;}
  .enquiry-form .form-pair {grid-template-columns:minmax(0,1fr);}
  /* Prevent iOS input-focus auto-zoom while preserving touch size. */
  .enquiry-form :is(input,select,textarea) {min-height:44px;font-size:16px;}
  #devheal-consent .devheal-consent-button {min-height:44px;}
}
@media (max-width:420px) {
  .dh-home-hero h1 {font-size:clamp(31px,8.6vw,36px);}
  .dh-theater-bottom {flex-wrap:wrap;gap:12px;}
}
@media (prefers-reduced-motion:reduce) {
  .nav .nav-links,.nav .nav-links.open {scroll-behavior:auto;}
}
