/*
Theme Name: van de Pol administraties
Theme URI: https://www.vandepoladministraties.nl
Author: Pol-iT
Description: Eigen blokthema voor van de Pol administraties. Rustig en precies, in de kleuren van het logo.
Version: 1.0.2
Requires at least: 6.5
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vdpa
*/

/* Alles wat in theme.json past, staat in theme.json. Hier alleen wat daar niet kan. */

:root {
	--vdpa-focus: var(--wp--preset--color--navy);
	--vdpa-radius: 8px;
}

html {
	scroll-padding-top: 7rem;
}

/* Toetsenbordfocus: altijd zichtbaar */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid var(--vdpa-focus);
	outline-offset: 2px;
}
.has-navy-background-color a:focus-visible,
.has-navy-background-color .wp-element-button:focus-visible {
	--vdpa-focus: var(--wp--preset--color--white);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Kop ---------- */
.vdpa-topbar p {
	margin: 0;
}
.vdpa-topbar a {
	color: inherit;
	text-decoration: none;
}
.vdpa-topbar a:hover {
	color: var(--wp--preset--color--white);
	text-decoration: underline;
}
.vdpa-header {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .vdpa-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}
.vdpa-logo {
	display: block;
	line-height: 0;
}
.vdpa-logo img {
	height: 64px;
	width: auto;
}
.vdpa-logo--footer img {
	height: 84px;
	margin-bottom: 0.5rem;
}
.vdpa-header .wp-block-navigation a:hover {
	color: var(--wp--preset--color--navy);
}
.vdpa-header .wp-block-navigation .current-menu-item > a,
.vdpa-header .wp-block-navigation a[aria-current="page"] {
	color: var(--wp--preset--color--navy);
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--blue);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.45em;
}
.vdpa-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
}
.vdpa-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	gap: 1.25rem;
	font-size: 1.375rem;
}

/* Secties over de volle breedte sluiten zonder witte strook op elkaar aan */
.wp-block-post-content > .alignfull,
main > .alignfull {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* ---------- Bouwstenen ---------- */

/* Kleine kop boven de opening */
.vdpa-label {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-family: var(--wp--preset--font-family--jakarta);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	color: var(--wp--preset--color--navy);
	margin-bottom: 0.25rem;
}
.vdpa-label::before {
	content: "";
	width: 28px;
	height: 3px;
	background: var(--wp--preset--color--blue);
}

/* Sectiekop met de blauwe kolomlijn erboven */
.vdpa-kop::before {
	content: "";
	display: block;
	width: 48px;
	height: 3px;
	background: var(--wp--preset--color--blue);
	margin-bottom: 1rem;
}
.vdpa-intro {
	max-width: 46rem;
}

/* Secundaire knop (rand) */
.wp-block-button.is-style-outline > .wp-block-button__link {
	border: 2px solid var(--wp--preset--color--navy);
	color: var(--wp--preset--color--navy);
	background: transparent;
	padding-top: calc(0.95rem - 2px);
	padding-bottom: calc(0.95rem - 2px);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
}
.vdpa-knop-wit .wp-block-button__link:hover {
	background: var(--wp--preset--color--blue-soft) !important;
}
.vdpa-knop-rand-wit.is-style-outline > .wp-block-button__link {
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--white);
}
.vdpa-knop-rand-wit.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--navy);
}

/* Kaart */
.vdpa-card {
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-top: 3px solid var(--wp--preset--color--blue);
	border-radius: var(--vdpa-radius);
	box-shadow: var(--wp--preset--shadow--card);
	padding: clamp(1.5rem, 3vw, 2rem);
}
.vdpa-card__title {
	font-size: var(--wp--preset--font-size--h-3) !important;
	margin-bottom: 0.75rem;
}
.vdpa-card__voet {
	margin-top: 1.25rem;
	color: var(--wp--preset--color--slate);
}

/* Opening: lijst met boekhoudpakketten in de kaart */
.vdpa-hero h1 {
	max-width: 14ch;
}
.vdpa-portalen-lijst {
	list-style: none;
	margin: 0;
	padding: 0;
}
.vdpa-portalen-lijst li + li {
	border-top: 1px solid var(--wp--preset--color--line);
}
.vdpa-portalen-lijst a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.9rem 0;
	font-family: var(--wp--preset--font-family--jakarta);
	font-weight: 700;
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.vdpa-portalen-lijst a:hover {
	color: var(--wp--preset--color--navy);
}
.vdpa-portalen-lijst a:hover span:first-child {
	text-decoration: underline;
}
.vdpa-pijl {
	display: inline-grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: var(--wp--preset--color--blue-soft);
	color: var(--wp--preset--color--navy);
	font-size: 0.95rem;
}

/* Diensten als register: genummerde regels met lijnen */
.vdpa-sticky {
	position: sticky;
	top: 8rem;
}
.vdpa-register {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--wp--preset--color--line);
}
.vdpa-register li {
	display: grid;
	grid-template-columns: 3.25rem minmax(0, 1fr);
	gap: 1rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.vdpa-register__nr {
	font-family: var(--wp--preset--font-family--jakarta);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--wp--preset--color--navy);
	font-variant-numeric: tabular-nums;
	padding-top: 0.2rem;
	border-top: 3px solid var(--wp--preset--color--blue);
	align-self: start;
	width: fit-content;
}
.vdpa-register h3 {
	margin: 0 0 0.35rem;
}
.vdpa-register h3 a {
	color: var(--wp--preset--color--navy);
	text-decoration: none;
}
.vdpa-register h3 a:hover {
	text-decoration: underline;
}
.vdpa-register p {
	margin: 0;
	color: var(--wp--preset--color--slate);
}

/* Werkwijze: vier punten */
.vdpa-punten {
	list-style: none;
	margin: 2.5rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 2rem;
}
.vdpa-punten li {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 1.25rem;
	position: relative;
}
.vdpa-punten li::before {
	content: "";
	position: absolute;
	top: -2px;
	left: 0;
	width: 48px;
	height: 3px;
	background: var(--wp--preset--color--blue);
}
.vdpa-punten h3 {
	margin: 0 0 0.5rem;
}
.vdpa-punten p {
	margin: 0;
	color: var(--wp--preset--color--slate);
}
@media (max-width: 960px) {
	.vdpa-punten {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 560px) {
	.vdpa-punten {
		grid-template-columns: 1fr;
	}
}

/* Team: namen met initialen */
.vdpa-namen {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}
.vdpa-namen li {
	display: flex;
	align-items: center;
	gap: 1rem;
	background: var(--wp--preset--color--white);
	border-radius: var(--vdpa-radius);
	padding: 0.9rem 1.1rem;
	font-family: var(--wp--preset--font-family--jakarta);
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--wp--preset--color--navy);
}
.vdpa-namen__letters {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 6px;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	font-size: 0.95rem;
	letter-spacing: 0.04em;
	flex: none;
}

/* Film */
.vdpa-video {
	border-radius: var(--vdpa-radius);
	overflow: hidden;
	box-shadow: var(--wp--preset--shadow--card);
	border-top: 3px solid var(--wp--preset--color--blue);
	line-height: 0;
	background: var(--wp--preset--color--navy);
}
.vdpa-video video {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

/* Titelbalk op subpagina's */
.vdpa-titelbalk .wp-block-post-title::before {
	content: "";
	display: block;
	width: 48px;
	height: 3px;
	background: var(--wp--preset--color--blue);
	margin-bottom: 1.25rem;
}
.vdpa-titelbalk__intro p {
	max-width: 46rem;
	margin-top: 0.75rem;
}

/* Inhoud van subpagina's */
.entry-content h2,
.wp-block-post-content h2 {
	margin-top: 3rem;
}
.wp-block-post-content > h2:first-child {
	margin-top: 0;
}
.vdpa-dienst {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 2rem;
	margin-top: 2.5rem !important;
}
.vdpa-dienst:first-child {
	border-top: 0;
	padding-top: 0;
	margin-top: 0 !important;
}
.vdpa-dienst h2 {
	margin-top: 0 !important;
	display: flex;
	gap: 0.85rem;
	align-items: baseline;
}
.vdpa-dienst h2 .vdpa-register__nr {
	font-size: 0.95rem;
}
.vdpa-vinklijst {
	list-style: none;
	padding-left: 0;
}
.vdpa-vinklijst li {
	position: relative;
	padding-left: 1.75rem;
}
.vdpa-vinklijst li + li {
	margin-top: 0.35rem;
}
.vdpa-vinklijst li::before {
	content: "";
	position: absolute;
	left: 0.2rem;
	top: 0.45em;
	width: 0.45rem;
	height: 0.8rem;
	border: solid var(--wp--preset--color--navy);
	border-width: 0 3px 3px 0;
	transform: rotate(45deg);
}

/* Portalen op de inlogpagina */
.vdpa-portalen {
	list-style: none;
	margin: 2rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
}
.vdpa-portalen a {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	height: 100%;
	box-sizing: border-box;
	padding: 1.5rem;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-top: 3px solid var(--wp--preset--color--blue);
	border-radius: var(--vdpa-radius);
	text-decoration: none;
	color: var(--wp--preset--color--ink);
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.vdpa-portalen a:hover {
	box-shadow: var(--wp--preset--shadow--card);
	transform: translateY(-2px);
}
.vdpa-portalen__naam {
	font-family: var(--wp--preset--font-family--jakarta);
	font-weight: 700;
	font-size: 1.3rem;
	color: var(--wp--preset--color--navy);
}
.vdpa-portalen__tekst {
	color: var(--wp--preset--color--slate);
	flex: 1;
}
.vdpa-portalen__actie {
	margin-top: 0.75rem;
	font-weight: 700;
	color: var(--wp--preset--color--navy);
}
.vdpa-portalen a:hover .vdpa-portalen__actie {
	text-decoration: underline;
}
@media (max-width: 781px) {
	.vdpa-portalen {
		grid-template-columns: 1fr;
	}
}

/* Contact: gegevens en kaart */
.vdpa-gegevens {
	display: grid;
	grid-template-columns: max-content minmax(0, 1fr);
	gap: 0.4rem 1.25rem;
	margin: 0;
}
.vdpa-gegevens dt {
	color: var(--wp--preset--color--slate);
}
.vdpa-gegevens dd {
	margin: 0;
	font-weight: 600;
}
.vdpa-kaart {
	border-radius: var(--vdpa-radius);
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--line);
	line-height: 0;
}
.vdpa-kaart iframe {
	width: 100%;
	height: 380px;
	border: 0;
}

/* Contactformulier (Contact Form 7) in de huisstijl */
.wpcf7 form p {
	margin: 0 0 1.1rem;
}
.wpcf7 label {
	display: block;
	font-weight: 600;
	font-size: 1rem;
}
.wpcf7 .wpcf7-form-control-wrap {
	display: block;
	margin-top: 0.35rem;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	font-size: 1.0625rem;
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
	border: 1px solid #A9B4C0;
	border-radius: 6px;
	padding: 0.7rem 0.85rem;
	min-height: 48px;
}
.wpcf7 textarea {
	min-height: 150px;
	resize: vertical;
}
.wpcf7 input:focus,
.wpcf7 textarea:focus {
	border-color: var(--wp--preset--color--navy);
}
.wpcf7 input[type="submit"] {
	font-family: var(--wp--preset--font-family--jakarta);
	font-weight: 700;
	font-size: 1rem;
	background: var(--wp--preset--color--navy);
	color: var(--wp--preset--color--white);
	border: 0;
	border-radius: 6px;
	min-height: 52px;
	padding: 0 1.75rem;
	cursor: pointer;
}
.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--navy-hover);
}
.wpcf7 .wpcf7-spinner {
	vertical-align: middle;
}
.wpcf7 .wpcf7-not-valid-tip {
	font-size: 0.95rem;
	margin-top: 0.3rem;
}
.wpcf7 form .wpcf7-response-output {
	margin: 1rem 0 0;
	padding: 0.85rem 1rem;
	border-radius: 6px;
}

/* ---------- Voettekst ---------- */
.vdpa-footer-title {
	font-family: var(--wp--preset--font-family--jakarta) !important;
	font-size: 0.95rem !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	color: var(--wp--preset--color--navy);
	margin-bottom: 0.75rem;
}
.vdpa-plain-list {
	list-style: none;
	padding-left: 0;
}
.vdpa-plain-list li + li {
	margin-top: 0.35em;
}
.vdpa-footer a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.vdpa-footer a:hover {
	color: var(--wp--preset--color--navy);
	text-decoration: underline;
}
.vdpa-footer p {
	margin: 0;
}
.vdpa-footer .wp-block-column > p + p {
	margin-top: 0.75rem;
}

/* ---------- Telefoon en tablet ---------- */
@media (max-width: 1000px) {
	.vdpa-topbar {
		display: none;
	}
	.vdpa-logo img {
		height: 54px;
	}
	.vdpa-sticky {
		position: static;
	}
}

/* Vaste actiebalk op de telefoon */
.vdpa-callbar {
	display: none;
}
@media (max-width: 781px) {
	.vdpa-callbar {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		gap: 10px;
		padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
		background: var(--wp--preset--color--white);
		border-top: 1px solid var(--wp--preset--color--line);
		box-shadow: 0 -8px 24px rgb(12 50 116 / 0.12);
	}
	.vdpa-callbar a {
		flex: 1;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 50px;
		border-radius: 6px;
		font-family: var(--wp--preset--font-family--jakarta);
		font-weight: 700;
		text-decoration: none;
	}
	.vdpa-callbar .vdpa-callbar__call {
		background: var(--wp--preset--color--navy);
		color: var(--wp--preset--color--white);
	}
	.vdpa-callbar .vdpa-callbar__contact {
		border: 2px solid var(--wp--preset--color--navy);
		color: var(--wp--preset--color--navy);
	}
	body {
		padding-bottom: 76px;
	}
	.vdpa-header .vdpa-header__phone {
		display: none;
	}
	.vdpa-gegevens {
		grid-template-columns: 1fr;
		gap: 0;
	}
	.vdpa-gegevens dd {
		margin-bottom: 0.6rem;
	}
	.vdpa-kaart iframe {
		height: 300px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
	html {
		scroll-behavior: auto;
	}
}
