:root {
  --bg: #fafafa;
  --bg-alt: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #f9f9f9;
  --border: #e5e5e5;
  --text: #1a1a1a;
  --text-dim: #666666;
  --text-dimmer: #999999;
  --accent-a: #d32f2f;
  --accent-b: #ff6f00;
  --accent-grad: linear-gradient(135deg, #d32f2f, #ff6f00);
  --danger: #d32f2f;
  --success: #388e3c;
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1419;
    --bg-alt: #14191f;
    --surface: #1a1f2e;
    --surface-2: #242b38;
    --border: #323f52;
    --text: #f5f5f5;
    --text-dim: #b0b0b0;
    --text-dimmer: #808080;
    --accent-a: #ff6b6b;
    --accent-b: #ffb74d;
    --accent-grad: linear-gradient(135deg, #ff6b6b, #ffb74d);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

body {
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  box-shadow: var(--shadow);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand .brand-icon {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--accent-b);
  filter: drop-shadow(0 0 8px rgba(255, 111, 0, 0.35));
}

.brand .wordmark {
  white-space: nowrap;
}

.brand span.accent {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.main-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: color 0.2s;
  cursor: pointer;
}

.main-nav a:hover {
  color: var(--accent-a);
}

.admin-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #d32f2f, #ff6f00);
  border: none;
  border-radius: var(--radius-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.admin-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ---------- Hero Section ---------- */

.hero {
  padding: 28px 0 4px;
}

.hero-strap {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hero-strap-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-grad);
}

.hero-feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 460px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.hero-feature:hover .hero-media {
  transform: scale(1.06);
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(6, 9, 14, 0.94) 0%, rgba(6, 9, 14, 0.74) 30%, rgba(6, 9, 14, 0.12) 62%, rgba(6, 9, 14, 0.42) 100%),
    linear-gradient(to right, rgba(6, 9, 14, 0.55), transparent 65%);
}

.hero-body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 780px;
  padding: 44px 40px 38px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--accent-grad);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
}

.hero h1 {
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: #ffffff;
  text-wrap: balance;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.5);
}

.hero-standfirst {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  max-width: 60ch;
  margin: 0;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-dot { color: rgba(255, 255, 255, 0.4); }

.hero-more {
  margin-left: 6px;
  font-weight: 600;
  color: #ffffff;
  border-bottom: 2px solid var(--accent-b);
  padding-bottom: 2px;
}

.hero-more i {
  font-style: normal;
  display: inline-block;
  transition: transform 0.2s ease;
}

.hero-feature:hover .hero-more i {
  transform: translateX(4px);
}

.hero-feature:focus-visible {
  outline: 3px solid var(--accent-b);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .hero-feature { min-height: 380px; }
  .hero-body { padding: 28px 22px 26px; gap: 11px; }
  .hero-standfirst { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media,
  .hero-more i { transition: none; }
  .hero-feature:hover .hero-media { transform: scale(1.01); }
}

/* ---------- Category Tags ---------- */

.category-tag {
  display: inline-block;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-tag:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ---------- Articles List ---------- */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  padding: 60px 0;
}

.article-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.article-hero {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.article-hero.has-image {
  background-size: cover;
  background-position: center;
}

.article-hero.no-image {
  background: var(--accent-grad);
}

.article-category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
}

.article-category-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 90%;
}

.article-category-badges .category-tag {
  margin-bottom: 0;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
  color: #ffffff;
  white-space: nowrap;
}

.article-content {
  padding: 24px;
}

.article-headline {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.3;
}

.article-excerpt {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 12px;
  line-height: 1.5;
}

.article-meta {
  font-size: 12px;
  color: var(--text-dimmer);
}

.article-meta .divider {
  margin: 0 6px;
}

/* ---------- Article Detail Page ---------- */

.article-detail {
  padding: 40px 0;
}

.article-hero-large {
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
}

.article-hero-large.no-image {
  background: var(--accent-grad);
}

.article-header {
  max-width: 800px;
  margin: 0 auto;
}

.article-category-pills {
  margin-bottom: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.article-headline-detail {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
  line-height: 1.2;
}

.article-meta-detail {
  font-size: 14px;
  color: var(--text-dim);
  display: flex;
  gap: 24px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.article-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
}

.article-body h2 {
  font-size: 28px;
  margin: 40px 0 20px;
  color: var(--text);
}

.article-body p {
  margin-bottom: 20px;
}

.article-body strong {
  color: var(--accent-a);
  font-weight: 700;
}

.article-body em {
  font-style: italic;
  color: var(--text-dim);
}

.article-body a {
  color: var(--accent-a);
  text-decoration: underline;
  transition: color 0.2s;
}

.article-body a:hover {
  color: var(--accent-b);
}

.article-body img {
  max-width: 100%;
  margin: 30px 0;
  border-radius: var(--radius-lg);
}

/* ---------- Admin Panel ---------- */

.admin-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.admin-panel h2 {
  font-size: 28px;
  margin-bottom: 24px;
  color: var(--text);
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  border-bottom: 2px solid var(--border);
}

.admin-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.admin-tab.active {
  color: var(--accent-a);
  border-bottom-color: var(--accent-a);
}

/* ---------- Forms ---------- */

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-a);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.color-input-group {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.color-input-group input[type="color"] {
  width: 60px;
  height: 40px;
  padding: 4px;
  cursor: pointer;
}

.color-input-group input[type="text"] {
  flex: 1;
}

/* ---------- Editor ---------- */

.editor-wrapper {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ql-container {
  font-size: 14px;
  background: var(--surface-2);
  color: var(--text);
}

.ql-toolbar {
  background: var(--surface);
  border: none;
  border-bottom: 1px solid var(--border);
}

.ql-toolbar.ql-snow .ql-formats {
  margin-right: 12px;
}

.ql-toolbar.ql-snow .ql-stroke {
  stroke: var(--text-dim);
}

.ql-toolbar.ql-snow .ql-fill {
  fill: var(--text-dim);
}

.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke {
  stroke: var(--accent-a);
}

.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-fill {
  fill: var(--accent-a);
}

/* ---------- Buttons ---------- */

.btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #d32f2f, #ff6f00);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-danger {
  color: #ffffff;
  background: #d32f2f;
}

.btn-danger:hover {
  background: #b71c1c;
}

.btn-group {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h2 {
  margin-bottom: 20px;
  font-size: 24px;
  color: var(--text);
}

/* ---------- Messages ---------- */

.message {
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 14px;
}

.message.success {
  background: rgba(56, 142, 60, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.message.error {
  background: rgba(211, 47, 47, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

/* ---------- Login Page ---------- */

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(211, 47, 47, 0.1), rgba(255, 111, 0, 0.1));
}

.login-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.login-box h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: var(--text);
  text-align: center;
}

.login-box p {
  text-align: center;
  color: var(--text-dim);
  margin-bottom: 32px;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .hero h1 {
    font-size: 36px;
  }

  .article-headline-detail {
    font-size: 28px;
  }

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

  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-panel {
    padding: 20px;
  }

  .main-nav {
    gap: 16px;
  }

  .site-header .container {
    height: 60px;
  }

  .brand {
    font-size: 20px;
  }
}

/* ---------- Rich Text Editor Styles ---------- */

.ql-editor {
  background: var(--surface-2);
  color: var(--text);
  padding: 20px;
}

.ql-editor.ql-blank::before {
  color: var(--text-dimmer);
}

.ql-editor h1, .ql-editor h2, .ql-editor h3 {
  font-family: 'Playfair Display', Georgia, serif;
}

.article-content p:empty {
  display: none;
}

/* Category color styles */
.category-tag {
  color: #ffffff;
}

.article-body ul,
.article-body ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 8px;
}

.article-body blockquote {
  margin: 30px 0;
  padding: 20px 24px;
  background: var(--surface-2);
  border-left: 4px solid var(--accent-a);
  font-style: italic;
  color: var(--text-dim);
}

.site-footer a {
  color: var(--text);
  font-weight: 600;
  transition: color 0.15s ease;
}

.site-footer a:hover { color: var(--accent-a); }

/* ---------- DocurAI advertentie ---------- */

.ad {
  --d-navy: #0a2240;
  --d-navy-2: #0e2d4f;
  --d-red: #c0392b;
  --d-red-2: #e74c3c;
  --d-text: #eaf2fb;
  --d-text-mut: #93a9c4;
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--d-text);
  text-decoration: none;
}

.ad-label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--d-text-mut);
}

.ad-label--float {
  position: absolute;
  top: 9px;
  right: 14px;
}

.ad-mark { flex: none; display: block; }

.ad-wordmark {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #ffffff;
}

.ad-wordmark i { font-style: normal; color: #f0705f; }

.ad-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--d-red-2), var(--d-red));
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 6px 18px -6px rgba(192, 57, 43, 0.75);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ad:hover .ad-cta {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -8px rgba(192, 57, 43, 0.85);
}

.ad:focus-visible {
  outline: 3px solid var(--d-red-2);
  outline-offset: 3px;
}

/* Banner */

.ad--banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  padding: 22px 26px;
  margin: 32px 0 8px;
  background:
    radial-gradient(700px 260px at 88% 130%, rgba(192, 57, 43, 0.3), transparent 62%),
    radial-gradient(600px 300px at 8% -40%, rgba(59, 125, 216, 0.42), transparent 60%),
    linear-gradient(100deg, var(--d-navy), var(--d-navy-2));
}

.ad-brand { display: flex; align-items: center; gap: 14px; }

.ad-body h3 {
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 9px;
}

.ad-ticks { display: flex; flex-wrap: wrap; gap: 7px 20px; font-size: 12.5px; }

.ad-tick { display: flex; align-items: center; gap: 7px; }

.ad-tick i {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(111, 168, 220, 0.18);
  color: #6fa8dc;
  font-style: normal;
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

.ad-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  text-align: right;
}

.ad-price { line-height: 1.2; }
.ad-price b { display: block; font-size: 20px; font-weight: 800; color: #ffffff; }
.ad-price span { display: block; font-size: 11px; color: var(--d-text-mut); }

/* Sponsorstrip */

.ad--strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 13px 18px;
  margin-top: 48px;
  font-size: 13.5px;
  background: linear-gradient(90deg, var(--d-navy), #123258 55%, var(--d-navy-2));
}

.ad-sep { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.16); }

.ad-strip-text strong { color: #ffffff; font-weight: 700; }

.ad-strip-link {
  margin-left: auto;
  color: #ffffff;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 2px solid var(--d-red-2);
  padding-bottom: 1px;
}

@media (max-width: 860px) {
  .ad--banner { grid-template-columns: 1fr; gap: 16px; }
  .ad-side { align-items: flex-start; text-align: left; }
  .ad-label--float { position: static; display: block; }
  .ad-strip-link { margin-left: 0; }
}
