/*
 * Koesterstoul – "Het lange licht"
 * Aanvulling op theme.json: kleuren en lettertypen staan daar (Weergave → Editor → Stijlen).
 * Selectors beginnen waar nodig met "body", zodat ze winnen van de algemene
 * blokafstanden van WordPress en ook in de editor werken.
 */

:root {
	--ks-kop: 64px;
	--ks-admin: var(--wp-admin--admin-bar--height, 0px);
	--ks-focus: var(--wp--preset--color--baksteen);
	--ks-tekst-donker: #E9E1D2;
}

html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }

/* Ankers (menu, QR-codes) vallen nooit onder de vaste kop. */
:where([id]) { scroll-margin-top: calc(var(--ks-kop) + var(--ks-admin) + 16px); }

/* Kop, inhoud en footer sluiten naadloos op elkaar aan (contactsectie en footer vormen één donker deel). */
body .wp-site-blocks > * { margin-block-start: 0; }

/* ---------- Focus en skiplink ---------- */
:where(a, button, summary, input, select, textarea, [tabindex]):focus-visible,
.wp-block-button__link:focus-visible,
.wp-block-navigation-item__content:focus-visible {
	outline: 2px solid var(--ks-focus);
	outline-offset: 2px;
	border-radius: 2px;
}
.ks-contact, .ks-voet, .has-turf-background-color { --ks-focus: var(--wp--preset--color--kaslicht); }
.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--turf);
	color: var(--wp--preset--color--kleiwit);
	font-size: 16px;
	padding: 14px 20px;
	border-radius: 999px;
	z-index: 100000;
}

/* ---------- Tekst ---------- */
body a:where(:not(.wp-element-button)) { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
body :is(h1, h2, h3) em, body .wp-block-heading em { color: var(--wp--preset--color--baksteen); font-style: italic; }
body .has-turf-background-color :is(h1, h2, h3) em { color: var(--wp--preset--color--kaslicht); }

body .is-style-bovenregel {
	font-size: 13px;
	line-height: 1.45;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--klei);
}
body .is-style-bovenregel + * { margin-block-start: 18px; }
body .wp-block-heading + * { margin-block-start: 28px; }

body .is-style-inleiding {
	font-family: var(--wp--preset--font-family--newsreader);
	font-style: italic;
	font-size: var(--wp--preset--font-size--inleiding);
	line-height: 1.35;
	color: var(--wp--preset--color--turf);
}
body .is-style-inleiding.ks-klein { font-size: 22px; }

body .is-style-citaat {
	font-family: var(--wp--preset--font-family--newsreader);
	font-style: italic;
	font-size: var(--wp--preset--font-size--citaat);
	line-height: 1.3;
	color: var(--wp--preset--color--turf);
}

body .is-style-gronings {
	font-family: var(--wp--preset--font-family--newsreader);
	font-style: italic;
	font-size: var(--wp--preset--font-size--opschrift);
	line-height: 1.08;
	color: var(--wp--preset--color--turf);
	font-variation-settings: "opsz" 48;
}
body .is-style-vertaling { color: var(--wp--preset--color--baksteen); font-size: 17px; }

body .is-style-meer-link a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	font-weight: 500;
	font-size: 17px;
}
body .is-style-meer-link a::after { content: "→"; content: "→" / ""; text-decoration: none; display: inline-block; }

/* Horizonlijn: kort, dun, Wad. */
body hr.is-style-horizon {
	width: 64px;
	max-width: 64px;
	height: 0;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--wad);
	background: none;
	opacity: 1;
	margin-block: 48px 0;
	margin-inline: auto;
}
body hr.is-style-horizon + * { margin-block-start: 40px; }

/* ---------- Knoppen ---------- */
body .wp-block-button__link {
	min-height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-decoration: none;
	transition: background-color .15s ease;
}
body .is-style-pijl-omlaag .wp-block-button__link::after { content: "↓"; content: "↓" / ""; }
body .is-style-kaslicht .wp-block-button__link {
	background: var(--wp--preset--color--kaslicht);
	color: var(--wp--preset--color--turf);
}
body .is-style-kaslicht .wp-block-button__link:hover { background: #F7EACB; color: var(--wp--preset--color--turf); }

/* ---------- Beelden ---------- */
body .wp-block-image img { border-radius: var(--wp--custom--radius--foto); }
body .wp-block-image.is-style-illustratie img { border-radius: 0; }
body .wp-block-image figcaption,
body .wp-element-caption { margin-top: 12px; margin-bottom: 0; font-size: 14px; line-height: 1.5; color: #5E544A; text-align: left; }
body .wp-block-image.is-style-portret img {
	width: 100%;
	max-height: 640px;
	object-fit: cover;
	object-position: 50% 30%;
}

/* ---------- Kop (sticky, max. 64 px) ---------- */
.ks-kop-wrap {
	position: sticky;
	top: var(--ks-admin);
	z-index: 50;
}
body .ks-kop { border-bottom: 1px solid var(--wp--preset--color--lijn); padding-block: 0; }
body .ks-kop__rij {
	min-height: calc(var(--ks-kop) - 1px);
	gap: 16px 40px;
}
body .ks-logo, body .ks-logo a { display: block; line-height: 0; }
body .ks-logo img { width: 160px; height: auto; border-radius: 0; }
body .ks-menu { font-size: 16px; }
body .ks-menu .wp-block-navigation__container { gap: 6px 28px; }
body .ks-menu .wp-block-navigation-item__content {
	color: var(--wp--preset--color--turf);
	text-decoration: none;
	padding-block: 10px;
}
body .ks-menu .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--baksteen); }
body .ks-menu .wp-block-navigation__responsive-container-open,
body .ks-menu .wp-block-navigation__responsive-container-close {
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	color: var(--wp--preset--color--turf);
}
body .ks-menu .wp-block-navigation__responsive-container-close { top: 10px; right: 14px; }
body .ks-menu .wp-block-navigation__responsive-container.is-menu-open { padding: 72px clamp(20px, 6vw, 40px) 40px; }
body .ks-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
body .ks-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: flex-start; gap: 4px; }
body .ks-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 28px;
	line-height: 1.2;
	padding-block: 10px;
}

/* Tot 900 px past het menu niet naast het logo: dan het hamburgermenu. */
@media (min-width: 600px) and (max-width: 899px) {
	body .ks-menu .wp-block-navigation__responsive-container-open:not(.always-shown) { display: inline-flex; }
	body .ks-menu .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	body .ks-menu .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: inline-flex; }
}
@media (max-width: 599px) {
	:root { --ks-kop: 60px; }
	body .ks-logo img { width: 138px; }
}

/* ---------- Secties ---------- */
body .ks-midden { text-align: center; }
body .ks-midden .wp-block-buttons { justify-content: center; }

/* Hero */
body .ks-hero__tekst .wp-block-heading { margin-block-start: 22px; }
body .ks-hero__tekst .wp-block-heading + * { margin-block-start: 28px; }
body .ks-hero__tekst .is-style-inleiding + * { margin-block-start: 14px; }
body .ks-hero__intro { max-width: 560px; }
body .ks-hero__tekst .wp-block-buttons { margin-block-start: 36px; }
body .ks-hero .ks-hero__beeld { margin-block: clamp(32px, 5vw, 56px) 0; }
body .ks-hero .ks-hero__beeld img { width: 100%; height: auto; }

/* Desktop: tekst links, de getekende stoelen kleiner ernaast. Op smallere schermen eronder. */
@media (min-width: 1000px) {
	body .ks-hero {
		display: grid;
		grid-template-columns: minmax(0, 11fr) minmax(0, 10fr);
		column-gap: clamp(32px, 4vw, 64px);
		align-items: center;
		padding-inline: max(var(--wp--style--root--padding-left, 40px), calc((100% - 1200px) / 2));
		padding-bottom: clamp(16px, 2vw, 32px) !important;
	}
	body .ks-hero > * { max-width: none; margin-inline: 0; }
	body .ks-hero .ks-hero__tekst .wp-block-heading { font-size: clamp(48px, 4.6vw, 68px); }
	body .ks-hero .ks-hero__beeld { margin: 0; }
	/* Lichte uitsnede (alleen de lege randen), met zacht verlopende zijkanten. */
	body .ks-hero .ks-hero__beeld img {
		aspect-ratio: 2 / 1;
		object-fit: cover;
		object-position: 50% 50%;
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
		mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
	}
}

/* Tekstsectie */
body .ks-tekstsectie p:not([class]) + p:not([class]) { margin-block-start: 20px; }

/* Twee kolommen */
body .ks-kolommen { gap: clamp(40px, 6vw, 96px); }
body .ks-tekstkolom { max-width: 560px; }
body .ks-locaties__kop { gap: clamp(40px, 6vw, 80px); margin-block-end: 56px; }
body .ks-locaties .ks-impressie { margin-block: 0 40px; }
body .ks-locaties .ks-impressie img { object-position: 50% 60%; }

/* Raster met kaarten */
body .ks-sectie-intro { margin-block-end: 64px; }
body .ks-kaarten { gap: 28px; }
body .ks-stoelen__verder { margin-block-start: 40px; }

/* ---------- Stoelkaart ---------- */
body .ks-stoelkaart {
	--ks-stip: var(--wp--preset--color--stoelgroen);
	--ks-kleur: "Groen";
	background: var(--wp--preset--color--kaartwit);
	border: 1px solid var(--wp--preset--color--lijn);
	border-radius: var(--wp--custom--radius--kaart);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
body .ks-stoelkaart.is-style-stoel-geel { --ks-stip: var(--wp--preset--color--stoelgeel); --ks-kleur: "Geel"; }
body .ks-stoelkaart > * { margin-block: 0; }
body .ks-stoelkaart .ks-stoelkaart__beeld { margin: 0; }
body .ks-stoelkaart .ks-stoelkaart__beeld img { display: block; width: 100%; height: auto; border-radius: 0; }
body .ks-stoelkaart .ks-stoelkaart__tekst { padding: 32px 36px 36px; flex: 1; }
body .ks-stoelkaart .ks-stoelkaart__tekst > * { margin-block: 0; }
body .ks-stoelkaart .ks-stoelkaart__tekst > .ks-stoelkaart__label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.4;
	margin-block-end: 22px;
}
/* Kleurstip met het woord Groen of Geel: volgt de gekozen blokstijl. */
body .ks-stoelkaart .ks-stoelkaart__label::after {
	content: var(--ks-kleur);
	flex: none;
	letter-spacing: 0;
	text-transform: none;
	padding-left: 20px;
	background: radial-gradient(circle at 6px 50%, var(--ks-stip) 0 5px, rgba(0, 0, 0, .18) 5px 6px, transparent 6.5px) no-repeat;
}
body .ks-stoelkaart .ks-stoelkaart__tekst > .is-style-gronings { margin-block-end: 10px; }
body .ks-stoelkaart .ks-stoelkaart__tekst > .is-style-vertaling { margin-block-end: 20px; }
body .ks-stoelkaart .ks-stoelkaart__toelichting { font-size: 17px; }

/* Na het scannen van de QR-code (alleen CSS). */
body .ks-stoelkaart .ks-qr-melding { display: none; }
body .ks-stoelkaart:target { border: 1.5px solid var(--wp--preset--color--baksteen); }
body .ks-stoelkaart:target .ks-qr-melding {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 22px;
	font-size: 14px;
	line-height: 1.4;
	color: #5E544A;
	border-bottom: 1px solid var(--wp--preset--color--lijn);
}
body .ks-stoelkaart:target .ks-qr-melding::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--baksteen);
	flex: none;
}

/* ---------- Locatiekaart ---------- */
body .ks-locatiekaart {
	background: var(--wp--preset--color--kaartwit);
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--kaart);
	padding: 32px 36px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	overflow: hidden;
}
body .ks-locatiekaart > * { margin-block: 0; max-width: 100%; }
body .ks-locatiekaart .ks-locatiekaart__foto { margin: -33px -37px 4px; max-width: none; width: calc(100% + 74px); }
body .ks-locatiekaart .ks-locatiekaart__foto img { border-radius: 0; width: 100%; }
body .ks-locatiekaart.is-style-locatie-onbekend { background: transparent; border: 1px dashed #A89D8B; }
body .ks-locatiekaart :is(p, a) { font-size: 17px; }
body .ks-locatiekaart .ks-locatiekaart__naam { margin-block-start: 6px; }
body .ks-locatiekaart .wp-block-heading + * { margin-block-start: 0; }
body .ks-locatiekaart .ks-status {
	font-size: 13px;
	line-height: 1.4;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 6px 12px;
	border-radius: 999px;
	color: var(--wp--preset--color--turf);
	background: var(--wp--preset--color--kaslicht);
	border: 1px solid transparent;
}
body .is-style-locatie-permanent .ks-status { background: var(--wp--preset--color--linnen); border-color: var(--wp--preset--color--lijn); }
body .is-style-locatie-onbekend .ks-status { background: transparent; border-color: #A89D8B; }

/* ---------- Wie zijn wij ---------- */
body .ks-over-ons .wp-block-image { margin: 0; }

/* ---------- Veelgestelde vragen ---------- */
body .ks-vragen { border-top: 1px solid var(--wp--preset--color--lijn); }
body .ks-vragen > .wp-block-heading + * { margin-block-start: 40px; }
body .ks-vragenlijst > * { margin-block: 0; }
body .wp-block-details.ks-vraag { border-bottom: 1px solid var(--wp--preset--color--lijn); }
body .ks-vraag > summary {
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	min-height: 44px;
	padding: 20px 0;
	font-size: 19px;
	line-height: 1.45;
	color: var(--wp--preset--color--turf);
	cursor: pointer;
}
body .ks-vraag > summary::-webkit-details-marker { display: none; }
body .ks-vraag > summary::marker { content: ""; }
body .ks-vraag > summary::after {
	content: "+";
	content: "+" / "";
	flex: none;
	font-size: 28px;
	line-height: 1;
	font-weight: 300;
	color: var(--wp--preset--color--baksteen);
}
body .ks-vraag[open] > summary::after { transform: rotate(45deg); }
body .ks-vraag > summary:hover { color: var(--wp--preset--color--baksteen); }
body .ks-vraag > :not(summary) { margin-block: 0 24px; max-width: 620px; }
body .ks-vraag > summary + * { margin-block-start: 0; }

/* ---------- Contact (de avond van de pagina) ---------- */
body .ks-contact { color: var(--ks-tekst-donker); }
body .ks-contact .is-style-bovenregel { color: #D9CFBD; }
body .ks-contact .wp-block-heading { color: var(--wp--preset--color--kleiwit); font-size: clamp(36px, 4.4vw, 52px); line-height: 1.1; }
body .ks-contact .ks-namen { color: var(--wp--preset--color--kleiwit); margin-block-start: 20px; }
body .ks-contact .wp-block-buttons { margin-block-start: 40px; }
body .ks-contact a:where(:not(.wp-element-button)) { color: var(--wp--preset--color--kaslicht); }

/* ---------- Footer ---------- */
body .ks-voet {
	border-top: 1px solid #4A4038;
	color: #D9CFBD;
	font-size: 15px;
	line-height: 1.6;
}
body .ks-voet__rij { gap: 28px 64px; }
body .ks-voet__merk > * { margin-block: 0; }
body .ks-voet .ks-voet__naam {
	font-family: var(--wp--preset--font-family--newsreader);
	font-style: italic;
	font-size: 24px;
	line-height: 1.3;
	color: var(--wp--preset--color--kleiwit);
	margin-block-end: 6px;
}
body .ks-voet__links { gap: 8px 28px; }
body .ks-voet__links > * { margin: 0; }
body .ks-voet a,
body .ks-voetmenu .wp-block-navigation-item__content {
	color: var(--wp--preset--color--kleiwit);
	text-decoration: underline;
	text-underline-offset: 0.2em;
	text-decoration-thickness: 1px;
}
body .ks-voet a:hover { color: var(--wp--preset--color--kaslicht); }
body .ks-voetmenu { font-size: 15px; }
body .ks-voetmenu .wp-block-navigation__container { gap: 8px 28px; }
body .ks-voetmenu .wp-block-navigation-item__content { display: inline-flex; align-items: center; min-height: 44px; }
body .ks-sociaal.is-style-logos-only .wp-social-link { color: var(--wp--preset--color--kleiwit) !important; }
body .ks-sociaal .wp-social-link a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Tekstpagina's (privacy) ---------- */
body .ks-tekstpagina { padding-bottom: var(--wp--preset--spacing--60); }
body .ks-tekstpagina h2 { font-size: 30px; margin-block-start: 48px; }
body .ks-concept { background: var(--wp--preset--color--kaslicht); color: var(--wp--preset--color--turf); padding: 12px 16px; border-radius: 6px; font-size: 16px; }

/* ---------- Telefoon ---------- */
@media (max-width: 600px) {
	body .ks-stoelkaart .ks-stoelkaart__tekst { padding: 24px 22px 26px; }
	body .ks-stoelkaart .ks-stoelkaart__tekst > .ks-stoelkaart__label { font-size: 12px; margin-block-end: 16px; }
	body .ks-locatiekaart { padding: 26px 22px; }
	body .ks-locatiekaart .ks-locatiekaart__foto { margin: -27px -23px 4px; width: calc(100% + 46px); }
	body .ks-hero__knoppen .wp-block-button,
	body .ks-contact__knoppen .wp-block-button { width: 100%; }
	body .ks-hero__knoppen .wp-block-button__link,
	body .ks-contact__knoppen .wp-block-button__link { width: 100%; }
	body .ks-sectie-intro { margin-block-end: 40px; }
	body .ks-voet__rij { flex-direction: column; align-items: flex-start !important; }
}

/* ---------- Beweging alleen als de bezoeker dat goed vindt ---------- */
@media (prefers-reduced-motion: no-preference) {
	/* Alleen vloeiend scrollen na een klik (focus in de pagina), niet bij binnenkomst via een QR-link. */
	html:focus-within { scroll-behavior: smooth; }
	body .ks-vraag > summary::after { transition: transform .2s ease; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
