/*
Theme Name: Zonnehoek
Theme URI: https://zonnehoek.net
Description: Childthema voor Tuinrecreatievereniging Zonnehoek — "Klassiek verfijnd"-ontwerp op basis van Astra.
Author: Zonnehoek
Template: astra
Version: 0.3.3
Text Domain: zonnehoek
*/

/* ============================================================
   §2  Design tokens
   ============================================================ */
:root{
  --zh-groen:#2e7d32; --zh-groen-dark:#1b5e20; --zh-accent:#f9a825;
  --zh-bg:#ffffff; --zh-card:#ffffff; --zh-ink:#1f2a24; --zh-muted:#5b6b60;
  --zh-line:#e5ece4; --zh-line-soft:#eef3ec; --zh-radius:14px; --zh-radius-lg:18px;
  --zh-wa:#25d366;

  /* Typografie */
  --zh-serif:"Newsreader",Georgia,"Times New Roman",serif;
  --zh-sans:"Public Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}

/* ============================================================
   Basis: kleuren + typografie
   ============================================================ */
body{
  background:var(--zh-bg);
  color:var(--zh-ink);
  font-family:var(--zh-sans);
}
/* Astra zet op archief/blog/single/zoek de body-achtergrond groen via dynamische
   CSS die ná deze stylesheet laadt en daardoor wint. Forceer wit op alle templates. */
body,
body.archive, body.blog, body.single, body.search, body.error404, body.category, body.tag,
body.ast-separate-container{
  background-color:var(--zh-bg) !important;
}
h1,h2,h3,h4,.zh-serif,
.entry-title,.ast-single-post .entry-title,.site-title{
  font-family:var(--zh-serif);
  color:var(--zh-ink);
  letter-spacing:-.01em;
}
/* Geen Astra-standaardblauw op links */
a{color:var(--zh-groen-dark);}
a:hover,a:focus{color:var(--zh-groen);}

/* ============================================================
   §2/§3  Kaart-component
   ============================================================ */
.zh-card{
  display:flex;flex-direction:column;gap:.4rem;
  background:var(--zh-card);
  border:1px solid var(--zh-line);
  border-radius:var(--zh-radius);
  padding:1.15rem 1.2rem;
  text-decoration:none;color:inherit;
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.zh-card:hover{
  transform:translateY(-3px);
  box-shadow:0 10px 26px rgba(27,94,32,.13);
  border-color:#d7e4d1;
}
.zh-card .zh-ico{
  display:inline-flex;align-items:center;justify-content:center;
  width:2.5rem;height:2.5rem;border-radius:12px;
  background:var(--zh-line-soft);font-size:1.35rem;line-height:1;
}
.zh-card strong{color:var(--zh-groen-dark);font-family:var(--zh-serif);font-size:1.05rem;}
.zh-card small{color:var(--zh-muted);}

/* Badge "leden" */
.zh-badge{
  display:inline-block;background:var(--zh-accent);color:#3a2f00;
  border-radius:999px;padding:.05rem .5rem;font-size:.72rem;font-weight:600;
  vertical-align:middle;
}

/* Voorproefje-tegel (uitgelogd, leden-only): subtiel slot-affordance */
.zh-card--locked{position:relative;}
.zh-card--locked::after{content:"🔒";position:absolute;top:.85rem;right:.95rem;font-size:.9rem;opacity:.6;}
.zh-card--locked strong{color:var(--zh-muted);}

/* ============================================================
   §2  Knoppen
   ============================================================ */
.zh-btn,.zh-btn:visited{
  display:inline-flex;align-items:center;gap:.4rem;
  background:var(--zh-groen);color:#fff !important;
  border-radius:999px;border:0;
  padding:.6rem 1.15rem;font-weight:600;font-family:var(--zh-sans);
  text-decoration:none;cursor:pointer;line-height:1.3;
  min-height:44px; /* §8 tikdoel */
  transition:background .14s ease,transform .14s ease;
}
.zh-btn:hover{background:var(--zh-groen-dark);transform:translateY(-1px);color:#fff !important;}
.zh-btn--ghost{
  background:transparent;color:var(--zh-groen-dark) !important;
  border:1px solid var(--zh-line);
}
.zh-btn--ghost:hover{background:var(--zh-line-soft);color:var(--zh-groen-dark) !important;}
.zh-btn--wa{background:var(--zh-wa);}
.zh-btn--wa:hover{background:#1eb257;}

/* ============================================================
   §3  Hero (Home)
   ============================================================ */
.zh-hero{
  display:grid;grid-template-columns:1.3fr .9fr;gap:1.6rem;align-items:center;
  background:linear-gradient(135deg,var(--zh-groen),var(--zh-groen-dark));
  color:#fff;border-radius:var(--zh-radius-lg);
  padding:2.6rem 2.2rem;margin:1.4rem 0 2.2rem;
}
.zh-hero h1{font-family:var(--zh-serif);color:#fff;margin:0 0 .55rem;font-size:2.15rem;line-height:1.12;}
.zh-hero p{color:#eaf5ea;margin:0 0 1.2rem;max-width:46rem;font-size:1.05rem;}
.zh-hero__actions{display:flex;flex-wrap:wrap;gap:.7rem;}
.zh-hero__actions .zh-btn--ghost{color:#fff !important;border-color:rgba(255,255,255,.55);}
.zh-hero__actions .zh-btn--ghost:hover{background:rgba(255,255,255,.12);color:#fff !important;}
.zh-hero__media{
  aspect-ratio:4/3;border-radius:var(--zh-radius);
  background:rgba(255,255,255,.12) center/cover no-repeat;
  border:1px solid rgba(255,255,255,.22);min-height:180px;
}
/* Transparant logo in het groene hero-vak (naast de tekst) */
.zh-hero__logo-wrap{display:flex;align-items:center;justify-content:center;}
.zh-hero__logo{max-width:100%;height:auto;max-height:300px;filter:drop-shadow(0 6px 18px rgba(0,0,0,.22));}

/* ============================================================
   §3  Grids: snelkoppelingen (268) + nieuws (300)
   ============================================================ */
.zh-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(268px,1fr));gap:14px;}
.zh-grid--news{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));}

/* Nieuws-cards: categorie-pill + datum + serif-titel + excerpt */
.zh-news__meta{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;}
.zh-pill{
  display:inline-block;background:var(--zh-line-soft);color:var(--zh-groen-dark);
  border-radius:999px;padding:.1rem .6rem;font-size:.72rem;font-weight:600;
}
.zh-date{color:var(--zh-muted);font-size:.8rem;}

/* Sectietitels */
.zh-section-title{font-family:var(--zh-serif);margin:2.2rem 0 1rem;font-size:1.5rem;}

/* Beveiligd-deel notice op de homepage */
.zh-secure-note{
  background:#fff8e1;border:1px solid #ffe082;border-radius:var(--zh-radius);
  padding:1rem 1.2rem;margin:1.2rem 0;color:#5b4a00;
}
.zh-secure-note a{color:var(--zh-groen-dark);font-weight:600;}

/* ============================================================
   §3.5  Footer (donkergroen, 3 kolommen)  — styling vast;
   de template-part volgt met de mega-menu-fase.
   ============================================================ */
.zh-footer{background:var(--zh-groen-dark);color:#dcebd8;margin-top:3rem;}
.zh-footer__cols{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:2rem;
  max-width:1180px;margin:0 auto;padding:2.6rem 1.2rem;
}
.zh-footer h3{font-family:var(--zh-serif);color:#fff;font-size:1.05rem;margin:0 0 .8rem;}
.zh-footer a{color:#c8e0c2;text-decoration:none;}
.zh-footer a:hover{color:#fff;}
.zh-footer ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.45rem;}
.zh-footer__bar{
  border-top:1px solid rgba(255,255,255,.14);
  text-align:center;padding:1rem;font-size:.85rem;color:#a9c6a3;
}
/* Astra's eigen footer (#colophon) verbergen — we hebben onze eigen .zh-footer; voorkomt dubbele © -balk. */
footer.site-footer#colophon{display:none!important;}

/* ============================================================
   Ingesloten PDF-viewer (nieuwsberichten) — knoppenbalk + frame
   ============================================================ */
.zh-pdf{margin:1.4rem 0;}
.zh-pdf__bar{
  display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;
  background:var(--zh-line-soft);border:1px solid var(--zh-line);
  border-radius:12px 12px 0 0;border-bottom:0;padding:.5rem .7rem;
}
.zh-pdf__bar .zh-btn{min-height:38px;padding:.4rem .8rem;font-size:.9rem;}
.zh-pdf__bar button.zh-btn{cursor:pointer;}
.zh-pdf__level{
  min-width:4.5rem;text-align:center;font-weight:600;color:var(--zh-ink);
  font-size:.9rem;
}
.zh-pdf__spacer{flex:1 1 auto;}
/* Scroll-venster. Bij PDF.js (canvas) grijze achtergrond met witte pagina's. */
.zh-pdf__stage{
  width:100%;max-height:900px;overflow:auto;
  border:1px solid var(--zh-line);border-top:0;
  border-radius:0 0 12px 12px;background:#fff;
}
.zh-pdf__stage--canvas{background:#f2f4ef;padding:12px;text-align:center;}
.zh-pdf__page{
  display:block;margin:0 auto 12px;background:#fff;
  box-shadow:0 1px 6px rgba(0,0,0,.15);max-width:none;
}
.zh-pdf__page:last-child{margin-bottom:0;}
/* iframe-fallback (als PDF.js niet laadt) */
.zh-pdf iframe{
  display:block;width:100%;height:900px;border:0;background:#fff;
}
@media (max-width:600px){
  .zh-pdf__stage{max-height:75vh;}
  .zh-pdf iframe{height:70vh;}
  .zh-pdf__bar .zh-btn span.zh-pdf__txt{display:none;}
}

/* ============================================================
   Merk-tegel (header) — groene "Z"
   ============================================================ */
.zh-brand{display:inline-flex;align-items:center;gap:.6rem;text-decoration:none;}
.zh-brand__z{
  display:inline-flex;align-items:center;justify-content:center;
  width:38px;height:38px;border-radius:11px;
  background:var(--zh-groen);color:#fff;font-family:var(--zh-serif);
  font-weight:600;font-size:1.25rem;
}
/* Logo-embleem linksboven in het menu — hoogte vast op ~40px zodat de balk niet groter wordt. */
.zh-brand__logo{height:40px;width:auto;display:block;}
.zh-brand__name{font-family:var(--zh-serif);color:var(--zh-ink);font-weight:600;line-height:1.1;}
.zh-brand__name small{display:block;color:var(--zh-muted);font-family:var(--zh-sans);font-size:.72rem;font-weight:400;}

/* ============================================================
   §3/§4  Custom header + mega-menu
   ============================================================ */
.zh-header{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--zh-line);box-shadow:0 1px 0 rgba(0,0,0,.02);}
.zh-header__inner{position:relative;max-width:1220px;margin:0 auto;display:flex;align-items:center;gap:16px;padding:12px 24px;}

.zh-nav{flex:1 1 auto;display:flex;align-items:center;justify-content:center;gap:1px;flex-wrap:wrap;}
.zh-nav__btn{
  display:inline-flex;align-items:center;gap:4px;
  border:0;background:transparent;cursor:pointer;text-decoration:none;
  font-family:var(--zh-sans);font-size:14px;font-weight:500;color:#3a4a40;
  padding:8px 10px;border-radius:8px;white-space:nowrap;line-height:1.2;
}
.zh-nav__btn:hover,.zh-nav__btn[aria-expanded="true"]{background:var(--zh-line-soft);color:var(--zh-groen-dark);}
.zh-nav__caret{font-size:9px;opacity:.6;}

.zh-auth{
  flex:0 0 auto;background:var(--zh-groen);color:#fff !important;border-radius:999px;
  padding:8px 17px;font-size:13.5px;font-weight:600;text-decoration:none;min-height:36px;
  display:inline-flex;align-items:center;
}
.zh-auth:hover{background:var(--zh-groen-dark);color:#fff !important;}

/* Mega-panelen */
.zh-mega{
  position:absolute;top:100%;left:0;right:0;z-index:60;margin-top:1px;
  background:#fff;border:1px solid #cfe0c9;border-top:3px solid var(--zh-groen);
  border-radius:0 0 14px 14px;box-shadow:0 18px 40px rgba(0,0,0,.16);padding:22px 26px;
}
.zh-mega__head{display:flex;align-items:baseline;gap:12px;margin-bottom:14px;}
.zh-mega__title{font-family:var(--zh-serif);font-size:19px;font-weight:600;color:var(--zh-groen-dark);text-decoration:none;}
.zh-mega__more{font-size:12.5px;color:var(--zh-muted);text-decoration:none;}
.zh-mega__more:hover{color:var(--zh-groen-dark);}
.zh-mega__cols{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:22px 26px;}
.zh-mega__col{display:flex;flex-direction:column;gap:6px;}
.zh-mega__coltitle{display:flex;align-items:center;gap:8px;text-decoration:none;padding-bottom:4px;border-bottom:1px solid var(--zh-line-soft);}
.zh-mega__coltitle strong{font-size:13.5px;font-weight:700;color:var(--zh-ink);}
.zh-mega__sub{display:flex;flex-direction:column;gap:2px;}
.zh-mega__sub > a{font-size:13px;color:#3a4a40;text-decoration:none;padding:3px 0;}
.zh-mega__sub > a:hover{color:var(--zh-groen-dark);}
.zh-mega__kid{font-size:12px;color:var(--zh-muted);text-decoration:none;padding:2px 0 2px 12px;border-left:1px solid var(--zh-line);margin-left:2px;}
.zh-mega__kid:hover{color:var(--zh-groen);}
.zh-mega__overlay{position:fixed;inset:0;z-index:40;background:transparent;}

/* Hamburger (mobiel) */
.zh-burger{display:none;flex-direction:column;gap:4px;background:transparent;border:0;cursor:pointer;padding:8px;margin-left:auto;}
.zh-burger span{display:block;width:22px;height:2px;background:var(--zh-groen-dark);border-radius:2px;}

@media (max-width:900px){
  .zh-burger{display:flex;}
  .zh-nav{
    order:3;flex-basis:100%;margin-left:0;display:none;flex-direction:column;align-items:stretch;
    justify-content:flex-start;gap:2px;padding-top:10px;border-top:1px solid var(--zh-line-soft);
  }
  .zh-header.zh-nav-open .zh-nav{display:flex;}
  .zh-nav__btn{justify-content:space-between;padding:12px 6px;font-size:15px;min-height:44px;}
  .zh-mega{position:static;box-shadow:none;border:0;border-top:0;border-radius:0;padding:6px 6px 10px 14px;margin:0;}
  .zh-mega__cols{grid-template-columns:1fr;gap:12px;}
  .zh-mega__overlay{display:none;}
  .zh-auth{order:2;}
}

/* ============================================================
   Bestaande Astra-menu leesbaarheid (fallback wanneer Astra's
   eigen header toch rendert; onze custom header vervangt 'm normaal)
   ============================================================ */
html body .main-header-menu .sub-menu,
html body .ast-desktop .main-header-menu .sub-menu,
html body .astra-hfb .main-header-menu .sub-menu,
html body ul.sub-menu{
  background:#ffffff !important;
  border:1px solid #cfe0c9 !important;
  border-top:3px solid var(--zh-groen) !important;
  box-shadow:0 10px 28px rgba(0,0,0,.22) !important;
  border-radius:0 0 10px 10px;
}
html body .ast-desktop .main-header-menu .sub-menu .menu-item .menu-link,
html body .ast-desktop .main-header-menu .sub-menu .menu-item > a,
html body .main-header-menu .sub-menu .menu-item .menu-link,
html body .main-header-menu .sub-menu .menu-item > a,
html body ul.sub-menu li a{
  color:var(--zh-ink) !important;
  background-color:#ffffff !important;
  font-size:15px !important;font-weight:500;
}
html body .ast-desktop .main-header-menu .sub-menu .menu-item:hover > .menu-link,
html body .ast-desktop .main-header-menu .sub-menu .menu-item:focus-within > .menu-link,
html body .main-header-menu .sub-menu .menu-item:hover > .menu-link,
html body .main-header-menu .sub-menu .menu-item > a:hover,
html body ul.sub-menu li a:hover{
  color:#ffffff !important;background-color:var(--zh-groen) !important;
}
html body .main-header-menu .sub-menu .menu-item + .menu-item{ border-top:1px solid var(--zh-line-soft); }
.main-header-menu > .menu-item > .menu-link,
.main-header-menu > .menu-item > a{ color:var(--zh-ink); }

/* Inlog/uitlog-knop rechts in het menu */
.menu-item.zh-auth-item > a{
  background:var(--zh-groen);color:#fff !important;border-radius:999px;
  padding:.2rem .85rem !important;font-weight:600;font-size:.82rem;line-height:1.7;
}
.menu-item.zh-auth-item > a:hover{ background:var(--zh-groen-dark);color:#fff !important; }

/* ============================================================
   Layout-fix: Astra maakt .ast-container een flex-row, waardoor
   de home/pagina-secties naast elkaar komen i.p.v. onder elkaar.
   Forceer verticaal stapelen binnen de content.
   ============================================================ */
.home .ast-container,
.page .ast-container{flex-direction:column;}
.home .ast-container{gap:28px;}
.page .ast-container{gap:12px;}
/* Content niet laten inkrimpen tot z'n natuurlijke breedte (Astra's auto-marges) — vul de ruimte. */
.page .ast-container.zh-page{width:100%;max-width:1100px;margin-left:auto;margin-right:auto;}

/* ============================================================
   Algemene content-wrapper (dashboard/login) — verticaal, gecentreerd
   ============================================================ */
.zh-main{max-width:1180px;margin:0 auto;padding:28px 24px 48px;display:flex;flex-direction:column;gap:26px;}

/* Grote paginakop verbergen — de kruimel toont de paginanaam al (op alle pagina's). */
.zh-page__title{display:none;}

/* ---- Inlogpagina /leden/ ---- */
.zh-login-wrap{display:flex;justify-content:center;padding:3.5rem 1rem;}
.zh-login-inner{width:100%;max-width:460px;display:flex;flex-direction:column;align-items:center;}
.zh-login-logo{width:52px;height:52px;font-size:1.6rem;margin:0 0 1.1rem;}
.zh-login-inner .zh-card{width:100%;max-width:460px;}
.zh-login-inner .zh-card h3{font-family:var(--zh-serif);margin:0 0 .4rem;}

/* ---- Dashboard "Mijn Zonnehoek" ---- */
.zh-dash__welcome{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;}
.zh-dash__avatar{
  flex:0 0 auto;width:56px;height:56px;border-radius:50%;
  background:linear-gradient(135deg,var(--zh-groen),var(--zh-groen-dark));
  color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:1.15rem;
}
.zh-dash__hi{font-family:var(--zh-serif);margin:0;font-size:1.8rem;letter-spacing:-.01em;}
.zh-dash__meta{color:var(--zh-muted);font-size:.9rem;}
.zh-dash__stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;}
.zh-stat{background:var(--zh-card);border:1px solid var(--zh-line);border-radius:var(--zh-radius);padding:1.1rem 1.2rem;display:flex;flex-direction:column;gap:.2rem;}
.zh-stat strong{font-family:var(--zh-serif);font-size:1.8rem;color:var(--zh-groen-dark);}
.zh-stat small{color:var(--zh-muted);}
.zh-dash__cols{display:grid;grid-template-columns:1fr 330px;gap:22px;align-items:start;}
.zh-dash__main{display:flex;flex-direction:column;gap:14px;}
.zh-dash__aside{display:flex;flex-direction:column;gap:16px;}
.zh-action{gap:.6rem;}
.zh-action__head{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;}
.zh-action__head strong{font-size:1.02rem;color:var(--zh-ink);}
.zh-action p{color:var(--zh-muted);font-size:.92rem;margin:0;}
.zh-quick{display:flex;justify-content:space-between;align-items:center;padding:.55rem .3rem;text-decoration:none;color:var(--zh-ink);border-radius:8px;font-size:.95rem;}
.zh-quick:hover{background:var(--zh-line-soft);color:var(--zh-groen-dark);}
.zh-quick__arr{color:#b6c3b8;}
@media (max-width:820px){ .zh-dash__cols{grid-template-columns:1fr;} }

/* ============================================================
   §8  Responsive
   ============================================================ */
@media (max-width:820px){
  .zh-hero{grid-template-columns:1fr;padding:2rem 1.4rem;}
  .zh-hero__media{order:-1;}
  .zh-hero__logo{max-height:200px;}
  .zh-hero h1{font-size:1.75rem;}
}
