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

:root {
    --bg: #f4f6f9; --card: #fff; --fg: #14202e; --muted: #5d6b7c; --line: #d9e0e8; --accent: #1a73e8;
    --content-width: 1088px; --header-height: 56px;
}
@media (prefers-color-scheme: dark) {
    :root { --bg: #0e1620; --card: #17222f; --fg: #e8eef5; --muted: #93a1b2; --line: #2a3848; --accent: #6aa8ff; }
}

*, *::before, *::after { box-sizing: border-box; }

/* nothing may widen the page: otherwise mobile browsers zoom out and the header stops filling the screen */
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);
}
.ba-loadbar { position: absolute; left: 0; right: 0; top: 100%; height: 3px; overflow: hidden; pointer-events: none; opacity: 0; }
.ba-loadbar span { display: block; width: 0; height: 100%; background: var(--accent); }
.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); }
.site-account { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: auto; color: var(--accent); }
.site-account + .menu-toggle { margin-left: 0; }
.site-account:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.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: 768px) {
    .menu-toggle { display: none; }
    .site-account { order: 3; margin-left: 20px; margin-right: -10px; }
    .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; }
}

/* ---------- layout ---------- */
.site-main { max-width: var(--content-width); margin: 0 auto; padding: 0 16px; }
.home .site-main { padding: 36px 16px 0; } /* room to see the weather scene behind the header */

.site-footer { margin-top: 32px; background: var(--card); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .site-logo, .site-footer .site-logo:hover { color: var(--accent); text-decoration: none; }
.site-footer .site-logo:hover .site-logo__text { color: var(--fg); text-decoration: none; }
.site-footer__main {
    max-width: var(--content-width); margin: 0 auto; padding: 32px 16px 24px;
    display: grid; gap: 28px; grid-template-columns: 1fr;
}
.site-footer__brand p { margin: 10px 0 0; max-width: 34ch; }
.site-footer__title { margin: 0 0 10px; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); }
.site-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__bar { border-top: 1px solid var(--line); }
.site-footer__bar-inner {
    max-width: var(--content-width); margin: 0 auto; padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 24px; font-size: .78rem;
}
.site-footer__bar p { margin: 0; }
.site-footer__bar a { color: inherit; }
.site-footer__bar a.site-footer__owner { color: var(--fg); font-weight: 600; }
.site-footer__legal { font-size: .78rem; max-width: 70ch; }
@media (min-width: 768px) {
    .site-footer__main { grid-template-columns: 1.6fr 1fr; gap: 40px; padding: 40px 16px 32px; }
}

/* ---------- pages, blog ---------- */
.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; }
.pagination { margin: 24px 0; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: 6px 12px; text-decoration: none; }
.pagination .current { font-weight: 700; }

.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: 768px) {
    .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 { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px); mask-image: linear-gradient(90deg, transparent 0, #000 40px); }
.breadcrumbs.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 { -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; }
