/* =====================================
   NAV HEADER (sticky) — mobile-first
   ===================================== */

.nav-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--bg-nav);
  border-bottom: 3px solid var(--border-gold);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-6);
}

/* =====================================
   LOGO
   ===================================== */

.logo {
  padding-top: 15px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: var(--logo-sun);
  width: fit-content;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-text {
  width: auto;
  height: 41px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: 2.25rem;
  line-height: 1;
  white-space: nowrap;
}

.logo-sun {
  width: 60px;
  height: auto;
  display: block;
  overflow: visible;
}

:root {
  --logo-sun-fill: #E1B747;
}

/* =====================================
   GLOBAL NAV STATE
   ===================================== */

body.nav-open {
  overflow: hidden;
}

/* =====================================
   MOBILE NAV TOGGLE
   ===================================== */

.nav-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  position: relative;
  z-index: calc(var(--z-header) + 3);
  cursor: pointer;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--logo-sun);
  border-radius: 2px;
  display: block;
  transition: transform 220ms ease, opacity 220ms ease;
}

/* hamburger -> kruis */
.nav-toggle.is-active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* =====================================
   OVERLAY
   ===================================== */

.nav-overlay {
  position: fixed;
  inset: calc(var(--header-height) + 3px) 0 0 0;
  background: rgba(11, 20, 18, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  z-index: calc(var(--z-header) - 1);
}

.nav-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* =====================================
   MOBILE NAV PANEL
   ===================================== */

.nav {
  position: fixed;
  top: calc(var(--header-height) + 3px);
  right: 0;
  width: min(72vw, 320px);
  height: calc(100dvh - var(--header-height) - 3px);
  padding: var(--space-6) var(--space-5)
           calc(var(--space-6) + env(safe-area-inset-bottom));
  background: var(--bg-nav);
  border-left: 1px solid rgba(200, 169, 81, 0.35);
  box-shadow: -12px 0 30px rgba(0, 0, 0, 0.28);
  transform: translateX(110%);
  transition: transform 220ms ease;
  z-index: calc(var(--z-header) + 2);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

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

.nav-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  flex: 0 0 auto;
}

.nav-list > li {
  width: 100%;
}

.nav-list a,
.submenu-toggle {
  font-family: var(--font-body);
  font-size: var(--fs-300);
  color: var(--text-on-dark);
  letter-spacing: 0.01em;
  text-decoration: none;
}

/* gewone links mobile */
.nav-list > li > a:not(.nav-cta) {
  display: block;
  width: 100%;
  padding: 0.72rem 0;
  border-bottom: 1px solid rgba(200, 169, 81, 0.14);
  color: var(--text-on-dark);
}

/* =====================================
   SUBMENU TRIGGER MOBILE
   ===================================== */

.submenu-trigger {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-bottom: 1px solid rgba(200, 169, 81, 0.14);
}

.submenu-parent-link,
.submenu-parent-link:visited {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  padding: 0.72rem 0;
  color: var(--text-on-dark);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: var(--fs-300);
  font-weight: 400;
  line-height: 1.3;
}

.submenu-toggle {
  flex: 0 0 auto;
  width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: var(--text-on-dark);
}

/* chevron */
.submenu-chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--border-gold);
  border-bottom: 2px solid var(--border-gold);
  transform: rotate(45deg);
  transition: transform 220ms ease, border-color 220ms ease;
  flex-shrink: 0;
}

.nav-item-has-submenu.is-open .submenu-chevron {
  transform: rotate(225deg);
}

/* submenu mobile accordion */
.submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.75rem;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 260ms ease,
    opacity 180ms ease,
    padding-top 180ms ease,
    padding-bottom 180ms ease;
}

.nav-item-has-submenu.is-open .submenu {
  max-height: 320px;
  opacity: 1;
  padding-top: 0.2rem;
  padding-bottom: 0.25rem;
}

.submenu li {
  width: 100%;
}

.submenu a,
.submenu a:visited {
  display: block;
  padding: 0.5rem 0;
  font-size: var(--fs-200);
  color: var(--text-on-dark);
  opacity: 0.92;
  text-decoration: none;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.submenu-toggle:hover,
.submenu-toggle:focus-visible,
.submenu a:hover,
.submenu a:focus-visible,
.submenu-parent-link:hover,
.submenu-parent-link:focus-visible {
  color: var(--border-gold);
  outline: none;
}

/* =====================================
   CTA
   ===================================== */

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin-top: var(--space-4);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

.nav-list .nav-cta {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.nav-list .nav-cta:hover,
.nav-list .nav-cta:focus-visible {
  background: var(--btn-bg-hover);
  color: var(--text-on-dark);
}

/* =====================================
   MOBILE FOOTER IN PANEL
   ===================================== */

.nav-footer {
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(200, 169, 81, 0.15);
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-on-dark);
  opacity: 0.82;
}

.nav-footer-title {
  margin: 0 0 0.25rem;
  font-weight: 600;
  color: var(--text-on-dark);
}

.nav-footer p {
  margin: 0;
  color: var(--text-on-dark);
}

.nav-footer a {
  color: var(--text-on-dark);
  text-decoration: none;
}

.nav-footer a:hover,
.nav-footer a:focus-visible {
  color: var(--border-gold);
  outline: none;
}

/* =====================================
   DESKTOP (901px+)
   ===================================== */

@media (min-width: 901px) {
  .nav-toggle {
    display: none;
  }

  .nav-footer {
    display: none;
  }

  .nav-overlay {
    display: none;
  }

  .nav {
    position: static;
    width: auto;
    height: auto;
    transform: none;
    transition: none;
    padding: 0;
    border-left: none;
    box-shadow: none;
    background: transparent;
    overflow: visible;
    display: block;
  }

  .nav-list {
    flex-direction: row;
    align-items: center;
    gap: var(--space-8);
    width: auto;
  }

  .nav-list > li {
    width: auto;
    position: relative;
  }

  .nav-list > li > a:not(.nav-cta),
  .nav-list > li > a:not(.nav-cta):visited {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-bottom: none;
    font-family: var(--font-body);
    font-size: var(--fs-200);
    font-weight: 400;
    line-height: 1;
    color: var(--border-gold);
    text-decoration: none;
  }

  .submenu-trigger {
    display: inline-flex;
    align-items: center;
    width: auto;
    border-bottom: none;
    gap: 0.35rem;
  }

  .nav-list > li > .submenu-trigger > .submenu-parent-link,
  .nav-list > li > .submenu-trigger > .submenu-parent-link:visited {
    display: inline-flex;
    align-items: center;
    padding: 0;
    font-family: var(--font-body);
    font-size: var(--fs-200);
    font-weight: 400;
    line-height: 1;
    color: var(--border-gold);
    text-decoration: none;
    flex: 0 0 auto;
  }

  .nav-list > li > .submenu-trigger > .submenu-toggle {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: none;
    color: var(--border-gold);
    flex: 0 0 auto;
  }

  .nav-list > li > a:not(.nav-cta):hover,
  .nav-list > li > a:not(.nav-cta):focus-visible,
  .nav-list > li > .submenu-trigger > .submenu-parent-link:hover,
  .nav-list > li > .submenu-trigger > .submenu-parent-link:focus-visible,
  .nav-item-has-submenu:hover > .submenu-trigger > .submenu-parent-link,
  .nav-item-has-submenu:focus-within > .submenu-trigger > .submenu-parent-link,
  .nav-item-has-submenu:hover > .submenu-trigger > .submenu-toggle,
  .nav-item-has-submenu:focus-within > .submenu-trigger > .submenu-toggle {
    color: var(--text-on-dark);
    outline: none;
  }

  .nav-item-has-submenu {
    position: relative;
  }

  /* hover bridge */
  .nav-item-has-submenu::after {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 30px;
  }

  .submenu {
    position: absolute;
    top: calc(100% + 22px);
    left: 0;
    min-width: 240px;
    max-height: none;
    opacity: 0;
    overflow: visible;
    padding: 0.65rem 0;
    background: var(--bg-nav);
    border: 1px solid rgba(200, 169, 81, 0.25);
    border-radius: var(--radius-sm);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
    transform: translateY(8px);
    visibility: hidden;
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      visibility 180ms ease;
    z-index: calc(var(--z-header) + 5);
  }

  .submenu li {
    width: 100%;
  }

  .submenu a,
  .submenu a:visited {
    display: block;
    padding: 0.7rem 1rem;
    white-space: nowrap;
    font-size: var(--fs-200);
    color: var(--border-gold);
    opacity: 1;
    text-decoration: none;
  }

  .submenu a:hover,
  .submenu a:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-on-dark);
  }

  .nav-item-has-submenu:hover .submenu,
  .nav-item-has-submenu:focus-within .submenu,
  .nav-item-has-submenu.is-open .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-item-has-submenu:hover .submenu-chevron,
  .nav-item-has-submenu:focus-within .submenu-chevron,
  .nav-item-has-submenu.is-open .submenu-chevron {
    transform: rotate(225deg);
    border-right-color: var(--text-on-dark);
    border-bottom-color: var(--text-on-dark);
  }

  .nav-cta {
    width: auto;
    margin-top: 0;
    padding: 0.45rem 1rem;
    align-self: auto;
    font-size: var(--fs-100);
  }

  .nav-list .nav-cta {
    font-size: var(--fs-200);
  }
}