/* ═══════════════════════════════════════════
   1. BASE NAV (DESKTOP & ALGEMEEN)
═══════════════════════════════════════════ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4rem;
  height: 80px;
  background: rgba(253,252,250,0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--ink-10);
  transition: box-shadow 0.4s;
}

nav.scrolled {
  box-shadow: 0 2px 40px rgba(26,26,26,0.08);
}

.nav-logo-img {
  height: 72px;
  width: auto;
  display: block;
}

/* De lijst met links (Desktop) */
.nav-links {
  display: flex;
  gap: 1.8rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-60);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

/* Hover lijntje desktop */
.nav-links > li > a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.nav-links a:hover, .nav-links li.active > a {
  color: var(--navy);
}

.nav-links > li:hover > a::after,
.nav-links > li.active > a::after {
  transform: scaleX(1);
}

.nav-cta {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  border: 1px solid var(--navy);
  padding: 9px 22px;
  border-radius: 2px;
  transition: background 0.25s, color 0.25s;
}

.nav-cta:hover {
  background: var(--navy);
  color: var(--white);
}

/* ═══════════════════════════════════════════
   2. SUBMENU'S (DESKTOP DROPDOWNS)
═══════════════════════════════════════════ */

/* Verberg submenu's standaard op desktop */
@media (min-width: 901px) {
  .nav-links li { position: relative; }

  .nav-links .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    list-style: none;
    padding: 1rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--ink-10);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
  }

  /* Derde laag fly-out naar rechts */
  .nav-links .submenu .submenu {
    top: -1rem;
    left: 100%;
    transform: translateX(10px);
  }

  .nav-links li:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translate(0, 0);
  }

  .nav-links .submenu a {
    padding: 0.6rem 1.5rem;
    display: block;
    font-size: 13px;
  }

  .nav-links .submenu a::after { display: none; }
}

/* ═══════════════════════════════════════════
   3. HAMBURGER ICON
═══════════════════════════════════════════ */

.hamburger {
  display: none; /* Alleen tonen op mobiel */
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 54px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--navy);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════════════════════════════════════
   4. MOBILE MENU CONTAINER
═══════════════════════════════════════════ */

.mobile-menu {
  display: none; /* Belangrijk: Wordt 'flex' via JS class .open */
  position: fixed;
  top: 0; /* Veranderd van 80px naar 0 voor full-screen effect */
  padding-top: 80px; /* Ruimte voor de nav bar */
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  z-index: 999;
  flex-direction: column;
  padding-left: 2rem;
  padding-right: 2rem;
  overflow-y: auto;
}

.mobile-menu.open {
  display: flex !important; /* Forceert tonen */
}

/* ═══════════════════════════════════════════
   5. RESPONSIVE DESIGN (MOBIEAL OVERRIDES)
═══════════════════════════════════════════ */

@media (max-width: 1100px) {
  /* Verberg desktop links in de nav bar */
  nav .nav-links, 
  nav .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  nav {
    padding: 0 1.5rem;
  }

  .nav-logo-img {
    height: 54px;
  }

  /* Styling van de lijst binnen het mobiele menu */
  .mobile-menu .nav-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 2rem;
  }

  .mobile-menu .nav-links a {
    font-size: 24px;
    font-family: var(--font-display);
    font-weight: 300;
    color: var(--navy);
    padding: 1.1rem 0;
    display: block;
    border-bottom: 1px solid var(--ink-10);
  }

  /* Submenu's op mobiel (Accordion stijl) */
  .mobile-menu .submenu {
    display: none; /* Verberg tot parent .active is */
    list-style: none;
    padding-left: 1.5rem;
    background: rgba(0,0,0,0.02);
  }

  .mobile-menu li.active > .submenu {
    display: block;
  }

  .mobile-menu .submenu a {
    font-size: 18px;
    border-bottom: none;
    padding: 0.8rem 0;
  }
}

@media (max-width: 480px) {
  .nav-logo-img { height: 44px; }
}