/*
Theme Name: Zoektocht
Theme URI: https://www.zoektocht.nu/
Author: Menno de Wilde
Description: Blokthema voor Zoektocht.nu — blog over gezondheid, hooggevoeligheid en vrouw-zijn. Zelf-gehoste fonts, geoptimaliseerde schema-markup (NewsArticle, BreadcrumbList, FAQPage) en een rustige, botanische stijl.
Version: 1.0.1
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zoektocht
*/

/* ---------- Basis ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
:where(h1, h2, h3, h4) { text-wrap: balance; scroll-margin-top: 1.5rem; }
img { height: auto; }
::selection { background: #E6EEDD; }

.zt-eyebrow {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--wp--preset--color--groen);
}
.has-bosgroen-background-color .zt-eyebrow { color: #C9E3A8; }

/* ---------- Header ---------- */
.zt-header { border-bottom: 1px solid var(--wp--preset--color--lijn); }
.zt-logo { display: inline-flex; align-items: center; text-decoration: none; }
.zt-logo__svg { display: block; height: 52px; width: auto; }
@media (max-width: 600px) { .zt-logo__svg { height: 44px; } }
.zt-header .wp-block-navigation a:hover { color: var(--wp--preset--color--groen); }
.zt-header .wp-block-navigation .current-menu-item > a,
.zt-header .wp-block-navigation a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--wp--preset--color--blad); }
.zt-header .wp-block-navigation__submenu-container {
	border-radius: 16px;
	border: 1px solid var(--wp--preset--color--lijn) !important;
	padding: 8px !important;
	box-shadow: 0 12px 32px rgba(31, 42, 36, 0.08);
}
.zt-header .wp-block-search__button {
	border-radius: 999px;
	min-width: 44px;
	min-height: 44px;
	background: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--inkt);
	border: 1px solid var(--wp--preset--color--lijn);
}

/* ---------- Kaarten ---------- */
.zt-card {
	background: var(--wp--preset--color--wit);
	border: 1px solid var(--wp--preset--color--lijn);
	border-radius: 20px;
	overflow: hidden;
	height: 100%;
	position: relative;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.zt-card:hover { box-shadow: 0 14px 34px rgba(31, 42, 36, 0.08); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .zt-card, .zt-card:hover { transition: none; transform: none; } }
.zt-card .wp-block-post-featured-image { border-radius: 0; margin: 0; }
.zt-card .wp-block-post-featured-image img { border-radius: 0; }
.zt-card .wp-block-post-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Hele kaart klikbaar via de titel-link */
.zt-card .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.zt-card .wp-block-post-terms { position: relative; z-index: 1; }

.zt-card--mini { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 18px; }
.zt-card--mini .wp-block-post-featured-image { width: 96px; flex-shrink: 0; border-radius: 12px; overflow: hidden; }
.zt-card--mini .wp-block-post-featured-image img { border-radius: 12px; }

.zt-placeholder-img .wp-block-post-featured-image:empty,
.wp-block-post-featured-image:not(:has(img)) { background: var(--wp--preset--color--salie); }

/* Lege featured image: toon zachte tint */
.zt-card .wp-block-post-featured-image:not(:has(img)) { aspect-ratio: 3 / 2; }

/* ---------- Categorie-pills ---------- */
.zt-pills, .zt-pills ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.zt-pills li { margin: 0; }
.zt-pills a {
	display: inline-block;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--wp--preset--color--wit);
	border: 1px solid var(--wp--preset--color--lijn);
	color: var(--wp--preset--color--inkt);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	line-height: 1.4;
}
.zt-pills a:hover, .zt-pills .current-cat > a { background: var(--wp--preset--color--bosgroen); border-color: var(--wp--preset--color--bosgroen); color: #fff; }

/* Categorie-label als badge */
.zt-badge a, .zt-badge {
	display: inline-block;
	text-decoration: none;
}
.zt-badge a {
	background: var(--wp--preset--color--salie);
	color: var(--wp--preset--color--bosgroen);
	padding: 5px 12px;
	border-radius: 999px;
}

/* ---------- Thema-tegels ---------- */
.zt-tile { border-radius: 20px; min-height: 170px; text-decoration: none; }
.zt-tile a { text-decoration: none; color: inherit; }
.zt-tile .zt-tile__more { margin-top: auto; font-weight: 700; font-size: 0.875rem; }

/* ---------- Kruimelpad ---------- */
.zt-breadcrumbs { font-size: 0.875rem; color: var(--wp--preset--color--tekst); }
.zt-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.zt-breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: var(--wp--preset--color--grijs); }
.zt-breadcrumbs [aria-current] { color: var(--wp--preset--color--tekst); }

/* ---------- Inhoudsopgave ---------- */
.zt-toc {
	background: var(--wp--preset--color--wit);
	border: 1px solid var(--wp--preset--color--lijn);
	border-radius: 20px;
	padding: 20px 22px;
}
.zt-toc__title { margin: 0 0 10px; font-family: var(--wp--preset--font-family--tekst); font-size: 0.8125rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--wp--preset--color--grijs); }
.zt-toc ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 0.9375rem; line-height: 1.4; }
.zt-sticky { position: sticky; top: 24px; }
@media (max-width: 781px) { .zt-sticky { position: static; } }

/* Op mobiel: inhoudsopgave boven de tekst, inklapbaar uiterlijk */
@media (max-width: 781px) { .zt-sidebar { order: -1; } }

/* ---------- Artikel ---------- */
.zt-article .wp-block-post-content > * + h2 { margin-top: 2.5rem; }
.zt-article .wp-block-post-content :where(ul, ol) { padding-left: 1.4rem; }
.zt-article .wp-block-post-content li + li { margin-top: 0.35rem; }
.zt-lead { font-size: var(--wp--preset--font-size--groot); line-height: 1.6; color: #2F3A33; }
.zt-meta { font-size: 0.9375rem; color: var(--wp--preset--color--grijs); gap: 6px; }
.zt-meta > * { margin: 0 !important; }
.zt-meta .zt-sep { color: var(--wp--preset--color--lijn); }
.zt-meta a { font-weight: 700; text-decoration: none; }

/* Info-boxen (patronen) */
.zt-box { border-radius: 20px; }
.zt-box > *:first-child { margin-top: 0; }
.zt-box > *:last-child { margin-bottom: 0; }

/* Auteursbox */
.zt-author .wp-block-post-author { gap: 20px; align-items: flex-start; }
.zt-author .wp-block-post-author__avatar img { border-radius: 999px; width: 84px; height: 84px; }
.zt-author .wp-block-post-author__name { font-family: var(--wp--preset--font-family--kop); font-size: 1.625rem; font-weight: 600; }
.zt-author .wp-block-post-author__bio { font-size: 1rem; color: var(--wp--preset--color--tekst); }
.zt-author .wp-block-post-author__byline { font-size: 0.8125rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--wp--preset--color--grijs); }

/* Delen */
.zt-share { display: flex; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--wp--preset--color--lijn); }
.zt-share a, .zt-share button {
	width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--wp--preset--color--lijn);
	background: var(--wp--preset--color--creme); display: inline-flex; align-items: center; justify-content: center;
	cursor: pointer; color: var(--wp--preset--color--bosgroen); padding: 0;
}
.zt-share svg { width: 18px; height: 18px; }

/* FAQ (details) */
.zt-faq .wp-block-details summary { font-weight: 700; cursor: pointer; }
.zt-faq .wp-block-details + .wp-block-details { margin-top: 10px; }
.zt-faq .wp-block-details[open] summary { margin-bottom: 0.5rem; }

/* SEO-tekst op de homepage in twee kolommen */
@media (min-width: 900px) {
	.zt-seo-text .wp-block-post-content { columns: 2; column-gap: 48px; }
	.zt-seo-text .wp-block-post-content > * { break-inside: avoid-column; }
	.zt-seo-text .wp-block-post-content :is(h2, h3) { break-after: avoid-column; }
}
.zt-seo-text .wp-block-post-content { color: var(--wp--preset--color--tekst); font-size: 1rem; }

/* Footer */
.zt-footer a { color: #D9DED8; text-decoration: none; }
.zt-footer a:hover { color: #fff; text-decoration: underline; }
.zt-footer .zt-footer__title { font-family: var(--wp--preset--font-family--tekst); font-size: 0.875rem; letter-spacing: 1.4px; text-transform: uppercase; color: #fff; font-weight: 700; }
.zt-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.zt-footer .wp-block-categories li { margin: 0; }
.zt-wordmark__svg { height: 34px; width: auto; display: block; }

/* Paginering */
.wp-block-query-pagination { gap: 8px; }
.wp-block-query-pagination-numbers .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px;
	border-radius: 999px; border: 1px solid var(--wp--preset--color--lijn); background: #fff; text-decoration: none;
}
.wp-block-query-pagination-numbers .page-numbers.current { background: var(--wp--preset--color--bosgroen); color: #fff; border-color: var(--wp--preset--color--bosgroen); }

/* Schermlezer-tekst */
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

/* Badges: alleen eerste categorie-stijl, geen komma's */
.zt-badge { display: flex; flex-wrap: wrap; gap: 6px; }
.zt-badge .wp-block-post-terms__separator { display: none; }
.zt-badge a { font-size: 0.75rem; }

/* Thema-tegels volledig klikbaar */
.zt-tile h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.zt-tile h3 a:focus-visible::after { outline: 2px solid var(--wp--preset--color--bosgroen); outline-offset: 3px; }

/* Yoast-kruimelpad in dezelfde stijl */
.zt-breadcrumbs--yoast a { text-decoration: underline; }
.zt-breadcrumbs--yoast .breadcrumb_last { color: var(--wp--preset--color--tekst); }

/* Lege categoriepill-lijst niet tonen */
.zt-pills:empty { display: none; }

/* ---------- Verfijningen ---------- */
.wp-site-blocks > * + * { margin-block-start: 0; }
.zt-logo__svg { height: 60px; }
.zt-header .wp-block-search__button { width: 44px; padding: 0; justify-content: center; }
.zt-meta .zt-sep, .zt-meta-line .zt-sep { color: #9AA39D; }
.zt-meta-line { margin: 0; font-size: 0.9375rem; color: var(--wp--preset--color--grijs); }
.zt-meta-line a { font-weight: 700; text-decoration: none; }
.zt-tile h3 { font-size: 1.5rem; }
.zt-footer .zt-footer__title { margin-bottom: 12px; }
.zt-wordmark__svg { height: 56px; }
.zt-seo-text .wp-block-post-content > h2:first-child { column-span: all; }
.zt-author:not(:has(.wp-block-post-author__name a, .wp-block-post-author__name:not(:empty))) { display: none; }
.zt-header .wp-block-search__button { display: inline-flex; align-items: center; }
.zt-header .wp-block-search__button svg { margin: 0; }
