/*
Theme Name: De Laatste Bestemming
Theme URI: https://www.delaatstebestemming.nl
Author: De Laatste Bestemming
Author URI: https://www.delaatstebestemming.nl
Description: Ingetogen, waardig en warm block-thema (Full Site Editing) voor delaatstebestemming.nl — een Nederlandstalige gids over uitvaart, nalatenschap, de laatste levensfase en rouw. Self-hosted Lora & Source Sans 3, SEO- en E-E-A-T-gericht.
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 7.4
Version: 0.4.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dlb-theme
Tags: full-site-editing, block-styles, blog, custom-colors, custom-menu, editor-style, featured-images, threaded-comments, translation-ready
*/

/*
 * De meeste styling komt uit theme.json (design tokens, kleuren, typografie).
 * Hier alleen aanvullingen die theme.json niet (goed) kan uitdrukken.
 */

/* Papieren korrel: heel subtiel stippenraster over de crème-achtergrond.
   Ligt bovenop de theme.json-achtergrondkleur; transparante stippen laten
   die kleur zien. Bewust laag contrast (waardig, niet druk). */
body {
	background-image: radial-gradient(
		color-mix(in oklab, var(--wp--preset--color--contrast) 4%, transparent) 0.6px,
		transparent 0.6px
	);
	background-size: 5px 5px;
}

/* Toegankelijkheid: skip-link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	padding: 0.75em 1.25em;
	border-radius: 0 0 6px 0;
	text-decoration: none;
}
.skip-link:focus {
	left: 0;
}

/* Vloeiende afbeeldingen */
img,
.wp-block-image img {
	max-width: 100%;
	height: auto;
}

/* Onderschriften iets rustiger laten ademen */
figcaption.wp-element-caption {
	margin-top: 0.5rem;
	line-height: 1.5;
}

/* Nette focus-states voor toetsenbordnavigatie (YMYL = toegankelijkheid telt) */
:where(a, button, input, summary):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

/* =========================================================
   Herbruikbare patterns (dlb-*)
   ========================================================= */

/* Answer capsule — subtiele schaduw bovenop de inline tokens */
.dlb-answer-capsule {
	box-shadow: 0 1px 3px rgba(43, 42, 40, 0.06);
}
/* Inleiding bewust een stuk kleiner dan de standaard 'grote' tekst;
   het kader (rand + achtergrond) draagt de nadruk, niet de lettergrootte.
   !important overschrijft de preset-klasse .has-large-font-size. */
.dlb-answer-capsule p.has-large-font-size {
	font-size: 1.0625rem !important;
}

/* Footer-linklijsten — geen bullets; op de lichte (crème) footer. */
.dlb-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	line-height: 1.9;
	font-size: var(--wp--preset--font-size--small);
}
.dlb-footer-links a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}
.dlb-footer-links a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Lichte footer (crème) — leaf + serif tagline, ingetogen kolommen. */
.dlb-footer-leaf {
	display: inline-flex;
	color: var(--wp--preset--color--primary);
	margin-bottom: 0.75rem;
}
.dlb-footer-leaf svg {
	width: 1.5rem;
	height: 1.5rem;
}
.dlb-footer-lead {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.5rem;
	line-height: 1.4;
	max-width: 28rem;
	color: var(--wp--preset--color--contrast);
}
.dlb-footer-text {
	color: var(--wp--preset--color--muted-foreground);
}

/* Infographics (inline SVG) — schaalbaar, op-merk */
.dlb-figure {
	margin: var(--wp--preset--spacing--40) 0;
	text-align: center;
}
.dlb-figure svg {
	width: 100%;
	max-width: 720px;
	height: auto;
}
.dlb-figure figcaption {
	margin-top: 0.5rem;
}

/* Bronnen-verantwoording onder pillar-content — ingetogen */
.dlb-bronnen {
	color: var(--wp--preset--color--muted-foreground);
	border-left: 3px solid var(--wp--preset--color--sage);
	padding-left: 1rem;
}
.dlb-bronnen a {
	color: var(--wp--preset--color--accent);
}

/* Lees ook / Meer lezen — interne-link-kader (hub-and-spoke) */
.dlb-related {
	margin: var(--wp--preset--spacing--50) 0;
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50);
	background-color: var(--wp--preset--color--muted);
	border-radius: 10px;
}
.dlb-related h2 {
	margin-top: 0;
	font-size: 1.25rem;
}
.dlb-related ul {
	margin-bottom: 0;
}
.dlb-related a {
	color: var(--wp--preset--color--accent);
}

/* Broodkruimels — ingetogen, terra-links */
.dlb-breadcrumbs {
	color: var(--wp--preset--color--muted-foreground);
}
.dlb-breadcrumbs a {
	color: var(--wp--preset--color--accent);
	text-decoration: none;
}
.dlb-breadcrumbs a:hover {
	text-decoration: underline;
}
.dlb-breadcrumbs .separator {
	margin: 0 0.4em;
	opacity: 0.6;
}

/* FAQ-accordeon (core/details) */
.dlb-faq .wp-block-details {
	background: var(--wp--preset--color--base-2);
	border: 1px solid var(--wp--preset--color--sage);
	border-radius: 8px;
	padding: 1rem 1.25rem;
}
.dlb-faq .wp-block-details > summary {
	cursor: pointer;
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	font-size: 1.1875rem;
	color: var(--wp--preset--color--primary);
	list-style: none;
}
.dlb-faq .wp-block-details > summary::-webkit-details-marker {
	display: none;
}
.dlb-faq .wp-block-details > summary::after {
	content: "+";
	float: right;
	margin-left: 1rem;
	font-weight: 400;
	color: var(--wp--preset--color--accent);
}
.dlb-faq .wp-block-details[open] > summary::after {
	content: "–";
}
.dlb-faq .wp-block-details[open] > summary {
	margin-bottom: 0.5rem;
}

/* Kostentabel — responsive (scrollbaar op smal scherm) en leesbaar */
.dlb-kostentabel {
	overflow-x: auto;
}
.dlb-kostentabel table {
	border-collapse: collapse;
	width: 100%;
}
.dlb-kostentabel th,
.dlb-kostentabel td {
	padding: 0.6rem 0.85rem;
	text-align: left;
	border-bottom: 1px solid var(--wp--preset--color--sage);
	vertical-align: top;
}
.dlb-kostentabel thead th {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--base);
	font-family: var(--wp--preset--font-family--heading);
}
.dlb-kostentabel tbody th[scope="row"] {
	font-weight: 600;
	color: var(--wp--preset--color--primary);
}
.dlb-kostentabel.is-style-stripes tbody tr:nth-child(odd) {
	background: rgba(122, 141, 123, 0.10);
}

/* Checklist met vinkjes */
.dlb-checklist {
	list-style: none;
	padding-left: 0;
}
.dlb-checklist li {
	position: relative;
	padding-left: 1.9rem;
	margin-bottom: 0.5rem;
}
.dlb-checklist li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--wp--preset--color--primary);
	font-weight: 700;
}

/* Checklist-CTA kader */
.dlb-checklist-cta {
	box-shadow: 0 2px 8px rgba(43, 42, 40, 0.08);
}

/* =========================================================
   Homepage-vormgeving (hero, situatiekaarten, tools, uitgelicht)
   ========================================================= */

/* Eyebrow — klein, gespatieerd label boven een sectiekop */
.dlb-eyebrow {
	display: inline-block;
	margin: 0 0 0.75rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

/* Ronde icoon-badge met inline SVG */
.dlb-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 999px;
	background: var(--wp--preset--color--muted);
	color: var(--wp--preset--color--primary);
	flex-shrink: 0;
}
.dlb-icon-badge svg {
	width: 1.35rem;
	height: 1.35rem;
}

/* Situatiekaarten als één verbonden raster: de 1px-tussenruimte toont de
   randkleur als haarlijn; de buitenrand + radius maken er één geheel van. */
.dlb-path-grid {
	background: var(--wp--preset--color--sage);
	border: 1px solid var(--wp--preset--color--sage);
	border-radius: 16px;
	overflow: hidden;
	/* Vaste kolomtelling i.p.v. WP's auto-fill (dat liet bij brede schermen
	   een leeg 5e vak ontstaan). Reflowt 1 → 2 → 4 zoals de export. */
	grid-template-columns: 1fr !important;
}
@media (min-width: 600px) {
	.dlb-path-grid {
		grid-template-columns: 1fr 1fr !important;
	}
}
@media (min-width: 900px) {
	.dlb-path-grid {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}
.dlb-path-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 18rem;
	background: var(--wp--preset--color--base-2);
	padding: var(--wp--preset--spacing--40);
	transition: background-color 0.2s ease;
}
.dlb-path-card:hover {
	background: var(--wp--preset--color--muted);
}
/* Categorie-label rechtsboven in een kaart */
.dlb-card-label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}
/* Pijl onderaan een kaart, tegen de bodem en links uitgelijnd.
   WP's constrained layout centreert smalle kinderen met
   margin-inline:auto !important; daarom hier expliciet overschrijven. */
.dlb-card-arrow {
	margin-top: auto;
	font-size: var(--wp--preset--font-size--large);
}
.dlb-card-arrow,
.dlb-article-card .wp-block-read-more {
	margin-left: 0 !important;
	margin-right: auto !important;
}
.dlb-card-arrow a {
	display: inline-block;
	text-decoration: none;
	transition: transform 0.2s ease;
}
.dlb-path-card:hover .dlb-card-arrow a {
	transform: translateX(4px);
}

/* Hero-titel groter en strakker dan de standaard 'huge' — zoals de export. */
h1.dlb-hero-title {
	font-size: clamp(2.75rem, 5vw, 4.5rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
}

/* Hero — boogvormig beeld met overlappend quote-kaartje */
.dlb-hero-media {
	position: relative;
	max-width: 30rem;
	margin-inline: auto;
}
/* Decoratieve ring die linksboven achter het beeld uit piept */
.dlb-hero-ring {
	position: absolute;
	top: -2.5rem;
	left: -2.5rem;
	width: 10rem;
	height: 10rem;
	border-radius: 999px;
	border: 1px solid color-mix(in oklab, var(--wp--preset--color--accent) 45%, transparent);
	pointer-events: none;
}
.dlb-hero-media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 180px 180px 16px 16px;
}
.dlb-hero-quote {
	position: absolute;
	left: -1.25rem;
	bottom: 2.5rem;
	max-width: 14rem;
	margin: 0;
	background: var(--wp--preset--color--accent-light);
	color: var(--wp--preset--color--contrast);
	border-radius: 14px;
	padding: 1rem 1.25rem;
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
	box-shadow: 0 8px 24px rgba(43, 42, 40, 0.1);
}

/* Grote zoekbalk in de hero */
.dlb-hero-search .wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--sage);
	border-radius: 999px;
	background: var(--wp--preset--color--base-2);
	padding: 0.35rem 0.35rem 0.35rem 1.25rem;
	box-shadow: 0 4px 16px rgba(43, 42, 40, 0.05);
}
.dlb-hero-search .wp-block-search__input {
	border: 0;
	background: transparent;
	padding: 0.6rem 0;
}
.dlb-hero-search .wp-block-search__input:focus {
	outline: none;
}
/* Zoekknop rustig houden: een ingetogen icoon i.p.v. een terra-blok,
   maar wel een werkende submit. */
.dlb-hero-search .wp-block-search__button {
	background: transparent;
	color: var(--wp--preset--color--muted-foreground);
	border: 0;
	min-width: 0;
	padding: 0.5rem 0.85rem;
	transition: color 0.2s ease;
}
.dlb-hero-search .wp-block-search__button:hover {
	background: transparent;
	color: var(--wp--preset--color--primary);
}
.dlb-hero-search .wp-block-search__button svg {
	fill: currentColor;
}

/* Kaart op de groene tools-strook: omrand i.p.v. gevuld, met een lichte
   vulling bij hover. Witwaarden via color-mix op het wit-token. */
.dlb-tool-card {
	background: transparent;
	border: 1px solid color-mix(in oklab, var(--wp--preset--color--base-2) 25%, transparent);
	border-radius: 16px;
	padding: var(--wp--preset--spacing--40);
	transition: background-color 0.2s ease;
}
.dlb-tool-card:hover {
	background: color-mix(in oklab, var(--wp--preset--color--base-2) 8%, transparent);
}
.dlb-tool-card .dlb-icon-badge {
	background: color-mix(in oklab, var(--wp--preset--color--base-2) 15%, transparent);
	color: var(--wp--preset--color--base-2);
}
/* Lange titels (bijv. "Begrippenlijst") netjes op lettergrepen afbreken
   op smalle kaarten i.p.v. een lelijke breuk middenin het woord. */
.dlb-tool-card h3 {
	hyphens: auto;
	-webkit-hyphens: auto;
}

/* Redactionele kaart (uitgelichte artikelen, zonder afbeelding) —
   de haarlijn bovenaan kleurt warm (terra) zodra je over de kaart hovert. */
.dlb-article-card {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--wp--preset--color--sage);
	padding-top: var(--wp--preset--spacing--30);
	transition: border-color 0.2s ease;
}
.dlb-article-card:hover {
	border-top-color: var(--wp--preset--color--accent);
}
.dlb-article-card .wp-block-read-more {
	text-underline-offset: 4px;
}
.dlb-article-card .dlb-article-meta-row {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

/* Sticky site-header met zachte blur — blijft rustig bovenin staan.
   Doorschijnende crème-achtergrond zodat de inhoud er subtiel doorheen schemert. */
.dlb-site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: color-mix(in oklab, var(--wp--preset--color--base) 95%, transparent);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

/* Logo-blok in de header: icoon-badge + titel + tagline */
.dlb-logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
}
.dlb-logo .dlb-logo-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.dlb-logo .dlb-logo-title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 500;
	font-size: 1.125rem;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}
.dlb-logo .dlb-logo-tagline {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

/* Hero op smal scherm: quote onder het beeld i.p.v. overlappend;
   ring verbergen (decoratief, voorkomt horizontaal scrollen). */
@media (max-width: 781px) {
	.dlb-hero-quote {
		position: static;
		left: 0;
		bottom: 0;
		max-width: none;
		margin-top: 1rem;
	}
	.dlb-hero-ring {
		display: none;
	}
}

/* =========================================================
   Artikel-view: tools, inhoudsopgave, voorlezen, print
   ========================================================= */

/* Leestekst iets ruimer dan de standaard body: prettiger voor lange artikelen. */
#dlb-article-content {
	font-size: 1.0625rem;
	line-height: 1.8;
}

/* Optionele openingsalinea (serif, salie) — voeg de klasse toe aan de eerste
   paragraaf van een artikel voor een rustige, literaire intro. */
.dlb-article-lede {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
	color: var(--wp--preset--color--primary);
}

/* Meta- en tools-balk onder de titel */
.dlb-article-meta {
	color: var(--wp--preset--color--contrast);
}
.dlb-article-meta .dlb-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}
.dlb-article-meta svg {
	width: 1em;
	height: 1em;
	flex-shrink: 0;
}

/* Knoppen (voorlezen, bewaren, print) */
.dlb-article-tools {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.dlb-tool-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.9rem;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	line-height: 1;
	color: var(--wp--preset--color--contrast);
	background: var(--wp--preset--color--base-2);
	border: 1px solid var(--wp--preset--color--sage);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.dlb-tool-btn:hover {
	background: var(--wp--preset--color--muted);
}
.dlb-tool-btn svg {
	width: 1.05em;
	height: 1.05em;
	flex-shrink: 0;
}
.dlb-tool-btn--icon {
	padding: 0.5rem;
}
.dlb-tool-btn.is-saved,
.dlb-tool-btn[aria-pressed="true"] {
	background: var(--wp--preset--color--accent-light);
	border-color: var(--wp--preset--color--accent);
}

/* Voorlees-banner */
.dlb-read-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: var(--wp--preset--color--muted);
	border-radius: 8px;
	padding: 0.75rem 1rem;
	font-size: var(--wp--preset--font-size--small);
}
.dlb-read-banner[hidden] {
	display: none;
}
.dlb-read-banner svg {
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
}
.dlb-read-banner .dlb-read-text {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}
.dlb-read-banner button {
	background: none;
	border: 0;
	padding: 0;
	color: var(--wp--preset--color--primary);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

/* Inhoudsopgave (zwevend op desktop) */
.dlb-toc[hidden] {
	display: none;
}
.dlb-toc-title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--contrast);
	margin: 0 0 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--wp--preset--color--sage);
}
.dlb-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}
.dlb-toc-list li {
	margin: 0 0 0.6rem;
}
.dlb-toc-sub {
	padding-left: 0.9rem;
}
.dlb-toc-list a {
	display: block;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	border-left: 2px solid transparent;
	padding-left: 0.6rem;
	margin-left: -0.6rem;
}
.dlb-toc-list a:hover {
	color: var(--wp--preset--color--accent);
}
.dlb-toc-list a.is-active {
	color: var(--wp--preset--color--accent);
	border-left-color: var(--wp--preset--color--accent);
	font-weight: 600;
}
@media (min-width: 782px) {
	.dlb-toc {
		position: sticky;
		top: 2rem;
	}
}

/* Auteursbox (E-E-A-T) onderaan een artikel */
.dlb-author-box .wp-block-post-author__name {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--contrast);
}
.dlb-author-box .wp-block-post-author__bio {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--contrast);
	margin-top: 0.5rem;
}
.dlb-author-box .wp-block-post-author__avatar img {
	border-radius: 999px;
}

/* Auteursoverzicht — kop met ronde foto en ingetogen titel */
.dlb-author-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: var(--wp--preset--spacing--40);
	margin-bottom: var(--wp--preset--spacing--50);
}
.dlb-author-photo {
	flex: 0 0 auto;
	width: 150px;
	height: 150px;
	margin: 0;
	border-radius: 999px;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--sage);
}
.dlb-author-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.dlb-author-header > .wp-block-group {
	flex: 1 1 16rem;
}
.dlb-author-header .wp-block-query-title {
	margin: 0;
}
.dlb-author-bio {
	margin-top: 0.75rem;
	max-width: 46rem;
	white-space: pre-line;
	color: var(--wp--preset--color--muted-foreground);
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.7;
}

/* Print: focus op de tekst, verberg UI en navigatie */
@media print {
	.no-print {
		display: none !important;
	}
	body {
		background: #fff;
	}
	.dlb-toc,
	.dlb-article-tools,
	.dlb-read-banner {
		display: none !important;
	}
	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 0.8em;
		color: #555;
	}
}
