/* JUNIQ V449 — DESKTOP HEADER NAV TRUE-CENTRE LOCK
   Scope: HEADER GEOMETRY ONLY.
   Centres the primary desktop navigation (Record → Pricing) on the true page axis.
   Mobile/tablet hamburger behaviour remains unchanged. */

/* Existing compact/tablet behaviour remains unchanged. */
@media (min-width:1025px) and (max-width:1179px){
  #siteHeader > #navLinks{display:none!important;}
  #siteHeader > #headerActions > a{display:none!important;}
}

/* Desktop / laptop: centre the primary navigation on the true header/page axis,
   independent of the logo width and right-side account actions. */
@media (min-width:1180px){
  #siteHeader{
    position:relative!important;
  }
  #siteHeader > #navLinks{
    position:absolute!important;
    left:50%!important;
    right:auto!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    grid-column:auto!important;
    grid-row:1!important;
    justify-self:auto!important;
    width:max-content!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    white-space:nowrap!important;
    z-index:3!important;
  }
  #siteHeader > #headerActions{
    grid-column:3!important;
    grid-row:1!important;
    justify-self:end!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    min-width:max-content!important;
    position:relative!important;
    z-index:2!important;
  }

  /* Legacy/design-system header variant used on a small number of active pages. */
  .site-header .header-inner{
    position:relative!important;
  }
  .site-header .header-inner > nav.primary{
    position:absolute!important;
    left:50%!important;
    right:auto!important;
    top:50%!important;
    transform:translate(-50%,-50%)!important;
    grid-column:auto!important;
    justify-self:auto!important;
    width:max-content!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
    white-space:nowrap!important;
    z-index:3!important;
  }
}

/* Keep the existing compact desktop spacing so the centred nav and account
   controls remain comfortable on standard laptop widths. */
@media (min-width:1180px) and (max-width:1499px){
  #siteHeader{
    display:grid!important;
    grid-template-columns:max-content minmax(0,1fr) max-content!important;
    align-items:center!important;
    column-gap:clamp(12px,1.4vw,22px)!important;
    padding-left:24px!important;
    padding-right:80px!important;
  }
  #siteHeader > #navLinks{
    gap:clamp(8px,1vw,15px)!important;
  }
  #siteHeader > #headerActions > a{
    padding-left:10px!important;
    padding-right:10px!important;
    font-size:12px!important;
  }
}

/* Older 404-style header: centre its desktop primary navigation too, without
   altering its links, colours, logo, buttons or mobile menu. */
@media (min-width:1281px){
  html body header[data-juniq-v327-header]{
    position:relative!important;
  }
  html body header[data-juniq-v327-header] > .v150-primary-nav,
  html body header[data-juniq-v327-header] > .juniq-v240-primary-nav{
    position:absolute!important;
    left:50%!important;
    right:auto!important;
    top:50%!important;
    grid-column:auto!important;
    grid-row:auto!important;
    justify-self:auto!important;
    align-self:auto!important;
    transform:translate(-50%,-50%)!important;
    margin:0!important;
    width:max-content!important;
    max-width:none!important;
    z-index:3!important;
  }
}

/* JUNIQ V468 — SITEWIDE MOBILE/TABLET HORIZONTAL CONTAINMENT */
@media (max-width:1024px){
  html,body{max-width:100%!important;overflow-x:hidden!important;}
  #siteHeader,#mobileMenuPanel,main,footer{max-width:100%!important;}
  img,video,canvas,iframe,embed,object,svg{max-width:100%!important;}
  input,select,textarea{max-width:100%!important;min-width:0!important;box-sizing:border-box!important;}
}

/* JUNIQ V484 — TABLET/PHONE HEADER SAFETY LOCK
   Touch-first devices use the existing hamburger menu at every viewport width.
   Desktop/laptop pointer devices retain the approved horizontal navigation.
   Scope: header visibility only; no colours, spacing, content, layout or menu contents changed. */
@media (hover:none) and (pointer:coarse){
  #siteHeader > #navLinks{
    display:none!important;
  }
  #siteHeader > #headerActions > a{
    display:none!important;
  }
  .site-header .header-inner > nav.primary,
  header.juniq-v240-header > .v150-primary-nav,
  header.juniq-v240-header > .juniq-v240-primary-nav,
  header.v138-header.v150-integrated-header:not(.juniq-v240-header) > .v150-primary-nav,
  .v150-home-header:not(.juniq-v240-header) > .v150-primary-nav{
    display:none!important;
  }
  header.juniq-v240-header > .juniq-v240-header-actions > a,
  header.v138-header.v150-integrated-header:not(.juniq-v240-header) > .juniq-v240-header-actions > a,
  .v150-home-header:not(.juniq-v240-header) > .juniq-v240-header-actions > a{
    display:none!important;
  }
}
