/*
Theme Name: Rigtered
Theme URI: https://rigtered.nl
Author: Arthur Rigter
Author URI: https://rigtered.nl
Description: Persoonlijk thema voor rigtered.nl — tools en inzichten voor docenten.
Version: 3.0.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rigtered
Tags: blog, education, minimal
*/

/* ── DESIGN TOKENS ── */
:root {
  --ink:    #0f1923;
  --sub:    #5a6a7e;
  --panel:  #f4f6f9;
  --white:  #ffffff;
  --border: #d4dbe6;
  --blauw:  #1d4ed8;
  --bl-l:   #3b82f6;
  --bl-xl:  #dbeafe;
  --bg:     #e8edf5;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
img { max-width: 100%; height: auto; display: block; }

/* ── BASE ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  font-size: 1rem;
}

a { color: var(--blauw); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── CONTAINER ── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}
.container--narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── NAV ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(232, 237, 245, 0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.site-nav__logo {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blauw);
  text-decoration: none;
}
.site-nav__logo:hover { text-decoration: none; color: var(--blauw); }
.site-nav__menu {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__menu a {
  font-size: .82rem;
  font-weight: 500;
  color: var(--sub);
  text-decoration: none;
  letter-spacing: .02em;
  transition: color .15s;
}
.site-nav__menu a:hover,
.site-nav__menu .current-menu-item a { color: var(--ink); }

/* ── PAGE HERO ── */
.page-hero {
  padding: 3.5rem 0 2.5rem;
}
.page-hero__label {
  font-family: 'DM Mono', monospace;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blauw);
  margin-bottom: .5rem;
}
.page-hero__title {
  font-family: 'DM Serif Display', serif;
  font-size: 2.6rem;
  line-height: 1.08;
  color: var(--ink);
  margin-bottom: .6rem;
}
.page-hero__title em { font-style: italic; color: var(--blauw); }
.page-hero__sub {
  font-size: .92rem;
  color: var(--sub);
  max-width: 520px;
  line-height: 1.7;
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.card:hover {
  border-color: var(--blauw);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(29,78,216,.1);
  text-decoration: none;
}

/* ── BLOG CARDS ── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 3rem;
}
.blog-card__meta {
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sub);
}
.blog-card__title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.3;
}
.blog-card__excerpt {
  font-size: .82rem;
  color: var(--sub);
  line-height: 1.65;
  flex: 1;
}
.blog-card__link {
  font-size: .78rem;
  font-weight: 600;
  color: var(--blauw);
}

/* ── SINGLE POST ── */
.post-header { padding: 3rem 0 2rem; }
.post-header__meta {
  font-family: 'DM Mono', monospace;
  font-size: .62rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--sub);
  margin-bottom: .6rem;
}
.post-header__title {
  font-family: 'DM Serif Display', serif;
  font-size: 2.2rem;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 1rem;
}

.post-content {
  padding: 2rem 0 4rem;
}
.post-content p {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1.4rem;
  max-width: 65ch;
}
.post-content h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 2.5rem 0 .75rem;
  line-height: 1.2;
}
.post-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.8rem 0 .5rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.post-content ul, .post-content ol {
  margin: 0 0 1.4rem 1.5rem;
  font-size: .95rem;
  color: var(--ink);
  line-height: 1.75;
}
.post-content blockquote {
  border-left: 3px solid var(--blauw);
  margin: 1.5rem 0;
  padding: .5rem 1.2rem;
  color: var(--sub);
  font-style: italic;
  font-size: .95rem;
}
.post-content img {
  border-radius: 10px;
  margin: 1.5rem 0;
}
.post-content a { color: var(--blauw); }
.post-content code {
  font-family: 'DM Mono', monospace;
  font-size: .82rem;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: .1rem .4rem;
  border-radius: 4px;
  color: var(--blauw);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: .84rem;
  font-weight: 600;
  padding: .75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn--primary {
  background: var(--blauw);
  color: #fff;
  box-shadow: 0 2px 8px rgba(29,78,216,.2);
}
.btn--primary:hover { box-shadow: 0 6px 20px rgba(29,78,216,.3); color: #fff; }
.btn--ghost {
  background: var(--white);
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover { border-color: var(--blauw); box-shadow: none; color: var(--ink); }

/* ── SECTION LABELS ── */
.section-label {
  font-family: 'DM Mono', monospace;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blauw);
  margin-bottom: .4rem;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem;
  color: var(--ink);
  margin-bottom: .5rem;
}
.section-sub {
  font-size: .88rem;
  color: var(--sub);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 2rem;
}

/* ── ABOUT STRIP ── */
.about-strip {
  background: var(--ink);
  padding: 4rem 0;
  margin: 4rem 0 0;
}
.about-strip__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}
.about-strip__label {
  font-family: 'DM Mono', monospace;
  font-size: .62rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bl-l);
  margin-bottom: .4rem;
}
.about-strip__name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: .2rem;
}
.about-strip__role {
  font-family: 'DM Mono', monospace;
  font-size: .72rem;
  letter-spacing: .08em;
  color: #94a3b8;
}
.about-strip__text {
  font-size: .9rem;
  color: #cbd5e1;
  line-height: 1.8;
}

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ── FOOTER ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.8rem 0;
  margin-top: 0;
}
.site-footer__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-footer__logo {
  font-family: 'DM Mono', monospace;
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--sub);
}
.site-footer__copy {
  font-size: .75rem;
  color: var(--sub);
}

/* ── WORDPRESS CORE BUTTONS (overschrijf standaard donkergrijs) ── */
.wp-block-button__link,
.wp-block-button .wp-block-button__link {
  background: var(--blauw) !important;
  color: #ffffff !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: .84rem !important;
  font-weight: 600 !important;
  padding: .75rem 1.5rem !important;
  border-radius: 8px !important;
  border: none !important;
  text-decoration: none !important;
  transition: transform .1s, box-shadow .1s !important;
  box-shadow: 0 2px 8px rgba(29,78,216,.2) !important;
}
.wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(29,78,216,.3) !important;
  color: #ffffff !important;
  text-decoration: none !important;
}
.wp-block-button.is-style-outline .wp-block-button__link {
  background: var(--white) !important;
  color: var(--ink) !important;
  border: 1.5px solid var(--border) !important;
  box-shadow: none !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--blauw) !important;
  color: var(--ink) !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
  .site-nav__menu { display: none; }
  .page-hero__title { font-size: 2rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .about-strip__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .container, .container--narrow { padding: 0 1.2rem; }
}


/* ═══════════════════════════════════════════════════════════
   v3.0 — HERO (ruitjespapier-motief)
   ═══════════════════════════════════════════════════════════ */
.hero {
  background:
    linear-gradient(to bottom, rgba(232,237,245,0) 55%, var(--bg) 96%),
    repeating-linear-gradient(to right, rgba(29,78,216,.065) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(to bottom, rgba(29,78,216,.065) 0 1px, transparent 1px 32px),
    var(--bg);
  padding: 5rem 0 4rem;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero__trust {
  font-family: 'DM Mono', monospace;
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sub);
  margin-top: 1.4rem;
}
.hero__mock {
  gap: .9rem;
  cursor: default;
  transform: none;
  box-shadow: 0 8px 40px rgba(15,25,35,.08);
}
.hero__mock:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: 0 8px 40px rgba(15,25,35,.08);
}
.hero__mock-chip {
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blauw);
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 4px;
  align-self: flex-start;
}
.hero__mock-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.3rem;
  color: var(--ink);
}
.hero__mock-sub {
  font-size: .78rem;
  color: var(--sub);
  line-height: 1.6;
  margin: 0;
}

/* ── TOOLKAARTEN ── */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.tool-card { gap: .7rem; }
.tool-card--dicht {
  opacity: .55;
  pointer-events: none;
}
.tool-card__kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tool-card__icoon {
  width: 40px;
  height: 40px;
  background: var(--bl-xl);
  color: var(--blauw);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-card__chip {
  font-family: 'DM Mono', monospace;
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sub);
  border: 1px solid var(--border);
  padding: .18rem .55rem;
  border-radius: 999px;
}
.tool-card__naam {
  font-family: 'DM Serif Display', serif;
  font-size: 1.15rem;
  color: var(--ink);
}
.tool-card__tekst {
  font-size: .82rem;
  color: var(--sub);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}
.badge {
  font-family: 'DM Mono', monospace;
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .6rem;
  border-radius: 999px;
  display: inline-block;
  align-self: flex-start;
}
.badge--live   { background: #dcfce7; color: #15803d; }
.badge--nieuw  { background: var(--bl-xl); color: var(--blauw); }
.badge--straks { background: var(--panel); color: var(--sub); }

/* ── WAAROM ── */
.waarom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}
.waarom-grid p {
  font-size: .92rem;
  line-height: 1.8;
  color: var(--ink);
  margin: 0;
}

/* ── TOOLPAGINA (fullscreen iframe) ──
   Het iframe is precies één schermhoogte hoog en scrollt intern.
   Dat is nodig: de tools gebruiken sticky (zijbalk, bovenbalk) en
   fixed (projectiemodus, modals). Die werken alleen als er bínnen
   het iframe gescrold wordt, niet als het iframe meegroeit met de
   inhoud. --navh moet gelijk blijven aan de hoogte van .site-nav__inner. */
:root { --navh: 56px; }

.tool-wrap {
  width: 100%;
  padding: 0;
  margin: 0;
  height: calc(100vh - var(--navh));  /* fallback voor oudere browsers */
  height: calc(100dvh - var(--navh)); /* dvh: correct op mobiel met adresbalk */
}

/* Ingelogd toont WordPress bovenaan de beheerbalk. Zonder deze correctie
   is de pagina 32px te hoog en verschijnt er een tweede scrollbalk. */
body.admin-bar .tool-wrap {
  height: calc(100vh - var(--navh) - 32px);
  height: calc(100dvh - var(--navh) - 32px);
}
@media screen and (max-width: 782px) {
  body.admin-bar .tool-wrap {
    height: calc(100vh - var(--navh) - 46px);
    height: calc(100dvh - var(--navh) - 46px);
  }
}

/* Geen tweede scrollbalk: op een toolpagina scrolt alleen de tool zelf,
   nooit de pagina eromheen. Zowel html als body worden vastgezet, want
   afhankelijk van de browser scrolt de een of de ander. */
html.tool-page-html,
body.tool-page {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
html:has(body.tool-page) {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.tool-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Op een toolpagina vult de tool het scherm; de sitefooter zou alleen
   een overbodige scrollbalk opleveren. De tool heeft zelf een footer
   met versienummer en feedbacklink. */
body.tool-page .site-footer { display: none; }

.tool-info {
  padding-top: 2rem;
  padding-bottom: 3rem;
  border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   v3.0 — NAVIGATIE (voorheen in Customizer-css; nu in het thema)
   ═══════════════════════════════════════════════════════════ */
.menu-badge > a {
  background: #1d4ed8;
  color: #fff !important;
  padding: 4px 14px;
  border-radius: 5px;
  font-weight: 600;
}
.menu-badge > a:hover { background: #1e40af; }

/* Hamburger */
.site-nav { position: relative; }
.site-nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}
.site-nav__hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #0f172a;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.site-nav--open .site-nav__hamburger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.site-nav--open .site-nav__hamburger span:nth-child(2) { opacity: 0; }
.site-nav--open .site-nav__hamburger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Desktop dropdown */
.site-nav__menu .menu-item-has-children { position: relative; }
.site-nav__menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  min-width: 200px;
  padding: 6px 0;
  z-index: 100;
  list-style: none;
  margin: 0;
}
/* Onzichtbare brug zodat de muis van item naar submenu kan */
.site-nav__menu .menu-item-has-children::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 12px;
}
.site-nav__menu .menu-item-has-children:hover .sub-menu,
.site-nav__menu .menu-item-has-children:focus-within .sub-menu { display: block; }
.site-nav__menu .sub-menu li { list-style: none; }
.site-nav__menu .sub-menu li a {
  display: block;
  padding: 10px 16px;
  color: #0f172a;
  font-size: 0.9rem;
  text-decoration: none;
}
.site-nav__menu .sub-menu li a:hover {
  background: #f1f5ff;
  color: #1d4ed8;
}

/* Mobiel menu */
@media (max-width: 768px) {
  .site-nav__hamburger { display: flex; }
  .site-nav__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 3px solid #1d4ed8;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 8px 0;
    z-index: 200;
  }
  .site-nav--open .site-nav__menu { display: flex; }
  .site-nav__menu li a {
    display: block;
    padding: 12px 24px;
  }
  .site-nav__menu .sub-menu {
    display: block !important;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: #f8faff;
    padding: 4px 0;
  }
  .site-nav__menu .sub-menu li a {
    padding-left: 40px;
    font-size: 0.9rem;
  }
}

/* ── BIJDRAGEN-KNOPPEN (voorheen in Customizer-css) ── */
.bijdragen-knoppen {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 560px;
  margin: 2rem 0 1rem;
}
.bijdragen-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: #fff;
  border: 2px solid #1d4ed8;
  border-radius: 8px;
  color: #1d4ed8 !important;
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}
.bijdragen-btn:hover {
  background: #1d4ed8;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.2);
}
.bijdragen-btn--anders { background: #f1f5ff; }
.bijdragen-disclaimer {
  font-size: 0.85rem;
  color: #64748b;
  margin-top: 0.5rem;
}
@media (max-width: 600px) {
  .bijdragen-knoppen { grid-template-columns: repeat(2, 1fr); }
}

/* ── v3.0 RESPONSIVE ── */
@media (max-width: 720px) {
  .hero { padding: 3.5rem 0 3rem; }
  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__mock { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .waarom-grid { grid-template-columns: 1fr; gap: 1.2rem; }
}
