/* ============================================
   MR. VENTILATIE — MEGA DROPDOWN (Kennisbank)
   Minimaal, functioneel, scanbaar.
   Scoped onder .has-dropdown.has-mega modifier.
   ============================================ */

.nav-list { position: relative; }

/* =====================================================
   Panel container
   ===================================================== */
.has-dropdown.has-mega > .mega-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  width: min(1200px, calc(100vw - 32px));
  background: white;
  border: 1px solid var(--border, #E5EAF0);
  border-radius: 14px;
  box-shadow:
    0 24px 60px -20px rgba(10, 25, 50, 0.18),
    0 2px 6px rgba(10, 25, 50, 0.06);
  padding: 1.5rem 1.75rem;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 50;
}

/* Hover-bridge */
.has-dropdown.has-mega > .mega-panel::before {
  content: '';
  position: absolute;
  top: -14px; left: 0; right: 0;
  height: 14px;
}

.has-dropdown.has-mega:hover > .mega-panel,
.has-dropdown.has-mega:focus-within > .mega-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) 240px;
  gap: 2rem 1.5rem;
  align-items: start;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =====================================================
   Column
   ===================================================== */
.mega-panel .mega-col {
  min-width: 0;
}

.mega-panel .mega-col-title {
  display: block;
  font-family: var(--font-display, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text, #1A2B3C);
  text-decoration: none;
  padding-bottom: 0.7rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border, #E5EAF0);
  line-height: 1.3;
  transition: color .15s ease;
}
.mega-panel .mega-col-title:hover,
.mega-panel .mega-col-title:focus-visible {
  color: var(--primary, #0d86f7);
}

.mega-panel .mega-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
}
.mega-panel .mega-sublist a {
  display: block;
  padding: 0.45rem 0.6rem;
  margin: 0 -0.6rem;
  border-radius: 6px;
  font-family: var(--font-body, sans-serif);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light, #5A6B7C);
  text-decoration: none;
  line-height: 1.35;
  transition: background .12s ease, color .12s ease;
}
.mega-panel .mega-sublist a:hover,
.mega-panel .mega-sublist a:focus-visible {
  background: var(--bg-light, #F5F7F9);
  color: var(--primary, #0d86f7);
}

/* =====================================================
   Featured column — 3 quick-action cards
   ===================================================== */
.mega-panel .mega-featured {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border, #E5EAF0);
  min-width: 0;
}

/* === Quiz card — "Welk systeem heb je?" === */
.mega-panel .mega-feat-quiz {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem 0.95rem;
  background: var(--bg-light, #F5F7F9);
  border: 1px solid var(--border, #E5EAF0);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.mega-panel .mega-feat-quiz:hover {
  border-color: var(--primary, #0d86f7);
  background: white;
  transform: translateY(-1px);
}
.mega-panel .quiz-letters {
  display: flex;
  gap: 0.25rem;
}
.mega-panel .quiz-letters span {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: white;
  border: 1px solid var(--border, #E5EAF0);
  border-radius: 4px;
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary-deepest, #084a94);
  letter-spacing: -0.01em;
  transition: background .22s ease, border-color .22s ease, color .22s ease;
}
.mega-panel .mega-feat-quiz:hover .quiz-letters span:nth-child(3) {
  background: var(--primary, #0d86f7);
  border-color: var(--primary, #0d86f7);
  color: white;
}
.mega-panel .quiz-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.mega-panel .quiz-title {
  font-family: var(--font-display, sans-serif);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text, #1A2B3C);
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.mega-panel .quiz-sub {
  font-family: var(--font-body, sans-serif);
  font-size: 0.78rem;
  color: var(--text-light, #5A6B7C);
  line-height: 1.35;
}

/* === Subsidy card === */
.mega-panel .mega-feat-subsidy {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  background: white;
  border: 1px solid var(--border, #E5EAF0);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color .18s ease, transform .18s ease;
}
.mega-panel .mega-feat-subsidy:hover {
  border-color: var(--accent, #f59e0b);
  transform: translateY(-1px);
}
.mega-panel .subsidy-amount {
  font-family: var(--font-display, sans-serif);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent, #f59e0b);
  letter-spacing: -0.025em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.05rem;
}
.mega-panel .subsidy-currency {
  font-size: 0.95rem;
  font-weight: 700;
}
.mega-panel .subsidy-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.mega-panel .subsidy-title {
  font-family: var(--font-display, sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text, #1A2B3C);
  line-height: 1.25;
}
.mega-panel .subsidy-sub {
  font-family: var(--font-body, sans-serif);
  font-size: 0.76rem;
  color: var(--text-light, #5A6B7C);
  line-height: 1.3;
}

/* === Phone CTA — altijd donker blauw, witte tekst (geen contrast-flip bug) === */
.mega-panel .mega-feat-phone {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  background: var(--primary-deepest, #084a94);
  border: 1px solid var(--primary-deepest, #084a94);
  border-radius: 8px;
  text-decoration: none;
  color: white;
  transition: background .18s ease, transform .18s ease;
}
.mega-panel .mega-feat-phone:hover {
  background: var(--primary, #0d86f7);
  border-color: var(--primary, #0d86f7);
  transform: translateY(-1px);
}
.mega-panel .phone-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  color: white;
}
.mega-panel .phone-icon svg {
  width: 100%;
  height: 100%;
}
.mega-panel .phone-body {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.mega-panel .phone-label {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}
.mega-panel .phone-number {
  font-family: var(--font-display, sans-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}

/* =====================================================
   Responsive
   ===================================================== */

/* < 1200px: drop featured column */
@media (max-width: 1200px) {
  .has-dropdown.has-mega > .mega-panel {
    width: min(920px, calc(100vw - 32px));
    padding: 1.25rem 1.5rem;
  }
  .has-dropdown.has-mega:hover > .mega-panel,
  .has-dropdown.has-mega:focus-within > .mega-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
  }
  .mega-featured { display: none; }
}

/* Tablet: 2 columns */
@media (max-width: 992px) {
  .has-dropdown.has-mega:hover > .mega-panel,
  .has-dropdown.has-mega:focus-within > .mega-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 1.25rem;
  }
}

/* Mobile: stacked inside dropdown */
@media (max-width: 768px) {
  .has-dropdown.has-mega > .mega-panel {
    position: static;
    transform: none;
    width: 100%;
    box-shadow: none;
    border: 0;
    padding: 0.5rem 0;
    background: transparent;
    border-radius: 0;
  }
  /* Disable hover/focus-within on mobile — only .open controls visibility */
  .has-dropdown.has-mega:hover > .mega-panel,
  .has-dropdown.has-mega:focus-within > .mega-panel {
    display: none;
    transform: none;
  }

  .has-dropdown.has-mega.open > .mega-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    transform: none;
  }
  .mega-col-title { padding-top: 0.5rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .has-dropdown.has-mega > .mega-panel,
  .mega-sublist a,
  .mega-feat-quiz,
  .mega-feat-subsidy,
  .mega-feat-phone,
  .quiz-letters span {
    transition: none;
  }
}
