:root {
    --goud: rgb(254,200,12);
    --goud-donker: rgb(170,150,0);
    --groen: green;
    --bruin: brown;
    --achter: rgb(255,255,230);
}

html, body {
    height: 100%;
    margin: 0;
    background: var(--achter);
    font-family: Verdana, Calibri, sans-serif;
    color: var(--groen);
}

h1, h2, h3, h4, h5, h6 {
  /*font-family: "Segoe UI", Arial, Helvetica, sans-serif;*/
  font-family: Verdana, Calibri, sans-serif;
  font-weight: 600; /* of bold */
}

.page {
    position: relative;
    margin: 0 auto;
    max-width: 1101px;
    min-height: 100vh;
    background: var(--achter);
    border: 1px solid var(--bruin);
    display: grid;
    grid-template-rows: auto 50px 1fr auto;
}

/* Header */
header {
    background: var(--achter);
    position: relative;
    display: flex;
    align-items: center;
    height: 120px;
}
header .brand {
    margin-left: 20px;
    display: flex;
    align-items: center;
}
header .brand img {
    width: 310px;
    border: 0;
    display: block;
}

/* Menubalk */
.topbar {
    display: flex;
    align-items: center;
    background-color: rgb(70, 35, 0);
    padding: 0;
}

.topbar .brand img {
    height: 60px; /* pas aan naar wens */
    margin: 0 20px;
}
nav {
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.menu {
    width: 140px;
    border-color: var(--goud);
    border-style: outset;
    padding: 8px 6px;
    font: normal 100% Verdana;
    color: white;
    font-weight: bolder;
    background: var(--goud-donker);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    display: inline-block;
}
.menu.active {
    outline: 3px solid var(--goud);
    filter: brightness(1.05);
}


/* Layout met linker kolom */
.content {
    display: grid;
    grid-template-columns: 155px 1fr;
}
.left-rail {
    background: var(--goud);
    overflow: hidden;
}
.left-rail img {
    width: 150px;
    padding: 2px;
    display: block;
}

/* Hoofdcontent */
.main {
    padding: 5px 10px 0 10px;
    position: relative;
}
.main-inner {
    background: white;
    color: var(--groen);
    font-family: Verdana;
    padding: 10px;
    height: 100%;
    box-sizing: border-box;
    overflow: auto;
}

/* Homepagina content */
/* Content helpers (vervangen inline styles) */
.page-intro {
    font-size: 20px;
    color: var(--groen);
    background: #fff;
}
.emphasis-lg {
    color: var(--groen);
    font-size: 22px;
}
.board th.text-left {
    text-align: left;
}

/* Stichting-pagina helpers */
.section { margin-top: 1rem; }
.h2 { font-size: 1.25rem; margin: 0 0 .5rem 0; }
.address { margin: .5rem 0 0 0; }
.contact-row { margin: .5rem 0 0 0; }
.kvk { margin: .7rem 0; }
.kvk td { padding: .15rem .5rem .15rem 0; }

/* Beleidsplan lay-out: 2 kolommen met sticky inhoudsopgave (desktop) */
.policy-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
}

.policy-content h1 {
  margin-top: 0;
}

.policy-block {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin: 12px 0;
  overflow: hidden;
}
.policy-block > summary {
  list-style: none;
  cursor: pointer;
  padding: .9rem 1rem;
  background: #fafafa;
  border-bottom: 1px solid #eee;
}
.policy-block > summary::-webkit-details-marker { display: none; }
.policy-block[open] > summary { background: #f6f6f6; }
.policy-block h2 { margin: 0; font-size: 1.15rem; }

.policy-body {
  padding: 1rem 1rem 1.2rem;
  line-height: 1.55;
  font-size: 18px; /* aansluitend op je basis */
}

/* TOC */
.toc { background: #fff; border: 1px solid #e5e5e5; border-radius: 8px; padding: .8rem 1rem; }
.toc ul { margin: .4rem 0 0 0; padding-left: 1rem; }
.toc li { margin: .25rem 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Sticky aan rechterkant op desktop */
.toc-desktop { position: sticky; top: 12px; height: max-content; }
.toc-mobile { display: none; }

/* 'Naar boven' link en anchor offset (ivm fixed/top spacing) */
.to-top { text-align: right; margin-top: .6rem; }
.anchor-offset { position: relative; top: -70px; }

/* Responsiveness: TOC onder content op mobiel, één kolom */
@media (max-width: 1100px) {
  .policy-layout { grid-template-columns: 1fr; }
  .toc-desktop { display: none; }
  .toc-mobile { display: block; margin: 0 0 12px 0; }
}

/* Donaties / persberichten */
.press { background:#fff; border:1px solid #e5e5e5; border-radius:10px; padding:1rem; margin:1rem 0; }
.press-header { margin-bottom:.5rem; }
.press-title { margin:0; font-size:1.2rem; }
.press-grid { display:grid; grid-template-columns: 1fr 1.2fr; gap:16px; align-items:start; }
.press-figure img { width:100%; height:auto; display:block; }
.press-body { font-size:18px; line-height:1.55; }
.press-lede { font-size:1.05rem; }
.press-wide { margin:.6rem 0; }
.press-wide img { width:100%; height:auto; display:block; }

.press-body .list {
  grid-column: 1 / -1; /* loopt over alle kolommen */
  grid-row: 2; /* start op de tweede rij */
  margin-top: 0;
}

.press-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap; /* zorgt dat op kleine schermen het plaatje naar boven schuift */
}

.press-header-image img {
    max-height: 80%;
    max-width: 120px; /* zelfde breedte als je tekstblok of kleiner */
    height: auto;
    width: auto;
    object-fit: contain;
    padding: 2px;
    background-color: transparent;
}

.press-title {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
    flex: 1; /* tekstblok neemt resterende ruimte */
}


/* Overzichtstabel */
.donations-details { margin-top:.8rem; }
.donations-details > summary { cursor:pointer; padding:.6rem .8rem; background:#fafafa; border:1px solid #e5e5e5; border-radius:8px; }
.donations-table-wrap { overflow:auto; border:1px solid #e5e5e5; border-radius:8px; margin-top:.6rem; }
.donations-table { width:100%; border-collapse:collapse; font-size:16px; }
.donations-table th, .donations-table td { padding:.35rem .5rem; border-bottom:1px solid #f2f2f2; }
.donations-table th { text-align:left; background:#fcfcfc; }
.donations-table .num { text-align:right; white-space:nowrap; }

/* Responsiveness */
@media (max-width: 900px){
  .press-grid { grid-template-columns:1fr; }
}


/* Paul Kok - foto rechts */
.bio-right {
  position: relative;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 1rem;
  font-size: 18px;
  line-height: 1.6;
}

.bio-right .bio-img {
  float: right;
  width: 180px;      /* iets kleiner */
  margin: 0 0 1rem 1rem;
  border-radius: 6px;
}

@media (max-width: 600px) {
  .bio-right .bio-img {
    float: none;
    display: block;
    margin: 0 auto 1rem auto;
    width: 60%;
  }
}

/* Jaarrekeningen: afbeeldingstack */
.doc-images { display: grid; gap: 10px; }
.doc-images img { width: 100%; height: auto; display: block; }


.home-wrap {
    max-width: 940px;
    overflow-x: hidden;
    overflow-y: auto;
}
.home-core {
    max-width: 740px;
    margin-left: 0px;
    margin-right: 0px;
}
.anbi {
    float: right;
    max-width: 250px;
}
.anbi img {
    width: 200px;
    padding: 10px;
    display: block;
}

/* Tabellen */
table, tr, td, th {
    color: var(--groen);
    background-color: #fff;
    border: none;
    vertical-align: top;
}
h1 {
    margin-top: 0;
}

/* Footer */
footer {
    position: relative;
    height: 40px;
}
.stripe {
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--goud);
}
.stripe.top {
    top: 0;
}
.stripe.bottom {
    bottom: 0;
}
.footer-bar {
    position: absolute;
    top: 5px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--goud-donker);
    text-align: center;
    font-size: 11pt;
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-bar p {
    color: rgb(240,240,255);
    text-decoration: none;
}

/* Responsiveness */
@media (max-width: 900px) {
    .home-core {
        margin-left: 0;
        margin-right: 0;
    }
    header .brand img {
        width: 260px;
    }
    .menu {
        width: auto;
        padding: 8px 12px;
    }
    .content {
        grid-template-columns: 120px 1fr;
    }
    .left-rail img {
        width: 115px;
    }
}
@media (max-width: 640px) {
    .content {
        grid-template-columns: 1fr;
    }
    .left-rail {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding: 6px;
    }
    .left-rail img {
        width: 120px;
    }
}

/* Contact */
.contact-form { background:#fff; border:1px solid #e5e5e5; border-radius:10px; padding:1rem; }
.contact-form .field { margin-bottom:.8rem; }
.contact-form label { display:block; font-weight:600; margin-bottom:.25rem; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea { width:100%; padding:.6rem .7rem; border:1px solid #dcdcdc; border-radius:8px; font-size:16px; }
.contact-form textarea { resize:vertical; }
.contact-form .btn { display:inline-block; padding:.6rem 1rem; border-radius:8px; border:1px solid #caa100; background:#f4d24a; cursor:pointer; }
.alert { border-radius:8px; padding:.7rem .9rem; margin:.8rem 0; }
.alert.success { background:#f0fff5; border:1px solid #b9e6c6; }
.alert.error { background:#fff6f6; border:1px solid #f0b7b7; }
.hp { position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }
.mini { font-size:.85rem; color:#4a4a4a; margin-top:.4rem; }

.donations-table { width: 100%; border-collapse: collapse; }
.donations-table td, .donations-table th { padding: .35rem .5rem; border-bottom: 1px solid #eee; }
.donations-table .num { text-align: right; white-space: nowrap; }
.donations-table-wrap { overflow-x: auto; }


/* ——— Header & logo ——— */
.site-header {
  position: relative;
  z-index: 10;         /* zorg dat het logo nooit onder/over het menu schuift */
  display: block;
  padding: .5rem 1rem;
}

.brand { display: inline-block; line-height: 0; }
.brand img {
  display: block;
  height: auto;      /* hoogte weer automatisch */
  width: auto;       /* breedte automatisch */
  max-width: 100%;   /* past wel in kleinere schermen */
}


/* ——— Topbar / menu ——— */
.topbar { 
  position: relative;
  z-index: 9;
}

/* Flex + nowrap fix voor Safari: hou alles op één regel, scroll bij te weinig ruimte */
.main-nav {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: nowrap;            /* voorkom afbreken naar nieuwe regel */
  overflow-x: auto;             /* liever horizontaal scrollen dan wrappen */
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;          /* extra zekerheid voor Safari */
}

.main-nav .menu {
  flex: 0 0 auto;               /* knoppen mogen niet krimpen tot 0 */
  display: inline-block;
  padding: .55rem .9rem;
  text-decoration: none;
  border-radius: .4rem;
  /* je bestaande kleuren kunnen blijven; voorbeeld: */
  /* background: #f6f6f6; color:#222; */
}

/* Active state kan blijven zoals je had; bv.: */
/* .main-nav .menu.active { background:#F09027; color:#fff; } */

/* ——— Hard Safari-fix voor flex-min-width bug ——— */
.main-nav, .main-nav * {
  min-width: 0;   /* voorkomt dat lange labels de rij forceren */
}

/* ——— Voorkom overlap met content ——— */
.content { 
  position: relative; 
  z-index: 1; 
}

/* Optioneel: als het menu echt moet wrappen onder 360px, kun je dit switchen */
@media (max-width: 360px) {
  .main-nav { overflow-x: visible; flex-wrap: wrap; white-space: normal; }
}
