:root {
	--p56-shadow-soft: 0 20px 50px rgba(25, 20, 14, 0.12);
	/* Ruimte voor vaste header; hero vult rest van eerste scherm */
	--p56-header-estimate: 4.25rem;
	--p56-menu-color: #1d1d1b;
}

body {
	letter-spacing: 0.01em;
}

/* Achtergrond: via theme.json (Stijlen > Kleuren > Achtergrond), niet hardcoded */
.wp-site-blocks {
	min-height: 100vh;
	background: transparent;
}

header.wp-block-template-part,
footer.wp-block-template-part,
main.wp-block-group {
	max-width: 100%;
	width: 100%;
	margin: 0;
	background: var(--wp--preset--color--canvas);
	box-shadow: none;
}

/* Transparante menubalk die over de hero ligt */
header.wp-block-template-part {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 50;
	background: transparent;
}

main.wp-block-group {
	padding-bottom: 0;
}

/* Voorkom horizontale scroll door full-bleed hero (100vw) */
main.p56-home {
	overflow-x: clip;
}

/* Op niet-home pagina's ruimte reserveren voor vaste header */
body:not(.home) main.wp-block-group {
	padding-top: var(--p56-header-estimate);
}

/* Geen paginatitel op homepage (blok zit soms in inhoud of template) */
main.p56-home .wp-block-post-title {
	display: none !important;
}

body.admin-bar {
	--p56-admin-bar: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar {
		--p56-admin-bar: 46px;
	}
}

body.admin-bar {
	--p56-header-estimate: calc(4.25rem + var(--p56-admin-bar, 0px));
}

.p56-header-shell {
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	transition: background-color 220ms ease, backdrop-filter 220ms ease, border-color 220ms ease;
}

body.p56-header-scrolled .p56-header-shell {
	background: rgba(240, 233, 223, 0.08);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.p56-mobile-nav {
	display: none !important;
}

.p56-desktop-nav {
	display: flex;
}

.p56-desktop-nav .wp-block-navigation {
	flex: 0 0 auto;
	width: auto;
	min-width: 0;
}

.p56-header-shell .wp-block-site-title a {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 1rem;
	text-decoration: none;
}

.p56-header-shell .wp-block-navigation .wp-block-navigation-item__label {
	letter-spacing: 0.08em;
	font-weight: 500;
}

.p56-header-shell .wp-block-navigation-item__content,
.p56-header-shell .wp-block-navigation-item__label,
.p56-header-shell .wp-block-navigation-submenu__toggle,
.p56-header-shell .wp-block-navigation__responsive-container-open {
	color: var(--p56-menu-color);
}

/* Hover underline op menu-items */
.p56-header-shell .wp-block-navigation-item__content {
	text-decoration: none;
	text-underline-offset: 0.26em;
	text-decoration-thickness: 1px;
}

.p56-header-shell .wp-block-navigation-item__content:hover,
.p56-header-shell .wp-block-navigation-item__content:focus-visible,
.p56-header-shell .wp-block-navigation-item__content:hover .wp-block-navigation-item__label,
.p56-header-shell .wp-block-navigation-item__content:focus-visible .wp-block-navigation-item__label {
	text-decoration: none;
	color: #a2b4c0 !important;
}

.p56-desktop-nav .wp-block-navigation__container {
	display: inline-flex;
	width: max-content;
	max-width: none;
	border-bottom: 2px solid rgba(29, 29, 27, 0.35);
	padding-bottom: 0.15rem;
	transition: border-color 220ms ease;
}

body.p56-header-scrolled .p56-desktop-nav .wp-block-navigation__container {
	border-bottom-color: rgba(240, 233, 223, 0.28);
}

/*
 * Navigatie: lettergrootte uit Site Editor / blok moet op alle menu-items landen.
 * Core zet soms grootte alleen op de wrapper; links/labels erven dan niet goed.
 */
.wp-block-navigation .wp-block-navigation-item__content,
.wp-block-navigation .wp-block-navigation-item__label,
.wp-block-navigation .wp-block-navigation-submenu__toggle,
.wp-block-navigation .wp-block-page-list__item__link {
	font-size: inherit;
	line-height: inherit;
}

.wp-block-navigation__responsive-container,
.wp-block-navigation__responsive-container-content {
	font-size: inherit;
}

.p56-home .wp-block-image img {
	display: block;
	width: 100%;
	object-fit: cover;
}

.p56-home .wp-block-image {
	margin: 0;
}

.p56-header-shell .custom-logo-link,
.p56-header-shell .wp-block-site-logo img {
	display: inline-block;
	transform-origin: center center;
	transition: transform 220ms ease;
}

body.p56-header-scrolled .p56-header-shell .custom-logo-link,
body.p56-header-scrolled .p56-header-shell .wp-block-site-logo img {
	transform: scale(0.28);
}

/* Beeldvullende hero: volle breedte + hoogte tot onderkant viewport (zoals PDF) */
.p56-hero-viewport {
	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding: 0 !important;
}

.p56-hero-viewport .p56-hero__media,
.p56-hero-viewport .wp-block-image {
	margin: 0;
	width: 100%;
	height: 100dvh;
	min-height: 100dvh;
	max-height: none;
}

.p56-hero-viewport .p56-hero__media img,
.p56-hero-viewport .wp-block-image img {
	width: 100%;
	height: 100%;
	min-height: 100dvh;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* Fallback browsers zonder dvh */
@supports not (height: 100dvh) {
	.p56-hero-viewport .p56-hero__media,
	.p56-hero-viewport .wp-block-image {
		height: 100vh;
		min-height: 100vh;
	}

	.p56-hero-viewport .p56-hero__media img,
	.p56-hero-viewport .wp-block-image img {
		min-height: 100vh;
	}
}

.p56-intro h2 {
	max-width: 620px;
	margin: 0 auto;
	font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
	font-weight: 400;
}

.p56-about h5,
.p56-services-row h5,
.p56-process h5 {
	font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.65rem;
	margin-bottom: 1rem;
}

.p56-about p,
.p56-services-row p,
.p56-process p {
	color: #413b36;
}

.p56-process {
	background: #ece5d9;
}

.p56-feature-image img {
	aspect-ratio: 16 / 7.1;
}

.p56-services-row {
	margin: 0 !important;
	background: #e8e3d8;
}

.p56-services-row > .wp-block-column:first-child img {
	height: 100%;
	min-height: 270px;
}

footer.wp-block-template-part {
	box-shadow: 0 20px 50px rgba(25, 20, 14, 0.08);
}

@media (max-width: 900px) {
	:root {
		--p56-header-estimate: 3.9rem;
	}

	header.wp-block-template-part,
	footer.wp-block-template-part,
	main.wp-block-group {
		box-shadow: none;
		max-width: 100%;
	}

	.p56-header-shell .wp-block-columns {
		gap: 0.6rem;
	}

	.p56-desktop-nav {
		display: flex !important;
		flex: 0 0 auto;
		width: auto;
		margin-right: auto;
	}

	/* Op mobiel alleen het midden-logo uit de desktop-rij tonen */
	.p56-desktop-nav > .wp-block-column:first-child,
	.p56-desktop-nav > .wp-block-column:last-child {
		display: none !important;
	}

	.p56-desktop-nav > .wp-block-column:nth-child(2) {
		display: flex !important;
		flex: 0 0 auto;
		align-items: center;
	}

	.p56-desktop-nav > .wp-block-column:nth-child(2) .wp-block-site-logo,
	.p56-desktop-nav > .wp-block-column:nth-child(2) .custom-logo-link {
		display: inline-flex !important;
		align-items: center;
	}

	.p56-desktop-nav > .wp-block-column:nth-child(2) .wp-block-site-logo img,
	.p56-desktop-nav > .wp-block-column:nth-child(2) .custom-logo-link img {
		display: block;
		width: auto;
		max-height: 44px;
		height: auto;
	}

	.p56-mobile-nav {
		display: flex !important;
		flex: 0 0 auto;
		width: auto;
		align-items: center;
		justify-content: flex-end;
		position: absolute;
		top: 0.8rem;
		right: 1.2rem;
		margin: 0;
		z-index: 80;
	}

	.p56-mobile-nav .wp-block-navigation {
		margin: 0 !important;
	}

	/*
	 * In de header nooit sitetitel-tekst op mobiel (sommige omgevingen hebben
	 * een gesynchroniseerde template met titel i.p.v. logo).
	 */
	header.wp-block-template-part .wp-block-site-title,
	header.wp-block-template-part .wp-block-site-title a {
		display: none !important;
	}

	/* Mobiel: logo komt uit .p56-desktop-nav (middenkolom), niet uit mobile-nav */
	.p56-mobile-nav .wp-block-site-logo,
	.p56-mobile-nav .custom-logo-link,
	.p56-mobile-nav > .wp-block-group:first-child {
		display: none !important;
	}

	.p56-mobile-nav > .wp-block-navigation {
		margin-left: auto;
		flex: 0 0 auto;
	}

	.p56-mobile-nav .wp-block-navigation__responsive-container-open {
		padding: 0.3rem 0.45rem;
		color: var(--p56-menu-color);
	}

	/* Mobiel menu: zelfde kleurtoon als desktop + grotere, gecentreerde items */
	.p56-mobile-nav .wp-block-navigation__responsive-container {
		position: fixed !important;
		inset: 0 !important;
		width: 100vw !important;
		height: 100dvh !important;
		min-height: 100dvh !important;
		max-height: none !important;
		padding: 1.2rem;
		background: rgba(240, 233, 223, 0.8);
		background: color-mix(in srgb, var(--wp--preset--color--canvas) 80%, transparent);
		color: var(--p56-menu-color);
	}

	.p56-mobile-nav .wp-block-navigation__responsive-close {
		position: relative;
	}

	.p56-mobile-nav .wp-block-navigation__responsive-container-close {
		position: fixed !important;
		top: max(0.8rem, env(safe-area-inset-top));
		right: max(2.4rem, env(safe-area-inset-right));
		width: 2.4rem;
		height: 2.4rem;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		border-radius: 9999px;
		background: rgba(255, 255, 255, 0.45);
		color: var(--p56-menu-color);
		z-index: 110000;
	}

	.p56-mobile-nav .wp-block-navigation__responsive-container-content {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: calc(100dvh - 2.4rem);
	}

	/* Overschrijf core: overlay gebruikt soms flex-start + rechts uitlijnen */
	.p56-mobile-nav
		.wp-block-navigation__responsive-container.is-menu-open
		.wp-block-navigation__responsive-container-content {
		justify-content: center !important;
		align-items: center !important;
	}

	.p56-mobile-nav .wp-block-navigation__container {
		width: 100%;
		max-width: 22rem;
		display: flex !important;
		flex-direction: column !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 1rem;
		margin: 0 auto;
		--navigation-layout-justify: center !important;
		--navigation-layout-justification-setting: center !important;
	}

	.p56-mobile-nav .wp-block-navigation-item {
		width: 100%;
		max-width: 100%;
		text-align: center;
		display: flex;
		justify-content: center;
		margin: 0;
	}

	.p56-mobile-nav .wp-block-navigation-item__content {
		display: inline-block;
		width: 100%;
		max-width: 100%;
		text-align: center;
		white-space: normal;
		font-size: 1.35rem !important;
		line-height: 1.4;
		padding: 0.85rem 0;
		margin: 0.35rem 0;
		color: var(--p56-menu-color);
	}

	.p56-mobile-nav .wp-block-navigation-item__label {
		white-space: normal;
		text-align: center;
	}

	/* Scroll-shrink niet toepassen op mobiel logo */
	body.p56-header-scrolled .p56-header-shell .wp-block-site-logo img,
	body.p56-header-scrolled .p56-header-shell .custom-logo-link img {
		transform: none !important;
	}

	.p56-services-row.is-not-stacked-on-mobile {
		flex-wrap: wrap !important;
	}

	.p56-services-row > .wp-block-column {
		flex-basis: 100% !important;
	}
}

/*
 * Defensief: kapotte "Globale stijlen" in WordPress (zoals op development.jkcp.nl)
 * overschrijven o.a. body naar forest, alle links naar XL, navigatie naar 10px/100.
 * Dit herstelt frontend-weergave; ruim de foutieve stijlen in WP liever ook op
 * (Weergave → Editor → Stijlen → reset / typografie links / navigatie).
 */
body:not(.block-editor-iframe__body) {
	background-color: transparent !important;
	background-image: var(
		--wp--preset--gradient--site-frame,
		radial-gradient(circle at 15% 10%, #6a5445 0%, #4a3a31 28%, #3a312c 60%, #332d29 100%)
	) !important;
	background-size: cover;
	background-attachment: fixed;
}

body:not(.block-editor-iframe__body)
	a:where(:not(.wp-element-button):not(.wp-block-button__link)) {
	font-size: inherit !important;
	text-decoration: none;
}

.p56-header-shell .wp-block-navigation,
.p56-mobile-nav .wp-block-navigation {
	font-size: var(--wp--preset--font-size--nav) !important;
	font-weight: 500 !important;
	font-style: normal !important;
}

.p56-header-shell .wp-block-navigation a,
.p56-mobile-nav .wp-block-navigation a {
	font-size: inherit !important;
}
