/**
 * MTB de Zeeleeuw — header & navigation
 *
 * 2026 redesign: apple.com's defining UI signature is the sticky,
 * translucent, blurred nav bar — small, unobtrusive, dark text on a
 * near-white background, not the earlier solid navy bar. The mobile
 * off-canvas panel keeps a solid dark treatment (matching how apple.com
 * itself still uses a full solid panel for its own mobile menu — blur
 * only really reads on a bar sitting over content, not a full-screen
 * overlay).
 */
.site-topbar {
  background: var(--z-navy);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--step-xs);
}

.site-topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-2);
  gap: var(--space-4);
  flex-wrap: wrap;
}

.site-topbar a {
  color: rgba(255, 255, 255, 0.85);
}

.site-header {
  /* v2.1.15 refresh: was a near-opaque flat navy fill (rgba(0,52,102,.88))
     — read as one heavy dark block, and contradicted this file's own
     2026-redesign comment above (which already described the intended
     apple.com-style light glass bar). Switched to what that comment
     described: a light, translucent blurred bar, navy used as the
     accent color in the logo/nav/underlines rather than as a full-bleed
     fill. Brand color stays clearly present, just carried by typography
     and detail instead of by a big solid block. */
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--z-line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  position: relative;
  /* Was 40 — te laag t.o.v. embedded derde-partij-widgets zoals
     Leaflet-kaarten (bijv. de bodemvocht-/toegankelijkheidskaart), die
     hun eigen tegel-/marker-/besturingslagen standaard tot z-index 1000
     kunnen geven. Bij het scrollen kwam zo'n kaart-component daardoor
     boven de sticky header te liggen. 1200 ligt ruim boven het normale
     bereik van zulke widgets, zodat de header altijd bovenaan blijft. */
  z-index: 1200;
}

/* "Kust bij nacht": een lichte glasbalk zou hier vloeken met de rest van
   de donkere leesoppervlakte, dus deze preset krijgt een eigen, iets
   luchtiger donkere variant — nog steeds echt glas (translucent + blur,
   je ziet de pagina er vaag doorheen), niet meer het oude vlakke navy-
   blok. */
body.theme-night .site-header {
  background: var(--z-navy-glass);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.theme-night .site-logo,
body.theme-night .site-nav a,
body.theme-night .nav-toggle {
  color: #fff;
}

.site-header.is-sticky {
  position: sticky;
  top: 0;
}

.site-search {
  display: flex;
  align-items: center;
}

.site-search input[type="search"],
.site-search input[type="text"] {
  min-width: 180px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--z-navy);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-sm);
}

.site-logo:hover {
  opacity: 0.75;
  text-decoration: none;
}

.site-logo img {
  height: 56px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step-xs);
  color: var(--z-navy);
  opacity: 0.7;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav .current > a {
  opacity: 1;
  color: var(--z-accent);
  text-decoration: none;
}

body.theme-night .site-nav a {
  color: #fff;
  opacity: 0.85;
}

body.theme-night .site-nav a:hover,
body.theme-night .site-nav .current > a {
  opacity: 1;
  color: var(--z-accent-on-dark);
}

.site-nav .parent {
  position: relative;
}

.site-nav .nav-child {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--z-line);
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: var(--space-2);
  min-width: 200px;
  flex-direction: column;
  gap: 0;
}

.site-nav .parent:hover .nav-child,
.site-nav .parent:focus-within .nav-child {
  display: flex;
}

.site-nav .nav-child a {
  color: var(--z-navy);
  font-weight: 500;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border-bottom: none;
  opacity: 1;
}

.site-nav .nav-child a:hover {
  background: var(--z-blue-soft);
}

body.theme-night .site-nav .nav-child {
  background: rgba(6, 26, 51, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
}

body.theme-night .site-nav .nav-child a {
  color: #fff;
}

body.theme-night .site-nav .nav-child a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--z-navy);
  padding: var(--space-2) var(--space-3);
  font-size: 1.1rem;
  cursor: pointer;
}

body.theme-night .nav-toggle {
  color: #fff;
}

/* Grassveld-preset: Grassfeld's eigen nav is een lichte, bijna-witte
   balk met donkere tekst en een subtiele schaduw i.p.v. een gekleurde
   vlakvulling — hier vertaald met de site se eigen (nu groene) accent
   voor de actieve/hover-status. */
body.theme-grassfeld .site-header {
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--z-line);
  box-shadow: var(--shadow-soft-sm);
}

body.theme-grassfeld .site-logo,
body.theme-grassfeld .site-nav a,
body.theme-grassfeld .nav-toggle {
  color: var(--z-ink);
}

body.theme-grassfeld .site-nav a {
  opacity: 0.75;
}

body.theme-grassfeld .site-nav a:hover,
body.theme-grassfeld .site-nav .current > a {
  opacity: 1;
  color: var(--z-accent);
}

body.theme-grassfeld .site-nav .nav-child {
  background: #fff;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--z-line);
}

body.theme-grassfeld .site-nav .nav-child a {
  color: var(--z-ink);
}

body.theme-grassfeld .site-nav .nav-child a:hover {
  background: var(--z-green-soft);
  color: var(--z-accent);
}

@media (max-width: 900px) {
  body.theme-grassfeld .site-nav {
    background: #fff;
  }

  body.theme-grassfeld .site-nav a,
  body.theme-grassfeld .nav-close {
    color: var(--z-ink);
  }

  body.theme-grassfeld .site-nav a:hover,
  body.theme-grassfeld .site-nav .current > a {
    color: var(--z-accent);
  }

  body.theme-grassfeld .site-nav .nav-child {
    background: var(--z-paper);
    box-shadow: none;
  }
}

/* Only ever meant to be seen inside the mobile off-canvas panel — never
   explicitly hidden outside the mobile media query below, so on desktop
   it rendered as a stray button sitting in front of the regular menu. */
.nav-close {
  display: none;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    /* Moet boven .site-header (nu 1200) blijven staan, anders verdwijnt
       het paneel er zelf achter zodra het opengeschoven wordt. */
    z-index: 1300;
    width: min(320px, 85vw);
    /* v2.1.15 refresh: was flat var(--z-void) (puur zwart) — een zacht
       navy-verloop oogt minder als een kale zwarte lap en sluit aan bij
       de merkkleur, net als de vernieuwde donkere voettekst-rijen
       verderop. */
    background: linear-gradient(160deg, var(--z-navy) 0%, #061529 100%);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-16) var(--space-6) var(--space-6);
    transform: translateX(100%);
    transition: transform var(--dur) var(--ease);
    overflow-y: auto;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
    width: 100%;
  }

  .site-nav a {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--step-base);
  }

  .site-nav a:hover,
  .site-nav .current > a {
    color: var(--z-accent-on-dark);
  }

  .site-nav .nav-child {
    position: static;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
    display: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .site-nav .nav-child a {
    color: #fff;
  }

  .site-nav .parent:hover .nav-child,
  .site-nav .parent:focus-within .nav-child {
    display: flex;
  }

  .nav-close {
    display: block;
    align-self: flex-end;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: var(--space-6);
  }
}
