/* CAELIST V37 — mobile header/navigation repair
   Keeps the desktop navigation intact and turns tablet/mobile widths into a clean
   two-control header: language + Menu. The full navigation appears only when
   the Menu button is opened. */

/* V31's fixed .header .navlinks rule was overriding the original mobile
   display:none media rule. Re-establish the responsive visibility contract. */
@media (max-width:1050px){
  .header .navlinks{
    display:none !important;
    min-width:0;
  }

  .header .nav.open .navlinks{
    display:flex !important;
    position:absolute;
    left:14px;
    right:14px;
    top:78px;
    flex-direction:column;
    align-items:stretch;
    padding:10px;
    background:rgba(6,15,26,.99);
    border:1px solid rgba(255,255,255,.08);
    border-radius:16px;
    box-shadow:0 20px 50px rgba(0,0,0,.35);
    max-height:calc(100vh - 94px);
    overflow:auto;
    z-index:120;
  }

  .header .nav.open .navlinks .navitem,
  .header .nav.open .navlinks > .navlink,
  .header .nav.open .navlinks > .btn{
    width:100%;
  }

  /* Language control remains available without competing with the main nav. */
  .header .lang-chooser{
    flex:0 0 auto;
    margin-left:auto;
  }

  .header .mobile-toggle{
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    width:auto;
    min-width:82px;
    height:44px;
    margin-left:8px;
    padding:0 15px;
    border:1px solid rgba(255,255,255,.13);
    border-radius:12px;
    background:rgba(255,255,255,.035);
    color:#eef4ff;
    font:700 14px/1 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
    letter-spacing:.01em;
    white-space:nowrap;
    cursor:pointer;
  }

  .header .mobile-toggle:hover,
  .header .mobile-toggle:focus-visible{
    background:rgba(29,140,255,.11);
    border-color:rgba(83,215,255,.26);
    outline:none;
  }
}

@media (max-width:680px){
  .header .nav.open .navlinks{
    left:10px;
    right:10px;
    top:74px;
    max-height:calc(100vh - 86px);
  }

  .header .mobile-toggle{
    min-width:76px;
    height:42px;
    padding:0 13px;
    font-size:13px;
  }

  .header .lang-trigger{
    min-width:58px;
    min-height:42px;
    height:42px;
    padding:10px 12px;
  }
}

@media (max-width:390px){
  .header .mobile-toggle{
    min-width:70px;
    padding:0 11px;
  }

  .header .lang-trigger{
    min-width:54px;
    padding-left:10px;
    padding-right:10px;
  }
}
