/*
 * 23 — PROJECTEN
 * Deel 1: homepage (mi-projecten-lijst): één groot beeld links, twee
 *         gestapeld rechts, titel (serif) en plaats · jaar eronder.
 * Deel 2: /projecten/ en /projecten/<type>/ (mi-projectenlijst): filterlinks
 *         + rijen die om en om spiegelen (beeld links / beeld rechts, via
 *         nth-child), tekening klein ernaast.
 * Hele kaarten zijn klikbaar (WERKWIJZE §9).
 */

.mi-projecten-lijst .wp-block-post-template {
	display: grid;
	grid-template-columns: 7fr 5fr;
	grid-template-rows: 1fr 1fr;
	gap: 24px;
	height: clamp(540px, 48vw, 660px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.mi-projecten-lijst .wp-block-post {
	display: flex;
	flex-direction: column;
	min-height: 0;
	min-width: 0;
	margin: 0;
}

.mi-projecten-lijst .wp-block-post:first-child {
	grid-row: span 2;
}

.mi-projecten-lijst .mi-project-beeld {
	flex: 1;
	min-height: 0;
	margin: 0;
}

.mi-projecten-lijst .mi-project-beeld a,
.mi-projecten-lijst .mi-project-beeld img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background-color: var(--wp--preset--color--surface);
}

.mi-projecten-lijst .mi-project-beeld a:hover {
	opacity: 0.88;
}

.mi-project-onder {
	flex: none;
	margin-top: 16px;
	gap: 16px;
}

.mi-project-onder .wp-block-post-title {
	margin: 0;
	line-height: 1.15;
}

.mi-project-onder .mi-project-meta {
	margin: 0;
	white-space: nowrap;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
}

@media (max-width: 781px) {
	.mi-projecten-lijst .wp-block-post-template {
		grid-template-columns: 1fr;
		grid-template-rows: none;
		height: auto;
	}

	.mi-projecten-lijst .wp-block-post:first-child {
		grid-row: auto;
	}

	.mi-projecten-lijst .mi-project-beeld img {
		aspect-ratio: 4 / 3;
	}
}

/* Hele projectkaart klikbaar (WERKWIJZE §9): de titel-link bedekt de kaart. */
.mi-projecten-lijst .wp-block-post {
	position: relative;
}

.mi-projecten-lijst .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.mi-projecten-lijst .wp-block-post:hover .wp-block-post-featured-image img {
	opacity: 0.88;
}

/* Zelfde trage zoom als in 01-animaties.css, anders springt het beeld. */
.mi-projecten-lijst .wp-block-post-featured-image img {
	transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.4s ease;
}


/* ============================== /projecten/ ============================== */

.mi-projecten-hero .mi-kicker {
	margin-bottom: 24px;
}

/* Titel met de intro eronder, links, zoals op de dienstpagina's. */
.mi-projecten-hero .mi-projecten-koprij > * {
	margin: 0;
}

.mi-projecten-hero .mi-projecten-titel {
	margin: 0;
	line-height: 1.02;
	letter-spacing: -0.012em;
}

.mi-projecten-hero .mi-projecten-intro {
	max-width: 1040px;
	margin: 22px 0 0 !important;
	line-height: 1.7;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 80%, transparent);
}

/* Filterrij (uit [mi_projectfilter], pas vanaf 7 projecten) */
/* De shortcode rendert zonder omhulsel: de filterrij zelf krijgt de afstand. */
.mi-projecten-hero .mi-filters {
	margin-top: 40px;
}

.mi-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 26px;
}

.mi-filter {
	padding: 0 0 3px;
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
	background-image: linear-gradient(var(--wp--preset--color--primary), var(--wp--preset--color--primary));
	background-repeat: no-repeat;
	background-position: 0 100%;
	background-size: 0% 2px;
	transition: color 0.2s ease, background-size 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mi-filter:hover,
.mi-filter:focus-visible,
.mi-filter.is-actief {
	opacity: 1;
	color: var(--wp--preset--color--contrast);
	background-size: 100% 2px;
}

/* Kaartraster: drie kolommen, twee op tablet, één op gsm. Hele kaart klikbaar. */
.mi-projectenlijst .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 44px 28px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.mi-projectenlijst .wp-block-post {
	position: relative;
	margin: 0;
}

.mi-projectenlijst .wp-block-post[hidden] {
	display: none;
}

.mi-projectenlijst .mi-projectkaart-beeld {
	margin: 0 0 16px;
	overflow: hidden;
}

.mi-projectenlijst .mi-projectkaart-beeld a,
.mi-projectenlijst .mi-projectkaart-beeld img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background-color: var(--wp--preset--color--surface);
}

.mi-projectenlijst .mi-projectkaart-beeld img {
	transition: transform 1.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mi-projectenlijst .wp-block-post:hover .mi-projectkaart-beeld img {
	transform: scale(1.03);
}

.mi-projectenlijst .mi-projectkaart-titel {
	margin: 0 0 4px;
	line-height: 1.15;
}

.mi-projectenlijst .mi-projectkaart-titel a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.mi-projectenlijst .mi-projectkaart-plaats {
	margin: 0;
	font-size: 0.8125rem;
	color: color-mix(in srgb, var(--wp--preset--color--contrast) 60%, transparent);
}

.mi-projectenlijst .mi-projectkaart-plaats:empty {
	display: none;
}

.mi-projectenlijst .wp-block-query-no-results p {
	margin: 0;
}

@media (max-width: 1023px) {
	.mi-projectenlijst .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.mi-projectenlijst .wp-block-post-template {
		grid-template-columns: 1fr;
		gap: 36px;
	}
}
