/*
Theme Name: Simpel Blog
Description: Rustig blogthema: één kolom, systeemletters, geen externe bestanden. Wel logo-ondersteuning, een gewone header, een taalkeuzemenu dat de pagina via Google Translate vertaalt, en tabellen die op mobiel niet buiten het scherm lopen.
Version: 1.9.2
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: simpel-blog
Tags: blog, one-column, custom-logo, custom-menu, featured-images, translation-ready, accessibility-ready
*/

/* ---------------------------------------------------------------- basis */

:root {
  --kleur-tekst: #1f1e1c;
  --kleur-zacht: #5f5c56;
  --kleur-lijn: #e3e0d9;
  --kleur-achtergrond: #f6f5f1;
  --kleur-oppervlak: #ffffff;
  --kleur-vlak: #f4f3ee;
  --kleur-mat: #ffffff;
  --kleur-link: #14524f;
  --kleur-link-hover: #0a3735;
  --breedte: 44rem;
  --breedte-pagina: 44rem;
  --zijbalk: 19rem;
  --hoogte-kop: 6.25rem;
  --ruimte: 1.5rem;
  --lettertype: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* koptekst: donkere band met patroon en accentrand onderaan (variant 6) */
  --kop-band: linear-gradient(110deg, #10403d 0%, #14524f 45%, #235e58 75%, #3c6b5a 100%);
  --kop-patroon: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.2px);
  --kop-patroon-grootte: 14px 14px;
  --kop-accent: linear-gradient(90deg, #14524f 0%, #3f8d84 45%, #c4a060 100%);
  --kop-accent-hoogte: 3px;
  --kop-accent-tekst: #9fd8cf;
  --kleur-kop-tekst: #f4f7f6;
  --kleur-kop-tekst-sterk: #ffffff;
  --kleur-kop-zacht: rgba(244, 247, 246, 0.74);
  --kleur-kop-lijn: rgba(255, 255, 255, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --kleur-tekst: #e8e6e3;
    --kleur-zacht: #a5a29d;
    --kleur-lijn: #34322e;
    --kleur-achtergrond: #17191a;
    --kleur-oppervlak: #1f2224;
    --kleur-vlak: #292c2e;
    --kleur-mat: #1f2224;
    --kleur-link: #7ecfc6;
    --kleur-link-hover: #a9e3dc;

    --kop-band: linear-gradient(110deg, #12302e 0%, #17383a 48%, #1f3f3a 100%);
    --kop-patroon: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1.2px);
    --kop-accent: linear-gradient(90deg, #2f6f68 0%, #7ecfc6 45%, #a8894f 100%);
    --kleur-kop-tekst: #f4f7f6;
    --kleur-kop-tekst-sterk: #ffffff;
    --kleur-kop-zacht: rgba(244, 247, 246, 0.7);
    --kleur-kop-lijn: rgba(255, 255, 255, 0.18);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--kleur-achtergrond);
  color: var(--kleur-tekst);
  font-family: var(--lettertype);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------- koptekst */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: #12403d;
  background-image: var(--kop-patroon), var(--kop-band);
  background-size: var(--kop-patroon-grootte), 100% 100%;
  padding: 1.5rem 1.25rem;
}

/* accentrand in plaats van een gewone lijn onder de koptekst */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--kop-accent-hoogte);
  background: var(--kop-accent);
}

.site-header__binnen {
  max-width: var(--breedte-pagina);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  min-height: 3.25rem;
}

.site-branding { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }

.custom-logo-link { display: block; line-height: 0; }
.custom-logo { height: 2.75rem; width: auto; }

.site-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--kleur-kop-tekst);
}
.site-title a { color: inherit; text-decoration: none; }
.site-title a:hover { color: var(--kop-accent-tekst); }

.site-description {
  margin: 0.15rem 0 0;
  font-size: 0.875rem;
  line-height: 1.35;
  color: var(--kleur-kop-zacht);
}

.site-header nav { margin-left: auto; }

.menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
.menu a {
  color: var(--kleur-kop-tekst);
  text-decoration: none;
  text-decoration-line: none;
  padding: 0.4rem 0;
}
.menu a:hover,
.menu a:focus,
.menu .current-menu-item > a,
.menu .current_page_item > a {
  color: var(--kleur-kop-tekst-sterk);
  text-decoration-line: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--kop-accent-tekst);
  text-underline-offset: 0.35em;
}

/* uitklapmenu's: dicht, open bij hover of toetsenbordfocus */
.menu li { position: relative; }
.menu .sub-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 20;
  min-width: 12rem;
  margin: 0.4rem 0 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--kleur-achtergrond);
  border: 1px solid var(--kleur-lijn);
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.menu .sub-menu li { display: block; }
.menu .sub-menu a {
  display: block;
  padding: 0.35rem 0.85rem;
  border-bottom: 0;
  white-space: nowrap;
  color: var(--kleur-tekst);
  text-decoration: none;
}
.menu .sub-menu a:hover,
.menu .sub-menu .current-menu-item > a {
  background: var(--kleur-vlak);
  color: var(--kleur-link);
  text-decoration: none;
}
.menu li:hover > .sub-menu,
.menu li:focus-within > .sub-menu { display: block; }
.menu .sub-menu .sub-menu { left: 100%; top: 0; margin: 0; }

/* -------------------------------------------------------------- inhoud */

.site-inhoud {
  max-width: var(--breedte-pagina);
  margin: 0 auto;
  padding: var(--ruimte) 1.25rem 3rem;
}

/* Wit tekstvlak op de getinte pagina: één kaart, één haarscherpe rand,
   geen schaduw die aandacht vraagt. De zijbalk blijft op de paginatint,
   zodat er maar één wit vlak is en het rustig blijft. */
.inhoud-hoofd {
  background: var(--kleur-oppervlak);
  border: 1px solid var(--kleur-lijn);
  border-radius: 6px;
  padding: 1.75rem 2rem;
}

/* Met widgets erbij: twee kolommen op brede schermen, anders één. */
body.met-zijbalk { --breedte-pagina: 68rem; }

.site-inhoud:has(> .widget-gebied) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--zijbalk);
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 62rem) {
  .site-inhoud:has(> .widget-gebied) { display: block; }
  .widget-gebied {
    margin-top: 2rem;
  }
}

/* De zijbalk blijft onder de sticky header staan zolang je scrolt.
   Alleen in de twee-koloms opstelling; op mobiel staat hij gewoon stil.
   Is de zijbalk hoger dan het scherm (zoals bij lange lijstjes), dan krijgt
   hij een eigen scrollbalk, anders is de onderkant niet te bereiken. */
@media (min-width: 62.01rem) {
  .widget-gebied {
    position: sticky;
    top: calc(var(--hoogte-kop) + 1.25rem);
    align-self: start;
    max-height: calc(100vh - var(--hoogte-kop) - 2.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 40rem) {
  .inhoud-hoofd {
    padding: 1.25rem 1.15rem;
    border-radius: 4px;
  }
}

.site-inhoud > *:first-child { margin-top: 0; }

a { color: var(--kleur-link); text-underline-offset: 0.15em; }
a:hover { color: var(--kleur-link-hover); }

h1, h2, h3, h4 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.75rem;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

p, ul, ol, dl, blockquote, pre, table, figure { margin: 0 0 1.25rem; }

blockquote {
  border-left: 3px solid var(--kleur-lijn);
  margin-left: 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--kleur-zacht);
}

code, kbd, samp { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--kleur-vlak); padding: 0.1em 0.35em; border-radius: 3px; }

pre {
  background: var(--kleur-vlak);
  border: 1px solid var(--kleur-lijn);
  border-radius: 4px;
  padding: 1rem;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

img, svg, video { max-width: 100%; height: auto; }

/* plaatjes in een licht kader, zodat ze loskomen van de tekst */
.entry-content img,
.entry-thumbnail img,
.post-thumbnail-in-lijst img,
figure img,
.wp-block-image img,
.wp-block-gallery img {
  border: 1px solid var(--kleur-lijn);
  border-radius: 4px;
  padding: 4px;
  background: var(--kleur-mat);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* geen kader voor kleine inline-afbeeldingen (logo's, icoontjes in tekst) */
.entry-content img.emoji,
.entry-content img.wp-smiley,
.entry-content p > img:first-child:only-child[width="16"],
.entry-content p > img:first-child:only-child[height="16"] {
  border: 0;
  padding: 0;
  box-shadow: none;
}

figure { max-width: 100%; }
figcaption, .wp-caption-text { font-size: 0.875rem; color: var(--kleur-zacht); }

hr { border: 0; border-top: 1px solid var(--kleur-lijn); margin: 2rem 0; }

/* tabellen: op mobiel scrollen in plaats van buiten de kolom lopen */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
}
th, td { border: 1px solid var(--kleur-lijn); padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; }
th { background: var(--kleur-vlak); }

.entry-content > table,
.entry-content > figure.wp-block-table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------- berichten */

.post { margin-bottom: 3rem; }

.entry-header { margin-bottom: 0.75rem; }

.entry-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}
.entry-title a { color: inherit; text-decoration: none; }
.entry-title a:hover { color: var(--kleur-link); }

.entry-meta {
  font-size: 0.875rem;
  color: var(--kleur-zacht);
}
.entry-meta a { color: inherit; }

.entry-thumbnail img { border-radius: 4px; }

.entry-summary p:last-child, .entry-content > *:last-child { margin-bottom: 0; }

.meer-lezen { font-size: 0.9375rem; }

.entry-thumbnail img {
  display: block;
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
}

/* staande schermafbeeldingen mogen niet het hele scherm vullen */
.entry-content img {
  max-height: 85vh;
  width: auto;
}

.post-thumbnail-in-lijst { margin-bottom: 1rem; }

/* de kaart-afbeelding in de lijst: altijd een rustige strook, ook bij een
   staande afbeelding, zonder dat hij vervormt (bijsnijden in plaats van rekken) */
.post-thumbnail-in-lijst img {
  display: block;
  width: 100%;
  max-height: 20rem;
  object-fit: contain;
  background: var(--kleur-mat);
  border: 1px solid var(--kleur-lijn);
  border-radius: 4px;
  padding: 4px;
}

/* lijst op de voorpagina en archieven */
.lijstitem {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--kleur-lijn);
  margin-bottom: 2rem;
}
.lijstitem:last-of-type { border-bottom: 0; }

/* -------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--kleur-lijn);
  padding: 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--kleur-zacht);
}
.site-footer__binnen {
  max-width: var(--breedte-pagina);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.site-footer a { color: inherit; }

/* -------------------------------------------------------------- reacties */

.comments-area { margin-top: 3rem; border-top: 1px solid var(--kleur-lijn); padding-top: 2rem; }
.comments-title, .comment-reply-title { font-size: 1.125rem; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; margin: 0; padding-left: 1.5rem; }
.comment-body { margin-bottom: 1.5rem; }
.comment-meta { font-size: 0.875rem; color: var(--kleur-zacht); }
.comment-author img { border-radius: 50%; vertical-align: middle; margin-right: 0.4rem; }

input[type="text"], input[type="email"], input[type="url"], input[type="search"], input[type="password"], textarea {
  width: 100%;
  max-width: 30rem;
  padding: 0.5rem 0.65rem;
  font: inherit;
  color: var(--kleur-tekst);
  background: var(--kleur-achtergrond);
  border: 1px solid var(--kleur-lijn);
  border-radius: 3px;
}
textarea { max-width: 100%; }

button, input[type="submit"], .wp-block-button__link {
  font: inherit;
  padding: 0.5rem 1rem;
  color: #ffffff;
  background: var(--kleur-link);
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
button:hover, input[type="submit"]:hover { background: var(--kleur-link-hover); }

.search-form { display: flex; gap: 0.5rem; max-width: 30rem; }

/* ------------------------------------------------------- navigatie/blokken */

.pagination, .navigation.posts-navigation, .comments-pagination {
  margin: 2rem 0 0;
  font-size: 0.9375rem;
}
.nav-links { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  position: static !important;
  width: auto; height: auto;
  clip: auto;
  padding: 0.5rem 0.75rem;
  background: var(--kleur-vlak);
}

.alignleft { float: left; margin: 0 1.25rem 0.75rem 0; }
.alignright { float: right; margin: 0 0 0.75rem 1.25rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }

.wp-block-quote { border-left: 3px solid var(--kleur-lijn); padding-left: 1.25rem; }
.wp-block-code, .wp-block-preformatted { overflow-x: auto; }
.wp-block-embed { margin-bottom: 1.25rem; }

/* De zijbalk: hetzelfde witte vlak als de tekstkolom, zodat het één rustig
   geheel is. Eén paneel voor alle widgets, niet per widget een kader. */
.widget-gebied {
  background: var(--kleur-oppervlak);
  border: 1px solid var(--kleur-lijn);
  border-radius: 6px;
  padding: 1.5rem 1.5rem 1.25rem;
}
.widget-gebied .widget {
  margin-bottom: 1.75rem;
  font-size: 0.9375rem;
}
.widget-gebied .widget:last-child { margin-bottom: 0; }
.widget-title {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--kleur-zacht);
}
.widget ul, .widget ol { margin: 0; padding-left: 1.1rem; }
.widget li { margin-bottom: 0.3rem; }
.widget p:last-child { margin-bottom: 0; }
.widget .search-form { max-width: none; }

/* ------------------------------------------------------------- klein scherm */

@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  .site-header__binnen { align-items: flex-start; }
  .site-header nav { margin-left: 0; width: 100%; }
  .menu { gap: 0.25rem 0.9rem; font-size: 0.9375rem; }
  h1, .entry-title { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}

/* ------------------------------------------------------------- taal kiezen */

.site-translate {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: 0.25rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 6px;
  background: rgba(127, 127, 127, 0.12);
  color: var(--kleur-kop-tekst);
}
.site-translate:hover { background: rgba(127, 127, 127, 0.22); }

.site-translate__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}
.site-translate__label svg { flex-shrink: 0; }

.site-translate__select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0 0.1rem;
  max-width: 7.5rem;
  color: var(--kleur-kop-tekst-sterk);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}
.site-translate__select option { color: #1f1e1c; background: #ffffff; }
.site-translate__select:focus-visible {
  outline: 2px solid var(--kop-accent-tekst);
  outline-offset: 2px;
  border-radius: 3px;
}

/* pijltje naast de keuzelijst */
.site-translate::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-left: -0.15rem;
  border-right: 2px solid var(--kleur-kop-tekst);
  border-bottom: 2px solid var(--kleur-kop-tekst);
  transform: rotate(45deg) translateY(-1px);
  pointer-events: none;
}

/* vertaalbalk van Google zelf onzichtbaar houden */
#google_translate_element { display: none !important; }
.goog-te-banner-frame.skiptranslate,
iframe.skiptranslate { display: none !important; }
body { top: 0 !important; }

@media (max-width: 40rem) {
  .site-translate { order: 1; margin-left: auto; }
  .site-header nav { order: 2; }
}
