/* HL3C desktop header balance patch — 2026-09-13
   Keep the existing font size and keep every desktop nav label on one line,
   but distribute the navigation across the available header width instead of
   packing all items against the right edge. Mobile hamburger layout <=820px is untouched. */

@media (min-width:821px){
  .site-header{
    --hl3c-header-pad:clamp(18px,2.4vw,48px);
    padding-left:var(--hl3c-header-pad)!important;
    padding-right:var(--hl3c-header-pad)!important;
    gap:clamp(28px,3vw,58px)!important;
  }

  .site-header > .brand{
    flex:0 0 auto!important;
    white-space:nowrap!important;
  }

  /* Use the whole remaining row and share the free space between items.
     This keeps the menu visually balanced while the language control stays last. */
  .site-header .top-nav{
    flex:1 1 auto!important;
    min-width:0!important;
    width:auto!important;
    flex-wrap:nowrap!important;
    justify-content:space-between!important;
    align-items:center!important;
    gap:0!important;
  }

  .site-header .top-nav > a.top-nav-link,
  .site-header .top-nav > a.top-nav-link:visited{
    flex:0 0 auto!important;
    white-space:nowrap!important;
    word-break:keep-all!important;
    overflow-wrap:normal!important;
    padding-left:clamp(2px,.18vw,4px)!important;
    padding-right:clamp(2px,.18vw,4px)!important;
  }

  /* Cancel the earlier far-right translation: space-between now places the
     language selector naturally at the far end of the header. */
  .site-header .top-nav .hl3c-language-switcher{
    flex:0 0 auto!important;
    margin-left:0!important;
    margin-right:0!important;
    transform:none!important;
  }
}

/* At narrower desktop widths, preserve one-line labels without shrinking type.
   The browser simply uses smaller inter-item free space. */
@media (min-width:821px) and (max-width:1280px){
  .site-header{
    --hl3c-header-pad:16px;
    gap:18px!important;
  }

  .site-header .top-nav > a.top-nav-link,
  .site-header .top-nav > a.top-nav-link:visited{
    padding-left:1px!important;
    padding-right:1px!important;
  }
}
