/* ============================================
   de Hondengids — stijl
   ============================================ */

:root {
  --font-serif: 'Lora', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-pill: 999px;

  --container: 1140px;
}

/* LIGHT (default) */
[data-theme="light"] {
  --bg: #FAF8F3;
  --bg-elev-1: #FFFFFF;
  --bg-elev-2: #F1EEE6;
  --bg-overlay: rgba(0,0,0,0.45);

  --text: #1A1916;
  --text-mute: #6B6862;
  --text-faint: #908C84;

  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.16);

  --accent: #1A1916;
  --accent-text: #FFFFFF;

  --success-bg: #EAF3DE; --success-text: #3B6D11;
  --warning-bg: #FAEEDA; --warning-text: #854F0B;
  --danger-bg:  #FBEAF0; --danger-text:  #993556;
  --info-bg:    #E6F1FB; --info-text:    #185FA5;
}

/* DARK */
[data-theme="dark"] {
  --bg: #15161A;
  --bg-elev-1: #1E1F25;
  --bg-elev-2: #25262D;
  --bg-overlay: rgba(0,0,0,0.6);

  --text: #E8E6DF;
  --text-mute: #9A988F;
  --text-faint: #6E6C66;

  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.18);

  --accent: #E8E6DF;
  --accent-text: #15161A;

  --success-bg: #173404; --success-text: #C0DD97;
  --warning-bg: #412402; --warning-text: #FAC775;
  --danger-bg:  #4B1528; --danger-text:  #F4C0D1;
  --info-bg:    #1F3550; --info-text:    #85B7EB;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.2s, color 0.2s;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

button, input, select { font: inherit; color: inherit; }

button {
  cursor: pointer;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 6px 12px;
  font-size: 13px;
  transition: background 0.15s;
}
button:hover { background: var(--bg-elev-2); }
button.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
button.btn-primary:hover { opacity: 0.9; background: var(--accent); }

input[type="text"], input[type="search"], select {
  width: 100%;
  padding: 9px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-elev-1);
  color: var(--text);
  outline: none;
  font-size: 14px;
}
input:focus, select:focus { border-color: var(--text-mute); }

.muted { color: var(--text-mute); }
.faint { color: var(--text-faint); }
.mono  { font-family: var(--font-mono); }
.serif { font-family: var(--font-serif); font-weight: 400; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 24px;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px;
  background: var(--accent); color: var(--accent-text);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
}
.brand-title { font-family: var(--font-serif); font-size: 17px; line-height: 1; letter-spacing: -0.01em; }
.brand-sub { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); margin-top: 2px; }

.site-nav { display: flex; gap: 22px; font-size: 14px; margin-left: 12px; }
.site-nav a { color: var(--text-mute); }
.site-nav a:hover, .site-nav a.active { color: var(--text); text-decoration: none; }

.header-right { display: flex; gap: 10px; align-items: center; margin-left: auto; }

.theme-toggle {
  width: 36px; height: 36px; padding: 0;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
[data-theme="light"] .theme-icon-dark,
[data-theme="dark"] .theme-icon-light { display: none; }

.postcode-chip {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--bg-elev-2);
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font-mono);
  user-select: none;
  white-space: nowrap;
}
.postcode-chip:hover { background: var(--border); }

/* ============ MAIN / CONTAINER ============ */
main { min-height: calc(100vh - 200px); }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ HOMEPAGE / HERO ============ */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}
.hero-eyebrow {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-faint); margin: 0 0 14px;
}
.hero-title {
  font-family: var(--font-serif); font-weight: 400;
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05; letter-spacing: -0.025em;
  margin: 0 0 14px;
}
.hero-title em { font-style: italic; }
.hero-lead {
  max-width: 540px; margin: 0 auto 1.75rem;
  font-size: 15px; color: var(--text-mute); line-height: 1.6;
}
.hero-search {
  max-width: 520px; margin: 0 auto;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  text-align: left;
}
.hero-search-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-faint); text-align: center; margin: 0 0 10px; }
.hero-search-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; }

.hero-stats { display: flex; justify-content: center; gap: 36px; margin-top: 2rem; flex-wrap: wrap; }
.hero-stat-num { font-family: var(--font-mono); font-size: 22px; font-weight: 500; }
.hero-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); }

/* Section heading */
.section { padding: 2.25rem 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: none; }
.section-h { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 18px; flex-wrap: wrap; gap: 8px; }
.section-h h2 { margin: 0; font-family: var(--font-serif); font-weight: 400; font-size: 24px; letter-spacing: -0.01em; }
.section-h .meta { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-faint); }

/* ============ STAMGROEPEN GRID ============ */
.stam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}
.stam-card {
  padding: 14px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s;
}
.stam-card:hover { transform: translateY(-1px); border-color: var(--border-strong); text-decoration: none; }
.stam-dot { width: 10px; height: 10px; border-radius: 50%; margin-bottom: 8px; }
.stam-naam { font-size: 13px; font-weight: 500; }
.stam-aantal { font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* ============ RAS GRID ============ */
.ras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.ras-card {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.15s;
}
.ras-card:hover { transform: translateY(-2px); border-color: var(--border-strong); text-decoration: none; }
.ras-card-img-wrap {
  aspect-ratio: 4/3;
  background: var(--bg-elev-2);
  position: relative;
}
.ras-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.ras-card-img-wrap .placeholder {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  color: var(--text-faint); font-size: 32px;
}
.ras-card-body { padding: 12px 14px; }
.ras-card-naam { font-size: 14px; font-weight: 500; }
.ras-card-meta { font-size: 11px; color: var(--text-faint); margin-top: 2px; }
.ras-card-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

/* Badges per stamgroep */
.stam-badge {
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 500;
  display: inline-block;
}

/* Pills generic */
.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  font-size: 11px;
  background: var(--bg-elev-2);
  color: var(--text);
}
.pill-success { background: var(--success-bg); color: var(--success-text); }
.pill-warning { background: var(--warning-bg); color: var(--warning-text); }
.pill-danger  { background: var(--danger-bg);  color: var(--danger-text); }
.pill-info    { background: var(--info-bg);    color: var(--info-text); }

/* ============ FILTERBAR ============ */
.filterbar {
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap;
  padding: 12px 0;
  font-size: 13px;
}
.filterbar select {
  width: auto;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: var(--r-pill);
}
.filterbar .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-faint); }
.filter-result { margin-left: auto; font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }

/* ============ RAS DETAIL PAGE ============ */
.detail-breadcrumb {
  font-size: 12px;
  padding: 10px 0;
  color: var(--text-faint);
}
.detail-breadcrumb .stam-badge { vertical-align: middle; }

.detail-hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 18px 0 24px;
  border-bottom: 1px solid var(--border);
}
.detail-hero-img {
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-elev-2);
  position: relative;
}
.detail-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-img .credit {
  position: absolute; bottom: 8px; left: 8px;
  background: rgba(0,0,0,0.55); color: white;
  padding: 3px 8px; border-radius: var(--r-md);
  font-size: 10px; font-family: var(--font-mono);
}
.detail-title { font-family: var(--font-serif); font-weight: 400; font-size: 36px; letter-spacing: -0.025em; line-height: 1; margin: 6px 0 4px; }
.detail-tagline { font-family: var(--font-serif); font-style: italic; color: var(--text-mute); font-size: 14px; margin: 0; }
.detail-summary { margin: 14px 0 0; line-height: 1.65; }
.detail-actions { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }

/* Section nav (sticky table of contents) */
.section-nav {
  position: sticky; top: 64px; z-index: 30;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  margin: 0 -24px;
  padding-left: 24px; padding-right: 24px;
  display: flex; gap: 6px; overflow-x: auto;
  font-size: 11px;
  white-space: nowrap;
}
.section-nav a {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  color: var(--text-mute);
}
.section-nav a:hover { background: var(--bg-elev-2); text-decoration: none; }
.section-nav a.active { background: var(--accent); color: var(--accent-text); }

/* Detail subsection */
.subsection {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}
.subsection:first-of-type { border-top: none; }
.subsection-h {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px;
  flex-wrap: wrap;
}
.subsection-h h2 {
  margin: 0; font-family: var(--font-serif); font-weight: 400;
  font-size: 22px; letter-spacing: -0.01em;
}
.subsection-h .num {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
}
.subsection-h .sub {
  margin-left: auto; font-size: 12px; color: var(--text-mute);
}

/* Quick stats grid */
.quick-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 6px; }
.quick-stat {
  background: var(--bg-elev-2);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.quick-stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.quick-stat-value { font-size: 13px; font-weight: 500; margin-top: 2px; }

/* Karakter meters */
.meters { display: grid; gap: 10px; font-size: 13px; }
.meter-row .meter-head { display: flex; justify-content: space-between; margin-bottom: 4px; }
.meter-track { height: 4px; background: var(--bg-elev-2); border-radius: 2px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--text); }

/* Pros / Cons */
.proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.proscons h4 { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; margin: 0 0 6px; }
.proscons .pros h4 { color: var(--success-text); }
.proscons .cons h4 { color: var(--warning-text); }
.proscons ul { margin: 0; padding-left: 18px; line-height: 1.75; }

/* Ziektes lijst */
.ziekte-list { display: grid; gap: 8px; }
.ziekte-row {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: start;
}
.ziekte-naam { font-weight: 500; font-size: 14px; }
.ziekte-info { font-size: 12px; color: var(--text-mute); margin-top: 4px; line-height: 1.5; }

.checklist {
  background: var(--bg-elev-2);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-top: 1rem;
}
.checklist-h { font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase; font-weight: 500; margin: 0 0 8px; }
.checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; font-size: 12px; line-height: 1.7; }

/* Compatibility */
.compat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 2rem; }
.compat-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.compat-row:last-child { border-bottom: none; }
.compat-name { font-size: 13px; font-weight: 500; }
.compat-note { font-size: 11px; color: var(--text-faint); }
.compat-dots { display: inline-flex; gap: 3px; }
.compat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-elev-2); }
.compat-dot.on { background: var(--text); }

/* Training fasering */
.training-fasen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 1rem; }
.training-fase {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px;
}
.training-fase-leeftijd { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.training-fase-titel { font-weight: 500; font-size: 13px; margin: 4px 0 6px; }
.training-fase-text { font-size: 11px; color: var(--text-mute); line-height: 1.5; }

/* Fokcombinaties */
.fok-list { display: grid; gap: 8px; }
.fok-row {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 14px;
  align-items: start;
}
.fok-code { font-family: var(--font-mono); font-size: 18px; font-weight: 500; }
.fok-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.fok-titel { font-size: 13px; font-weight: 500; }
.fok-uitleg { font-size: 12px; color: var(--text-mute); line-height: 1.5; margin-top: 4px; }

/* Openbaar */
.openbaar-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.openbaar-banner-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.openbaar-banner-icon.ok { background: var(--success-bg); color: var(--success-text); }
.openbaar-banner-icon.alert { background: var(--warning-bg); color: var(--warning-text); }
.openbaar-banner-icon.warn { background: var(--danger-bg); color: var(--danger-text); }
.openbaar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.openbaar-cell {
  background: var(--bg-elev-2);
  padding: 12px 14px;
  border-radius: var(--r-md);
}
.openbaar-cell-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); }
.openbaar-cell-value { font-size: 13px; font-weight: 500; margin-top: 2px; }
.openbaar-cell-note { font-size: 11px; color: var(--text-mute); margin-top: 4px; }

/* Pro lijst (fokkers, trimmers, etc.) */
.pro-tabs {
  display: flex; gap: 22px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  overflow-x: auto;
}
.pro-tab {
  padding: 10px 0; font-size: 13px; cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
  background: transparent; border-radius: 0;
  color: var(--text-mute);
  border-top: none; border-left: none; border-right: none;
  border-bottom: 2px solid transparent;
  padding: 10px 4px;
}
.pro-tab:hover { background: transparent; color: var(--text); }
.pro-tab.active { color: var(--text); font-weight: 500; border-bottom-color: var(--text); }
.pro-tab .count { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }

.pro-list { display: grid; gap: 6px; }
.pro-row {
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 38px 1fr auto auto auto;
  gap: 14px;
  align-items: center;
}
.pro-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-elev-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
}
.pro-naam { font-weight: 500; font-size: 14px; }
.pro-meta { font-size: 12px; color: var(--text-mute); }
.pro-distance {
  font-family: var(--font-mono); font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--info-bg); color: var(--info-text);
  white-space: nowrap;
}

.pro-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-mute);
  background: var(--bg-elev-1);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
}

/* ============ MODAL ============ */
.modal {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-overlay);
  z-index: 100; padding: 20px;
}
.modal[hidden] { display: none; }
.modal-card {
  background: var(--bg-elev-1);
  border-radius: var(--r-lg);
  padding: 24px;
  max-width: 460px; width: 100%;
  border: 1px solid var(--border);
}
.modal-card h3 { margin: 0 0 4px; font-family: var(--font-serif); font-weight: 400; font-size: 22px; }
.modal-card p { margin: 0 0 16px; font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  margin-top: 4rem;
  font-size: 13px;
  color: var(--text-mute);
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 18px; }

/* ============ COMPARE BAR ============ */
.compare-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--accent); color: var(--accent-text);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 14px;
  z-index: 60;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.compare-bar[hidden] { display: none; }
.compare-bar button { background: var(--accent-text); color: var(--accent); border: none; }
.compare-bar button:hover { opacity: 0.9; }

/* ============ RESPONSIVE ============ */
@media (max-width: 800px) {
  .site-nav { display: none; }
  .detail-hero { grid-template-columns: 1fr; }
  .detail-hero-img { aspect-ratio: 4/3; }
  .quick-stats { grid-template-columns: repeat(2, 1fr); }
  .proscons, .compat-grid, .openbaar-grid, .checklist-grid { grid-template-columns: 1fr; }
  .pro-row { grid-template-columns: 38px 1fr; }
  .pro-row > *:nth-child(n+3) { grid-column: 1 / -1; justify-self: end; }
  .fok-row { grid-template-columns: 1fr; }
  .hero-search-row { grid-template-columns: 1fr; }
}

/* ============ UTIL ============ */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }
.spacer-1 { height: 1rem; }
.spacer-2 { height: 1.5rem; }
.tip {
  background: var(--bg-elev-2);
  padding: 10px 14px;
  border-radius: var(--r-md);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 1rem;
}
