/* header.css — STICKY + BURGER (single source of truth) */
html, body { height: 100%; }
body { margin: 0; overflow-x: hidden; }

/* Header structure */
.site-header{width:100%}

/* IMPORTANT: site-topbar is fixed by menu.css? We avoid that here.
   Header itself remains sticky at the mainbar level. */
.site-topbar{ position: relative; z-index: 9999; }

/* Sticky mainbar */
.mainbar{
  position:-webkit-sticky;
  position:sticky;
  top:0;
  z-index:9999;
  background:linear-gradient(180deg,var(--green),var(--green-dark));
  box-shadow:0 6px 18px rgba(0,0,0,.10);
  overflow: visible; /* do not break sticky/burger dropdown */
}

.mainbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 22px;
  flex-wrap: nowrap;
}

.brand{display:flex;align-items:center;gap:10px;min-width:180px}
.logo-box{
  width:170px;height:40px;
  display:flex;align-items:center;justify-content:center;
  border:1px solid rgba(255,255,255,.35);
  border-radius:12px; overflow:hidden;
  background:rgba(255,255,255,0);
}
.logo-box img{max-width:100%;max-height:100%;object-fit:contain;display:block}

/* NAV desktop: one line + horizontal scroll if overflow */
.nav{
  display:flex;
  gap:10px;
  flex-wrap: nowrap;
  font-size:13px;
  justify-content:flex-start;
  flex:1 1 auto;
  min-width:0;
  white-space:nowrap;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.nav a{
  flex:0 0 auto;
  padding:8px 10px;
  border-radius:10px;
  font-weight:800;
  color:#fff;
  opacity:.92;
}
.nav a:hover{background:rgba(255,255,255,.14);opacity:1}
.nav a.is-active{background:rgba(255,255,255,.18);opacity:1}
.nav::-webkit-scrollbar{height:0}

/* Actions */
.actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
  white-space:nowrap;
  min-width:0;
}
.btn-top{
  display:inline-block;
  background:#fff;color:var(--green);
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;font-weight:900;
}
.lang select{
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.35);
  color:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-weight:900;
  font-size:12px;
  outline:none;
  cursor:pointer;
}
.lang select option{color:#000}

/* subbar */
.subbar{
  background:#0b5f00;
  color:#fff;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.subbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 22px;
}
.context-pill{
  display:inline-block;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.25);
  font-size:12px;
  font-weight:900;
}
.sub-links{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.sub-links a{
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  background:rgba(255,255,255,.06);
  font-size:12px;font-weight:800;color:#fff;opacity:.95
}
.sub-links a:hover{background:rgba(255,255,255,.14)}

/* burger */
.burger{
  display:none;
  border:1px solid rgba(255,255,255,.35);
  background:rgba(255,255,255,.10);
  color:#fff;border-radius:10px;
  padding:10px; cursor:pointer;
}
.burger span{display:block;width:20px;height:2px;background:#fff;margin:4px 0;border-radius:2px}

/* Mobile/tablet behaviour */
@media (max-width: 980px){
  .mainbar-inner{align-items:center}
  .burger{display:inline-block}

  /* Hide nav until open (burger) */
  #mainNav.nav{ display:none; }

  #mainNav.nav.is-open{
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:8px;

    position:absolute;
    left:12px; right:12px;
    top: calc(100% + 10px);
    z-index:10000;

    padding:12px;
    border-radius:14px;
    background: rgba(6, 70, 0, 0.98);
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);

    overflow: hidden;
    white-space: normal;
  }

  #mainNav.nav.is-open a{
    display:block;
    padding:12px 12px;
    border-radius:10px;
    font-size:15px;
    line-height:1.2;
  }

  .subbar-inner{flex-direction:column;align-items:flex-start}
  .sub-links{
    width:100%;
    justify-content:flex-start;
    flex-wrap:nowrap;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    white-space:nowrap;
    scrollbar-width:none;
  }
  .sub-links::-webkit-scrollbar{height:0}
}

@media (max-width: 520px){
  .container{padding:16px}
  .mainbar-inner{padding:12px 16px}
  .subbar-inner{padding:8px 16px}
  .logo-box{width:140px;height:32px}
}

/* kill legacy badges if any */
.badge, .langs { display:none !important; }