/* =====================================================================
   FINLIO KENNISBANK — main.css
   Design tokens, layout, typography en componentstijlen.
   Pas kleuren en lettertypes uitsluitend hier aan.
   ===================================================================== */

/* --- GOOGLE FONTS ---------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&family=Playfair+Display:wght@800&display=swap');

/* --- DESIGN TOKENS ---------------------------------------------------- */
:root {
  /* Kleuren */
  --ink:          #0f1a12;
  --paper:        #f4f2eb;
  --white:        #ffffff;
  --green:        #1a6b3c;
  --green-light:  #e8f4ee;
  --green-mid:    #2d8f54;
  --gold:         #b8923a;
  --muted:        #6b7068;
  --rule:         rgba(15, 26, 18, 0.12);
  --danger:       #c0392b;

  /* Typografie */
  --font-serif:  'DM Serif Display', Georgia, serif;
  --font-sans:   'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --sidebar-w:   260px;
  --main-px:     56px;
  --main-py:     48px;
}

/* --- RESET ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* --- BODY ------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
}

/* Papier-ruis textuur */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* --- LAYOUT ----------------------------------------------------------- */
.layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.content-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* --- SIDEBAR ---------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--rule);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 32px 0 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.sidebar .logo {
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 20px;
  display: block;
  cursor: pointer;
  line-height: 1;
}

.nav-section {
  padding: 0 16px;
  margin-bottom: 8px;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 8px 4px;
}

.nav-item {
  display: block;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
  font-weight: 300;
  line-height: 1.4;
}

.nav-item:hover  { background: var(--green-light); color: var(--green); }
.nav-item.active { background: var(--green-light); color: var(--green); font-weight: 500; }

/* --- MOBILE MENU TOGGLE ---------------------------------------------- */
.menu-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 100;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 9;
}

/* --- MAIN CONTENT ----------------------------------------------------- */
.main {
  flex: 1;
  padding: var(--main-py) var(--main-px);
  max-width: 860px;
}

.main--wide {
  max-width: 1200px;
}

/* --- PAGE FOOTER ------------------------------------------------------ */
.page-footer {
  border-top: 1px solid var(--rule);
  padding: 24px var(--main-px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: var(--white);
}

.page-footer .ft-logo {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--green);
}

.page-footer .ft-tag { font-size: 12px; color: var(--muted); }
.page-footer .ft-copy { font-size: 11px; color: var(--muted); width: 100%; }

/* =====================================================================
   LANDING PAGE COMPONENTEN
   ===================================================================== */

.masthead {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 48px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.masthead .logo {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--green);
}

.masthead .tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead .date { margin-left: auto; font-size: 12px; color: var(--muted); }

/* Hero */
.hero { margin-bottom: 48px; }

.hero .eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 20px;
  max-width: 600px;
}

.hero h1 em { font-style: italic; color: var(--green); }

.hero .lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 540px;
  font-weight: 300;
}

/* Ornament divider */
.div-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 40px 0;
}

.div-rule::before, .div-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.div-rule .orn {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.7;
}

/* Pillars grid */
.pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 40px;
}

.pillar {
  background: var(--white);
  padding: 24px 24px 28px;
  position: relative;
  overflow: hidden;
}

.pillar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--green-light);
  transition: background 0.2s;
}

.pillar:hover::after { background: var(--green-mid); }

/* Klikbare pillar-variant */
a.pillar-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.pillar-link:hover {
  box-shadow: 0 4px 18px rgba(15,26,18,0.08);
}

a.pillar-link:hover h3 {
  color: var(--green);
}

a.pillar-link .num::after {
  content: ' →';
  opacity: 0;
  font-size: 12px;
  transition: opacity 0.2s;
}

a.pillar-link:hover .num::after {
  opacity: 1;
}

.pillar:first-child  { border-radius: 8px 0 0 0; }
.pillar:nth-child(2) { border-radius: 0 8px 0 0; }
.pillar:nth-child(3) { border-radius: 0 0 0 8px; margin-top: 2px; }
.pillar:last-child   { border-radius: 0 0 8px 0; margin-top: 2px; }

.pillar .num {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--green-light);
  margin-bottom: 10px;
  line-height: 1;
}

.pillar h3 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.pillar p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
}

/* Pull quote */
.pullquote {
  border-left: 3px solid var(--green);
  padding: 4px 0 4px 24px;
  margin: 40px 0;
}

.pullquote blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 10px;
}

.pullquote cite { font-size: 12px; color: var(--muted); font-style: normal; letter-spacing: 0.04em; }

/* =====================================================================
   KENNISBANK PAGINA COMPONENTEN
   ===================================================================== */

/* Paginaheader */
.kb-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.kb-header .kb-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.kb-header h2 {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 12px;
}

.kb-header .kb-lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
  max-width: 560px;
}

/* Inhoud blok */
.content-block {
  font-size: 14px;
  line-height: 1.75;
  color: #333;
  margin-bottom: 8px;
}

.content-block h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 12px;
  margin-top: 36px;
  letter-spacing: -0.01em;
}

.content-block h3:first-child { margin-top: 0; }

.content-block h4 {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 8px;
  margin-top: 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.content-block h4:first-child { margin-top: 0; }

.content-block p { margin-bottom: 12px; }
.content-block p:last-child { margin-bottom: 0; }

.content-block strong { font-weight: 500; color: var(--ink); }

.content-block ul, .content-block ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.content-block li { margin-bottom: 5px; line-height: 1.6; }

.content-block em { font-style: italic; }

/* Subsectie-kaart (wit vlak met border) */
.subsection {
  background: var(--white);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 16px 0;
  border: 0.5px solid var(--rule);
}

/* Categorie badge */
.badge-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  background: var(--green-light);
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Dunne horizontale lijn tussen secties */
.divider {
  height: 1px;
  background: var(--rule);
  margin: 36px 0;
}

/* =====================================================================
   TOOL EMBED (iframe wrapper)
   ===================================================================== */

.tool-embed {
  margin: 28px 0;
  border-radius: 10px;
  overflow: hidden;
  border: 0.5px solid var(--rule);
  background: var(--white);
}

.tool-embed .tool-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 16px;
  background: #f8f8f5;
  border-bottom: 1px solid var(--rule);
}

.tool-embed iframe {
  width: 100%;
  border: none;
  display: block;
  transition: height 0.2s ease;
}

/* =====================================================================
   TABELLEN
   ===================================================================== */

.table-wrap {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 8px;
  border: 0.5px solid var(--rule);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--white);
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-weight: 500;
  font-size: 12px;
  white-space: nowrap;
}

.data-table thead.green th {
  background: var(--green);
  color: var(--white);
}

.data-table thead.light th {
  background: #f0efea;
  color: var(--ink);
}

.data-table td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--rule);
  line-height: 1.5;
  vertical-align: top;
}

.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:nth-child(even) td { background: #fafaf8; }

.data-table .c-green  { color: var(--green); font-weight: 500; }
.data-table .c-gold   { color: var(--gold); font-weight: 500; }
.data-table .c-muted  { color: var(--muted); }
.data-table .c-danger { color: var(--danger); font-weight: 500; }

/* =====================================================================
   RESPONSIEF
   ===================================================================== */

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 20;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .menu-toggle {
    display: block;
  }

  .main {
    padding: 64px 24px 32px;
  }

  .page-footer {
    padding: 20px 24px;
  }

  .pillars {
    grid-template-columns: 1fr;
  }

  .pillar,
  .pillar:first-child,
  .pillar:nth-child(2),
  .pillar:nth-child(3),
  .pillar:last-child {
    border-radius: 8px;
    margin-top: 2px;
  }

  .pillar:first-child { margin-top: 0; }

  .kb-header h2 { font-size: 28px; }

  .hero h1 { font-size: 32px; }

  .blog-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   TAALSCHAKELAAR
   ===================================================================== */

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--rule);
}

.lang-btn {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  padding: 3px 7px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.lang-btn:hover {
  background: var(--green-light);
  color: var(--green);
}

.lang-btn.lang-active {
  background: var(--green);
  color: var(--white);
  cursor: default;
  pointer-events: none;
}

.lang-sep {
  font-size: 11px;
  color: var(--rule);
}

/* =====================================================================
   COMMUNITY
   ===================================================================== */

.community-coming-soon {
  background: var(--green-light);
  border: 1px solid rgba(26,107,60,0.2);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--green);
  line-height: 1.6;
}

.cs-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--green);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 4px;
}

.community-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 8px 0 24px;
}

@media (max-width: 900px) {
  .community-options { grid-template-columns: 1fr; }
}

.community-option {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 24px;
}

.community-option.option-recommended {
  border-color: rgba(26,107,60,0.3);
  background: #fafdf8;
}

.option-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.option-recommended .option-tag {
  color: var(--green);
}

.community-option h4 {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 10px;
}

.community-option p {
  font-size: 13px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 10px;
}

.community-option ul {
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.8;
  color: #444;
}

.community-option ul li { margin-bottom: 4px; }

/* =====================================================================
   BLOG
   ===================================================================== */

/* Disclaimer banner */
.blog-disclaimer {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fdf8f0;
  border: 1px solid rgba(184,146,58,0.35);
  border-left: 4px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 16px 20px;
  margin-bottom: 32px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
}

.blog-disclaimer .disc-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.75;
}

.blog-disclaimer strong {
  font-weight: 500;
  display: block;
  margin-bottom: 4px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Blog index grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.blog-card:hover {
  box-shadow: 0 4px 20px rgba(15,26,18,0.07);
  border-color: rgba(26,107,60,0.25);
}

.blog-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.blog-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
}

.blog-tag-geo   { background: #fdf0f0; color: #9e2a2a; }
.blog-tag-macro { background: #fdf5eb; color: #8c5a1a; }
.blog-tag-tech  { background: #edf4fa; color: #1a5a8c; }
.blog-tag-green { background: var(--green-light); color: var(--green); }

.blog-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

.blog-card .blog-card-lead {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 300;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.blog-card-cta {
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
}

/* Blog article header */
.blog-article-header {
  margin-bottom: 28px;
}

.blog-article-date {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Embed full-page article */
.article-embed {
  width: 100%;
  border: none;
  display: block;
  min-height: 600px;
}

/* =====================================================================
   BROKER VERGELIJKER
   ===================================================================== */

.broker-filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-group select {
  font-family: var(--font-sans);
  font-size: 13px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7068'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--green);
}

.broker-table-wrap {
  margin: 0 0 28px;
}

.broker-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.broker-table th.sortable:hover {
  background: rgba(255,255,255,0.15);
}

.broker-cat-cell {
  font-size: 12px;
  max-width: 180px;
}

.broker-app-score {
  font-weight: 500;
  color: var(--green);
  font-size: 14px;
}

.broker-app-detail {
  font-size: 11px;
  color: var(--muted);
}

/* Mobile cards (hidden on desktop, shown on mobile) */
.broker-cards {
  display: none;
}

.broker-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
}

.broker-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}

.broker-app-badge {
  background: var(--green-light);
  color: var(--green);
  font-size: 12px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
}

.broker-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.broker-card-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.broker-card-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.broker-card-cats {
  font-size: 12px;
  color: var(--muted);
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

@media (max-width: 900px) {
  .broker-table-wrap {
    display: none;
  }

  .broker-cards {
    display: block;
    margin-bottom: 24px;
  }

  .broker-filters {
    flex-direction: column;
    gap: 12px;
  }
}
