/*
Theme Name: Boterkaaseieren
Theme URI: https://boterkaaseieren.nl/
Author: boterkaaseieren.nl
Description: Lightweight classic theme voor boterkaaseieren.nl — snel, mobielvriendelijk, gericht op de game-ervaring. Geen page-builders, geen jQuery, minimal dependencies.
Version: 1.1.0
Requires at least: 6.5
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: boterkaaseieren
*/

:root {
    --bke-primary: #173b57;
    --bke-primary-dark: #0f2a3f;
    --bke-accent: #facc15;
    --bke-accent-warm: #f97316;
    --bke-success: #22c55e;
    --bke-bg: #fff8e7;
    --bke-card: #ffffff;
    --bke-text: #111827;
    --bke-muted: #4b5563;
    --bke-border: #e5e7eb;
    --bke-radius: 16px;
    --bke-shadow-sm: 0 2px 8px rgba(23, 59, 87, .08);
    --bke-shadow: 0 8px 28px rgba(23, 59, 87, .12);
    --bke-max: 1120px;
    --bke-fs: clamp(1rem, 0.97rem + 0.2vw, 1.0625rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
    font-size: var(--bke-fs);
    line-height: 1.6;
    color: var(--bke-text);
    background: var(--bke-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--bke-primary); text-underline-offset: 3px; }
a:hover { color: var(--bke-accent-warm); }
::selection { background: var(--bke-accent); color: var(--bke-text); }

/* ----- Layout ----- */
.bke-wrap { max-width: var(--bke-max); margin: 0 auto; padding: 0 clamp(.65rem, 2.5vw, 1.25rem); }
.bke-section { padding: clamp(2.5rem, 5vw, 3.75rem) 0; }
.bke-section--tight { padding: clamp(1.25rem, 3vw, 2rem) 0; }
.bke-section--alt {
    background: #fff;
    background-image:
        radial-gradient(circle at 100% 0%, rgba(250,204,21,.08), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(23,59,87,.04), transparent 40%);
}
.bke-section--dark {
    background: linear-gradient(135deg, var(--bke-primary) 0%, var(--bke-primary-dark) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.bke-section--dark::before {
    /* subtiel grid-patroon — moderne touch */
    content: ""; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(250,204,21,.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(250,204,21,.06) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    pointer-events: none;
}
.bke-section--dark h2, .bke-section--dark h3 { color: #fff; }
.bke-section--dark a { color: var(--bke-accent); }

h1, h2, h3, h4 { color: var(--bke-primary); line-height: 1.2; margin: 0 0 .6em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 1.2rem + 2.5vw, 2.75rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.5vw, 2rem); position: relative; padding-bottom: .35em; }
h2::after {
    content: ""; display: block; width: 56px; height: 4px;
    background: var(--bke-accent); border-radius: 2px; margin-top: .4em;
}
.bke-section--dark h2::after { background: var(--bke-accent); }
h3 { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); }

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .35em; }
blockquote {
    margin: 1.5rem 0; padding: 1rem 1.25rem;
    border-left: 4px solid var(--bke-accent); background: var(--bke-card);
    border-radius: 0 var(--bke-radius) var(--bke-radius) 0;
}

/* ----- Header ----- */
.bke-header {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid rgba(229, 231, 235, .8);
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 1px 0 rgba(23,59,87,.02), 0 8px 20px -16px rgba(23,59,87,.18);
}
.bke-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; padding: .85rem clamp(.85rem, 2.5vw, 1.25rem);
    max-width: var(--bke-max); margin: 0 auto;
}
.bke-logo {
    display: inline-flex; align-items: center; gap: .6rem;
    text-decoration: none; color: var(--bke-primary); font-weight: 800;
    font-size: 1.15rem; padding: .25rem .35rem;
}
.bke-logo__mark {
    display: inline-grid; grid-template-columns: repeat(3, 8px); gap: 2px;
    padding: 4px; background: var(--bke-primary); border-radius: 6px;
}
.bke-logo__mark span { display: block; width: 8px; height: 8px; background: var(--bke-card); border-radius: 1px; }
.bke-logo__mark span:nth-child(1), .bke-logo__mark span:nth-child(5), .bke-logo__mark span:nth-child(9) { background: var(--bke-accent); }

.bke-nav { display: flex; align-items: center; }
.bke-nav__list {
    display: flex; flex-wrap: wrap; gap: .15rem; margin: 0; padding: 0; list-style: none;
}
.bke-nav__list > li { position: relative; }
.bke-nav__list a {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .55rem .85rem;
    text-decoration: none; color: var(--bke-text); font-weight: 600;
    border-radius: 999px; transition: background-color .15s ease, color .15s ease;
}
.bke-nav__list a:hover, .bke-nav__list .current-menu-item > a,
.bke-nav__list .current-menu-parent > a, .bke-nav__list .current-menu-ancestor > a {
    background: var(--bke-bg); color: var(--bke-primary);
}
/* Dropdown indicator */
.bke-nav__list .menu-item-has-children > a::after {
    content: "▾"; font-size: .65em; opacity: .55; margin-left: .15rem;
}
/* Submenu (depth=2) */
.bke-nav__list .sub-menu {
    list-style: none; margin: 0; padding: .35rem;
    position: absolute; top: 100%; left: 0; z-index: 60;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--bke-border);
    border-radius: 14px;
    box-shadow:
        0 4px 14px -4px rgba(23,59,87,.18),
        0 16px 40px -16px rgba(23,59,87,.28);
    opacity: 0; visibility: hidden; transform: translateY(4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    display: flex; flex-direction: column; gap: .1rem;
}
.bke-nav__list > li:hover > .sub-menu,
.bke-nav__list > li:focus-within > .sub-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.bke-nav__list .sub-menu a {
    padding: .55rem .9rem;
    border-radius: 10px;
    white-space: nowrap;
    display: block;
    font-weight: 500;
}
.bke-nav__list .sub-menu a:hover { background: var(--bke-bg); color: var(--bke-primary); font-weight: 600; }

.bke-nav__toggle {
    display: none; appearance: none; border: 0; background: transparent;
    padding: .5rem; cursor: pointer; color: var(--bke-primary);
    font-size: 1.5rem; min-width: 44px; min-height: 44px;
}

@media (max-width: 820px) {
    .bke-nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
    .bke-nav__list {
        display: none; flex-direction: column;
        position: absolute; left: 0; right: 0; top: 100%;
        background: #fff; padding: .5rem;
        box-shadow: var(--bke-shadow);
        max-height: calc(100vh - 70px); overflow-y: auto;
    }
    .bke-nav.is-open .bke-nav__list { display: flex; }
    .bke-header__inner { position: relative; }
    /* Mobile: submenu komt inline (geen dropdown), kleiner ingesprongen */
    .bke-nav__list .sub-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; background: transparent;
        padding: .1rem 0 .25rem 1.25rem; min-width: 0; border-radius: 0;
    }
    .bke-nav__list .sub-menu a {
        font-size: .92rem; padding: .45rem .8rem;
    }
    .bke-nav__list .menu-item-has-children > a::after { content: ""; }
}

/* ----- Hero ----- */
.bke-hero {
    padding: clamp(1.25rem, 4vw, 2.5rem) clamp(.65rem, 2.5vw, 1.25rem) clamp(2rem, 5vw, 3rem);
    background:
        radial-gradient(60% 80% at 80% 0%, rgba(250, 204, 21, .22), transparent 60%),
        radial-gradient(50% 60% at 0% 30%, rgba(249, 115, 22, .12), transparent 60%),
        linear-gradient(180deg, #fffdf3 0%, var(--bke-bg) 100%);
    position: relative;
    overflow: hidden;
}
.bke-hero__inner {
    max-width: var(--bke-max); margin: 0 auto;
    display: grid; gap: clamp(1.25rem, 3vw, 2.25rem);
    grid-template-columns: 1fr;
    align-items: center;
}
@media (min-width: 960px) {
    .bke-hero__inner { grid-template-columns: 1.05fr 1fr; gap: 3rem; }
}
.bke-hero__game { width: 100%; }
.bke-hero__copy h1 { margin-top: 0; }
.bke-hero__subhead { font-size: 1.15rem; color: var(--bke-muted); margin: 0 0 1.25rem; max-width: 36ch; }
.bke-hero__ctas { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }
.bke-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: .85rem 1.35rem; border-radius: 999px; font-weight: 700;
    text-decoration: none; transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
    border: 2px solid transparent; min-height: 48px;
}
.bke-btn--primary { background: var(--bke-primary); color: #fff; border-color: var(--bke-primary); }
.bke-btn--primary:hover { background: var(--bke-primary-dark); color: #fff; box-shadow: var(--bke-shadow); transform: translateY(-1px); }
.bke-btn--accent { background: var(--bke-accent); color: var(--bke-text); border-color: var(--bke-accent); }
.bke-btn--accent:hover { background: #eab308; color: var(--bke-text); transform: translateY(-1px); }
.bke-btn--ghost { background: transparent; color: var(--bke-primary); border-color: var(--bke-primary); }
.bke-btn--ghost:hover { background: var(--bke-primary); color: #fff; }

/* ----- Card grid ----- */
.bke-grid { display: grid; gap: 1.25rem; }
.bke-grid--2 { grid-template-columns: 1fr; }
.bke-grid--3 { grid-template-columns: 1fr; }
.bke-grid--4 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .bke-grid--2 { grid-template-columns: 1fr 1fr; } .bke-grid--3 { grid-template-columns: 1fr 1fr; } .bke-grid--4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .bke-grid--3 { grid-template-columns: repeat(3, 1fr); } .bke-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.bke-card {
    background: var(--bke-card); border-radius: var(--bke-radius);
    padding: 1.5rem; box-shadow: var(--bke-shadow-sm);
    border: 1px solid var(--bke-border);
    position: relative; overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.bke-card::before {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
    background: linear-gradient(90deg, var(--bke-accent), var(--bke-accent-warm));
    opacity: .9;
}
.bke-card:hover { transform: translateY(-2px); box-shadow: var(--bke-shadow); border-color: var(--bke-accent); }
.bke-card h3 { margin-top: 0; font-size: 1.2rem; }
.bke-card p { color: var(--bke-muted); margin-bottom: .5rem; }
.bke-card .bke-card__icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bke-bg); color: var(--bke-primary); margin-bottom: .85rem;
    font-size: 1.4rem;
}
.bke-card a.bke-card__link { color: var(--bke-primary); font-weight: 700; text-decoration: none; }
.bke-card a.bke-card__link:hover { color: var(--bke-accent-warm); }

/* ----- Article / page ----- */
.bke-article { background: #fff; border-radius: var(--bke-radius); padding: clamp(1.25rem, 2vw, 2.5rem); box-shadow: var(--bke-shadow-sm); }
.bke-article > * + * { margin-top: 0; }
.bke-article p, .bke-article ul, .bke-article ol, .bke-article blockquote, .bke-article figure { max-width: 70ch; }
.bke-article h2 { margin-top: 2rem; }
.bke-article h3 { margin-top: 1.5rem; }

/* ----- FAQ ----- */
.bke-faq { display: grid; gap: .75rem; max-width: 760px; margin: 0 auto; }
.bke-faq__item {
    background: #fff; border-radius: 12px; border: 1px solid var(--bke-border);
    padding: 1rem 1.25rem;
}
.bke-faq__item summary {
    cursor: pointer; font-weight: 700; color: var(--bke-primary); list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.bke-faq__item summary::after {
    content: "+"; font-size: 1.4rem; color: var(--bke-accent-warm);
    transition: transform .15s ease;
}
.bke-faq__item[open] summary::after { content: "–"; }
.bke-faq__item[open] { border-color: var(--bke-accent); }
.bke-faq__item p { margin-top: .75rem; color: var(--bke-muted); }

/* ----- Footer ----- */
.bke-footer {
    background: var(--bke-primary); color: #cfd9e3; margin-top: 4rem;
}
.bke-footer__inner { max-width: var(--bke-max); margin: 0 auto; padding: 2.5rem 1rem; display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .bke-footer__inner { grid-template-columns: 1.5fr 1fr 1fr; } }
.bke-footer h4 { color: #fff; font-size: 1rem; margin: 0 0 .75rem; letter-spacing: .04em; text-transform: uppercase; }
.bke-footer a { color: #fff; text-decoration: none; opacity: .9; }
.bke-footer a:hover { opacity: 1; text-decoration: underline; }
.bke-footer ul { list-style: none; padding: 0; margin: 0; }
.bke-footer li { margin-bottom: .35em; }
.bke-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); text-align: center; padding: 1rem; font-size: .9rem; }
.bke-footer__bottom a { margin: 0 .5rem; }

/* ----- Misc ----- */
.bke-skiplink { position: absolute; left: -9999px; }
.bke-skiplink:focus { left: 1rem; top: 1rem; background: var(--bke-accent); color: var(--bke-text); padding: .5rem 1rem; border-radius: 6px; z-index: 100; }
.screen-reader-text { position: absolute; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* ----- USP bar ----- */
.bke-usps { display: grid; gap: 1rem; padding: 1.5rem 0; }
@media (min-width: 720px) { .bke-usps { grid-template-columns: repeat(4, 1fr); } }
.bke-usp { display: flex; align-items: center; gap: .65rem; font-weight: 600; color: var(--bke-primary); }
.bke-usp__mark {
    width: 36px; height: 36px; border-radius: 10px; flex: 0 0 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--bke-accent); color: var(--bke-text);
}

/* ----- 404 ----- */
.bke-404 { text-align: center; padding: 4rem 1rem; }
.bke-404 h1 { font-size: 4rem; margin-bottom: .25rem; color: var(--bke-accent-warm); }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .bke-btn, .bke-card { transition: none; }
}

/* ===== Auteur-box (onder posts) ===== */
.bke-author-box {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.25rem;
    margin: 2.5rem 0 0;
    padding: 1.5rem;
    background: linear-gradient(180deg, #fffdf3 0%, var(--bke-bg) 100%);
    border: 1px solid var(--bke-border);
    border-radius: 18px;
    box-shadow: 0 8px 24px -12px rgba(23,59,87,.18);
}
@media (max-width: 560px) {
    .bke-author-box { grid-template-columns: 1fr; text-align: left; padding: 1.25rem; }
}
.bke-author-box__photo {
    width: 120px; height: 120px; border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px -4px rgba(23,59,87,.25);
}
@media (max-width: 560px) {
    .bke-author-box__photo { width: 88px; height: 88px; }
}
.bke-author-box__name {
    margin: 0; font-size: 1.15rem; color: var(--bke-primary);
}
.bke-author-box__role {
    margin: .1rem 0 .65rem;
    font-size: .88rem; color: var(--bke-muted); font-style: italic;
}
.bke-author-box__bio {
    margin: 0 0 .65rem; font-size: .95rem; line-height: 1.55;
}
.bke-author-box__links { margin: 0; display: flex; gap: 1rem; flex-wrap: wrap; font-size: .9rem; }
.bke-author-box__links a { font-weight: 600; }

/* ===== Auteur over-pagina ===== */
.bke-author-page {
    max-width: 760px; margin: 0 auto;
}
.bke-author-page__hero {
    display: grid; grid-template-columns: 220px 1fr;
    gap: 2rem; align-items: center;
    padding: 2rem; background: #fff;
    border-radius: 22px; border: 1px solid var(--bke-border);
    box-shadow: 0 12px 40px -16px rgba(23,59,87,.22);
    margin-bottom: 2.5rem;
}
@media (max-width: 640px) {
    .bke-author-page__hero { grid-template-columns: 1fr; text-align: center; padding: 1.5rem; }
}
.bke-author-page__photo {
    width: 220px; height: 220px; border-radius: 50%;
    object-fit: cover; border: 5px solid #fff;
    box-shadow: 0 12px 30px -8px rgba(23,59,87,.3);
}
@media (max-width: 640px) {
    .bke-author-page__photo { width: 160px; height: 160px; margin: 0 auto; }
}
.bke-author-page__name { margin: 0 0 .25rem; font-size: 1.85rem; }
.bke-author-page__tag {
    margin: 0 0 .85rem; color: var(--bke-muted); font-style: italic;
}
.bke-author-page__stats {
    display: flex; gap: 1.5rem; margin-top: .85rem;
    font-size: .9rem; flex-wrap: wrap;
}
.bke-author-page__stats strong { color: var(--bke-primary); font-size: 1.05rem; }

.bke-author-page__section {
    background: #fff; padding: 1.5rem 1.75rem;
    border-radius: 16px; border: 1px solid var(--bke-border);
    margin-bottom: 1.25rem;
}
.bke-author-page__section h2 { margin-top: 0; font-size: 1.3rem; }

/* ===== Vraagformulier ===== */
.bke-question-form {
    background: #fff; padding: 1.75rem; border-radius: 18px;
    border: 1px solid var(--bke-border);
    box-shadow: 0 8px 28px -12px rgba(23,59,87,.18);
    max-width: 620px;
}
.bke-question-form label {
    display: block; margin-bottom: 1rem;
    font-weight: 600; color: var(--bke-primary); font-size: .95rem;
}
.bke-question-form input,
.bke-question-form textarea,
.bke-question-form select {
    display: block; width: 100%; margin-top: .35rem;
    padding: .7rem .85rem; border: 1px solid var(--bke-border);
    border-radius: 12px; font: inherit; background: #fff;
    color: var(--bke-text); min-height: 48px;
}
.bke-question-form textarea { min-height: 140px; resize: vertical; }
.bke-question-form input:focus,
.bke-question-form textarea:focus,
.bke-question-form select:focus {
    outline: 3px solid var(--bke-accent); outline-offset: 1px;
    border-color: var(--bke-primary);
}
.bke-question-form__help {
    font-size: .85rem; color: var(--bke-muted);
    margin-top: -.3rem; margin-bottom: 1rem; font-weight: 400;
    font-style: italic;
}
.bke-question-form__submit {
    background: linear-gradient(180deg, #1f4f74 0%, var(--bke-primary) 60%, #0f2a3f 100%);
    color: #fff; border: 0; padding: .9rem 1.5rem;
    border-radius: 999px; font-weight: 700; cursor: pointer;
    min-height: 52px; font-size: 1rem;
    box-shadow: 0 8px 18px -8px rgba(23,59,87,.55);
}
.bke-question-form__submit:hover { filter: brightness(1.08); }
.bke-question-form__msg {
    padding: 1rem; border-radius: 12px; margin-bottom: 1rem;
    font-weight: 500;
}
.bke-question-form__msg--ok { background: #d1fae5; color: #065f46; border: 1px solid #22c55e; }
.bke-question-form__msg--err { background: #fee2e2; color: #991b1b; border: 1px solid #ef4444; }

/* ===== Article extras voor blog posts ===== */
.bke-article-meta {
    display: flex; flex-wrap: wrap; gap: 1rem;
    margin: 0 0 1.5rem; padding-bottom: 1rem;
    border-bottom: 1px solid var(--bke-border);
    color: var(--bke-muted); font-size: .92rem;
}
.bke-article-meta a { color: var(--bke-primary); font-weight: 600; }

/* TOC voor lange artikelen */
.bke-toc {
    background: var(--bke-bg); border-left: 4px solid var(--bke-accent);
    padding: 1rem 1.25rem; border-radius: 8px; margin: 1.5rem 0;
}
.bke-toc__title { margin: 0 0 .5rem; font-size: .95rem; color: var(--bke-primary); font-weight: 700; }
.bke-toc ol { margin: 0; padding-left: 1.25rem; }
.bke-toc li { margin-bottom: .25rem; }

/* Highlight callout */
.bke-callout {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 14px; padding: 1.1rem 1.35rem;
    margin: 1.5rem 0; border-left: 4px solid var(--bke-accent-warm);
}
.bke-callout strong { color: var(--bke-primary); }

/* Stat cards */
.bke-stats-grid {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin: 1.5rem 0;
}
.bke-stat {
    background: #fff; padding: 1.1rem; border-radius: 14px;
    border: 1px solid var(--bke-border);
    text-align: center;
}
.bke-stat__num {
    display: block; font-size: 1.9rem; font-weight: 800;
    color: var(--bke-primary); font-variant-numeric: tabular-nums;
}
.bke-stat__label {
    font-size: .85rem; color: var(--bke-muted); margin-top: .15rem;
}
