/* ==========================================================================
   Quiro modern theme
   Eigentijdse vraag-en-antwoord look: SVG-only assets, system-following
   dark/light theme, subtiele animatie. Geen bitmaps, geen inline styles.
   ========================================================================== */

/* --- Design tokens: light ------------------------------------------------ */
:root {
  --bg: #f5f7fb;
  --bg-glow: radial-gradient(120% 120% at 10% -10%, rgba(79,110,247,.10), transparent 55%),
             radial-gradient(120% 120% at 90% -10%, rgba(168,85,247,.08), transparent 55%);
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --surface-3: #e6ebf3;
  --border: #dde3ee;
  --border-strong: #c9d2e0;
  --text: #1c2431;
  --text-muted: #5c6672;
  --accent: #4f6ef7;
  --accent-2: #8b5cf6;
  --accent-soft: rgba(79,110,247,.12);
  --danger: #e05252;
  --ring: rgba(79,110,247,.28);
  --shadow: 0 6px 24px rgba(20,24,40,.08);
  --shadow-lg: 0 14px 40px rgba(20,24,40,.12);
  --grad: linear-gradient(135deg,#4f6ef7 0%,#7b5cf6 55%,#a855f7 100%);
  --grad-soft: linear-gradient(135deg,rgba(79,110,247,.16),rgba(168,85,247,.12));
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* --- Design tokens: dark (volgt het systeem, geen JS nodig voor core) ---- */
html[data-theme="dark"] {
  --bg: #0f1117;
  --bg-glow: radial-gradient(120% 120% at 10% -10%, rgba(108,139,255,.14), transparent 55%),
             radial-gradient(120% 120% at 90% -10%, rgba(168,85,247,.12), transparent 55%);
  --surface: #171a22;
  --surface-2: #20242e;
  --surface-3: #262b36;
  --border: #2a2f3a;
  --border-strong: #353c4a;
  --text: #e6e9f0;
  --text-muted: #8a91a3;
  --accent: #6c8bff;
  --accent-2: #a78bfa;
  --accent-soft: rgba(108,139,255,.16);
  --danger: #f06868;
  --ring: rgba(108,139,255,.35);
  --shadow: 0 6px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.5);
  --grad: linear-gradient(135deg,#6c8bff 0%,#a78bfa 55%,#c084fc 100%);
  --grad-soft: linear-gradient(135deg,rgba(108,139,255,.22),rgba(192,132,252,.16));
}

/* --- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  background-image: var(--bg-glow);
  background-attachment: fixed;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { border: 0; max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; }

/* --- Accessible skip link ------------------------------------------------ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.skip-link:focus { left: 8px; }

/* --- Topbar -------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  animation: logoFloat 3.2s ease-in-out infinite;
}
.brand-name {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -.02em;
}
.brand-name em {
  font-style: normal;
  color: var(--accent);
}

/* Compact askbar in topbar */
.askbar-compact {
  flex: 1;
  max-width: 420px;
  margin-left: auto;
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  transition: border-color .18s, box-shadow .18s;
}
.askbar-compact:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.askbar-compact input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: .95rem;
  padding: 6px 12px;
  min-width: 0;
}
.askbar-compact input:focus { outline: none; }
.askbar-compact .btn {
  flex: none;
  border-radius: 999px;
  padding: 6px 14px;
}

/* Nav */
.topnav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.topnav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
}
.topnav a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* --- Language dropdown (alleen op .eu) ---------------------------------- */
.lang-dropdown {
  position: relative;
}
.lang-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font: 500 .88rem var(--font);
  cursor: pointer;
}
.lang-toggle::after { content: " ▾"; }
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 60;
}
.lang-dropdown:hover .lang-menu,
.lang-dropdown:focus-within .lang-menu { display: block; }
.lang-menu .lang-item {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--text);
  font-size: .9rem;
}
.lang-menu .lang-item:hover { background: var(--surface-2); text-decoration: none; }
.lang-menu .lang-item.lang-selected { font-weight: 700; color: var(--accent); }

/* --- Icon + toggle buttons ---------------------------------------------- */
.icon-btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .18s;
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn svg { width: 18px; height: 18px; }

.legacy-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 10px;
  font: 500 .84rem var(--font);
  cursor: pointer;
}
.legacy-toggle:hover { color: var(--text); border-color: var(--border-strong); }

/* --- Hero (index) -------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 56px 20px 48px;
  background: var(--grad);
  color: #fff;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 80% at 50% 120%, rgba(0,0,0,.28), transparent 70%);
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 70% at 50% 0%, #000 30%, transparent 80%);
  animation: gridDrift 18s linear infinite;
}
.hero-title {
  position: relative;
  margin: 0 0 10px;
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 2px 18px rgba(0,0,0,.2);
  animation: fadeUp .55s .05s both;
}
.hero-sub {
  position: relative;
  margin: 0 auto 26px;
  max-width: 520px;
  color: rgba(255,255,255,.92);
  font-size: 1.05rem;
  animation: fadeUp .55s .12s both;
}

/* --- Ask bar ------------------------------------------------------------- */
.askbar {
  position: relative;
  margin: 0 auto;
  max-width: 640px;
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  animation: fadeUp .55s .2s both;
}
.askbar input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 1.02rem;
  padding: 10px 16px;
  color: #1c2431;
  min-width: 0;
}
.askbar input:focus { outline: none; }
.askbar .btn {
  flex: none;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
}

.hero-stats {
  position: relative;
  margin: 22px auto 0;
  display: flex;
  gap: 22px;
  justify-content: center;
  color: rgba(255,255,255,.9);
  animation: fadeUp .55s .3s both;
}
.hero-stats span { font-size: .92rem; }
.hero-stats b { font-weight: 700; }

/* --- Page grid ----------------------------------------------------------- */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 60px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.content-col { min-width: 0; }
.side-col { display: flex; flex-direction: column; gap: 20px; }

/* --- Cards --------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
  animation: fadeUp .5s both;
}
.card + .card { margin-top: 18px; }

.card-title {
  margin: 0 0 8px;
  font-size: 1.32rem;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--text);
}
.card-sub { color: var(--text-muted); margin: 0 0 16px; }

.question-list {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 8px;
}
.question-list li { border-left: 3px solid var(--accent-soft); padding: 8px 10px; border-radius: 6px; }
.question-list a { color: var(--text); font-weight: 500; display: block; }
.question-list a:hover { color: var(--accent); text-decoration: none; }

/* --- Question detail ----------------------------------------------------- */
.q-head { display: flex; gap: 14px; align-items: flex-start; }
.q-body { margin: 14px 0; color: var(--text); }
.q-body p { margin: 0 0 12px; }
.q-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.q-actions a { font-size: .92rem; }
.translation-notice {
  background: var(--grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: .9rem;
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  appearance: none;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font: 600 .95rem var(--font);
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, filter .16s;
  background: var(--surface-2);
  color: var(--text);
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 4px 14px var(--ring);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--ring); filter: saturate(1.1); }
.btn-danger { background: var(--danger); color: #fff; }

/* --- Forms --------------------------------------------------------------- */
textarea, input[type="text"], input[type="search"] {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font: .95rem var(--font);
}
textarea:focus, input[type="text"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

/* --- Side cards ---------------------------------------------------------- */
.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  animation: fadeUp .5s both;
}
.side-title {
  margin: 0 0 12px;
  font-size: .98rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.side-list { list-style: none; display: grid; gap: 8px; }
.side-list li { padding: 4px 2px; }
.side-list a { color: var(--text-muted); font-size: .9rem; line-height: 1.45; }
.side-list a:hover { color: var(--accent); text-decoration: none; }

/* --- Footer -------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  padding: 18px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
}
.footer p { margin: 6px 0; }
.footer-actions { display: flex; gap: 10px; justify-content: center; }

/* --- AdSense slots ------------------------------------------------------- */
/* Verberg lege ad-blokken: een ins dat nog geen gevuld iframe heeft (data-ad-status
   "unfilled" of clientHeight 0) wordt onzichtbaar, zodat er nooit een lege
   advertentie-vlek zichtbaar is. De JS in base_modern.html voert de check uit. */
.ad-slot {
  margin: 14px 0;
  min-height: 0;
}
.adsbygoogle { display: block; }
.adsbygoogle[data-ad-status="unfilled"],
.adsbygoogle:empty { display: none !important; }
/* Door de JS-cleanup gezette klasse: verberg lege advertentie-vlekken. */
.ad-slot.ad-empty { display: none !important; }

/* --- Animations ---------------------------------------------------------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 44px 44px, 44px 44px; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 14px var(--ring); }
  50%      { box-shadow: 0 6px 26px var(--ring), 0 0 0 6px var(--accent-soft); }
}

/* Staggered reveal for lists */
.question-list li:nth-child(2) { animation-delay: .03s; }
.question-list li:nth-child(3) { animation-delay: .06s; }
.question-list li:nth-child(4) { animation-delay: .09s; }
.question-list li:nth-child(5) { animation-delay: .12s; }
.question-list li:nth-child(6) { animation-delay: .15s; }
.question-list li:nth-child(7) { animation-delay: .18s; }
.question-list li:nth-child(8) { animation-delay: .21s; }
.question-list li:nth-child(9) { animation-delay: .24s; }
.question-list li:nth-child(10){ animation-delay: .27s; }

/* --- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
  .page {
    grid-template-columns: 1fr;
  }
  .side-col { order: 3; }
  .topnav { display: none; }
  .askbar-compact { display: none; }
  .topbar-inner { gap: 10px; }
  .brand-name { font-size: 1.15rem; }
}
@media (max-width: 520px) {
  .hero { padding: 40px 16px 36px; }
  .askbar { flex-direction: column; border-radius: var(--radius); }
  .askbar .btn { width: 100%; }
  .topbar-actions .legacy-toggle { display: none; }
}
