/* ==========================================================================\n   TrueHarbor V791 — responsive shell + always-visible multilingual controls\n   Scope: public mobile/tablet shell, footer language surface, page 30041.\n   Desktop content/layout remains unchanged.\n   ========================================================================== */

/* The mobile language surface exists in markup but never occupies desktop space. */
.th-mobile-language{display:none}

/* Footer language selector is intentionally visible without opening a dropdown. */
.th-global-footer__language{
  min-width:0;
  display:grid!important;
  gap:8px;
  justify-items:end;
  align-items:center;
}
.th-global-footer__language-label{
  color:#6f8ba1!important;
  font-size:10px!important;
  font-weight:850!important;
  letter-spacing:.12em;
  text-transform:uppercase;
  line-height:1;
}
.th-language-links{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  min-width:0;
}
.th-language-links a{
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  min-height:34px;
  padding:0 9px;
  border:1px solid rgba(110,198,255,.13);
  border-radius:9px;
  background:rgba(255,255,255,.035);
  color:#a8bfd0!important;
  text-decoration:none!important;
  font-size:11.5px!important;
  font-weight:700!important;
  line-height:1;
  white-space:nowrap;
  transition:border-color .18s ease,background .18s ease,color .18s ease;
}
.th-language-links a:hover,.th-language-links a:focus-visible{
  color:#fff!important;
  border-color:rgba(91,201,255,.42);
  background:rgba(17,113,203,.18);
}
.th-language-links a.is-current{
  color:#fff!important;
  border-color:rgba(84,199,255,.54);
  background:linear-gradient(135deg,rgba(12,125,238,.34),rgba(12,84,170,.22));
  box-shadow:inset 0 1px rgba(255,255,255,.06);
}
.th-language-links small{
  color:#65c9ff!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.05em;
}

@media (max-width:1120px){
  html,body{max-width:100%;overflow-x:hidden}
  .site-main{min-width:0;overflow-x:clip}
  .site-main img,.site-main video,.site-main iframe,.site-main canvas,.site-main svg{max-width:100%}
  .site-main input,.site-main select,.site-main textarea,.site-main button{max-width:100%}

  /* Compact, collision-proof sticky header. */
  .site-header{padding:8px 0!important}
  .site-header__inner{
    width:calc(100% - 20px)!important;
    min-height:72px!important;
    grid-template-columns:minmax(0,1fr) auto auto!important;
    gap:8px!important;
    padding:0 10px!important;
    border-radius:15px!important;
  }
  .site-branding{grid-column:1!important;grid-row:1!important;min-width:0!important}
  .custom-logo-link{width:auto!important;max-width:min(210px,45vw)!important;min-height:50px!important}
  .custom-logo{max-width:100%!important;max-height:58px!important}
  .brand-wordmark{max-width:42vw;overflow:hidden}
  .brand-copy strong{font-size:18px!important}
  .brand-copy small{font-size:9px!important}

  .site-header__actions{grid-column:2!important;grid-row:1!important;gap:6px!important;min-width:0!important}
  .site-header__actions .header-cta{display:none!important}
  /* Desktop dropdown is replaced by the clearer language grid inside mobile navigation. */
  .site-header__actions .th-language-switcher{display:none!important}
  .site-header__actions .th-v704-header-search{
    display:inline-flex!important;
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
    padding:0!important;justify-content:center!important;border-radius:12px!important;
  }
  .site-header__actions .th-v704-header-search span{display:none!important}
  .nav-toggle{
    display:inline-flex!important;
    grid-column:3!important;grid-row:1!important;
    justify-self:end!important;
    width:44px!important;height:44px!important;min-width:44px!important;
    border-radius:12px!important;
  }

  .primary-nav{
    top:88px!important;
    left:10px!important;right:10px!important;
    width:auto!important;
    max-height:calc(100dvh - 100px)!important;
    padding:12px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    border-radius:16px!important;
    scrollbar-width:thin;
  }

  /* Language is now the first, permanent control inside the mobile menu. */
  .th-mobile-language{
    display:grid!important;
    gap:9px;
    margin:0 0 12px;
    padding:12px;
    border:1px solid rgba(103,199,255,.13);
    border-radius:13px;
    background:linear-gradient(180deg,rgba(15,43,66,.66),rgba(5,22,35,.62));
    box-shadow:inset 0 1px rgba(255,255,255,.025);
  }
  .th-mobile-language__label{
    color:#7f9cb2!important;
    font-size:10px!important;
    font-weight:850!important;
    letter-spacing:.12em;
    text-transform:uppercase;
  }
  .th-language-links--mobile{
    display:grid!important;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:7px;
  }
  .th-language-links--mobile a{
    min-width:0;
    min-height:42px;
    padding:0 8px;
    justify-content:center;
    gap:5px;
    color:#d8e8f5!important;
    background:rgba(255,255,255,.035);
    font-size:11px!important;
    overflow:hidden;
  }
  .th-language-links--mobile a span{min-width:0;overflow:hidden;text-overflow:ellipsis}
  .th-language-links--mobile small{flex:0 0 auto}

  .primary-menu{width:100%!important;display:grid!important;gap:2px!important}
  .primary-menu>li>a{min-height:50px!important;font-size:15.5px!important;padding-inline:11px!important}

  /* Footer stays readable and the translator never gets squeezed out. */
  .th-global-footer__bottom{
    grid-template-columns:1fr!important;
    align-items:start!important;
    gap:16px!important;
    min-height:0!important;
    padding-top:20px!important;padding-bottom:22px!important;
  }
  .th-global-footer__bottom-links{justify-content:flex-start!important}
  .th-global-footer__language{width:100%;justify-items:start!important;padding-top:2px}
  .th-language-links--footer{width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
  .th-language-links--footer a{min-width:0;min-height:38px;justify-content:center;padding:0 8px;overflow:hidden}
  .th-language-links--footer a span{min-width:0;overflow:hidden;text-overflow:ellipsis}
}

@media (max-width:820px){
  .th-global-footer__top{gap:34px!important}
  .th-global-footer__nav{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:30px 22px!important}
  .th-global-footer__brand{max-width:none!important}
  .th-global-footer__contact-quick{display:grid!important;gap:9px!important}
  .th-global-footer__contact-quick a{min-width:0;overflow-wrap:anywhere}
}

@media (max-width:640px){
  .site-header{padding:6px 0!important}
  .site-header__inner{width:calc(100% - 12px)!important;min-height:66px!important;padding:0 8px!important;gap:6px!important;border-radius:13px!important}
  .custom-logo-link{max-width:min(174px,44vw)!important;min-height:46px!important}
  .custom-logo{max-height:50px!important}
  .site-header__actions .th-v704-header-search,.nav-toggle{width:40px!important;height:40px!important;min-width:40px!important;min-height:40px!important}
  .primary-nav{top:76px!important;left:6px!important;right:6px!important;max-height:calc(100dvh - 84px)!important;padding:9px!important;border-radius:14px!important}

  .th-language-links--mobile{grid-template-columns:repeat(2,minmax(0,1fr))}
  .th-language-links--mobile a{min-height:40px;font-size:12px!important}
  .th-mobile-language{padding:10px;margin-bottom:9px}

  .th-global-footer__top{padding-top:42px!important;padding-bottom:34px!important}
  .th-global-footer__nav{grid-template-columns:1fr!important;gap:26px!important}
  .th-global-footer__logo-image{max-width:min(238px,76vw)!important;max-height:64px!important}
  .th-global-footer__bottom-links{display:grid!important;gap:8px!important}
  .th-language-links--footer{grid-template-columns:repeat(2,minmax(0,1fr))}
  .th-language-links--footer a{min-height:40px;font-size:12px!important}

  /* Page 30041: narrow-screen layout without horizontal clipping. */
  body.page-id-30041 .tha-shell,body.page-id-30041 .thc-shell{width:calc(100% - 20px)!important;max-width:none!important}
  body.page-id-30041 .tha-hero{padding-top:20px!important;padding-bottom:24px!important}
  body.page-id-30041 .tha-hero__grid{gap:18px!important}
  body.page-id-30041 .tha-hero__copy{min-width:0!important;padding-inline:0!important}
  body.page-id-30041 .tha-hero h1{font-size:clamp(2rem,10.5vw,2.55rem)!important;line-height:1.06!important;overflow-wrap:anywhere}
  body.page-id-30041 .tha-hero h2{font-size:clamp(1.02rem,5.1vw,1.2rem)!important;line-height:1.45!important}
  body.page-id-30041 .tha-hero p{font-size:.95rem!important;line-height:1.68!important}
  body.page-id-30041 .tha-hero__actions{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  body.page-id-30041 .tha-btn{width:100%!important;justify-content:center!important;text-align:center!important}
  body.page-id-30041 .tha-hero__meta{display:grid!important;grid-template-columns:1fr!important;gap:7px!important;line-height:1.55!important}
  body.page-id-30041 .tha-hero3d{width:100%!important;max-width:100%!important;aspect-ratio:1.12/1!important;border-radius:16px!important;overflow:hidden!important}
  body.page-id-30041 .tha-hero3d__fallback,body.page-id-30041 .tha-hero3d__poster-xray{max-width:none!important}
  body.page-id-30041 .tha-strip__item{min-width:152px!important;height:120px!important}
  body.page-id-30041 .thc-cap-grid,body.page-id-30041 .thc-process{grid-template-columns:1fr!important}
  body.page-id-30041 .thc-rfq{padding:20px 14px!important}
  body.page-id-30041 .thc-rfq input,body.page-id-30041 .thc-rfq select,body.page-id-30041 .thc-rfq textarea{width:100%!important;min-width:0!important}
}

@media (max-width:390px){
  .custom-logo-link{max-width:148px!important}
  .site-header__inner{gap:4px!important}
  .site-header__actions .th-v704-header-search,.nav-toggle{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important}
  .th-language-links--mobile a,.th-language-links--footer a{padding-inline:6px}
  body.page-id-30041 .tha-shell,body.page-id-30041 .thc-shell{width:calc(100% - 14px)!important}
  body.page-id-30041 .tha-hero h1{font-size:1.95rem!important}
}

@media (prefers-reduced-motion:reduce){
  .th-language-links a{transition:none!important}
}

/* ==========================================================================\n   TrueHarbor V824 — mobile-only shell hardening\n   Desktop layout is intentionally untouched.\n   ========================================================================== */
@media (max-width:1120px){
  body.nav-open{overflow:hidden!important;touch-action:none}
  .site-header{position:sticky!important;top:0!important;z-index:1000!important}
  .site-header__bar{display:none!important}
  .site-header__inner{position:relative!important}
  .primary-nav{position:fixed!important;z-index:1002!important;visibility:hidden;opacity:0;pointer-events:none;transform:translateY(-8px);transition:opacity .18s ease,transform .18s ease,visibility .18s ease!important}
  .primary-nav.is-open{visibility:visible!important;opacity:1!important;pointer-events:auto!important;transform:none!important}
  .nav-toggle{position:relative!important;z-index:1003!important}
  .nav-toggle .nav-toggle__close{display:none!important}
  .nav-toggle[aria-expanded="true"] .nav-toggle__open{display:none!important}
  .nav-toggle[aria-expanded="true"] .nav-toggle__close{display:inline-flex!important}
  .primary-nav .primary-menu,.primary-nav .primary-menu li{min-width:0!important}
  .primary-nav .primary-menu a{white-space:normal!important;overflow-wrap:anywhere!important}
}
@media (max-width:640px){
  .site-header__inner{grid-template-columns:minmax(0,1fr) 40px 40px!important}
  .site-branding{overflow:hidden!important}
  .brand-wordmark,.custom-logo-link{min-width:0!important}
  .primary-nav{inset-inline:6px!important;width:auto!important}
}

/* ==========================================================================\n   V824 — authoritative mobile navigation state repair\n   ========================================================================== */
@media (max-width:1399px){
  [data-primary-nav].primary-nav{
    display:block!important;
    position:fixed!important;
    z-index:10020!important;
    pointer-events:none!important;
    opacity:0!important;
    visibility:hidden!important;
    transform:translateY(-10px)!important;
  }
  [data-primary-nav].primary-nav.is-open,
  body.nav-open [data-primary-nav].primary-nav{
    pointer-events:auto!important;
    opacity:1!important;
    visibility:visible!important;
    transform:translateY(0)!important;
  }
  [data-nav-toggle]{position:relative!important;z-index:10030!important;pointer-events:auto!important}
  body.nav-open{overflow:hidden!important}
}


/* ==========================================================================
   V825 — mobile menu portal + hero order + footer language repair
   ========================================================================== */
@media (max-width:1399px){
  .site-header__inner,
  body.th-concept-home .site-header__inner{
    overflow:visible!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    filter:none!important;
    transform:none!important;
  }
  body > [data-primary-nav].primary-nav,
  body > .primary-nav{
    display:block!important;
    position:fixed!important;
    z-index:10050!important;
    top:88px!important;
    left:10px!important;
    right:10px!important;
    width:auto!important;
    max-height:calc(100dvh - 100px)!important;
    overflow-y:auto!important;
    padding:14px!important;
    margin:0!important;
    border-radius:16px!important;
    border:1px solid rgba(104,198,255,.22)!important;
    background:rgba(3,15,25,.985)!important;
    box-shadow:0 26px 58px rgba(0,0,0,.5)!important;
    pointer-events:none!important;
    opacity:0!important;
    visibility:hidden!important;
    transform:translateY(-10px)!important;
    transition:opacity .18s ease,transform .18s ease,visibility .18s ease!important;
  }
  body > [data-primary-nav].primary-nav.is-open,
  body > .primary-nav.is-open,
  body.nav-open > [data-primary-nav].primary-nav{
    pointer-events:auto!important;
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
  }
  body > [data-primary-nav] .primary-menu{display:grid!important;gap:2px!important;margin:0!important;padding:0!important;list-style:none!important}
  body > [data-primary-nav] .primary-menu > li > a{display:flex!important;min-height:50px!important;align-items:center!important;padding:0 12px!important;color:#eef8ff!important;font-size:16px!important;font-weight:700!important}
  body > [data-primary-nav] .th-mobile-language{display:grid!important;gap:8px!important;margin-bottom:12px!important;padding:10px!important;border:1px solid rgba(110,198,255,.14)!important;border-radius:12px!important;background:rgba(255,255,255,.03)!important}
  body > [data-primary-nav] .th-language-links--mobile{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
}
@media (max-width:1120px){
  .th-global-footer__language,
  .th-global-footer__language .th-language-links,
  .th-global-footer__language .th-language-links a{position:relative!important;z-index:5!important;pointer-events:auto!important}
  .th-global-footer__language .th-language-links{display:flex!important;flex-wrap:wrap!important;gap:8px!important;justify-content:flex-start!important}
  .th-global-footer__language .th-language-links a{min-height:40px!important;min-width:72px!important;padding:0 12px!important;touch-action:manipulation!important}
  .th-global-footer__bottom{display:grid!important;gap:16px!important}
  .th-global-footer__language{justify-items:start!important;width:100%!important}
}
@media (max-width:900px){
  .thc-hero{display:flex!important;flex-direction:column!important;align-items:stretch!important;min-height:0!important;padding:96px 0 40px!important}
  .thc-hero__fx{order:0}
  .thc-system,.thc-system--photoreal{position:relative!important;order:1!important;width:min(100%,420px)!important;max-width:100%!important;height:min(52vw,280px)!important;min-height:220px!important;margin:8px auto 0!important;right:auto!important;left:auto!important;top:auto!important;opacity:1!important;transform:none!important}
  .thc-system .thc-callout{display:none!important}
  .thc-hero__layout{order:2!important;position:relative!important;z-index:3!important;min-height:0!important;padding:18px 0 12px!important;align-items:flex-start!important}
  .thc-hero__copy{width:100%!important;max-width:100%!important;padding-top:0!important}
  .thc-hero__actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:10px!important;margin-top:14px!important}
  .thc-hero__actions .thc-btn{width:100%!important;justify-content:center!important}
}
@media (max-width:600px){
  .thc-system,.thc-system--photoreal{height:min(58vw,240px)!important;min-height:200px!important}
  .thc-hero__copy h1{font-size:clamp(40px,11vw,58px)!important}
  .thc-hero__copy h2{font-size:18px!important}
}


/* ==========================================================================
   V826 — mobile-only: menu then languages, hero image gap, footer clear space
   ========================================================================== */

/* Languages sit BELOW the menu items inside the mobile nav panel */
@media (max-width:1399px){
  .primary-nav .th-mobile-language,
  body > [data-primary-nav] .th-mobile-language,
  body > .primary-nav .th-mobile-language{
    order:2!important;
    margin-top:14px!important;
    margin-bottom:0!important;
    padding:12px!important;
    border-top:1px solid rgba(110,198,255,.16)!important;
    border:1px solid rgba(110,198,255,.14)!important;
    border-radius:12px!important;
    background:rgba(255,255,255,.04)!important;
  }
  .primary-nav .primary-menu,
  body > [data-primary-nav] .primary-menu,
  body > .primary-nav .primary-menu{
    order:1!important;
  }
  .primary-nav,
  body > [data-primary-nav].primary-nav{
    display:flex!important;
    flex-direction:column!important;
  }
}

/* Hero mobile: image first → clear gap → text + buttons */
@media (max-width:900px){
  .thc-hero{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    min-height:0!important;
    padding:88px 0 36px!important;
  }
  .thc-hero__fx{order:0;pointer-events:none!important}
  .thc-system,
  .thc-system--photoreal{
    position:relative!important;
    order:1!important;
    width:min(92%,380px)!important;
    max-width:100%!important;
    height:min(48vw,260px)!important;
    min-height:200px!important;
    margin:4px auto 0!important;
    right:auto!important;
    left:auto!important;
    top:auto!important;
    opacity:1!important;
    transform:none!important;
    z-index:1!important;
  }
  .thc-system .thc-callout,
  .thc-system--photoreal .thc-callout{display:none!important}
  .thc-hero__layout{
    order:2!important;
    position:relative!important;
    z-index:3!important;
    min-height:0!important;
    margin-top:28px!important;
    padding:0 0 8px!important;
    align-items:flex-start!important;
  }
  .thc-hero__copy{
    width:100%!important;
    max-width:100%!important;
    padding-top:0!important;
    opacity:1!important;
    transform:none!important;
    animation:none!important;
  }
  .thc-hero__actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:10px!important;
    margin-top:14px!important;
  }
}
@media (max-width:600px){
  .thc-system,
  .thc-system--photoreal{
    height:min(52vw,230px)!important;
    min-height:180px!important;
  }
  .thc-hero__layout{margin-top:24px!important}
  .thc-hero__copy h1{font-size:clamp(36px,10.5vw,52px)!important;margin-top:10px!important}
  .thc-hero__copy h2{font-size:17px!important}
}

/* Footer: extra bottom space so language row clears chat / robot plugins */
@media (max-width:1120px){
  .th-global-footer{
    padding-bottom:calc(28px + env(safe-area-inset-bottom,0px))!important;
  }
  .th-global-footer__bottom{
    padding-bottom:calc(96px + env(safe-area-inset-bottom,0px))!important;
    margin-bottom:8px!important;
    gap:18px!important;
  }
  .th-global-footer__language{
    margin-bottom:12px!important;
    padding-bottom:8px!important;
  }
  .th-global-footer__language .th-language-links{
    gap:10px!important;
  }
  .th-global-footer__language .th-language-links a{
    min-height:42px!important;
  }
}
