/* =============================================
   nav.css — Horizontale sticky navigatie
   ============================================= */

/* ── Site header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-white);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-color: var(--color-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ── Header inner container ── */
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  height: 68px;
}

/* ── Logo ── */
.header-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.header-logo img {
  height: 48px;
  width: auto;
  display: block;
}

/* ── Desktop nav — gecentreerd via flex:1 ── */
.nav-primary {
  flex: 1;
  display: flex;
  justify-content: center;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ── Nav-link: anchors en buttons dezelfde visuele stijl ── */
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  font-family: var(--ff);
  color: var(--color-text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
  line-height: 1;
}
.nav-link:hover {
  background: rgba(239, 52, 41, 0.07);
  color: var(--color-brand-red);
}
.nav-link.nav-active {
  background: var(--color-bg);
  color: var(--color-brand-teal);
  font-weight: 700;
}

/* ── Chevron-pijl naast trigger-tekst ── */
.nav-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  stroke: currentColor;
}
.nav-has-mega.open .nav-trigger .nav-chevron,
.nav-has-dropdown.open .nav-trigger .nav-chevron {
  transform: rotate(180deg);
}

/* ── Dropdown / mega: gemeenschappelijke basis ── */
.nav-has-mega,
.nav-has-dropdown {
  position: relative;
}
.nav-mega-panel,
.nav-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 200;
}

/* Alleen JS-toggle (.open class) — geen CSS :hover trigger */
.nav-has-mega.open > .nav-mega-panel  { display: flex; }
.nav-has-dropdown.open > .nav-dropdown-panel { display: block; }

/* ── Mega panel (Bewerkingen): 3 kolommen ── */
.nav-mega-panel {
  flex-direction: row;
  left: 0;
  min-width: 580px;
  padding: 16px 8px 16px 0;
}

.nav-mega-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px 0 16px;
  border-right: 1px solid var(--color-border);
}
.nav-mega-col:last-child {
  border-right: none;
}

.nav-mega-head {
  display: block;
  padding: 4px 8px 10px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--ff);
  color: var(--color-brand-teal);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: color 0.15s ease;
}
.nav-mega-head:hover {
  color: var(--color-brand-red);
}

.nav-mega-col a:not(.nav-mega-head) {
  display: block;
  padding: 6px 8px;
  font-size: 14px;
  font-family: var(--ff);
  color: var(--color-text-muted);
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-mega-col a:not(.nav-mega-head):hover {
  background: rgba(239, 52, 41, 0.07);
  color: var(--color-brand-red);
}

/* ── Dropdown panel (Projecten, Nieuws) ── */
.nav-dropdown-panel {
  min-width: 210px;
  padding: 8px;
  list-style: none;
}

.nav-dropdown-panel li a {
  display: block;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-family: var(--ff);
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-panel li a:hover {
  background: rgba(239, 52, 41, 0.07);
  color: var(--color-brand-red);
}

/* ── Nieuws dropdown: artikel-items met titel + datum ── */
.nav-dropdown-nieuws {
  min-width: 300px;
}
.nav-dropdown-artikel a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
}
.nav-dropdown-titel {
  display: block;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--ff);
  color: var(--color-text);
  line-height: 1.3;
}
.nav-dropdown-datum {
  display: block;
  font-size: 11px;
  font-family: var(--ff);
  color: var(--color-text-muted);
}
.nav-dropdown-alle {
  border-top: 1px solid var(--color-border);
  margin-top: 4px;
  padding-top: 4px;
}
.nav-dropdown-alle a {
  color: var(--color-brand-teal) !important;
  font-weight: 600;
}
.nav-dropdown-alle a:hover {
  background: rgba(239, 52, 41, 0.07) !important;
  color: var(--color-brand-red) !important;
}

/* ── Rechts: Contact CTA + hamburger ── */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  background: var(--color-brand-red);
  color: var(--color-white);
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--ff);
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.nav-cta:hover {
  filter: brightness(0.88);
  box-shadow: 0 4px 14px rgba(239, 52, 41, 0.4);
  transform: translateY(-1px);
}
.nav-cta.nav-active {
  filter: brightness(0.88);
}

/* ── Hamburger (verborgen op desktop) ── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 6px;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.nav-hamburger:hover {
  background: var(--color-bg);
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile panel ── */
.nav-mobile-panel {
  display: none;
  border-top: 1px solid var(--color-border);
  background: var(--color-white);
  max-height: calc(100vh - 68px);
  overflow-y: auto;
}
.nav-mobile-panel.open {
  display: block;
}
.nav-mobile-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Top-level mobile links + trigger-knoppen */
.nav-mobile-list > li > a,
.nav-mobile-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 24px;
  font-size: 16px;
  font-family: var(--ff);
  color: var(--color-text);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.15s ease;
}
.nav-mobile-list > li:last-child > a,
.nav-mobile-list > li:last-child > .nav-mobile-trigger {
  border-bottom: none;
}
.nav-mobile-list > li > a:hover,
.nav-mobile-trigger:hover {
  color: var(--color-brand-red);
}
.nav-mobile-trigger {
  font-weight: 600;
}
.nav-mobile-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  stroke: currentColor;
}
.nav-mobile-trigger.open .nav-mobile-chevron {
  transform: rotate(180deg);
}

/* Sub-menus mobile */
.nav-mobile-sub {
  display: none;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--color-bg);
}
.nav-mobile-sub.open {
  display: block;
}
.nav-mobile-sub li a {
  display: block;
  padding: 10px 24px 10px 40px;
  font-size: 14px;
  font-family: var(--ff);
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav-mobile-sub li a:hover {
  color: var(--color-brand-red);
}
.nav-mobile-sub-head {
  display: block;
  padding: 10px 24px 4px 40px;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--ff);
  color: var(--color-brand-teal);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.nav-mobile-alle {
  color: var(--color-brand-teal) !important;
  font-weight: 600;
}

/* ── Responsive: verberg desktop nav onder 900px ── */
@media (max-width: 900px) {
  .nav-primary {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .header-inner {
    gap: 12px;
  }
  .nav-actions {
    margin-left: auto;
  }
}

@media (max-width: 400px) {
  .header-inner {
    padding: 0 16px;
    height: 60px;
  }
  .header-logo img {
    height: 40px;
  }
  .nav-cta {
    padding: 7px 14px;
    font-size: 13px;
  }
  .nav-mobile-panel {
    max-height: calc(100vh - 60px);
  }
}
