/* =========================================================
   LANGUAGE SWITCH (NL / EN) — shared by every page
   Link as the LAST stylesheet:  <link rel="stylesheet" href="/lang-switch.css">
   Flags are inline SVG (emoji flags do not render on Windows).
   ========================================================= */

/* Make room in the nav pill: logo left, everything else pushed right */
.nav-inner{ justify-content:flex-start; }
.nav-logo{ margin-right:auto; }

.lang-switch{
  display:inline-flex;
  align-items:center;
  gap:2px;
  margin-left:14px;
  padding:3px;
  border:1px solid var(--border-bright, rgba(255,255,255,.14));
  border-radius:999px;
  background:rgba(255,255,255,.03);
  flex-shrink:0;
  line-height:1;
}
.lang-opt{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:6px 11px 6px 8px;
  border-radius:999px;
  font-family:"Geist", system-ui, -apple-system, sans-serif;
  font-size:12.5px;
  font-weight:600;
  letter-spacing:.06em;
  color:var(--text-2, #B8C2D1);
  text-decoration:none;
  transition:background .2s ease, color .2s ease;
}
a.lang-opt:hover{
  color:var(--text, #F8FAFC);
  background:rgba(255,255,255,.07);
}
a.lang-opt:focus-visible{
  outline:2px solid var(--accent, #00D4FF);
  outline-offset:2px;
}
.lang-opt.is-active{
  color:var(--text, #F8FAFC);
  background:rgba(255,255,255,.10);
  cursor:default;
}
.lang-flag{
  width:20px;
  height:14px;
  border-radius:3px;
  flex-shrink:0;
  background-repeat:no-repeat;
  background-size:100% 100%;
  box-shadow:0 0 0 1px rgba(255,255,255,.18);
}
.lang-flag--nl{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 6' preserveAspectRatio='none'%3E%3Crect width='9' height='6' fill='%23AE1C28'/%3E%3Crect y='2' width='9' height='2' fill='%23fff'/%3E%3Crect y='4' width='9' height='2' fill='%2321468B'/%3E%3C/svg%3E");
}
.lang-flag--en{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30' preserveAspectRatio='none'%3E%3CclipPath id='s'%3E%3Cpath d='M0,0 v30 h60 v-30 z'/%3E%3C/clipPath%3E%3CclipPath id='t'%3E%3Cpath d='M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23s)'%3E%3Cpath d='M0,0 v30 h60 v-30 z' fill='%23012169'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0,0 L60,30 M60,0 L0,30' clip-path='url(%23t)' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30,0 v30 M0,15 h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/g%3E%3C/svg%3E");
}

/* Legal pages (privacy / terms): "back to home" button sits next to the switch */
.nav-back{ margin-left:auto; }
.nav-back + .lang-switch{ margin-left:10px; }
.nav-logo + .lang-switch{ margin-left:auto; }

/* Mobile: switch stays visible next to the hamburger */
@media (max-width:960px){
  .lang-switch{ order:2; margin-left:0; margin-right:10px; }
  .nav-toggle{ order:3; }
}
@media (max-width:640px){
  /* legal pages: keep the back button as an arrow-only pill so the switch fits */
  .nav-back{ padding:10px 12px; white-space:nowrap; }
  .nav-back-text{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
}
@media (max-width:520px){
  .lang-opt{ padding:6px 9px 6px 7px; gap:6px; font-size:12px; }
  .lang-flag{ width:18px; height:12px; }
  .nav-back{ padding:8px 12px; font-size:13px; }
  .nav-back + .lang-switch{ margin-left:8px; }
  .nav-inner{ padding-left:16px; padding-right:12px; }
}
@media (max-width:380px){
  /* very small phones: flags only, no letters */
  .lang-opt{ padding:6px 8px; }
  .lang-opt .lang-code{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
  .nav-logo span{ font-size:18px; }
}
