/* Nationale Mediasite 2.0 - moderne stijl, identiteit: indigo #31389a + blauw #066da1 */
:root {
  --indigo: #31389a;
  --indigo-deep: #262c78;
  --blue: #066da1;
  --blue-soft: #e8f2f8;
  --ink: #1c2033;
  --text: #2c3245;
  --text-soft: #5a6175;
  --line: #e5e8ef;
  --bg: #f7f8fb;
  --card: #ffffff;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(28, 32, 51, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 32, 51, 0.1);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ===== Basis (geldt ook voor de 600+ bestaande pagina's) ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font) !important;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  margin: 0;
  font-size: 16px;
}
body:not(.home) {
  max-width: 1200px;
  margin-inline: auto;
  padding: 1rem 1.25rem 3rem;
  background: var(--bg);
}

/* Subpagina's: blokken als homepage-kaarten */
body:not(.home) .grid-item {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 0.9rem 1.1rem 1rem !important;
  overflow: hidden;
  margin-bottom: 1.1rem;
}
body:not(.home) .grid-item h2 {
  margin: -0.9rem -1.1rem 0.8rem !important;
  padding: 0.75rem 1.1rem !important;
  background: #fbfcfe !important;
  border-bottom: 1px solid var(--line) !important;
  border-top: 0 !important;
  font-size: 1rem !important;
}
body:not(.home) .grid-item h2 a { text-decoration: none; }
body:not(.home) .grid-item h2 font,
body:not(.home) .grid-item h2 a font { color: var(--ink) !important; }
body:not(.home) .grid-container,
body:not(.home) .grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 1.1rem !important;
  width: 100% !important;
}
body:not(.home) .grid-container .grid-item,
body:not(.home) .grid .grid-item { margin-bottom: 0; }
/* oude navigatie en header-restanten verbergen */
body:not(.home) #myTopnav,
body:not(.home) .topnav#myTopnav,
body:not(.home) div[id="myTopnav"] { display: none !important; }
body:not(.home) img[src*="afbeeldingen/logo"] { display: none !important; }
body:not(.home) .dropbtn,
body:not(.home) .dropdown-content,
body:not(.home) .dropdown:has(.dropbtn) { display: none !important; }
/* oude gekleurde tabelvakken neutraliseren */
body:not(.home) table[bgcolor], body:not(.home) td[bgcolor],
body:not(.home) tr[bgcolor], body:not(.home) th[bgcolor] {
  background: transparent !important;
}
body:not(.home) [style*="background-color:#fafaa5"],
body:not(.home) [style*="background-color:#faf4bb"],
body:not(.home) [style*="background-color: #fafaa5"],
body:not(.home) [style*="background-color: #faf4bb"] {
  background: var(--card) !important;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
body:not(.home) h1 {
  position: static !important; width: auto !important; left: auto !important; top: auto !important;
  font-size: 1.6rem !important; color: var(--ink) !important; margin: 0.5rem 0 1rem;
}
body:not(.home) hr { border: 0; border-top: 1px solid var(--line); }

/* Content volledig normaliseren naar homepage-typografie */
body:not(.home) a,
body:not(.home) a:link,
body:not(.home) a:visited,
body:not(.home) a font,
body:not(.home) a b {
  color: var(--blue) !important;
  font-family: var(--font) !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  font-size: inherit;
}
body:not(.home) a:hover,
body:not(.home) a:hover font { color: var(--indigo) !important; text-decoration: underline !important; }
body:not(.home) font { color: inherit !important; font-family: var(--font) !important; }
body:not(.home) h3 {
  font-size: 1rem !important; font-weight: 700 !important;
  color: var(--ink) !important; line-height: 1.9 !important; margin: 0.3rem 0 !important;
}
body:not(.home) h3 a, body:not(.home) h3 a font {
  color: var(--text-soft) !important; font-weight: 600 !important;
}
body:not(.home) h3 a:hover { color: var(--indigo) !important; }
body:not(.home) b, body:not(.home) strong { font-weight: 600; color: var(--text); }
body:not(.home) .feed-title a { color: var(--text) !important; font-weight: 600 !important; }
body:not(.home) .feed-description { color: var(--text-soft); font-size: 0.9rem; }
body:not(.home) li { line-height: 1.7; }
body:not(.home) img[src*="_pict"], body:not(.home) img[src*="_icon"],
body:not(.home) img[src*="afbeeldingen/"][width="20"] { vertical-align: middle; opacity: 0.85; }

/* Header exact gelijk aan homepage, wint van alle normalisatie hierboven */
body .mtopbar .logo,
body:not(.home) .mtopbar .logo {
  color: var(--ink) !important; font-family: var(--font) !important;
  font-weight: 400 !important; font-size: 1.3rem !important;
  text-decoration: none !important; letter-spacing: -0.01em;
}
body .mtopbar .logo b,
body:not(.home) .mtopbar .logo b {
  color: var(--indigo) !important; font-weight: 800 !important;
}
body .mtopbar .nav-link,
body:not(.home) .mtopbar .nav-link {
  color: var(--text-soft) !important; font-family: var(--font) !important;
  font-weight: 600 !important; font-size: 0.88rem !important;
  text-decoration: none !important;
}
body .mtopbar .nav-link:hover,
body:not(.home) .mtopbar .nav-link:hover {
  color: var(--indigo) !important; background: var(--blue-soft); text-decoration: none !important;
}
body .mtopbar .dropdown-panel a,
body:not(.home) .mtopbar .dropdown-panel a {
  color: var(--text-soft) !important; font-family: var(--font) !important;
  font-weight: 400 !important; font-size: 0.88rem !important;
  text-decoration: none !important;
}
body .mtopbar .dropdown-panel a:hover,
body:not(.home) .mtopbar .dropdown-panel a:hover {
  color: var(--indigo) !important; background: var(--blue-soft);
}
body .mtopbar .caret,
body:not(.home) .mtopbar .caret { color: inherit !important; }
body:not(.home) .mtopbar .lokaal select {
  font-family: var(--font) !important; color: var(--text-soft) !important;
}
h1, h2, h3, h4 { font-family: var(--font); color: var(--ink); line-height: 1.25; }
body:not(.home) h2 {
  font-size: 1.25rem; margin-top: 1.8rem;
  padding-bottom: 0.35rem; border-bottom: 2px solid var(--blue-soft);
}
body:not(.home) h2 font, body:not(.home) h2 a font { color: var(--indigo) !important; }
a { color: var(--blue); }
a:hover { color: var(--indigo); }
body:not(.home) img { max-width: 100%; height: auto; }
body:not(.home) table { max-width: 100%; }
body:not(.home) td { font-family: var(--font) !important; }
body:not(.home) font { font-family: var(--font) !important; }

/* ===== Homepage ===== */
.home { background: var(--bg); }
.container { max-width: 1200px; margin-inline: auto; padding-inline: 1.4rem; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 2rem; height: 4.2rem; }
.logo { font-size: 1.3rem; font-weight: 400; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.logo b { color: var(--indigo); font-weight: 800; }
.topnav { display: flex; gap: 0.2rem; margin-left: auto; flex-wrap: wrap; }
.topnav a {
  color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: 0.9rem;
  padding: 0.45rem 0.8rem; border-radius: 999px;
}
.topnav a:hover { background: var(--blue-soft); color: var(--indigo); }
.nav-az { border: 1.5px solid var(--line); }

.masthead {
  background: linear-gradient(115deg, var(--indigo-deep), var(--indigo) 55%, var(--blue));
  color: #fff; padding: 3.2rem 0 2.6rem;
}
.masthead h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; margin: 0 0 1.6rem; }
.quick-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.quick {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff; text-decoration: none; font-weight: 600; font-size: 0.88rem;
  padding: 0.5rem 1rem; border-radius: 10px;
  transition: background 0.15s, transform 0.15s;
}
.quick:hover { background: rgba(255, 255, 255, 0.24); transform: translateY(-1px); color: #fff; }
.quick-ico { font-size: 1rem; }

.sec-title { display: flex; align-items: center; gap: 1rem; margin: 2.6rem 0 1.2rem; }
.sec-title h2 { font-size: 1.4rem; font-weight: 800; margin: 0; white-space: nowrap; }
.sec-rule { flex: 1; height: 2px; background: linear-gradient(90deg, var(--indigo), transparent); }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.1rem; }
.news-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
}
.news-card header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--line); background: #fbfcfe;
}
.news-card header a {
  font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1rem;
}
.news-card header a:hover { color: var(--indigo); }
.live {
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: #0b7a3d; background: #e5f6ec; padding: 0.15rem 0.55rem; border-radius: 999px;
}
.feed-scroll { max-height: 340px; overflow-y: auto; padding: 0.4rem 1.1rem 0.9rem; }
.feed-scroll a { color: var(--text); text-decoration: none; }
.feed-scroll a:hover { color: var(--blue); text-decoration: underline; }
.headline-list { list-style: none; margin: 0; padding: 0.6rem 1.1rem 1rem; max-height: 340px; overflow-y: auto; }
.headline-list li { padding: 0.42rem 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.headline-list li:last-child { border-bottom: 0; }
.headline-list a { color: var(--text); text-decoration: none; }
.headline-list a:hover { color: var(--blue); text-decoration: underline; }

.reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.5rem; }
.reg-grid a {
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  color: var(--text-soft); text-decoration: none; font-size: 0.9rem; font-weight: 600;
  padding: 0.5rem 0.9rem;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.reg-grid a:hover { border-color: var(--blue); color: var(--indigo); background: var(--blue-soft); }
.reg-more { margin-top: 1rem; }
.reg-more a { font-weight: 700; text-decoration: none; }
.reg-more a:hover { text-decoration: underline; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.blog-item {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--indigo);
  border-radius: var(--radius); padding: 1.1rem 1.3rem; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.blog-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.blog-item h3 { margin: 0 0 0.4rem; font-size: 1rem; color: var(--ink); }
.blog-item span { font-size: 0.85rem; font-weight: 700; color: var(--blue); }

.links-sec { margin-top: 2.6rem; }
.links-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .links-cols { grid-template-columns: 1fr; } }
.links-cols h2 { font-size: 1.15rem; font-weight: 800; margin: 0 0 0.8rem; }
.pill-cloud { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pill-cloud a {
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text-soft); text-decoration: none; font-size: 0.85rem; font-weight: 600;
  padding: 0.35rem 0.9rem;
  transition: border-color 0.15s, color 0.15s;
}
.pill-cloud a:hover { border-color: var(--indigo); color: var(--indigo); }

.footer { background: var(--ink); color: #a7adc2; margin-top: 3.5rem; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; padding-block: 1.6rem; font-size: 0.9rem;
}
.footer .logo { color: #fff; }
.footer a { color: #a7adc2; }
.footer a:hover { color: #fff; }

@media (max-width: 720px) {
  .topnav { display: none; }
  .masthead { padding: 2.2rem 0 2rem; }
}

/* ===== Topbar op subpagina's ===== */
body:not(.home) .mtopbar {
  margin: -1rem -1.25rem 1.5rem;
}

/* ===== Mega-menu ===== */
.logo-sub {
  display: inline-block; margin-left: 0.6rem; font-size: 0.72rem; font-style: italic;
  color: var(--text-soft); font-weight: 400;
}
.burger { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; padding: 0.5rem; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

.meganav { display: flex; flex-wrap: wrap; align-items: center; margin-left: auto; gap: 0.1rem; }
.meganav .nav-item { position: relative; }
.meganav .nav-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  background: none; border: 0; cursor: pointer;
  color: var(--text-soft); text-decoration: none; font-family: var(--font);
  font-weight: 600; font-size: 0.88rem; padding: 0.45rem 0.7rem; border-radius: 999px;
}
.meganav .nav-link:hover { background: var(--blue-soft); color: var(--indigo); }
.meganav .caret { font-size: 0.65rem; opacity: 0.6; }
.dropdown-panel {
  visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  position: absolute; left: 0; top: 100%; min-width: 230px; max-height: 65vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--indigo);
  box-shadow: var(--shadow-md); border-radius: 0 0 10px 10px;
  padding: 0.4rem 0; z-index: 70;
}
.meganav .nav-item:hover .dropdown-panel,
.meganav .nav-item:focus-within .dropdown-panel {
  visibility: visible; opacity: 1; transform: translateY(0);
}
.dropdown-panel a {
  display: block; padding: 0.42rem 1rem; text-decoration: none;
  color: var(--text-soft); font-size: 0.88rem; white-space: nowrap;
}
.dropdown-panel a:hover { background: var(--blue-soft); color: var(--indigo); }

.lokaal { display: inline-flex; align-items: center; margin-left: 0.4rem; }
.lokaal select {
  font-family: var(--font); font-size: 0.84rem; color: var(--text-soft); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 0.32rem 0.6rem; max-width: 150px;
  cursor: pointer;
}
.lokaal select:hover { border-color: var(--indigo); color: var(--indigo); }

.dropdown-panel { left: auto; right: auto; }
.topbar-inner { flex-wrap: wrap; height: auto; min-height: 4.2rem; padding-block: 0.4rem; }

@media (max-width: 1080px) {
  .burger { display: block; }
  .meganav { display: none; }
  body.nav-open .meganav {
    display: flex; flex-direction: column; align-items: stretch; width: 100%;
    border-top: 1px solid var(--line); padding-top: 0.5rem; margin-top: 0.4rem;
  }
  body.nav-open .meganav .nav-link { width: 100%; justify-content: space-between; border-radius: 8px; }
  body.nav-open .dropdown-panel {
    position: static; visibility: visible; opacity: 1; transform: none;
    display: none; border-radius: 0; max-height: none; box-shadow: none; border-top: 0;
  }
  body.nav-open .nav-item:focus-within .dropdown-panel { display: block; }
  body.nav-open .lokaal { margin: 0.5rem 0 0.8rem; }
}

/* ===== WordPress-blog opfrissen ===== */
body[class*="wp-theme"] { max-width: none !important; padding: 0 !important; box-shadow: none !important; background: var(--bg) !important; }
body[class*="wp-theme"] .mtopbar { margin: 0; }
body[class*="wp-theme"] header.site-header,
body[class*="wp-theme"] #site-header,
body[class*="wp-theme"] .elementor-location-header { display: none !important; }
body[class*="wp-theme"] main, body[class*="wp-theme"] .site-main {
  max-width: 1080px; margin-inline: auto; padding: 1.5rem 1.25rem 3rem;
  background: #fff; border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 0 40px rgba(28, 32, 51, 0.05);
}
body[class*="wp-theme"] h1, body[class*="wp-theme"] .entry-title {
  font-family: var(--font) !important; color: var(--ink);
}
body[class*="wp-theme"] a { color: var(--blue); }

/* ===== Contactpagina ===== */
.contact-wrap { max-width: 560px; margin: 2.5rem auto 4rem; padding-inline: 1.25rem; }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 2.2rem;
}
.contact-card h1 { margin: 0 0 0.4rem; font-size: 1.6rem; }
.contact-card > p { color: var(--text-soft); margin: 0 0 1.4rem; }
.contact-card label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.3rem; }
.contact-card input, .contact-card textarea {
  width: 100%; padding: 0.65rem 0.85rem; margin-bottom: 1.1rem;
  border: 1.5px solid var(--line); border-radius: 9px;
  font-family: var(--font); font-size: 1rem; color: var(--text);
}
.contact-card input:focus, .contact-card textarea:focus { outline: none; border-color: var(--indigo); }
.contact-card button {
  background: var(--indigo); color: #fff; border: 0; cursor: pointer;
  font-family: var(--font); font-weight: 700; font-size: 1rem;
  padding: 0.72rem 1.8rem; border-radius: 9px;
}
.contact-card button:hover { background: var(--indigo-deep); }
.captcha-err { color: #c0392b; font-size: 0.88rem; margin-top: 0.5rem; }
.form-success { color: #0b7a3d; font-weight: 600; margin-top: 0.8rem; }
