/* ===========================================================
   Geopolitiek & Wereldeconomie — stylesheet
   Donker, financieel-professioneel thema met gouden accent
   =========================================================== */

:root {
  --bg: #0b0e14;
  --bg-alt: #10131b;
  --surface: #161a24;
  --surface-hover: #1c212e;
  --border: #262c3a;
  --text: #e8e9ec;
  --text-muted: #9aa4b2;
  --text-faint: #6b7484;
  --gold: #c9a227;
  --gold-light: #e0be4d;
  --gold-dim: rgba(201, 162, 39, 0.15);
  --danger: #d9534f;
  --success: #4caf7d;
  --radius: 10px;
  --max-width: 1180px;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-light); }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 14, 20, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.brand__mark {
  color: var(--gold);
  font-size: 22px;
}

.brand__name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand__tagline {
  display: none;
  font-size: 12px;
  color: var(--text-faint);
}

@media (min-width: 720px) {
  .brand__tagline { display: inline; }
}

/* ---------- Menu / Nav ---------- */

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.main-nav a {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--surface-hover);
  color: var(--gold-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.btn:hover { border-color: var(--gold); color: var(--gold-light); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #1a1305;
  border: none;
}

.btn-gold:hover { filter: brightness(1.08); color: #1a1305; }

.btn-danger {
  border-color: var(--danger);
  color: var(--danger);
  background: transparent;
}
.btn-danger:hover { background: rgba(217, 83, 79, 0.1); color: var(--danger); }

.btn-small { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 16px;
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .hamburger { display: inline-flex; }
  .main-nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    gap: 2px;
  }
}

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

.hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
  background-image:
    linear-gradient(90deg, rgba(11, 14, 20, 0.8) 0%, rgba(11, 14, 20, 0.4) 55%, rgba(11, 14, 20, 0.05) 100%),
    url('../images/hero-banner.svg');
  background-size: cover, cover;
  background-position: center, right center;
  background-repeat: no-repeat, no-repeat;
}

@media (max-width: 700px) {
  .hero {
    background-image:
      linear-gradient(90deg, rgba(11, 14, 20, 0.92) 0%, rgba(11, 14, 20, 0.75) 100%),
      url('../images/hero-banner.svg');
  }
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 42px);
  margin: 0 0 12px;
  line-height: 1.15;
}

.hero p {
  color: var(--text-muted);
  font-size: 17px;
  max-width: 640px;
  margin: 0;
}

/* ---------- Layout: content + sidebar ---------- */

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding: 40px 0 80px;
}

@media (min-width: 900px) {
  .layout { grid-template-columns: 2.1fr 1fr; }
}

.content-col { min-width: 0; }

/* ---------- Post cards ---------- */

.post-grid {
  display: grid;
  gap: 20px;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s, transform 0.15s;
}

.post-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.post-card__meta {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-card__meta .category {
  color: var(--gold);
  font-weight: 700;
}

.post-card h2, .post-card h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0 0 10px;
  line-height: 1.3;
}

.post-card h2 a:hover, .post-card h3 a:hover { color: var(--gold-light); }

.post-card p { color: var(--text-muted); margin: 0 0 14px; font-size: 15px; }

.post-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.read-more {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
}

.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 100px;
  background: var(--gold-dim);
  color: var(--gold-light);
  border: 1px solid rgba(201, 162, 39, 0.3);
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-faint);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- Sidebar ---------- */

.sidebar { display: flex; flex-direction: column; gap: 24px; }

.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.widget h4 {
  margin: 0 0 14px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gold);
}

.widget input[type="search"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 14px;
}

.widget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.widget-list li a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
}
.widget-list li a:hover { color: var(--gold-light); }

.widget-list .rp-date { display: block; font-size: 11px; color: var(--text-faint); margin-top: 2px; }

.category-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.category-pill {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.category-pill:hover { border-color: var(--gold); color: var(--gold-light); }

.about-widget p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* ---------- Article page ---------- */

.article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

@media (max-width: 600px) { .article { padding: 22px; } }

.article__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.article__meta .category { color: var(--gold); font-weight: 700; }

.article h1 {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.2;
  margin: 0 0 18px;
}

.article .byline {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-body { font-size: 17px; color: #dadde3; }
.article-body p.lead {
  font-size: 19px;
  color: var(--text);
  font-style: italic;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
  margin: 0 0 28px;
}
.article-body h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin: 32px 0 14px;
  color: var(--gold-light);
}
.article-body p { margin: 0 0 18px; }
.article-body ul { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; color: #dadde3; }
.article-body strong { color: var(--text); }
.article-body .disclaimer { font-size: 13px; color: var(--text-faint); margin-top: 36px; }

.article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.back-link:hover { color: var(--gold-light); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 40px 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

.footer-grid h5 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--gold);
  margin: 0 0 12px;
}

.footer-grid p, .footer-grid a {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.footer-bottom {
  max-width: var(--max-width);
  margin: 28px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

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

.admin-shell { max-width: 480px; margin: 80px auto; padding: 0 24px; }

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.admin-card h1 {
  font-family: var(--font-serif);
  font-size: 24px;
  margin: 0 0 6px;
}

.admin-card .sub { color: var(--text-muted); font-size: 14px; margin: 0 0 24px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
}

.field textarea { resize: vertical; min-height: 90px; }
.field textarea.content-editor { min-height: 320px; font-family: 'SF Mono', Consolas, monospace; font-size: 13px; }
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

.error-msg {
  background: rgba(217, 83, 79, 0.12);
  border: 1px solid rgba(217, 83, 79, 0.4);
  color: #f0918e;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.error-msg.show { display: block; }

.dashboard { display: none; padding: 40px 0 80px; }
.dashboard.show { display: block; }
.login-view.hide { display: none; }

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-header h1 { font-family: var(--font-serif); font-size: 26px; margin: 0; }

.dash-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
}

@media (min-width: 980px) {
  .dash-grid { grid-template-columns: 1.1fr 1.4fr; }
}

.post-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--bg-alt);
}

.post-row .info { min-width: 0; }
.post-row .info strong { display: block; font-size: 14px; }
.post-row .info span { font-size: 12px; color: var(--text-faint); }
.post-row .row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--gold-dim);
  color: var(--gold-light);
  font-weight: 700;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--success);
  color: #06210f;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s;
  pointer-events: none;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }

.session-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Media binnen artikelen: afbeeldingen & video-embeds ---------- */

.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 24px 0;
  display: block;
}

.article-body figure {
  margin: 24px 0;
}

.article-body figure img {
  margin: 0 0 10px;
}

.article-body figcaption {
  font-size: 13px;
  color: var(--text-faint);
  text-align: center;
}

/* Gebruik deze wrapper-div rond een YouTube/Vimeo <iframe> voor een
   responsive 16:9 video die meeschaalt met de paginabreedte. */
.article-body .video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  margin: 28px 0;
  border-radius: 8px;
  background: var(--bg-alt);
}

.article-body .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Afbeelding-upload widget in het admin-dashboard ---------- */

.upload-result {
  margin-top: 14px;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

.upload-result img {
  max-width: 100%;
  border-radius: 6px;
  margin-bottom: 10px;
}

.upload-result input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-family: 'SF Mono', Consolas, monospace;
}

/* ---------- Deelknop (X / twitter.com) ---------- */

.share-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.share-bar__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transition: opacity 0.15s, transform 0.15s;
}

.share-btn-x {
  background: #000;
  color: #fff;
}

.share-btn-x:hover {
  opacity: 0.85;
  color: #fff;
  transform: translateY(-1px);
}

/* ---------- Thumbnail op de post-kaart (homepage) ---------- */
/* De thumbnail staat alleen naast de samenvatting (niet naast titel/meta). */

.post-card__summary {
  overflow: hidden; /* bevat de zwevende thumbnail binnen dit blok */
}

.post-card__thumb {
  float: left;
  width: 84px;
  height: 84px;
  margin: 2px 16px 8px 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-alt);
  display: block;
  flex-shrink: 0;
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.post-card:hover .post-card__thumb img {
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .post-card__thumb {
    width: 64px;
    height: 64px;
    margin: 2px 12px 8px 0;
  }
}

/* ---------- Sterren-rating onder een artikel ---------- */

.rating-block {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.rating-block__label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 4px;
}

.rating-block__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.star-display {
  position: relative;
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 2px;
}

.star-display__bg {
  color: rgba(255, 255, 255, 0.55);
}

.star-display__fg {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--gold);
  width: 0%;
}

.rating-block__count {
  font-size: 13px;
  color: var(--text-faint);
}

.rating-input {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.star-input {
  display: inline-flex;
  gap: 2px;
}

.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.55);
  padding: 2px;
  transition: color 0.1s, transform 0.1s;
}

.star-btn:hover {
  transform: scale(1.1);
}

.star-btn.is-active {
  color: var(--gold);
}

.rating-thanks {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--gold-light);
}
