/*
 * Sectie: 50/50 tekst en afbeelding.
 * Wordt alleen geladen op pagina's waar deze sectie gerenderd wordt (zie inc/registry.php, sleutel text_image_50).
 * Kleuren en radius komen uit de variabelen in base.css.
 *
 * Mobiel: één kolom, tekst boven de foto. Vanaf 48rem: twee gelijke kolommen; de foto staat links of rechts.
 */

.cp-text-image-50 {
	background: var(--cp-color-bg);
	padding-block: 3.5rem;
}

.cp-text-image-50__inner {
	display: grid;
	gap: 2rem;
	width: min(100% - 3rem, 80rem);
	margin-inline: auto;
}

.cp-text-image-50__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	color: var(--cp-color-primary);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.cp-text-image-50__eyebrow::before {
	content: "";
	flex: none;
	width: 2rem;
	height: 2px;
	background: var(--cp-color-primary);
}

.cp-text-image-50__title {
	margin-block-start: 1rem;
	color: var(--cp-color-navy);
	font-size: 2.25rem;
	font-weight: 800;
	letter-spacing: 0;
	line-height: 1.1;
}

.cp-text-image-50__accent {
	display: block;
	color: var(--cp-color-primary);
}

.cp-text-image-50__text {
	max-width: 35rem;
	margin-block-start: 1.25rem;
	color: rgb(1 28 56 / 0.7);
	font-size: 1.125rem;
	line-height: 1.6;
}

.cp-text-image-50__text :where(p, ul, ol, h1, h2, h3, h4, h5, h6) {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.cp-text-image-50__text :where(p + p, ul + p, p + ul) {
	margin-block-start: 0.75rem;
}

.cp-text-image-50__text :where(a) {
	color: var(--cp-color-navy);
}

.cp-text-image-50__features {
	display: grid;
	gap: 1.25rem;
	margin: 1.75rem 0 0;
	padding: 0;
	list-style: none;
}

.cp-text-image-50__feature {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.cp-text-image-50__feature-icon {
	flex: none;
	margin-block-start: 0.125rem;
	color: var(--cp-color-navy);
	line-height: 0;
}

.cp-text-image-50__feature-body {
	display: grid;
	gap: 0.125rem;
}

.cp-text-image-50__feature-title {
	color: var(--cp-color-navy);
	font-weight: 700;
}

.cp-text-image-50__feature-text {
	color: rgb(1 28 56 / 0.7);
}

.cp-text-image-50__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-block-start: 1.75rem;
	padding: 0.75rem 2rem;
	border-radius: var(--cp-radius-button);
	background: var(--cp-color-primary);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 0.2s;
}

.cp-text-image-50__button:hover {
	background: var(--cp-color-primary-hover);
	color: #fff;
}

.cp-text-image-50__media {
	min-width: 0;
}

.cp-text-image-50__image {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
	box-shadow: 0 16px 40px -16px rgb(1 28 56 / 0.28);
}

@media (min-width: 48rem) {
	.cp-text-image-50 {
		padding-block: 5rem;
	}

	.cp-text-image-50__inner {
		width: min(100% - 4rem, 80rem);
	}

	.cp-text-image-50--split .cp-text-image-50__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		align-items: stretch;
		gap: 4rem;
	}

	/* De tekstkolom bepaalt de rijhoogte. De foto vult die hoogte, van eyebrow tot knop. */
	.cp-text-image-50--split .cp-text-image-50__media {
		position: relative;
		min-height: 0;
	}

	.cp-text-image-50--split .cp-text-image-50__image {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		aspect-ratio: auto;
		object-fit: cover;
	}

	.cp-text-image-50--image-rechts .cp-text-image-50__content {
		order: 1;
	}

	.cp-text-image-50--image-rechts .cp-text-image-50__media {
		order: 2;
	}

	.cp-text-image-50--image-links .cp-text-image-50__media {
		order: 1;
	}

	.cp-text-image-50--image-links .cp-text-image-50__content {
		order: 2;
	}

	.cp-text-image-50__title {
		font-size: 3rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cp-text-image-50__button {
		transition: none;
	}
}
