/*
Theme Name: Zonderstorting
Theme URI: https://zonderstorting.nl
Author: Zonderstorting
Description: Block theme voor zonderstorting.nl — wit canvas, één rode knop, koppen in gewicht 900, gekantelde kaarten. Naar de refero.design-stijl "Pinterest".
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Version: 0.4.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zonderstorting
*/

/* ---------- Basis ---------- */
html {
	scroll-behavior: smooth;
}
body {
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "ss01";
}
strong,
b {
	font-weight: 700;
}
::selection {
	background: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--contrast);
}

/* ---------- Logo: inline SVG uit patterns/logo.php ---------- */
.logo {
	display: inline-block;
	line-height: 0;
	color: var(--wp--preset--color--contrast);
}
.logo__svg {
	display: block;
	height: 40px;
	width: auto;
}
.site-footer .logo {
	color: var(--wp--preset--color--white);
}
.site-footer .logo__svg {
	height: 44px;
}

/* ---------- Header: wit, 64px, plakt, geen schaduw ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--surface);
	min-height: 64px;
}
.site-header .wp-block-navigation {
	flex: 1;
	justify-content: center;
}
.site-header .wp-block-navigation-item {
	white-space: nowrap;
}
.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close {
	padding: 0.5rem;
	border-radius: var(--wp--custom--radius--knop);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	background: transparent;
	color: var(--wp--preset--color--white);
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1rem;
}
.site-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
}
.site-header .header-cta {
	flex-shrink: 0;
}
.site-header .header-cta .wp-block-button__link {
	padding-top: 0.6rem;
	padding-bottom: 0.6rem;
	white-space: nowrap;
}
@media (max-width: 599px) {
	.site-header > .alignwide {
		gap: 0.75rem;
	}
	.site-header .logo__svg {
		height: 36px;
	}
	.site-header .header-cta .wp-block-button__link {
		padding: 0.5rem 0.85rem;
		font-size: var(--wp--preset--font-size--small);
		border-radius: 12px;
	}
}

/* Gekantelde tegels steken buiten hun vak; geen horizontale scroll daardoor. */
main.wp-block-group {
	overflow-x: clip;
}

/* ---------- Koppen ---------- */
h1.wp-block-post-title,
.wp-block-query-title {
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 900;
	line-height: 1.05;
	letter-spacing: -0.037em;
}
/* De hero-kop: 70px, tweede regel in lavendel cursief (het handelsmerk van de stijl). */
.is-display,
h1.is-display,
.wp-block-post-title.is-display {
	font-size: var(--wp--preset--font-size--display);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.037em;
}
.kop-accent {
	color: var(--wp--preset--color--lavender);
	font-style: italic;
	font-weight: 900;
}
.kicker {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	color: var(--wp--preset--color--muted);
}

/* ---------- Sectiekop: titel links, link rechts ---------- */
.section-title {
	gap: 1rem;
}
.section-title .section-link a {
	display: inline-block;
	padding: 0.6rem 1.1rem;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--knop);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}
.section-title .section-link a:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
}

/* ---------- Knoppen ---------- */
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button__link.is-style-outline {
	background: transparent;
	border: 1px solid var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast);
	padding-top: calc(0.75rem - 1px);
	padding-bottom: calc(0.75rem - 1px);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
}
.wp-block-button.is-small .wp-block-button__link {
	padding: 0.5rem 0.9rem;
	font-size: var(--wp--preset--font-size--small);
	border-radius: 12px;
}
.wp-block-read-more {
	display: inline-block;
	padding: 0.6rem 1.1rem;
	border: 1px solid var(--wp--preset--color--contrast);
	border-radius: var(--wp--custom--radius--knop);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}
.wp-block-read-more:hover {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
}

/* ---------- Hero: kop links, gekantelde stapel rechts ---------- */
.hero {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
	align-items: center;
}
@media (max-width: 899px) {
	.hero {
		grid-template-columns: 1fr;
	}
}
.hero__tekst > * + * {
	margin-top: var(--wp--preset--spacing--40);
}
.hero__tekst .wp-block-buttons {
	margin-top: var(--wp--preset--spacing--50);
}
.definitie {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	max-width: 34rem;
}
/* In de tekstkolom van een pagina is de kolom zelf al smal; anders centreert de constrained layout de alinea. */
.wp-block-post-content .definitie {
	max-width: none;
}

/* De stapel: drie tegels van 32px radius, ±6° en ±12° gekanteld, overlappend. Geen schaduw. */
.stapel {
	position: relative;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: center;
	padding: 2.5rem 1rem;
	list-style: none;
	margin: 0;
}
.stapel__kaart {
	aspect-ratio: 4 / 5;
	border-radius: var(--wp--custom--radius--beeld);
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transform: rotate(-8deg) translateY(1.5rem);
	transition: transform 0.2s ease;
}
.stapel__kaart:nth-child(2) {
	transform: rotate(6deg) translateY(-1rem) scale(1.08);
	z-index: 2;
}
.stapel__kaart:nth-child(3) {
	transform: rotate(-12deg) translateY(1.75rem);
}
.stapel__kaart:hover {
	transform: rotate(0) scale(1.06);
	z-index: 3;
}
.stapel__kaart--lavender {
	background: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--white);
}
.stapel__kaart--coral {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--white);
}
.stapel__kaart--yellow {
	background: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--contrast);
}
.stapel__kaart--ink {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
}
.stapel__merk {
	font-weight: 900;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.1;
	letter-spacing: -0.037em;
}
.stapel__bonus {
	font-weight: 700;
	font-size: clamp(1.25rem, 2.2vw, 1.75rem);
	line-height: 1.1;
	letter-spacing: -0.037em;
}
.stapel__label {
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	opacity: 0.8;
}
@media (max-width: 899px) {
	.stapel {
		padding: 1.5rem 0.5rem 0.5rem;
		gap: 0;
	}
	.stapel__kaart {
		padding: 0.9rem;
		border-radius: var(--wp--custom--radius--kaart);
	}
	.stapel__kaart:nth-child(2) {
		transform: rotate(6deg) translateY(-0.75rem) scale(1.04);
	}
	.stapel__merk {
		font-size: var(--wp--preset--font-size--medium);
	}
}

/* ---------- Panelen en banden ---------- */
.paneel {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--paneel);
	padding: clamp(1.5rem, 4vw, 3rem);
}
.paneel--geel {
	background: var(--wp--preset--color--yellow);
}
.paneel--wit {
	background: var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius--kaart);
	padding: var(--wp--preset--spacing--40);
}
.band {
	background: var(--wp--preset--color--surface);
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
}
.band--ink {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
}
.band--ink a {
	color: var(--wp--preset--color--white);
}
.band--ink .kop-accent {
	color: var(--wp--preset--color--yellow);
}

/* ---------- Tabellen: scrollende wrapper, 20px radius, donkere kopregel ---------- */
.wp-block-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.wp-block-table table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
	min-width: 40rem;
	border: 1px solid var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--radius--kaart);
	font-size: var(--wp--preset--font-size--medium);
	font-variant-numeric: tabular-nums;
}
/* Ronde hoeken per hoekcel: zo hoeft de tabel geen overflow te knippen en blijft sticky werken. */
.wp-block-table thead th:first-child,
.wp-block-table tbody:first-child tr:first-child td:first-child {
	border-top-left-radius: calc(var(--wp--custom--radius--kaart) - 1px);
}
.wp-block-table thead th:last-child,
.wp-block-table tbody:first-child tr:first-child td:last-child {
	border-top-right-radius: calc(var(--wp--custom--radius--kaart) - 1px);
}
.wp-block-table tbody tr:last-child td:first-child {
	border-bottom-left-radius: calc(var(--wp--custom--radius--kaart) - 1px);
}
.wp-block-table tbody tr:last-child td:last-child {
	border-bottom-right-radius: calc(var(--wp--custom--radius--kaart) - 1px);
}
/* Op smalle schermen plakt de knopkolom rechts, zodat de CTA zichtbaar blijft tijdens het scrollen. */
@media (max-width: 899px) {
	.wp-block-table:not(.is-style-compact) td:last-child,
	.wp-block-table:not(.is-style-compact) th:last-child {
		position: sticky;
		right: 0;
		background: var(--wp--preset--color--base);
		border-left: 1px solid var(--wp--preset--color--surface);
	}
	.wp-block-table:not(.is-style-compact) thead th:last-child {
		background: var(--wp--preset--color--contrast);
		border-left-color: var(--wp--preset--color--contrast);
	}
}
.wp-block-table th,
.wp-block-table td {
	padding: 0.9rem 1rem;
	border: 0;
	border-top: 1px solid var(--wp--preset--color--surface);
	text-align: left;
	vertical-align: middle;
}
.wp-block-table thead th {
	border-top: 0;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0;
}
.wp-block-table tbody tr:first-child td {
	border-top: 0;
}
.wp-block-table tbody th,
.wp-block-table td:first-child {
	font-weight: 700;
}
.wp-block-table tbody tr:hover td {
	background: #faf9f6;
}
.wp-block-table td .wp-element-button,
.wp-block-table td .knop {
	display: inline-block;
	white-space: nowrap;
	padding: 0.5rem 0.9rem;
	border-radius: 12px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}
.wp-block-table td .knop:hover {
	background: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--white);
}
.wp-block-table figcaption {
	margin-top: 0.75rem;
	text-align: left;
}
/* Kleine tabellen (voorwaarden) hoeven niet te scrollen. */
.wp-block-table.is-style-compact table {
	min-width: 0;
}

/* ---------- Chips (doelgroep, type, status) ---------- */
.chip {
	display: inline-block;
	padding: 0.3em 0.85em;
	border-radius: var(--wp--custom--radius--pil);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	white-space: nowrap;
}
.chip--coral {
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--white);
}
.chip--lavender {
	background: var(--wp--preset--color--lavender);
	color: var(--wp--preset--color--white);
}
.chip--yellow {
	background: var(--wp--preset--color--yellow);
	color: var(--wp--preset--color--contrast);
}
.chip--ink {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
}
.chip--muted {
	background: transparent;
	border: 1px solid var(--wp--preset--color--border);
	color: var(--wp--preset--color--muted);
}

/* ---------- 24+ ---------- */
.leeftijd {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 900;
	letter-spacing: -0.02em;
	flex-shrink: 0;
}
.speel-bewust {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	align-items: flex-start;
}
.speel-bewust p {
	margin: 0;
}
.speel-bewust p + p {
	margin-top: 0.5rem;
}

/* ---------- Stappen ---------- */
.stappen {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	gap: var(--wp--preset--spacing--40);
	counter-reset: stap;
}
.stappen li {
	counter-increment: stap;
	background: var(--wp--preset--color--base);
	border-radius: var(--wp--custom--radius--kaart);
	padding: var(--wp--preset--spacing--40);
}
.stappen li::before {
	content: counter(stap);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	margin-bottom: 0.75rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font-weight: 900;
}
.stappen strong {
	display: block;
	font-size: var(--wp--preset--font-size--large);
	letter-spacing: -0.037em;
	margin-bottom: 0.25rem;
}

/* ---------- FAQ (details-blok) ---------- */
.wp-block-details {
	border-top: 1px solid var(--wp--preset--color--surface);
	padding: 1rem 0;
	margin: 0;
}
.wp-block-details:last-of-type {
	border-bottom: 1px solid var(--wp--preset--color--surface);
}
.wp-block-details summary {
	cursor: pointer;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	letter-spacing: -0.037em;
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: center;
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
.wp-block-details summary::after {
	content: "+";
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--wp--preset--color--surface);
	font-weight: 700;
}
.wp-block-details[open] summary::after {
	content: "–";
}
.wp-block-details > :not(summary) {
	margin-top: 0.75rem;
	color: var(--wp--preset--color--contrast);
}

/* ---------- Feed / actielijst ---------- */
.acties {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wp--preset--color--surface);
}
.actie {
	display: grid;
	grid-template-columns: 9rem minmax(0, 1fr) auto auto;
	gap: 1rem;
	align-items: center;
	padding: 1rem 0;
	border-bottom: 1px solid var(--wp--preset--color--surface);
}
.actie__merk {
	font-weight: 900;
	letter-spacing: -0.037em;
	font-size: var(--wp--preset--font-size--large);
}
.actie__tekst {
	margin: 0;
}
.actie__meta {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	flex-wrap: wrap;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.actie .knop {
	display: inline-block;
	white-space: nowrap;
	padding: 0.5rem 0.9rem;
	border-radius: 12px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
}
.actie .knop:hover {
	background: var(--wp--preset--color--primary-dark);
}
.actie--verlopen {
	color: var(--wp--preset--color--muted);
}
.actie--verlopen .actie__merk {
	font-weight: 600;
}
@media (max-width: 699px) {
	.actie {
		grid-template-columns: minmax(0, 1fr) auto;
	}
	.actie__merk {
		grid-column: 1 / -1;
	}
}

/* ---------- Merkpagina ---------- */
.merk-hero {
	display: flex;
	gap: var(--wp--preset--spacing--40);
	align-items: center;
	flex-wrap: wrap;
}
.merk-hero .wp-block-post-featured-image {
	width: 6rem;
	height: 6rem;
	flex-shrink: 0;
	border-radius: var(--wp--custom--radius--kaart);
	overflow: hidden;
	background: var(--wp--preset--color--surface);
}
.merk-hero .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 0.75rem;
}
.merk-hero__tekst {
	flex: 1;
	min-width: 16rem;
}
.merk-hero__tekst > * {
	margin: 0;
}
.merk-hero__tekst > * + * {
	margin-top: 0.5rem;
}

/* ---------- Kaarten in lijsten ---------- */
.post-card {
	border-radius: var(--wp--custom--radius--kaart);
}
.wp-block-post-featured-image {
	overflow: hidden;
	border-radius: var(--wp--custom--radius--kaart);
}
.wp-block-post-featured-image img {
	border-radius: inherit;
}
.wp-block-post-template.is-layout-flow > .wp-block-post + .wp-block-post {
	border-top: 1px solid var(--wp--preset--color--surface);
	padding-top: var(--wp--preset--spacing--40);
}

/* ---------- Zoeken: pil, linnen, geen rand ---------- */
.wp-block-search__inside-wrapper {
	border: 1px solid transparent;
	border-radius: var(--wp--custom--radius--knop);
	background: var(--wp--preset--color--surface);
	overflow: hidden;
}
.wp-block-search__inside-wrapper:focus-within {
	background: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--border);
}
.wp-block-search__input {
	border: 0;
	background: transparent;
	padding: 0.7rem 1rem;
}
.wp-block-search__input:focus {
	outline: none;
}
.wp-block-search__button {
	border: 0;
	margin: 0;
	background: transparent;
	color: var(--wp--preset--color--contrast);
	padding: 0 0.9rem;
}

/* ---------- Footer: inktpruim, wit ---------- */
.site-footer {
	margin-top: var(--wp--preset--spacing--70);
}
.site-footer a {
	color: var(--wp--preset--color--white);
}
.site-footer a:hover {
	color: var(--wp--preset--color--yellow);
}
.site-footer .is-style-plain {
	list-style: none;
	padding-left: 0;
}
.site-footer .is-style-plain li {
	margin-bottom: 0.5rem;
}
.site-footer .is-style-plain a {
	text-decoration: none;
}
.site-footer .is-style-plain a:hover {
	text-decoration: underline;
}
.site-footer .leeftijd {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
}

/* ---------- Formulieren ---------- */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--custom--radius--knop);
	padding: 0.7rem 1rem;
	font: inherit;
}

/* ---------- Verlopen acties: ingeklapt logje ---------- */
.log {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.log li + li {
	margin-top: 0.35rem;
}
