/* Knippin University - tutorials en overzicht */
[hidden] { display: none !important; }

/* ---------- Layout: inhoudsopgave links, artikel rechts ---------- */
.uni-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.uni-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  box-shadow: var(--shadow-xs);
}
.uni-toc-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.uni-toc ol { list-style: none; counter-reset: toc; }
.uni-toc-back::before { content: none !important; }
.uni-toc li { counter-increment: toc; }
.uni-toc a {
  display: flex;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: var(--transition);
}
.uni-toc li a::before {
  content: counter(toc);
  font-weight: 700;
  color: var(--text-muted);
  min-width: 16px;
}
.uni-toc a:hover { background: var(--bg-subtle); color: var(--text-main); }
.uni-toc a.active {
  background: var(--primary-light);
  color: var(--primary);
  border-left-color: var(--primary);
  font-weight: 600;
}
.uni-toc a.active::before { color: var(--primary); }
.uni-toc-back {
  display: block;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--primary);
  text-decoration: none;
}

/* ---------- Artikel ---------- */
.tut-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 44px 52px;
  min-width: 0;
}
.tut-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 40px;
  padding-bottom: 24px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}
.tut-meta strong {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.tut-meta div { color: var(--text-main); font-weight: 500; }

.tut-card h2 {
  font-size: 24px;
  margin: 48px 0 14px;
  padding-top: 8px;
  scroll-margin-top: 100px;
}
.tut-card h2 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 12px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  vertical-align: 3px;
}
.tut-card h3 { font-size: 18px; margin: 30px 0 10px; }
.tut-card p, .tut-card li { font-size: 16px; line-height: 1.75; color: var(--text-secondary); }
.tut-card p { margin: 0 0 14px; }
.tut-card ul, .tut-card ol { padding-left: 22px; margin: 0 0 16px; }
.tut-card li { margin-bottom: 6px; }
.tut-card a { color: var(--primary); }
.tut-card strong { color: var(--text-main); }

.tut-part {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 56px 0 -16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
}
.tut-part::after { content: ''; flex: 1; height: 1px; background: var(--primary-border); }

/* Code */
.tut-card pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin: 12px 0 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.65;
  border: 1px solid #1e293b;
}
.tut-card code { font-family: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; }
.tut-card p code, .tut-card li code, .tut-card td code {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 14px;
  color: var(--text-main);
  overflow-wrap: anywhere;
}

/* Notities */
.tut-note {
  margin: 18px 0 22px;
  padding: 16px 20px;
  border: 1px solid var(--primary-border);
  border-left: 4px solid var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-md);
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
}
.tut-note.warn { border-color: #fde68a; border-left-color: #f59e0b; background: var(--warning-bg); }

/* Afbeeldingen */
.tut-card figure { margin: 18px 0 28px; }
.tut-card figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.tut-card figcaption { margin-top: 10px; font-size: 13.5px; color: var(--text-muted); text-align: center; }

/* Tabellen */
.tut-scroll { overflow-x: auto; margin: 12px 0 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.tut-table { width: 100%; border-collapse: collapse; }
.tut-table th {
  background: var(--bg-subtle);
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tut-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  vertical-align: top;
  font-size: 15px;
  line-height: 1.6;
}
.tut-table td:first-child { width: 34%; color: var(--text-main); font-weight: 500; }

/* Afsluiter */
.tut-cta {
  margin-top: 40px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-navy);
  color: #cbd5e1;
}
.tut-cta p { color: #cbd5e1; margin: 0; }
.tut-cta strong { color: #fff; }
.tut-cta a { color: #fff; font-weight: 600; }

/* ---------- Overzichtspagina ---------- */
.uni-list { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.uni-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}
.uni-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.uni-card h2 { font-size: 20px; margin: 12px 0 10px; }
.uni-card p { font-size: 15px; color: var(--text-secondary); margin: 0 0 18px; flex: 1; }
.uni-meta { font-size: 13px; color: var(--text-muted); padding-top: 14px; border-top: 1px solid var(--border); }
.uni-more { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--primary); }

/* ---------- Mobiel / tablet ---------- */
@media (max-width: 1000px) {
  .uni-layout { grid-template-columns: 1fr; gap: 20px; }
  .uni-toc { position: static; max-height: none; }
  .tut-card { padding: 32px 28px; }
}
@media (max-width: 640px) {
  .tut-card { padding: 24px 18px; border-radius: 0; margin: 0 -16px; border-left: 0; border-right: 0; }
  .tut-card h2 { font-size: 21px; }
  .tut-card p, .tut-card li { font-size: 15.5px; }
  .tut-card pre { font-size: 13px; padding: 14px 16px; }
  .uni-list { grid-template-columns: 1fr; }
}
.tut-meta + h2 { margin-top: 32px; }

/* Breder dan de standaard 1200px container (alleen inhoud, header/footer blijven gelijk) */
[data-lang-only] > .hero .container, [data-lang-only] > .section .container { max-width: 1440px; }
