/**
 * WoordEnGeest - Gedeelde Styles
 * ================================
 * CSS variabelen, reset, navigatie, footer, typografie en responsive.
 * Wordt geladen op alle pagina's via functions.php.
 *
 * Page-specifieke styles staan nog inline in de templates zelf.
 */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* === CSS VARIABELEN === */
:root {
  --ink: #1c1a17;
  --ink-soft: #3d3529;
  --ink-muted: #6b5e4f;
  --parchment: #f5f1ea;
  --parchment-deep: #ece6db;
  --warm: #c4a265;
  /* Leesbare variant voor tekst (testronde punt 9).
     Het lichte goud haalde 2,14 : 1; dit haalt 5,07 : 1 op perkament.
     --warm blijft ongewijzigd voor lijnen en sierelementen. */
  --warm-text: #7a633c;
  --warm-light: #d9c89a;
  --mid: #2a5a3a;
  --mid-deep: #1e4a2e;
  --mid-light: #e4f0e8;
  --shadow-soft: 0 2px 20px rgba(28,26,23,0.06);
  --shadow-lift: 0 8px 40px rgba(28,26,23,0.08);
  --shadow-card: 0 2px 12px rgba(28,26,23,0.05);
}

/* === BODY === */
body {
  background: var(--parchment);
  color: var(--ink);
  font-family: 'Lora', Georgia, serif;
  font-weight: 400;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Verberg WP admin bar in frontend */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }

/* === NAVIGATIE === */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(245,241,234,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(196,162,101,0.15);
  transition: box-shadow 0.3s ease;
}

.site-nav.scrolled {
  box-shadow: 0 2px 24px rgba(28,26,23,0.08);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.nav-brand:hover { color: var(--mid); }
.nav-brand span { color: var(--mid); font-weight: 700; }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links > li {
  position: relative;
  /* Vul de volledige hoogte van de balk, zodat de hoverzone
     doorloopt tot aan de dropdown en er geen dood gebied is */
  display: flex;
  align-items: center;
  height: 60px;
}

.nav-links a {
  font-family: 'Lora', serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  position: relative;
  padding: 0.25rem 0;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: var(--mid);
  transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--mid); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active,
.nav-links .current-menu-item > a,
.nav-links .current-menu-ancestor > a { color: var(--mid); }
.nav-links a.active::after,
.nav-links .current-menu-item > a::after,
.nav-links .current-menu-ancestor > a::after { width: 100%; }

/* Dropdown
   Het oude gedrag (display:none + margin-top) liet een gat vallen tussen
   menu-item en dropdown, waardoor de hover verloren ging zodra de muis
   dat gat kruiste. Nu: geen gat, een onzichtbare brug en een korte
   sluitvertraging, zodat je rustig naar de submenulinks kunt bewegen. */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: -0.75rem;
  background: rgba(245,241,234,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(196,162,101,0.15);
  border-radius: 3px;
  padding: 0.5rem 0;
  min-width: 180px;
  box-shadow: var(--shadow-soft);
  list-style: none;
  margin-top: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0s linear 0.3s; /* sluitvertraging: kort uitstapje = geen probleem */
}

/* Onzichtbare brug die het visuele randje tussen balk en dropdown overbrugt */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.nav-links > li:hover > .nav-dropdown,
.nav-links > li:focus-within > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition-delay: 0s;
}

.nav-dropdown li { padding: 0; }

.nav-dropdown a {
  display: block;
  padding: 0.5rem 1.25rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.nav-dropdown a::after { display: none; }
.nav-dropdown a:hover { background: rgba(42,90,58,0.06); }

/* Hamburger toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}

.nav-toggle svg {
  width: 22px; height: 22px;
  stroke: currentColor; stroke-width: 2; fill: none;
}

/* === HERO (gedeeld patroon) === */
.hero {
  text-align: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(42,90,58,0.04) 0%, transparent 100%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(196,162,101,0.06) 0%, transparent 100%);
  pointer-events: none;
}

.hero-label {
  font-family: 'Lora', serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--warm-text);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.hero-label::before,
.hero-label::after {
  content: '\00b7';
  margin: 0 0.6em;
  opacity: 0.5;
}

.hero h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.2rem, 5.5vw, 3.5rem);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

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

.hero-intro,
.hero-sub {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.9;
  color: var(--ink-muted);
  max-width: 560px;
  margin: 0 auto;
}

.hero-rule {
  width: 60px;
  height: 1px;
  background: var(--warm);
  margin: 2.5rem auto 0;
  position: relative;
}

.hero-rule::after {
  content: '\2726';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--parchment);
  padding: 0 0.6rem;
  font-size: 0.75rem;
  color: var(--warm-text);
}

/* === GEDEELDE CONTAINER === */
.weg-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* === SECTION DIVIDER === */
.section-divider {
  width: 40px;
  height: 1px;
  background: var(--warm-light);
  margin: 3rem auto;
  position: relative;
}

.section-divider::after {
  content: '\2726';
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  background: var(--parchment);
  padding: 0 0.5rem;
  font-size: 0.6rem;
  color: var(--warm-light);
}

/* === FOOTER === */
.site-footer {
  text-align: center;
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--warm-light);
}

.site-footer p {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
  opacity: 0.6;
}

.site-footer a {
  color: var(--mid);
  text-decoration: none;
}

.site-footer a:hover { text-decoration: underline; }

/* Footerlinks (testronde punt 27 en 4) */
.site-footer-links {
  margin-top: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.6;
}

.site-footer-links span { opacity: 0.4; }

/* Vangnet: Complianz mag nooit zijn hele toestemmingspaneel in de footer zetten.
   Dat gebeurde met de shortcode; die is eruit, maar dit sluit het af. */
.site-footer-links .cmplz-cookiebanner,
.site-footer-links .cmplz-categories,
.site-footer-links #cmplz-manage-consent-container,
.site-footer-links .cmplz-category,
.site-footer-links .cmplz-banner-checkbox { display: none !important; }

/* De knop krijgt het uiterlijk van een gewone footerlink. */
.site-footer-links .cmplz-manage-consent,
.site-footer-consent button {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--mid);
  cursor: pointer;
  text-decoration: none;
}

.site-footer-links .cmplz-manage-consent:hover,
.site-footer-consent button:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .site-footer-links { gap: 0.4rem; font-size: 0.68rem; }
}

/* === RESPONSIVE: NAVIGATIE === */
@media (max-width: 720px) {
  .hero { padding: 7rem 1.5rem 3rem; }
  .weg-container { padding: 0 1.25rem; }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    /* Testronde punt 8: de vervaging sloeg niet aan, waardoor de pagina
       leesbaar door het menu heen liep. Nu volledig ondoorzichtig. */
    background: var(--parchment);
    box-shadow: 0 12px 24px -12px rgba(0,0,0,0.18);
    flex-direction: column;
    padding: 1rem 2rem 1.5rem;
    gap: 0;
    border-bottom: 1px solid rgba(196,162,101,0.15);
  }

  .nav-links.open { display: flex; }

  .nav-links li {
    padding: 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
  }

  .nav-links > li {
    display: block;
    height: auto;
  }

  /* Testronde punt 11: de link was 25px hoog en zo breed als het woord,
     waardoor tikken naast de tekst niets deed. Nu volledige rijhoogte. */
  .nav-links > li > a {
    display: block;
    width: 100%;
    padding: 0.85rem 0;
    min-height: 44px;
    line-height: 1.5;
    box-sizing: border-box;
  }

  .nav-links li:last-child { border-bottom: none; }
  .nav-toggle { display: block; }

  .nav-dropdown {
    position: static;
    display: block;
    background: none;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    margin: 0;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition: none;
  }

  .nav-dropdown::before { display: none; }

  .nav-dropdown li { padding: 0.4rem 0; border-bottom: none; }

  .nav-dropdown a {
    padding: 0.3rem 0 0.3rem 1rem;
    font-size: 0.75rem;
    color: var(--ink-muted);
  }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 2rem; }
}

/* === NIEUWSBRIEFBLOK IN HUISSTIJL (testronde punt 12) ===
   MailPoet levert een schreefloze kop, een felblauwe knop en grijze velden.
   Dat botst met de rest van de site (schreefletter, perkament, donkergroen).
   Hieronder alleen kleur en letter; de opbouw van het formulier blijft intact. */

.mailpoet_form {
  font-family: 'Lora', Georgia, serif !important;
  background: var(--parchment) !important;
  border: 1px solid var(--warm-light) !important;
}

.mailpoet_form h1.mailpoet-heading,
.mailpoet_form h2.mailpoet-heading {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 400 !important;
  color: var(--ink) !important;
  letter-spacing: 0 !important;
}

.mailpoet_form .mailpoet_text,
.mailpoet_form .mailpoet_textarea {
  font-family: 'Lora', Georgia, serif !important;
  background: #fff !important;
  border: 1px solid var(--warm-light) !important;
  border-radius: 3px !important;
  color: var(--ink) !important;
}

.mailpoet_form .mailpoet_text:focus {
  outline: 2px solid var(--mid) !important;
  outline-offset: 1px;
}

.mailpoet_form .mailpoet_submit {
  font-family: 'Lora', Georgia, serif !important;
  background: var(--mid) !important;
  color: #fff !important;
  border-radius: 3px !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em !important;
  transition: background 0.2s;
}

.mailpoet_form .mailpoet_submit:hover { background: var(--mid-deep) !important; }

.mailpoet_form .mailpoet_form_paragraph,
.mailpoet_form p { color: var(--ink-muted) !important; }

.mailpoet_form a { color: var(--mid) !important; }

/* Klikbare themalabels (redactieronde punt 10) */
a.article-thema, a.cat-article-thema { text-decoration: none; }
a.article-thema:hover, a.cat-article-thema:hover { text-decoration: underline; }

/* === BEHEER JE ABONNEMENT (MailPoet) ===
   Het beheerformulier heeft een eigen class en viel buiten de opmaak van het
   aanmeldformulier hierboven. Zelfde letter en kleuren. */
.mailpoet-manage-subscription { font-family: 'Lora', Georgia, serif; }

.mailpoet-manage-subscription .mailpoet_paragraph { margin-bottom: 1.25rem; }

.mailpoet-manage-subscription label,
.mailpoet-manage-subscription .mailpoet_text_label,
.mailpoet-manage-subscription .mailpoet_select_label,
.mailpoet-manage-subscription .mailpoet_segment_label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warm-text);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.mailpoet-manage-subscription .mailpoet_checkbox_label,
.mailpoet-manage-subscription .mailpoet_radio_label {
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-soft);
  font-weight: 400;
}

.mailpoet-manage-subscription input[type="text"],
.mailpoet-manage-subscription input[type="email"],
.mailpoet-manage-subscription select,
.mailpoet-manage-subscription .mailpoet_text,
.mailpoet-manage-subscription .mailpoet_select {
  width: 100%;
  font-family: 'Lora', Georgia, serif;
  font-size: 1rem;
  padding: 0.65rem 0.8rem;
  background: #fff;
  border: 1px solid var(--warm-light);
  border-radius: 3px;
  color: var(--ink);
  box-sizing: border-box;
  min-height: 44px;
}

.mailpoet-manage-subscription input:focus,
.mailpoet-manage-subscription select:focus {
  outline: 2px solid var(--mid);
  outline-offset: 1px;
}

.mailpoet-manage-subscription input[type="checkbox"],
.mailpoet-manage-subscription input[type="radio"] { accent-color: var(--mid); margin-right: 0.4rem; }

.mailpoet-manage-subscription .mailpoet_submit,
.mailpoet-manage-subscription input[type="submit"] {
  font-family: 'Lora', Georgia, serif;
  background: var(--mid);
  color: #fff;
  border: 0;
  border-radius: 3px;
  padding: 0.75rem 1.4rem;
  min-height: 44px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s;
}

.mailpoet-manage-subscription .mailpoet_submit:hover,
.mailpoet-manage-subscription input[type="submit"]:hover { background: var(--mid-deep); }

.mailpoet-manage-subscription .mailpoet_message,
.mailpoet-manage-subscription .mailpoet_validate_success {
  font-size: 0.95rem;
  color: var(--mid);
}
