/*
Theme Name: Politiek App
Description: Kaal thema voor politiek.app. Site-specifieke functionaliteit zit in de plugin 'politiekapp'.
Author: Moonlight Multimedia
Author URI: http://www.moonlightmultimedia.nl/
Version: 1.0
Text Domain: politiekapp
*/

:root {
    --bg: #f5f6f8; --card: #fff; --fg: #17202b; --muted: #5b6776; --line: #dde2e8; --accent: #2f4bc4;
    --yes: #1b7f4b; --no: #c0392b; --none: #8a94a1; --split: #b7791f;
    --content-width: 1088px; --header-height: 56px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1520; --card: #18212e; --fg: #e8edf3; --muted: #9aa7b7; --line: #2a3646; --accent: #8ea2ff;
        --yes: #4cc38a; --no: #ff7b6b; --none: #7d8a9a; --split: #e0b44c;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
/* a link to #something scrolls to it below the sticky header, not under it */
html { scroll-padding-top: calc(var(--header-height) + 16px); }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
}

a { color: var(--accent); }

.screen-reader-text {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- header + menu ---------- */
.site-header {
    position: sticky; top: 0; z-index: 2000;
    background: var(--card);
    box-shadow: 0 0 10px rgba(0, 0, 0, .15);
}
.site-header__inner {
    max-width: var(--content-width); margin: 0 auto; padding: 0 16px;
    height: var(--header-height);
    display: flex; align-items: center; justify-content: space-between;
}
.site-logo {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--accent); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em;
}
.site-logo__text { color: var(--fg); }

.menu-toggle {
    width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.menu-toggle { color: var(--accent); }
.menu-toggle__bars { display: block; }

/* mobile: panel slides in from the right over a dimmed page (same pattern as kaartjebezorgd) */
.site-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 2;
    width: 80vw; max-width: 340px;
    background: var(--card);
    transform: translateX(100%); visibility: hidden;
    transition: transform .2s ease-out, visibility 0s linear .2s;
    overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: env(safe-area-inset-bottom);
}
.menu-open .site-nav { transform: translateX(0); visibility: visible; transition: transform .2s ease-out; box-shadow: -8px 0 24px rgba(0, 0, 0, .3); }
.site-nav-overlay {
    position: fixed; inset: 0; z-index: 1; background: rgba(0, 0, 0, .45);
    opacity: 0; pointer-events: none; transition: opacity .2s ease-out;
}
.menu-open .site-nav-overlay { opacity: 1; pointer-events: auto; }
.admin-bar .site-header { transition: z-index 0s linear .25s; } /* on close, keep the raised z-index until the slide-out (.2s) has finished */
.admin-bar.menu-open .site-header { z-index: 100000; transition-delay: 0s; } /* menu panel and dimmer above #wpadminbar (z-index 99999) */
html:has(body.menu-open) { overflow: hidden; } /* on html (not body): html's overflow-x: clip stops body's overflow propagating to the viewport, which made body a scroll container and un-stuck the sticky header */
.site-nav__head {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-height); padding: 0 8px 0 16px; background: var(--accent); color: #fff; font-weight: 700;
}
.site-nav__close { position: relative; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.site-nav__close::before, .site-nav__close::after {
    content: ''; position: absolute; left: 11px; top: 21px; width: 22px; height: 2px; background: #fff; border-radius: 2px;
}
.site-nav__close::before { transform: rotate(45deg); }
.site-nav__close::after { transform: rotate(-45deg); }
.site-nav ul { list-style: none; margin: 0; padding: 4px 16px 12px; }
.site-nav a {
    display: block; padding: 12px 0; color: var(--fg); text-decoration: none; font-weight: 600;
    border-bottom: 1px solid var(--line);
}
.site-nav li:last-child a { border-bottom: 0; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--accent); text-decoration: none; }

@media (min-width: 1024px) {
    .menu-toggle { display: none; }
    .site-nav { position: static; width: auto; max-width: none; background: none; transform: none; visibility: visible; transition: none; overflow: visible; box-shadow: none; padding: 0; }
    .site-nav__head, .site-nav-overlay { display: none; }
    .site-nav ul { display: flex; gap: 28px; padding: 0; }
    .site-nav a { padding: 8px 0; border: 0; }
    .site-nav .menu-item-home, .site-nav .menu-item--home { display: none; } /* the logo already goes home */
}

.site-main { max-width: var(--content-width); margin: 0 auto; padding: 0 16px; }

/* ---------- pages, blog, breadcrumbs ---------- */
.page__head { margin-bottom: 20px; }
.page__title { margin: 0 0 6px; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.15; letter-spacing: -.01em; }
.page__intro { margin: 0; color: var(--muted); font-size: 1.05rem; }
.page__meta, .page__crumb { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.page__crumb a { text-decoration: none; }
.page--article { max-width: 760px; margin: 0 auto; }

.post-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
.post-card {
    display: flex; flex-direction: column; gap: 6px; padding: 20px;
    background: var(--card); border-radius: 14px; box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.post-card__date { font-size: .8rem; color: var(--muted); }
.post-card__title { margin: 0; font-size: 1.25rem; line-height: 1.25; }
.post-card__title a { color: var(--fg); text-decoration: none; }
.post-card__title a:hover { color: var(--accent); }
.post-card__excerpt { margin: 0; color: var(--muted); }
.post-card__more { margin-top: auto; padding-top: 6px; font-weight: 600; text-decoration: none; }

.entry { font-size: 1.05rem; line-height: 1.7; }
.entry h2 { margin: 1.8em 0 .4em; font-size: 1.3rem; line-height: 1.25; }
.entry p { margin: 0 0 1em; }
.entry img { max-width: 100%; height: auto; border-radius: 10px; }

@media (min-width: 1024px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .post-card { padding: 24px; }
}
@media (min-width: 1000px) {
    .post-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- breadcrumbs ---------- */
.breadcrumbs {
    display: flex; flex-wrap: nowrap; align-items: center; margin: 24px 0 16px;
    font-size: 14px; color: var(--muted);
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch;
}
.breadcrumbs::-webkit-scrollbar { display: none; }
.breadcrumbs > * { flex-shrink: 0; white-space: nowrap; }
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs.has-scroll-left, .pa-subnav.has-scroll-left { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px); mask-image: linear-gradient(90deg, transparent 0, #000 40px); }
.breadcrumbs.has-scroll-right, .pa-subnav.has-scroll-right { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 40px), transparent); }
.breadcrumbs.has-scroll-left.has-scroll-right, .pa-subnav.has-scroll-left.has-scroll-right { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent); }
.breadcrumbs__home { display: inline-flex; align-items: center; }
.breadcrumbs__separator { display: inline-block; width: 6px; height: 6px; margin: 0 8px; border-bottom: 2px solid; border-right: 2px solid; transform: rotate(-45deg); }
.breadcrumbs__current { color: var(--fg); font-weight: 600; }


.site-footer { margin-top: 40px; background: var(--card); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer__inner { max-width: var(--content-width); margin: 0 auto; padding: 28px 16px 20px; }
.site-footer__cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px 40px; }
@media (max-width: 760px) { .site-footer__cols { grid-template-columns: 1fr; gap: 20px; } }
.site-footer h2 { margin: 0 0 8px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fg); }
.site-footer p { margin: 0; max-width: 62ch; line-height: 1.5; }
.site-footer__logo { display: inline-block; margin-bottom: 8px; font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; color: var(--fg); text-decoration: none; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer__nav a { color: var(--muted); text-decoration: none; }
.site-footer__nav a:hover, .site-footer__nav a:focus-visible { color: var(--accent); text-decoration: underline; }
.site-footer__copy { margin-top: 24px !important; padding-top: 14px; border-top: 1px solid var(--line); font-size: .8rem; }


/* ---------- header search ---------- */
.site-search { display: flex; align-items: stretch; margin: 12px 16px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.site-search input { flex: 1; min-width: 0; padding: 8px 12px; font: inherit; font-size: .95rem; color: var(--fg); background: none; border: 0; outline: 0; }
.site-search:focus-within { border-color: var(--accent); }
.site-search__go { padding: 0 12px; color: var(--accent); background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; }
@media (min-width: 1024px) {
    .site-header__inner { gap: 24px; }
    .site-nav { display: flex; flex-direction: row-reverse; align-items: center; gap: 24px; margin-left: auto; }
    .site-search { margin: 0; width: 230px; }
}
.search__title { margin: 28px 0 10px; font-size: 1.15rem; }
.site-main .page { padding-bottom: 8px; } /* not just ".page": WordPress also puts that class on <body> for static pages, which left a gap under the footer */

/* ---------- pagination: arrows and numbered buttons (like the shops' WooCommerce pagination) ---------- */
.pa-pagination, .pagination { margin: 28px 0 8px; text-align: center; }
.pa-pagination ul, .pagination .nav-links { list-style: none; margin: 0; padding: 0; display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.pa-pagination .page-numbers, .pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 8px;
    font: inherit; font-size: .9rem; font-weight: 600; color: var(--accent); text-decoration: none; cursor: pointer;
    background: var(--card); border: 2px solid var(--line); border-radius: 8px;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.pa-pagination a.page-numbers:hover, .pa-pagination button.page-numbers:hover, .pagination a.page-numbers:hover {
    background: color-mix(in srgb, var(--accent) 10%, var(--card)); border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.pa-pagination .page-numbers:focus-visible, .pagination .page-numbers:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pa-pagination .page-numbers.current, .pagination .page-numbers.current { color: var(--bg); background: var(--accent); border-color: var(--accent); cursor: default; }
.pa-pagination .page-numbers.dots, .pagination .page-numbers.dots { background: none; border-color: transparent; color: var(--muted); min-width: 24px; padding: 0; cursor: default; }

/* account icon in the header (like kaartjebezorgd) */
.site-header__actions { display: inline-flex; align-items: center; gap: 6px; }
.site-account { position: relative; display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; justify-content: center; color: var(--accent); text-decoration: none; font-weight: 600; font-size: .9rem; }
.site-account:hover, .site-account:focus-visible { color: var(--fg); }
.site-account.is-in::after { content: ""; position: absolute; top: 9px; right: 8px; width: 9px; height: 9px; background: var(--yes); border: 2px solid var(--card); border-radius: 50%; }
.site-account__label { display: none; }
@media (min-width: 1024px) {
    .site-header__actions { order: 3; }
    .site-nav { order: 2; }
    .site-account { padding: 0 6px; }
    .site-account__label { display: inline; color: var(--fg); }
    .site-account.is-in::after { top: 8px; right: auto; left: 22px; }
}

/* footer, redesigned: dark, four columns, a bottom bar */
.site-footer { margin-top: 48px; color: rgba(255, 255, 255, .72); background: radial-gradient(80% 140% at 0% 0%, rgba(142, 162, 255, .16) 0%, rgba(142, 162, 255, 0) 60%), linear-gradient(135deg, #131a24 0%, #1b2547 100%); border-top: 0; }
.site-footer__inner { padding: 44px 16px 22px; }
.site-footer__cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px 40px; }
@media (max-width: 900px) { .site-footer__cols { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__cols { grid-template-columns: 1fr 1fr; gap: 26px 20px; } }
.site-footer h2 { margin: 0 0 12px; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; }
.site-footer p { margin: 0; max-width: 46ch; line-height: 1.55; }
.site-footer__logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; color: #fff; text-decoration: none; }
.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer__nav a { color: rgba(255, 255, 255, .72); text-decoration: none; }
.site-footer__nav a:hover, .site-footer__nav a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 36px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .82rem; color: rgba(255, 255, 255, .55); }

/* cookie consent: a card in the bottom right corner */
.cookie-consent { position: fixed; right: 16px; bottom: 16px; z-index: 1000; width: min(380px, calc(100vw - 32px)); padding: 16px 18px; background: var(--card); color: var(--fg); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 12px; box-shadow: 0 10px 32px rgba(15, 21, 32, .22); }
.cookie-consent[hidden] { display: none; }
.cookie-consent__inner { display: flex; flex-direction: column; gap: 12px; }
.cookie-consent__text { margin: 0; font-size: .88rem; line-height: 1.45; }
.cookie-consent__text a { color: var(--accent); }
.cookie-consent__actions { display: flex; gap: 10px; }
.cookie-consent__accept, .cookie-consent__decline { flex: 1; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; padding: 9px 14px; border-radius: 8px; border: 2px solid var(--accent); }
.cookie-consent__accept { background: var(--accent); color: var(--card); }
.cookie-consent__decline { background: transparent; color: var(--accent); }
.cookie-consent__accept:focus-visible, .cookie-consent__decline:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
