/*
Theme Name: In Beweging
Theme URI: https://www.politiekinbeweging.nl
Author: Qoden
Description: Blocktheme voor de vereniging Politiek In Beweging (Hof van Twente). Alle onderdelen zijn aan te passen in de site-editor en de pagina-editor; niets staat vast in de code.
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 8.0
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: in-beweging
*/

/* ---------- Basis ---------- */

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	-webkit-font-smoothing: antialiased;
}

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--wit);
	color: var(--wp--preset--color--donkerblauw);
}

/* Knoppen en links in navigatie: minimaal 44 px aanraakvlak */
.wp-block-button__link,
.wp-element-button {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

/* Knopstijl: op donker vlak (blauw met donkerblauwe tekst, 6,4:1) */
.wp-block-button.is-style-op-donker .wp-block-button__link {
	background-color: var(--wp--preset--color--blauw);
	color: var(--wp--preset--color--donkerblauw);
}
.wp-block-button.is-style-op-donker .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--accent-licht);
	color: var(--wp--preset--color--donkerblauw);
}

/* Knopstijl: witte rand op donker vlak */
.wp-block-button.is-style-rand-wit .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--wit);
	border: 2px solid var(--wp--preset--color--wit);
}
.wp-block-button.is-style-rand-wit .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--wit);
	color: var(--wp--preset--color--donkerblauw);
}

/* Knopstijl: donkerblauwe rand op licht vlak */
.wp-block-button.is-style-rand .wp-block-button__link {
	background-color: transparent;
	color: var(--wp--preset--color--donkerblauw);
	border: 2px solid var(--wp--preset--color--donkerblauw);
}
.wp-block-button.is-style-rand .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--donkerblauw);
	color: var(--wp--preset--color--wit);
}

/* Links op donkere vlakken (niet in het menu: dat heeft zijn eigen kleuren) */
.has-donkerblauw-background-color a:not(.wp-element-button):not(.wp-block-navigation-item__content),
.has-nacht-background-color a:not(.wp-element-button):not(.wp-block-navigation-item__content) {
	color: var(--wp--preset--color--accent-licht);
}
.has-donkerblauw-background-color a:not(.wp-element-button):not(.wp-block-navigation-item__content):hover,
.has-nacht-background-color a:not(.wp-element-button):not(.wp-block-navigation-item__content):hover {
	color: var(--wp--preset--color--wit);
}

/* Menu in de header: hover blijft donkerblauw met onderstreping */
.ib-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.ib-header .wp-block-navigation .wp-block-navigation-item__content:focus {
	color: var(--wp--preset--color--hover);
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

/* Uitklapmenu (submenu) */
.ib-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--lijn) !important;
	border-radius: 8px;
	padding: 0.375rem 0 !important;
	min-width: 220px !important;
}
.ib-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	padding: 0.5rem 1rem !important;
}
.ib-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.ib-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus {
	color: var(--wp--preset--color--accent-licht);
}

/* Geopend mobiel menu: wit op donkerblauw, hover lichtblauw */
.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	color: var(--wp--preset--color--wit);
	background: transparent;
	border: 0 !important;
}
.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus {
	color: var(--wp--preset--color--accent-licht);
}
.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	font-size: 1.375rem;
	min-height: 44px;
	padding: 0 0 0 1rem !important;
}

/* ---------- Bovenregel ---------- */

.is-style-bovenregel {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 600;
	letter-spacing: 0.125em;
	text-transform: uppercase;
	font-size: 1.125rem;
	line-height: 1.3;
}

/* ---------- Header ---------- */

.ib-header {
	border-bottom: 1px solid var(--wp--preset--color--lijn);
}

/* Toon de sitetitel alleen als er geen logo is ingesteld */
.ib-header .wp-block-site-logo + .wp-block-site-title {
	display: none;
}

.ib-header .wp-block-site-logo img {
	height: auto;
}

.ib-header .wp-block-navigation__responsive-container-open,
.ib-header .wp-block-navigation__responsive-container-close {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
}

@media (max-width: 599px) {
	.ib-header .wp-block-navigation__responsive-container-open {
		display: flex;
	}
}

.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	display: flex;
}

.ib-header .wp-block-navigation__responsive-container-open {
	background: var(--wp--preset--color--donkerblauw);
	color: var(--wp--preset--color--wit);
}

.ib-header .wp-block-navigation__responsive-container-close {
	background: var(--wp--preset--color--wit);
	color: var(--wp--preset--color--donkerblauw);
}

.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 2rem;
}

.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-size: 2.125rem;
	font-weight: 700;
	text-transform: uppercase;
	min-height: 56px;
	display: flex;
	align-items: center;
}

.ib-header .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.ib-header .wp-block-navigation-item__content[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 6px;
}

@media (max-width: 599px) {
	.ib-header .ib-header__knop {
		display: none;
	}
}

/* ---------- Cirkelmotief (blokstijlen op de groep) ---------- */

[class*="is-style-cirkels-"] {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

[class*="is-style-cirkels-"] > * {
	position: relative;
	z-index: 1;
}

[class*="is-style-cirkels-"]::before,
[class*="is-style-cirkels-"]::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	z-index: 0;
	pointer-events: none;
}

/* Drie cirkels rechts, voor de hero */
.is-style-cirkels-rechts {
	background-image: radial-gradient(circle at calc(100% - 340px) 320px, var(--wp--preset--color--groen) 0 110px, transparent 111px);
}
.is-style-cirkels-rechts::before {
	width: 360px;
	height: 360px;
	right: -60px;
	top: -80px;
	background: var(--wp--preset--color--rood);
}
.is-style-cirkels-rechts::after {
	width: 280px;
	height: 280px;
	right: 40px;
	top: 300px;
	background: var(--wp--preset--color--blauw);
}

/* Cirkels links onder, voor oproepen */
.is-style-cirkels-links {
	background-image: none;
}
.is-style-cirkels-links::before {
	width: 300px;
	height: 300px;
	left: -90px;
	bottom: -120px;
	background: var(--wp--preset--color--groen);
}
.is-style-cirkels-links::after {
	width: 70px;
	height: 70px;
	left: 70px;
	top: 48px;
	background: var(--wp--preset--color--rood);
}

/* Twee kleine cirkels rechtsboven, voor paginakoppen */
.is-style-cirkels-klein {
	background-image: none;
}
.is-style-cirkels-klein::before {
	width: 160px;
	height: 160px;
	right: 60px;
	top: -40px;
	background: var(--wp--preset--color--blauw);
}
.is-style-cirkels-klein::after {
	width: 80px;
	height: 80px;
	right: 240px;
	top: 70px;
	background: var(--wp--preset--color--groen);
}

@media (max-width: 781px) {
	.is-style-cirkels-rechts {
		background-image: none;
	}
	.is-style-cirkels-rechts::before {
		width: 190px;
		height: 190px;
		right: -70px;
		top: -60px;
	}
	.is-style-cirkels-rechts::after {
		width: 160px;
		height: 160px;
		right: -50px;
		top: auto;
		bottom: -70px;
	}
	.is-style-cirkels-links::before {
		width: 160px;
		height: 160px;
		left: auto;
		right: -60px;
		bottom: -60px;
	}
	.is-style-cirkels-links::after {
		display: none;
	}
	.is-style-cirkels-klein::before {
		width: 110px;
		height: 110px;
		right: -30px;
	}
	.is-style-cirkels-klein::after {
		display: none;
	}
	.ib-cta__tekst {
		padding-left: 0 !important;
	}
}

/* ---------- Stip (kernwaarden, lijsten) ---------- */

.ib-stip {
	width: 72px;
	height: 72px;
	min-height: 0 !important;
	border-radius: 50%;
	flex-shrink: 0;
	padding: 0 !important;
}

.ib-stip--klein {
	width: 48px;
	height: 48px;
}

.ib-stippen::before {
	content: "";
	display: inline-block;
	width: 40px;
	height: 12px;
	margin-right: 0.75rem;
	vertical-align: middle;
	background:
		radial-gradient(circle at 6px 6px, var(--wp--preset--color--rood) 0 5px, transparent 5.5px),
		radial-gradient(circle at 20px 6px, var(--wp--preset--color--groen) 0 5px, transparent 5.5px),
		radial-gradient(circle at 34px 6px, var(--wp--preset--color--blauw) 0 5px, transparent 5.5px);
}

/* Lijst met gekleurde stippen */
.is-style-stippen {
	list-style: none;
	padding-left: 0;
}
.is-style-stippen li {
	position: relative;
	padding-left: 2rem;
	margin-bottom: 0.75rem;
}
.is-style-stippen li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.5em;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--wp--preset--color--blauw);
}
.is-style-stippen li:nth-child(3n+1)::before { background: var(--wp--preset--color--rood); }
.is-style-stippen li:nth-child(3n+2)::before { background: var(--wp--preset--color--groen); }

.ib-cijfercirkel {
	aspect-ratio: 1 / 1;
	width: 100%;
	max-width: 320px;
	margin-inline: auto;
	box-sizing: border-box;
	text-align: center;
}

/* Secties direct onder elkaar, zonder witregel ertussen */
.ib-secties > .alignfull,
.ib-secties > .alignfull + * {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-site-blocks > .wp-block-template-part {
	margin-block-start: 0;
}

/* ---------- Kaarten ---------- */

.ib-kaart {
	height: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.ib-kaart .wp-block-post-featured-image,
.ib-kaart .ib-geen-foto {
	margin: 0;
}

.ib-kaart .wp-block-post-featured-image img {
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
	height: auto;
}

/* Kaart zonder foto: gekleurd vlak zodat rijen gelijk blijven */
.ib-geen-foto {
	aspect-ratio: 16 / 9;
	width: 100%;
	background:
		radial-gradient(circle at 78% 30%, var(--wp--preset--color--blauw) 0 18%, transparent 18.3%),
		var(--wp--preset--color--lichtblauw);
}
.wp-block-post-template > li:nth-child(3n+2) .ib-geen-foto {
	background:
		radial-gradient(circle at 78% 30%, var(--wp--preset--color--groen) 0 18%, transparent 18.3%),
		var(--wp--preset--color--lichtgroen);
}
.wp-block-post-template > li:nth-child(3n+3) .ib-geen-foto {
	background:
		radial-gradient(circle at 78% 30%, var(--wp--preset--color--rood) 0 18%, transparent 18.3%),
		var(--wp--preset--color--lichtrood);
}

.ib-geen-foto--rond {
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	max-width: 180px;
}

.ib-label a,
.ib-label span:not(.wp-block-post-terms__separator) {
	display: inline-block;
	background: var(--wp--preset--color--donkerblauw);
	color: var(--wp--preset--color--wit);
	padding: 0.125rem 0.75rem;
	border-radius: 999px;
	text-decoration: none;
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 600;
}
.ib-label a:hover {
	background: var(--wp--preset--color--hover);
	color: var(--wp--preset--color--wit);
}
.ib-label .wp-block-post-terms__separator {
	display: none;
}

/* Personen: ronde foto */
.ib-persoon .wp-block-post-featured-image img {
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 50%;
	width: 180px;
	height: 180px;
}
.ib-persoon .wp-block-post-featured-image,
.ib-persoon .ib-geen-foto {
	width: 180px;
}
.ib-persoon .ib-geen-foto {
	aspect-ratio: 1 / 1;
	border-radius: 50%;
}

/* ---------- Agenda ---------- */

.ib-datumcirkel {
	width: 76px;
	height: 76px;
	min-height: 0 !important;
	border-radius: 50%;
	flex-shrink: 0;
	box-sizing: border-box;
	padding: 0 !important;
	font-family: var(--wp--preset--font-family--barlow-condensed);
	font-weight: 700;
	line-height: 1;
	text-align: center;
}
.ib-datumcirkel p {
	margin: 0 !important;
}
.ib-datumcirkel .ib-datum-dag {
	font-size: 1.75rem;
}
.ib-datumcirkel .ib-datum-maand {
	font-size: 0.9375rem;
	text-transform: uppercase;
}

/* ---------- Footer ---------- */

.ib-footer .wp-block-navigation .wp-block-navigation-item__content {
	padding: 0.125rem 0;
}

.ib-footer .wp-block-social-links .wp-social-link {
	background: transparent;
	color: var(--wp--preset--color--accent-licht);
}

/* ---------- Formulieren (Contact Form 7 en algemeen) ---------- */

.wpcf7-form p {
	margin: 0 0 1.125rem;
}

.wpcf7-form label {
	display: block;
	font-weight: 600;
	font-size: 1rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form select,
.wpcf7-form textarea {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin-top: 0.375rem;
	border: 1px solid #7A8A9C;
	border-radius: 8px;
	font: inherit;
	color: var(--wp--preset--color--donkerblauw);
	background: var(--wp--preset--color--wit);
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="number"],
.wpcf7-form select {
	height: 44px;
	padding: 0 0.75rem;
}

.wpcf7-form textarea {
	padding: 0.625rem 0.75rem;
	min-height: 120px;
	resize: vertical;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
	outline: 3px solid var(--wp--preset--color--blauw);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--donkerblauw);
}

.wpcf7-form .wpcf7-acceptance label,
.wpcf7-form .wpcf7-list-item label {
	font-weight: 400;
	display: flex;
	gap: 0.625rem;
	align-items: flex-start;
}

.wpcf7-form .wpcf7-list-item {
	margin: 0;
}

.wpcf7-form input[type="checkbox"] {
	width: 22px;
	height: 22px;
	margin-top: 0.125rem;
	flex-shrink: 0;
}

.wpcf7-form input[type="submit"] {
	min-height: 52px;
	padding: 0 2rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--donkerblauw);
	color: var(--wp--preset--color--wit);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.wpcf7-form input[type="submit"]:hover {
	background: var(--wp--preset--color--hover);
}

.wpcf7-form .wpcf7-not-valid-tip {
	color: #B3121A;
	font-size: var(--wp--preset--font-size--klein);
	font-weight: 600;
}

.wpcf7 form .wpcf7-response-output {
	margin: 1rem 0 0;
	border-radius: 8px;
	padding: 0.75rem 1rem;
}

/* Kader om een formulier */
.ib-formulierkader {
	border: 2px solid var(--wp--preset--color--donkerblauw);
	border-radius: 20px;
}

/* Kop en secties in sjablonen sluiten op elkaar aan */
main.wp-block-group > .alignfull {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* Mobiel menu: links uitgelijnd met ruimte rondom */
.ib-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 10px 16px 32px;
}
.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start;
	justify-content: flex-start;
}
.ib-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	padding-top: 3rem;
}

/* Persoon zonder foto: effen gekleurde cirkel */
.ib-persoon .ib-geen-foto {
	background-image: none !important;
}

/* Kaart met foto uit de tekst van het bericht */
.ib-kaart .ib-foto-uit-tekst {
	margin: 0;
}
.ib-kaart .ib-foto-uit-tekst img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* Hele kaart klikbaar: de link van de titel bedekt de kaart */
.ib-kaart {
	position: relative;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ib-kaart .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}
.ib-kaart .ib-label a {
	position: relative;
	z-index: 2;
}
.ib-kaart:hover {
	box-shadow: 0 6px 20px rgba(0, 28, 64, 0.12);
	transform: translateY(-2px);
}
.ib-kaart:hover .wp-block-post-title a {
	text-decoration: underline;
}
.ib-kaart:focus-within {
	outline: 3px solid var(--wp--preset--color--blauw);
	outline-offset: 2px;
}
.ib-kaart .wp-block-post-title a:focus {
	outline: none;
}
@media (prefers-reduced-motion: reduce) {
	.ib-kaart {
		transition: none;
	}
	.ib-kaart:hover {
		transform: none;
	}
}
