/* =========================================================
   Community Hub Clean — THEME.CSS (global + desktop)
   - Gebruik assets/css/mobile.css voor ALLE @media (max-width) regels
   - Onder "10. Custom desktop overrides" kun je eigen desktop tweaks zetten
   ========================================================= */

/* 1) CSS variabelen / themakleuren */
/* LIGHT = default */
:root{
  --ch-bg:#ffffff;
  --ch-surface:#f7f8fb;
  --ch-surface-2:#eef1f6;
  --ch-text:#0b1220;
  --ch-muted:#5b6472;
  --ch-accent:#2563eb;
  --ch-border:rgba(0,0,0,.12);

  /* header */
  --ch-header:#1A6482;
  --ch-header-fg:#ffffff;
  --ch-header-hover:#ffdf5d;

  /* overige tokens */
  --ch-maxw:1100px;
  --ch-gap:24px;
  --ch-radius:16px;
  --ch-shadow:0 6px 24px rgba(0,0,0,.12);

  /* tekst op accentknoppen */
  --ch-on-accent:#ffffff;
}

/* DARK overrides */
html[data-theme="dark"]{
  --ch-bg:#0b0d10;
  --ch-surface:#171d28;
  --ch-surface-2:#0f1420;
  --ch-text:#e7ebf3;
  --ch-muted:#9aa4b2;
  --ch-accent:#44a6ff;
  --ch-border:rgba(255,255,255,.08);

  --ch-header:#1A6482;      /* mag je desgewenst donkerder maken voor dark */
  --ch-header-fg:#ffffff;
  --ch-header-hover:#ffdf5d;

  --ch-shadow:0 6px 24px rgba(0,0,0,.32);
  --ch-on-accent:#0b0f14;
}

/* 2) Reset / basis */
*{ box-sizing:border-box; }
html,body{
  margin:0; padding:0;
  background:var(--ch-bg); color:var(--ch-text);
  font:16px/1.65 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
}
a{ color:var(--ch-accent); text-decoration:none; }
a:hover{ text-decoration:underline; }
img{ max-width:100%; height:auto; border-radius:12px; }
figure{ margin:0 0 1rem; }

/* 3) Layout */
.ch-container{ width:min(var(--ch-maxw),100% - 40px); margin-inline:auto; }
.ch-main{
  display:grid;
  grid-template-columns:1fr 320px;
  gap:var(--ch-gap);
  padding:28px 0;
}

/* BuddyPress pagina's: desktop full-width (sidebar verbergen zonder witte kolom) */
body.activity .ch-main,
body.groups .ch-main,
body.members .ch-main,
body.register .ch-main,
body.activate .ch-main { grid-template-columns: 1fr; }

/* 4) Header + navigatie (desktop) */
.ch-header{
  background:var(--ch-header);
  position:sticky; top:0; z-index:50; box-shadow:var(--ch-shadow);
}
.ch-header-bar{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; }
.ch-brand{ font-weight:800; letter-spacing:.3px; }

/* hoofdmenu */
.ch-menu{ list-style:none; margin:0; padding:0; display:flex; gap:18px; }
.ch-menu > li{ display:inline-block; position:relative; }   /* alleen top-level naast elkaar */
.ch-menu li > a{ color:#fff; font-weight:600; }
.ch-menu li > a:hover{ color:#ffdf5d; }

/* Submenu’s (desktop hover dropdowns) */
.ch-menu .sub-menu{
  position:absolute; top:100%; left:0;
  min-width:220px;
  background:var(--ch-surface);
  border:1px solid var(--ch-border);
  border-radius:12px;
  box-shadow:var(--ch-shadow);
  padding:8px 0;
  display:none;
  z-index:9999;
}
.ch-menu li:hover > .sub-menu{ display:block; }

/* Zorg dat submenu-items onder elkaar staan (fix) */
.ch-menu .sub-menu li{ display:block; }
.ch-menu .sub-menu a{ display:block; padding:10px 12px; border-radius:8px; color:var(--ch-text); }
.ch-menu .sub-menu a:hover{ background:var(--ch-surface-2); }

/* 2e niveau flyout naar rechts */
.ch-menu .sub-menu .sub-menu{
  top:0; left:100%; margin-left:6px; min-width:220px;
  border:1px solid var(--ch-border); border-radius:12px; box-shadow:var(--ch-shadow); padding:8px 0; display:none;
}
.ch-menu .sub-menu li:hover > .sub-menu{ display:block; }

/* 5) User/profiel dropdown (desktop) */
.ch-user{ display:flex; align-items:center; gap:10px; position:relative; }
.ch-user-btn{
  display:flex; align-items:center; gap:8px;
  background:transparent; border:0; color:#fff; cursor:pointer; padding:6px 8px; border-radius:10px;
}
.ch-user-btn:hover{ background:rgba(255,255,255,.1); }
.ch-user-avatar{ border-radius:999px; width:28px; height:28px; }
.ch-user-name{ font-weight:600; display:none; }     /* getoond op desktop via mobile.css? Dan laat je ‘m hier hidden */
.ch-caret{ fill:#fff; opacity:.85; }

.ch-user-menu{
  position:absolute; right:0; top:calc(100% + 8px); min-width:220px;
  background:var(--ch-surface); color:var(--ch-text);
  border:1px solid var(--ch-border); border-radius:12px; box-shadow:var(--ch-shadow);
  padding:8px; display:none; z-index:1000;
}
.ch-user-menu a{ display:block; padding:10px 12px; border-radius:8px; text-decoration:none; color:var(--ch-text); }
.ch-user-menu a:hover{ background:var(--ch-surface-2); }
.ch-user-menu hr{ border:0; border-top:1px solid var(--ch-border); margin:6px 0; }
/* Toggle als 'menu item' */
.ch-user-menu .ch-theme-toggle{
  width:100%; display:flex; align-items:center; gap:10px;
  padding:10px 12px; border-radius:8px; border:0;
  background:transparent; color:var(--ch-text); cursor:pointer; text-align:left;
}
.ch-user-menu .ch-theme-toggle:hover{ background:var(--ch-surface-2); }
.ch-theme-toggle .ch-icon{ width:18px; height:18px; opacity:.9; }

/* Toon icoon contextueel: in 'light' zie je de maan (schakel naar donker),
   in 'dark' zie je de zon (schakel naar licht) */
html[data-theme="light"] .ch-icon-sun{ display:none; }
html[data-theme="dark"]  .ch-icon-moon{ display:none; }

.ch-btn{ font-weight:700; border-radius:12px; padding:8px 12px; text-decoration:none; }
.ch-btn-ghost{ color:#fff; border:1px solid rgba(255,255,255,.35); }
.ch-btn-ghost:hover{ background:rgba(255,255,255,.1); }
.ch-btn-solid{ background:#fff; color:#0d2b38; }
.ch-btn-solid:hover{ filter:brightness(0.95); }

/* 6) Mobiele navigatie — BASIS (zichtbaarheid & gedrag in mobile.css) */
.ch-burger{            /* verborgen op desktop; tonen doe je in mobile.css */
  display:none; margin-left:10px; background:transparent; border:0; cursor:pointer; padding:8px; border-radius:10px;
}
.ch-burger span{ display:block; width:22px; height:2px; background:#fff; margin:5px 0; border-radius:2px; }

/* slide-in paneel: basis, zodat het element bestaat; open/dicht & responsive in mobile.css */
.ch-mobile-panel{
  position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:99999; display:none;
}
.ch-mobile-panel.is-open{ display:block; }
.ch-mobile-inner{
  position:absolute; right:0; top:0;
  width:min(360px, 92vw);
  height:100dvh; max-height:100dvh;
  overflow-y:auto; -webkit-overflow-scrolling:touch;
  background:var(--ch-surface); color:var(--ch-text);
  border-left:1px solid var(--ch-border); box-shadow:var(--ch-shadow);
  padding:18px 16px;
}
body.admin-bar .ch-mobile-inner{ top:46px; height:calc(100dvh - 46px); max-height:calc(100dvh - 46px); }
@media (min-width:783px){
  body.admin-bar .ch-mobile-inner{ top:32px; height:calc(100dvh - 32px); max-height:calc(100dvh - 32px); }
}
.ch-mobile-close{ position:sticky; top:0; display:inline-block; margin-left:auto; background:transparent; border:0; color:#fff; font-size:28px; line-height:1; cursor:pointer; }
.ch-mobile-menu{ list-style:none; padding:0; margin:16px 0 12px; display:flex; flex-direction:column; gap:4px; }
.ch-mobile-menu a{ display:block; padding:12px; border-radius:10px; text-decoration:none; color:var(--ch-text); overflow-wrap:anywhere; }
.ch-mobile-menu a:hover{ background:var(--ch-surface-2); }
.ch-mobile-auth{ margin-top:12px; display:flex; flex-direction:column; gap:6px; }
.ch-mobile-auth a{ padding:12px; border-radius:10px; background:var(--ch-surface-2); color:var(--ch-text); }
.ch-mobile-auth a.register{ background:#fff; color:#0d2b38; font-weight:700; }

/* 7) Componenten (cards, teksten, knoppen, formulieren, widgets) */
.ch-card{ background:var(--ch-surface); border-radius:var(--ch-radius); box-shadow:var(--ch-shadow); padding:18px; }
.ch-title{ margin:0 0 12px; font-weight:800; line-height:1.2; }
.ch-page-title{ margin:0 0 18px; font-size:1.6rem; }
.ch-meta{ color:var(--ch-muted); font-size:.92rem; margin-bottom:10px; }
.ch-entry{ font-size:1rem; }
.ch-featured{ margin:0 0 14px; }

.button, .wp-block-button__link, button, input[type="submit"]{
  appearance:none; border:0; background:var(--ch-accent); color:#081018;
  padding:10px 14px; border-radius:12px; cursor:pointer; text-decoration:none; display:inline-block; font-weight:600;
}
.button:hover, .wp-block-button__link:hover{ filter:brightness(1.05); }
input, textarea, select{
  background:var(--ch-surface-2); color:var(--ch-text); border:1px solid var(--ch-border);
  border-radius:10px; padding:10px; width:100%;
}

/* 8) Widgets / paginering / comments / footer */
.widget-title{ margin:0 0 10px; }
.widget ul{ margin:0; padding-left:20px; }

.ch-pagination{ display:flex; justify-content:center; margin:16px 0; }
.ch-pagination .page-numbers{ display:inline-block; padding:8px 12px; background:var(--ch-surface-2); border-radius:10px; margin:0 4px; }

.ch-comments .comment-list{ margin:0 0 1rem; }
.ch-comments .comment{ background:var(--ch-surface-2); border-radius:12px; padding:12px; margin-bottom:10px; }

.ch-footer{ border-top:1px solid var(--ch-border); padding:24px 0; margin-top:28px; color:var(--ch-muted); }
.ch-footer-bar{ display:flex; gap:16px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.ch-menu-footer{ gap:12px; }

/* 9) (optioneel) BuddyPress elementaire styling
   — uitgebreide BP styling kan in buddypress.css
*/

/* 10) Custom DESKTOP overrides — zet toekomstige desktop tweaks HIERONDER
   (Zet GEEN mobiele media queries hier — gebruik assets/css/mobile.css)
*/
/* Laat de SVG-icoontjes de tekstkleur gebruiken */
.ch-theme-toggle .ch-icon,
.ch-theme-toggle .ch-icon *{
  fill: currentColor;      /* voor <circle>, <path> e.d. */
  stroke: currentColor;    /* fallback als je ooit stroked icons gebruikt */
}

/* In dark mode: maak de zon knalgeel */
html[data-theme="dark"] .ch-theme-toggle .ch-icon-sun{
  color: #facc15;          /* amber-400 */
}

/* (optioneel) In light mode: iets donkerdere maan */
html[data-theme="light"] .ch-theme-toggle .ch-icon-moon{
  color: #334155;          /* slate-700 */
}

/* (optioneel) Klein randje voor extra contrast op donkere header */
html[data-theme="dark"] .ch-theme-toggle .ch-icon-sun *{
  filter: drop-shadow(0 0 2px rgba(0,0,0,.5));
}
/* === jouw desktop aanpassingen hieronder === */

/* Featured image in kaarten (blogoverzicht) */
.ch-thumb-link{ display:block; margin:0 0 12px; border-radius:12px; overflow:hidden; }
.ch-featured-thumb{ display:block; width:100%; height:auto; border-radius:12px; }

.group-hero-cover img{ width:100%; height:auto; border-radius:12px; }

.group-hero-title{ margin-top:.6rem; font-size:clamp(24px,3vw,36px); }
.group-hero-sub{ color:var(--ch-muted); max-width:65ch; }
.group-hero-cta .button{ margin-right:8px; }
.button.button--ghost{
  background:transparent; border:1px solid var(--ch-border); color:var(--ch-text);
}

.group-cards{
  display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:12px 0 24px;
}
.group-card{
  background:var(--ch-surface); border:1px solid var(--ch-border);
  border-radius:12px; padding:14px;
}
.group-list{ margin:0 0 0 18px; }

@media (max-width:860px){
  .group-cards{ grid-template-columns:1fr; }
}

