

/* =========================================================
   V131 — Mobile-first responsive stabilization
   Final override loaded last on every public page.
   ========================================================= */
html{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body{
  width:100%;
  max-width:100%;
  overflow-x:hidden!important;
}
img,video,canvas{max-width:100%!important;height:auto;}
main,section,header,footer,.container,.nav-wrap,.home70-main{min-width:0;max-width:100%;}
input,select,textarea,button{max-width:100%;min-width:0;}
.table-wrap,.table-wrap-v32,.responsive-table{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;}

@media (max-width:900px){
  html{scroll-padding-top:82px!important;}
  body{padding-inline:0!important;}
  .container{width:calc(100% - 24px)!important;max-width:none!important;margin-inline:auto!important;}

  /* Mobile header: occupies its own space, no content hidden underneath it. */
  .header,
  .header.scrolled,
  .header:hover,
  .header:focus-within{
    position:sticky!important;
    inset:auto!important;
    top:0!important;
    width:100%!important;
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    pointer-events:auto!important;
    background:rgba(255,255,255,.96)!important;
    color:#0d2540!important;
    box-shadow:0 7px 22px rgba(7,31,56,.08)!important;
    backdrop-filter:blur(14px)!important;
    -webkit-backdrop-filter:blur(14px)!important;
    z-index:1000!important;
  }
  html[data-theme="dark"] .header,
  html[data-theme="dark"] .header.scrolled,
  html[data-theme="dark"] .header:hover,
  html[data-theme="dark"] .header:focus-within{
    background:rgba(7,21,35,.96)!important;
    color:#f4fbff!important;
  }
  .nav-wrap{
    width:calc(100% - 18px)!important;
    min-height:78px!important;
    height:auto!important;
    margin-inline:auto!important;
    padding:9px 0!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:7px!important;
    direction:ltr!important;
  }
  .brand{
    grid-column:2!important;
    grid-row:1!important;
    justify-self:end!important;
    min-width:0!important;
    margin:0!important;
  }
  .brand img{
    width:112px!important;
    min-width:0!important;
    max-width:28vw!important;
    height:auto!important;
  }
  .nav-actions{
    grid-column:1!important;
    grid-row:1!important;
    min-width:0!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    overflow:visible!important;
  }
  .nav-actions .small{
    display:inline-flex!important;
    width:auto!important;
    min-width:86px!important;
    max-width:104px!important;
    height:38px!important;
    padding:0 10px!important;
    border-radius:999px!important;
    font-size:11px!important;
    line-height:1!important;
    white-space:nowrap!important;
  }
  .mode-toggle,.lang,.menu{
    display:inline-grid!important;
    place-items:center!important;
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    padding:0!important;
    border-radius:999px!important;
    background:#fff!important;
    color:#0d2540!important;
    border:1px solid rgba(10,46,78,.12)!important;
    box-shadow:0 7px 18px rgba(7,31,56,.07)!important;
  }
  html[data-theme="dark"] .mode-toggle,
  html[data-theme="dark"] .lang,
  html[data-theme="dark"] .menu{
    background:#102536!important;color:#f4fbff!important;border-color:rgba(255,255,255,.12)!important;
  }
  .nav{
    position:fixed!important;
    top:84px!important;
    right:12px!important;
    left:12px!important;
    width:auto!important;
    max-width:none!important;
    max-height:calc(100dvh - 96px)!important;
    overflow:auto!important;
    padding:14px!important;
    border-radius:20px!important;
    background:rgba(255,255,255,.98)!important;
    color:#0d2540!important;
    box-shadow:0 20px 46px rgba(5,32,55,.16)!important;
    z-index:1100!important;
  }
  html[data-theme="dark"] .nav{background:rgba(8,25,39,.98)!important;color:#f4fbff!important;}
  .nav a{width:100%!important;text-align:center!important;white-space:normal!important;padding:9px 12px!important;}

  /* All top heroes scale from the real mobile width rather than desktop breakpoints. */
  .home70-hero,
  .page-hero,
  .career-hero-v28,
  .contact-hero-v30,
  .about-showcase-v16,
  .about-banner-v23{
    min-height:auto!important;
  }
  .home70-hero{padding:42px 0 58px!important;}
  .home70-hero-grid,
  .hero-content,
  .contact-v30-grid,
  .contact-grid,
  .about-grid,
  .about-core-grid,
  .home70-benefit-grid,
  .service-detail,
  .career-shell{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:26px!important;
    min-width:0!important;
  }
  .home70-copy{
    order:1!important;
    width:100%!important;
    min-width:0!important;
    padding:0!important;
    text-align:center!important;
  }
  .home70-visual{order:2!important;}
  .home70-eyebrow{max-width:100%!important;white-space:normal!important;justify-content:center!important;}
  .home70-title{
    max-width:100%!important;
    margin:18px auto 16px!important;
    font-size:clamp(38px,11vw,54px)!important;
    line-height:1.12!important;
    letter-spacing:-.02em!important;
    overflow:visible!important;
    word-break:normal!important;
    text-wrap:balance;
  }
  .home70-title span{display:block!important;overflow:visible!important;padding-block:.04em .08em!important;}
  .home70-copy>p{
    width:100%!important;
    max-width:620px!important;
    margin-inline:auto!important;
    font-size:15.5px!important;
    line-height:1.9!important;
    overflow-wrap:anywhere;
  }
  .home70-actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:11px!important;
    width:100%!important;
    max-width:520px!important;
    margin:24px auto 0!important;
  }
  .home70-actions .btn{width:100%!important;min-width:0!important;min-height:50px!important;}

  /* Home gallery: one full-width main image + four equal thumbnails. */
  body.home70 .home70-visual.home71-collage{
    position:relative!important;
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    grid-template-rows:auto auto!important;
    gap:9px!important;
    width:100%!important;
    max-width:100%!important;
    min-height:0!important;
    margin:8px 0 8px!important;
    padding:0!important;
    overflow:visible!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.home70 .home70-visual.home71-collage::before,
  body.home70 .home70-visual.home71-collage::after{display:none!important;}
  body.home70 .home71-photo,
  body.home70 .home71-photo-main,
  body.home70 .home71-photo-top,
  body.home70 .home71-photo-bottom-left,
  body.home70 .home71-photo-bottom-center,
  body.home70 .home71-photo-side{
    display:block!important;
    position:relative!important;
    inset:auto!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    margin:0!important;
    transform:none!important;
    translate:none!important;
    opacity:1!important;
    animation:none!important;
    border:3px solid rgba(255,255,255,.92)!important;
    border-radius:18px!important;
    overflow:hidden!important;
    box-shadow:0 12px 28px rgba(5,42,65,.11)!important;
  }
  body.home70 .home71-photo-main{
    grid-column:1/-1!important;
    grid-row:1!important;
    aspect-ratio:4/3!important;
  }
  body.home70 .home71-photo-top{grid-column:1!important;grid-row:2!important;aspect-ratio:1/1!important;}
  body.home70 .home71-photo-bottom-center{grid-column:2!important;grid-row:2!important;aspect-ratio:1/1!important;}
  body.home70 .home71-photo-bottom-left{grid-column:3!important;grid-row:2!important;aspect-ratio:1/1!important;}
  body.home70 .home71-photo-side{grid-column:4!important;grid-row:2!important;aspect-ratio:1/1!important;}
  body.home70 .home71-photo img{width:100%!important;height:100%!important;object-fit:cover!important;transform:none!important;}
  body.home70 .home71-photo-label{right:10px!important;bottom:10px!important;max-width:calc(100% - 20px)!important;padding:7px 10px!important;font-size:11px!important;white-space:nowrap!important;}
  body.home70 .home71-photo:not(.home71-photo-main) .home71-photo-label{display:none!important;}
  body.home70 .home71-badge{display:none!important;}

  /* Compact 2-column value panel on normal phones. */
  .home70-values{margin-top:22px!important;padding:0!important;}
  .home70-values-grid{
    width:calc(100% - 24px)!important;
    margin-inline:auto!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    padding:10px!important;
    border-radius:22px!important;
  }
  .home70-value{grid-template-columns:40px minmax(0,1fr)!important;gap:9px!important;padding:12px 8px!important;min-width:0!important;}
  .home70-icon{width:40px!important;height:40px!important;border-radius:13px!important;}
  .home70-icon svg{width:21px!important;height:21px!important;}
  .home70-value strong{font-size:13px!important;line-height:1.45!important;}
  .home70-value span{font-size:10.5px!important;line-height:1.45!important;}

  .home70-services,.home70-news,.home70-benefit-cards,.service-grid,.feature-grid,.project-grid,.project-grid.big,.news-grid,.values-grid-v16,.journey-cards,.mission-vision-grid-v16,.msa-footer-grid,.footer-grid{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .home70-service,.home70-news-card,.home70-benefit,.service-card,.project-card,.news-card,.value-card-v16,.journey-card,.mv-card,.contact-info-v30,.contact-form-v30,.career-form-v28,.service-detail{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }

  .contact-hero-content,.career-hero-content,.about-banner-content{
    width:calc(100% - 24px)!important;
    max-width:760px!important;
    margin-inline:auto!important;
    padding:58px 0!important;
  }
  .contact-hero-content h1,.career-hero-content h1,.about-banner-content h1,.page-hero h1{
    max-width:100%!important;
    font-size:clamp(34px,10vw,48px)!important;
    line-height:1.18!important;
    overflow-wrap:anywhere;
  }
  .contact-hero-content p,.career-hero-content p,.about-banner-content p,.page-hero p{font-size:15px!important;line-height:1.9!important;}
  .floating-grid-v30,.v28-grid.two,.v28-grid.three,.multi-row-v28,.multi-row-v28.four,.multi-row-v28.six,.language-matrix-v28{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .contact-form-v30,.contact-info-v30,.career-form-v28,.form-block-v28{padding:20px!important;border-radius:22px!important;}

  /* Projects/detail drawers should never force a desktop width. */
  .v62-shell,.v105-drawer,.v105-overlay,.v105-info,.v105-gallery,.v105-stage,.project-shell,.projects-shell{
    max-width:100%!important;
    min-width:0!important;
  }
  .v105-drawer{width:100%!important;}
  .v105-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;}

  .footer.msa-footer-pro{padding-bottom:92px!important;}
}

@media (max-width:520px){
  .container{width:calc(100% - 18px)!important;}
  .nav-wrap{width:calc(100% - 12px)!important;gap:5px!important;}
  .brand img{width:96px!important;max-width:27vw!important;}
  .nav-actions{gap:4px!important;}
  .nav-actions .small{min-width:78px!important;max-width:88px!important;height:36px!important;padding-inline:8px!important;font-size:10px!important;}
  .mode-toggle,.lang,.menu{width:36px!important;height:36px!important;min-width:36px!important;}
  .home70-hero{padding:34px 0 48px!important;}
  .home70-title{font-size:clamp(36px,11.7vw,48px)!important;}
  .home70-copy>p{font-size:14.5px!important;}
  .home70-values-grid{width:calc(100% - 18px)!important;}
  .home70-section,.section{padding-block:54px!important;}
}

@media (max-width:360px){
  .brand img{width:78px!important;max-width:25vw!important;}
  .nav-actions .small{min-width:70px!important;max-width:76px!important;padding-inline:6px!important;font-size:9px!important;}
  .mode-toggle,.lang,.menu{width:34px!important;height:34px!important;min-width:34px!important;}
  .home70-title{font-size:34px!important;}
  .home70-values-grid{grid-template-columns:minmax(0,1fr)!important;}
  body.home70 .home70-visual.home71-collage{gap:7px!important;}
  body.home70 .home71-photo{border-width:2px!important;border-radius:15px!important;}
}

@media (min-width:901px) and (max-width:1180px){
  .container{width:calc(100% - 40px)!important;}
  .nav{gap:15px!important;font-size:14px!important;}
  .brand img{width:155px!important;}
  .home70-hero-grid{gap:40px!important;}
}

