/*
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; }

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-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.2fr .6fr 1.6fr; 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; }
.page { padding-bottom: 8px; }

/* ---------- 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; }
