/* ═══════════════════════════════════════════════════════
   Nomade Educatie — Desktop Navigation & Mega Menu
   ═══════════════════════════════════════════════════════ */

/* ─── Header layout ─── */

.site-header {
  justify-content: flex-start;
  gap: 0;
  padding: 0 clamp(16px, 4vw, 40px);
  z-index: 1002;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.4s ease,
              backdrop-filter 0.4s ease,
              box-shadow 0.4s ease;
}

.site-header.scrolled,
.site-header.megamenu-open {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.site-header .logo {
  flex-shrink: 0;
}

/* ─── Desktop nav links ─── */

.nav-links {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.5vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.88rem;
  font-weight: var(--fw-semibold);
  transition: opacity 0.25s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  opacity: 0.55;
}

.has-megamenu.active > .megamenu-trigger {
  opacity: 0.55;
}

/* ─── Right-side CTA ─── */

.nav-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ─── Mega menu trigger chevron ─── */

.has-megamenu {
  position: static;
}

.megamenu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.megamenu-trigger::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform 0.3s ease;
}

.has-megamenu.active .megamenu-trigger::after {
  transform: rotate(-135deg) translateY(-1px);
}

/* ─── Mega menu container ─── */

.megamenu {
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  height: 0;
  opacity: 0;
  visibility: hidden;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.28s ease,
              visibility 0.28s ease;
  z-index: 99;
}

.megamenu.active {
  opacity: 1;
  visibility: visible;
}

.megamenu__inner {
  max-width: 1500px;
  margin: 0 auto;
  padding: var(--space-lg) clamp(24px, 4vw, 48px);
}

/* ─── Panel visibility ─── */

.megamenu__panel {
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.megamenu__panel.active {
  display: block;
  opacity: 1;
}

/* ─── Cards-sidebar layout (Lesmethoden) ─── */

.megamenu__split {
  display: flex;
  gap: var(--space-lg);
}

.megamenu__main {
  flex: 1;
  min-width: 0;
}

.megamenu__sidebar {
  flex: 0 0 220px;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  padding-left: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ─── Book card grid ─── */

.megamenu__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.megamenu__card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #fff;
  transition: transform 0.25s ease;
}

.megamenu__card:hover {
  transform: scale(1.02);
}

.megamenu__card-image {
  position: relative;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  transition: border-color 0.25s ease;
  aspect-ratio: 3 / 4;
}

.megamenu__card:hover .megamenu__card-image {
  border-color: #03788d;
}

.megamenu__card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.megamenu__card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: var(--fw-semibold);
}

.megamenu__card-label svg {
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.megamenu__card:hover .megamenu__card-label svg {
  opacity: 1;
}

.megamenu__card-subtitle {
  padding: 6px 2px 0;
  font-size: 0.75rem;
  color: #555;
  line-height: 1.4;
}

/* ─── Sidebar link groups ─── */

.megamenu__sidebar-group h4 {
  font-size: 0.82rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 6px 0;
  letter-spacing: 0.02em;
}

.megamenu__sidebar-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.megamenu__sidebar-group li + li {
  margin-top: 5px;
}

.megamenu__sidebar-group a {
  text-decoration: none;
  font-size: 0.8rem;
  color: #444;
  transition: color 0.2s ease;
}

.megamenu__sidebar-group a:hover {
  color: #03788d;
}

/* ─── Multi-column panels ─── */

.megamenu__columns {
  display: grid;
  gap: var(--space-xl);
  justify-content: center;
}

.megamenu__columns--2 {
  grid-template-columns: repeat(2, 200px);
}

.megamenu__columns--3 {
  grid-template-columns: repeat(3, 200px);
}

.megamenu__col h4 {
  font-size: 0.82rem;
  font-weight: var(--fw-bold);
  color: var(--color-text);
  margin: 0 0 10px 0;
  letter-spacing: 0.02em;
}

.megamenu__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.megamenu__col li + li {
  margin-top: 7px;
}

.megamenu__col a {
  text-decoration: none;
  font-size: 0.82rem;
  color: #444;
  transition: color 0.2s ease;
}

.megamenu__col a:hover {
  color: #03788d;
}

/* ─── Coming-soon / placeholder links ─── */

.megamenu__sidebar-group a.link--soon,
.megamenu__col a.link--soon {
  opacity: 0.4;
  text-decoration: line-through;
  pointer-events: none;
  cursor: default;
}

.megamenu__col span.link--soon {
  opacity: 0.5;
  font-size: 0.82rem;
  color: #444;
  font-style: italic;
}

/* ─── Tablet header (≤ 1200px) ─── */

@media (max-width: 1200px) {
  :root {
    --header-height: 60px;
  }

  .megamenu {
    top: 60px;
  }
}