/* =========================================================
   V20 — GLOBAL MOBILE RESPONSIVE REBUILD
   Applied after legacy styles to neutralise fixed desktop widths.
   ========================================================= */
html, body { width:100%; max-width:100%; overflow-x:clip; }
body { min-width:0; }
img, video, iframe, svg { max-width:100%; }
.container, main, section, footer, header { min-width:0; }
.container { width:min(1200px, calc(100% - 48px)); }

/* Mobile navigation: reliable tap target + visible dropdown layer. */
.site-header-v12 { position:relative; z-index:10003; width:100%; }
.header-v12-inner { min-width:0; }
.menu-v12 { -webkit-appearance:none; appearance:none; cursor:pointer; touch-action:manipulation; pointer-events:auto; }
.menu-v12 span { pointer-events:none; }
.mobile-nav-v12 { box-sizing:border-box; }

@media (max-width:1020px) {
  .header-v12-inner {
    display:flex !important; justify-content:space-between; align-items:center;
    width:calc(100% - 40px) !important; min-height:76px; gap:14px !important;
  }
  .brand-v12 { flex:0 1 auto; min-width:0; }
  .brand-v12 img { width:clamp(135px, 34vw, 180px); max-width:100%; height:auto; }
  .nav-v12 { display:none !important; }
  .header-actions-v12 { display:flex; align-items:center; gap:8px; margin-left:auto; }
  .menu-v12 {
    display:flex !important; flex:0 0 46px; width:46px; height:46px;
    align-items:center; justify-content:center; flex-direction:column;
    position:relative; z-index:10006; border-radius:50%;
    background:#fff; border:1px solid rgba(18,75,134,.2);
    box-shadow:0 5px 18px rgba(18,75,134,.12);
  }
  .menu-v12 span { width:19px; height:2px; margin:2.5px auto; border-radius:3px; transition:transform .2s,opacity .2s; }
  .site-header-v12.open .menu-v12 span:first-child { transform:translateY(7px) rotate(45deg); }
  .site-header-v12.open .menu-v12 span:nth-child(2) { opacity:0; }
  .site-header-v12.open .menu-v12 span:last-child { transform:translateY(-7px) rotate(-45deg); }
  .mobile-nav-v12 {
    display:flex !important; flex-direction:column; gap:0;
    position:absolute; top:100%; left:0; right:0; z-index:10005;
    width:calc(100% - 32px); max-width:560px; max-height:0;
    margin:0 auto; padding:0 16px; overflow:hidden;
    background:rgba(255,255,255,.985); border:1px solid rgba(18,75,134,0);
    border-radius:0 0 18px 18px; box-shadow:0 18px 35px rgba(5,30,55,0);
    visibility:hidden; opacity:0; pointer-events:none;
    transition:max-height .28s ease, opacity .2s ease, padding .28s ease, box-shadow .2s ease, border-color .2s ease;
  }
  .site-header-v12.open .mobile-nav-v12 {
    max-height:min(78vh,620px); padding:10px 16px 16px;
    overflow-y:auto; visibility:visible; opacity:1; pointer-events:auto;
    border-color:rgba(18,75,134,.14); box-shadow:0 18px 35px rgba(5,30,55,.2);
  }
  .mobile-nav-v12 a {
    display:block; width:100%; padding:13px 8px; color:#153c62 !important;
    font-size:15px; line-height:1.35; font-weight:750; text-decoration:none;
    border-bottom:1px solid rgba(15,76,132,.09); white-space:normal;
  }
  .mobile-nav-v12 a:last-child { border-bottom:0; }
  .mobile-nav-v12 a.active { color:#0758a4 !important; background:#eef6ff; border-radius:9px; }
}
@media (max-width:650px) {
  .topbar-v12 { height:32px; min-height:32px; }
  .topbar-inner-v12 { width:calc(100% - 24px) !important; min-height:32px; }
  .topbar-left-v12, .topbar-right-v12 { min-width:0; }
  .topbar-left-v12>span:last-child, .topbar-right-v12 span, .topbar-right-v12 .bar-separator-v12 { display:none !important; }
  .topbar-v12, .topbar-v12 a { font-size:9px; }
  .header-v12-inner { width:calc(100% - 28px) !important; min-height:72px; }
  .brand-v12 img { width:clamp(132px, 42vw, 158px); }
  .menu-v12 { width:44px; height:44px; flex-basis:44px; }
  .container { width:calc(100% - 36px); }

  /* Home hero: stack content and collage, never retain desktop columns. */
  .hero-v8 { min-height:0 !important; padding:42px 0 30px !important; }
  .hero-v8-layout { display:grid !important; grid-template-columns:minmax(0,1fr) !important; width:calc(100% - 36px) !important; min-height:0 !important; gap:22px !important; }
  .hero-v8-copy { width:100%; max-width:100%; min-width:0; margin:0 !important; padding:8px 0 0 !important; text-align:left !important; }
  .hero-v8-eyebrow { max-width:100%; font-size:10px; letter-spacing:1.4px; padding:9px 12px; }
  .hero-v8 h1 { display:flex; width:100%; max-width:100%; align-items:flex-start !important; text-align:left !important; margin:18px 0 20px; letter-spacing:-1.8px; line-height:.9; overflow-wrap:anywhere; }
  .hero-v8 h1 strong { display:block; max-width:100%; font-size:clamp(48px,13vw,62px) !important; line-height:.88; }
  .hero-v8 h1 span { display:block; max-width:100%; font-size:clamp(31px,8.6vw,40px) !important; line-height:.98; letter-spacing:-1.5px; margin:5px 0 8px; }
  .hero-v8 h1 small { display:block; font-size:clamp(19px,5.5vw,24px) !important; line-height:1.05; margin:0 0 2px !important; }
  .hero-v8 h1 em { display:block; max-width:100%; font-size:clamp(37px,10vw,49px) !important; line-height:1; transform:none !important; white-space:normal; overflow-wrap:anywhere; }
  .hero-v8-copy>p { width:100%; max-width:100%; margin:18px 0 !important; padding-left:13px; font-size:14px; line-height:1.65; overflow-wrap:anywhere; }
  .hero-v8-services { width:100%; max-width:100%; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px; }
  .hero-v8-services a { min-width:0; min-height:58px; padding:9px 10px; border-radius:12px; }
  .hero-v8-services span { font-size:11px; }
  .hero-v8-actions { width:100%; display:flex; flex-direction:column !important; align-items:stretch !important; gap:10px; margin-top:18px; }
  .hero-v8-actions .btn, .hero-v8-actions .btn:first-child, .hero-v8-actions .btn.outline { width:100% !important; min-width:0; min-height:48px; padding:13px 15px; white-space:normal; text-align:center; font-size:13px; }
  .hero-v8-media { width:100% !important; max-width:100% !important; height:370px !important; min-width:0; margin:10px 0 0 !important; overflow:hidden; }
  .hero-v8-orbit.orbit1 { width:310px; height:310px; right:-35px; top:30px; }
  .hero-v8-orbit.orbit2 { display:none; }
  .v8-camera { left:2%; top:35px; width:52%; height:285px; }
  .v8-shot-stage { width:57%; height:125px; right:0; top:12px; }
  .v8-shot-crowd { width:48%; height:115px; left:24%; bottom:44px; }
  .v8-shot-network { width:51%; height:125px; right:0; bottom:30px; }
  .v8-noise-card { top:145px; right:0; padding:8px 10px; gap:7px; max-width:72%; }
  .v8-noise-card>b { width:29px; height:29px; font-size:15px; }
  .v8-noise-card span { font-size:10px; }
  .v8-stats { left:2%; right:2%; bottom:0; width:96%; grid-template-columns:1fr 1px 1fr 1px 1.2fr; gap:6px; padding:10px 8px; }
  .v8-stats b { font-size:12px; }
  .v8-stats span { font-size:8px; }
  .v8-stats i { height:28px; }
  .hero-v8-scroll { display:none !important; }

  /* Shared content grids and typography. */
  .section { padding:65px 0; }
  .sectionhead { margin-bottom:28px; }
  .grid3, .process, .split, .contactgrid, .footergrid { grid-template-columns:minmax(0,1fr) !important; gap:18px; }
  .checks { grid-template-columns:minmax(0,1fr); }
  .stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .stat { padding:20px 8px; }
  .slide { min-width:85%; height:320px; }
  .pagehero { padding:115px 0 55px; }
  .pagehero h1 { font-size:clamp(38px,11vw,54px); overflow-wrap:anywhere; }
  .service-row { grid-template-columns:42px minmax(0,1fr); gap:12px; padding:24px 0; }
  .service-row ul { grid-template-columns:minmax(0,1fr); }
  .visual { height:330px; }
  .cta { display:block; padding:30px 22px; margin:15px auto 55px; }
  .cta>.btn { margin-top:22px; }
  .copyright { flex-direction:column; gap:8px; }
  .footer-v15 .footer-grid-v15, .footer-v15 .footer-main-v15 { grid-template-columns:minmax(0,1fr) !important; }
}

/* Smaller handset safety: no child may force a wider layout. */
@media (max-width:390px) {
  .container, .hero-v8-layout { width:calc(100% - 28px) !important; }
  .hero-v8 h1 strong { font-size:47px !important; }
  .hero-v8 h1 span { font-size:30px !important; }
  .hero-v8 h1 em { font-size:35px !important; }
  .hero-v8-services a { padding:8px 7px; }
  .hero-v8-services b { font-size:21px; }
  .hero-v8-media { height:330px !important; }
  .v8-stats { gap:4px; padding:8px 5px; }
  .v8-stats b { font-size:10px; }
  .v8-stats span { font-size:7px; }
}

/* Page-specific mobile width and overflow safeguards. */
@media(max-width:760px){
 .mbad-page,.hon-page{width:100%;max-width:100%;overflow-x:clip}
 .mbad-wrap,.hon-container{width:calc(100% - 36px) !important;max-width:100% !important}
 .mbad-hero-grid,.hon-hero-grid,.mbad-intro-grid,.mbad-accelerated-grid,.mbad-eligibility-grid,.mbad-system-grid,.hon-intro-grid,.hon-eligibility-grid,.hon-records-grid,.hon-verification-grid,.hon-system-grid{min-width:0;max-width:100%}
 .mbad-hero-grid,.hon-hero-grid{grid-template-columns:minmax(0,1fr) !important}
 .mbad-hero-copy,.hon-hero-copy{min-width:0;max-width:100%}
 .mbad-hero h1,.hon-hero h1{max-width:100%;overflow-wrap:anywhere}
 .mbad-hero-art,.hon-hero-visual,.mbad-art-frame,.hon-arch-image{max-width:100%;min-width:0}
 .mbad-actions,.hon-hero-actions{flex-wrap:wrap;max-width:100%}
 .mbad-btn,.hon-btn{max-width:100%;white-space:normal}
 .mbad-stage ul{min-width:0}
 .mbad-journey,.mbad-special-grid,.hon-special-grid,.hon-directory-grid,.hon-recognition-grid,.hon-gallery{min-width:0;max-width:100%}
}
@media(max-width:480px){
 .mbad-wrap,.hon-container{width:calc(100% - 30px) !important}
 .mbad-hero h1{font-size:clamp(37px,10.5vw,48px) !important;overflow-wrap:break-word}
 .hon-hero h1{font-size:clamp(42px,12vw,58px) !important}
 .mbad-title-lockup{gap:9px}
 .mbad-title-lockup strong{font-size:clamp(30px,9vw,38px)}
 .mbad-title-lockup small{max-width:100%;font-size:7px}
 .mbad-actions{align-items:flex-start;flex-direction:column}
 .mbad-btn{font-size:10px;padding:14px 15px}
 .hon-hero-actions{align-items:flex-start;flex-direction:column}
 .mbad-facts-grid,.mbad-special-grid,.mbad-journey,.hon-gallery{grid-template-columns:minmax(0,1fr) !important}
 .mbad-stage ul{grid-template-columns:minmax(0,1fr) !important}
 .mbad-hero-art{padding-left:0;padding-right:0}
 .hon-hero-visual{height:330px}
}

/* V21 — robust mobile dropdown visibility and tap handling */
.mobile-nav-v12[hidden] { display:none !important; }
@media (max-width:1020px) {
  .site-header-v12 { isolation:isolate; }
  .header-v12-inner { position:relative; z-index:10007; }
  .header-actions-v12 { position:relative; z-index:10008; }
  .menu-v12 {
    display:flex !important; position:relative !important; z-index:10010 !important;
    cursor:pointer !important; pointer-events:auto !important;
    -webkit-tap-highlight-color:transparent;
  }
  .mobile-nav-v12:not([hidden]) {
    display:flex !important; visibility:visible !important; opacity:1 !important;
    pointer-events:auto !important;
  }
  .site-header-v12.open .mobile-nav-v12:not([hidden]) {
    max-height:min(78vh,620px) !important; overflow-y:auto !important;
  }
}
