/* ── Reset & basis ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6f8;
  color: #222;
  min-height: 100vh;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.afas-header {
  background: #0072ce;
  padding: 0 40px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.header-logo-icon {
  background: #fff;
  color: #0072ce;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.header-right {
  color: rgba(255,255,255,0.85);
  font-size: 13px;
}

/* ── Hero zoekbalk ───────────────────────────────────────────────────────── */
.hero {
  background: #0072ce;
  padding: 40px 40px 60px;
  text-align: center;
  color: #fff;
}

.hero h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-search {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.hero-search textarea {
  width: 100%;
  border: none;
  border-radius: 4px;
  padding: 16px 130px 16px 20px;
  font-size: 15px;
  font-family: inherit;
  color: #222;
  resize: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  line-height: 1.5;
  min-height: 60px;
}

.hero-search textarea:focus { outline: 2px solid #004f9e; }

.hero-search-btn {
  position: absolute;
  right: 8px;
  top: 8px;
  background: #0072ce;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.hero-search-btn:hover { background: #004f9e; }

.hero-hint {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 10px;
}

/* ── Content layout ──────────────────────────────────────────────────────── */
.content {
  max-width: 1100px;
  margin: -20px auto 40px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── Sidebar filters ─────────────────────────────────────────────────────── */
.filters {
  background: #fff;
  border-radius: 4px;
  border: 1px solid #dde1e7;
  padding: 20px;
  position: sticky;
  top: 70px;
}

.filters h3 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  margin-bottom: 12px;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  border-radius: 3px;
}

.filter-item:hover { color: #0072ce; }

.filter-item input { accent-color: #0072ce; cursor: pointer; }

.filter-divider { border: none; border-top: 1px solid #eee; margin: 16px 0; }

/* ── Resultaten ──────────────────────────────────────────────────────────── */
.resultaten { display: flex; flex-direction: column; gap: 0; }

.resultaten-header {
  background: #fff;
  border: 1px solid #dde1e7;
  border-radius: 4px 4px 0 0;
  padding: 14px 20px;
  font-size: 14px;
  color: #555;
  border-bottom: none;
}

.resultaten-header strong { color: #222; }

/* ── Stap kaarten ────────────────────────────────────────────────────────── */
.stap-kaart {
  background: #fff;
  border: 1px solid #dde1e7;
  padding: 24px;
  margin-bottom: 12px;
  border-radius: 4px;
}

.stap-kaart.hidden { display: none; }

.stap-kaart h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #222;
}

.stap-hint {
  font-size: 13px;
  color: #777;
  margin-bottom: 16px;
}

/* ── Analyse badges ──────────────────────────────────────────────────────── */
.badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.badge {
  background: #f0f6ff;
  border: 1px solid #ccdff7;
  border-radius: 4px;
  padding: 10px 16px;
}

.badge-label {
  font-size: 11px;
  color: #0072ce;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
  font-weight: 600;
}

.badge-value {
  font-size: 15px;
  font-weight: 700;
  color: #222;
}

/* ── Vervolgvragen ───────────────────────────────────────────────────────── */
.vraag-item { margin-bottom: 16px; }

.vraag-item label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.vraag-item input {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.vraag-item input:focus {
  outline: none;
  border-color: #0072ce;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  background: #0072ce;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: #004f9e; }

.btn-secondary {
  background: #fff;
  color: #0072ce;
  border: 1px solid #0072ce;
  border-radius: 4px;
  padding: 10px 22px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover { background: #f0f6ff; }

/* ── Artikel resultaten ──────────────────────────────────────────────────── */
.artikel-kaart {
  background: #fff;
  border: 1px solid #dde1e7;
  border-top: none;
  padding: 20px 24px;
}

.artikel-kaart:first-child { border-top: 1px solid #dde1e7; }

.artikel-tag {
  font-size: 11px;
  font-weight: 700;
  color: #0072ce;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.artikel-titel {
  font-size: 17px;
  font-weight: 600;
  color: #0072ce;
  text-decoration: none;
  margin-bottom: 6px;
  display: block;
}

.artikel-titel:hover { text-decoration: underline; }

.artikel-score {
  display: inline-block;
  background: #e8f4e8;
  color: #2d7d2d;
  border-radius: 3px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 8px;
  vertical-align: middle;
}

/* ── Advies tekst ────────────────────────────────────────────────────────── */
.advies-tekst {
  font-size: 15px;
  line-height: 1.8;
  color: #222;
}

.advies-tekst h2 {
  font-size: 16px;
  font-weight: 700;
  color: #0072ce;
  margin-top: 24px;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #e8f0fb;
}

.advies-tekst p { margin-bottom: 12px; }

.advies-tekst ol, .advies-tekst ul {
  padding-left: 22px;
  margin-bottom: 12px;
}

.advies-tekst li { margin-bottom: 6px; }

.advies-tekst strong { font-weight: 700; }

.advies-tekst a { color: #0072ce; }
.advies-tekst a:hover { text-decoration: underline; }

/* ── Inklapbaar ──────────────────────────────────────────────────────────── */
.artikelen-details {
  margin-top: 24px;
  border-top: 1px solid #dde1e7;
  padding-top: 16px;
}

.artikelen-details summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #0072ce;
  user-select: none;
}

/* ── Feedback ────────────────────────────────────────────────────────────── */
.feedback-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #dde1e7;
  font-size: 14px;
  color: #666;
}

.btn-feedback {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-feedback.pos:hover { border-color: #2d7d2d; color: #2d7d2d; background: #e8f4e8; }
.btn-feedback.neg:hover { border-color: #c0392b; color: #c0392b; background: #fde8e8; }
.feedback-msg { color: #2d7d2d; font-weight: 600; font-size: 13px; }

/* ── Loader ──────────────────────────────────────────────────────────────── */
.loader {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  font-size: 14px;
  color: #666;
  background: #fff;
  border: 1px solid #dde1e7;
  border-radius: 4px;
  margin-bottom: 12px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid #dde1e7;
  border-top-color: #0072ce;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .content { grid-template-columns: 1fr; padding: 0 16px; }
  .filters { display: none; }
  .hero { padding: 24px 16px 40px; }
  .hero h1 { font-size: 20px; }
}
