/**
 * Content Rows widget styles.
 *
 * Figma references:
 * https://www.figma.com/design/UFbyQSXqjJ3fkYXo3ORgO7/Wellenreiten-2026-Handoff-Ext--Copy-?node-id=70-13818
 * https://www.figma.com/design/UFbyQSXqjJ3fkYXo3ORgO7/Wellenreiten-2026-Handoff-Ext--Copy-?node-id=70-13933
 *
 * 'Archivo' (Figma's heading font) is not enqueued anywhere else in the
 * theme, so it is loaded as a dependency of this stylesheet (see
 * functions.php); body copy reuses the theme's --font-family stack.
 */
.wrcb-rows {
	--wrcb-heading-font: 'Archivo', var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrcb-body-font: var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrcb-text-primary: #171717;
	--wrcb-text-secondary: #404040;
	--wrcb-text-tertiary: #525252;
	--wrcb-text-muted: #6b7280;
	--wrcb-brand: #0f4c81;
	--wrcb-brand-50: #ebf5f5;
	--wrcb-tag-border: #f5f5f5;
	--wrcb-radius: 16px;

	display: flex;
	flex-direction: column;
	gap: 128px;
}

/**
 * Layout variants — the two Figma frames this widget covers:
 * - Intro (default, node 70-13818): 628×471 image, 64px image/text gap.
 * - Regions (node 70-13933): 530×368 image, 48px image/text gap.
 */
.wrcb-row {
	display: flex;
	align-items: flex-start;
	gap: 64px;
}

.wrcb-rows--regions .wrcb-row {
	gap: 48px;
}

/* The media block comes first in the markup, so it's the right-hand
   variant that needs reversing — reversing "left" instead had the
   Links/Rechts setting working backwards. */
.wrcb-row--image-right {
	flex-direction: row-reverse;
}

.wrcb-row__media {
	flex: 0 0 628px;
	width: 628px;
	max-width: 100%;
	/* Fixed crop box per Figma (not the uploaded image's own ratio) —
	   without it, `height: auto` on the <img> makes `object-fit: cover`
	   a no-op and every row renders at a different size. */
	aspect-ratio: 628 / 471;
	border-radius: var(--wrcb-radius);
	overflow: hidden;
}

.wrcb-rows--regions .wrcb-row__media {
	flex-basis: 530px;
	width: 530px;
	aspect-ratio: 530 / 368;
}

.wrcb-row__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--wrcb-radius);
}

.wrcb-row__content {
	flex: 1 1 420px;
	min-width: 280px;
	display: flex;
	flex-direction: column;
	/* Intro: 20px between heading group, text and callout (Figma). */
	gap: 20px;
}

/* Regions: 16px heading-to-text (Figma). */
.wrcb-rows--regions .wrcb-row__content {
	gap: 16px;
}

.wrcb-row__heading-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wrcb-row__eyebrow {
	display: block;
	font: 600 18px/24px var(--wrcb-body-font);
	color: var(--wrcb-text-muted);
}

.wrcb-row__heading {
	margin: 0;
	font: 700 36px/44px var(--wrcb-heading-font);
	letter-spacing: -0.02em;
	color: var(--wrcb-text-primary);
}

.wrcb-rows--regions .wrcb-row__heading {
	font-size: 30px;
	line-height: 38px;
	letter-spacing: 0;
}

.wrcb-row__body {
	font: 400 18px/28px var(--wrcb-body-font);
	color: var(--wrcb-text-tertiary);
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.wrcb-rows--regions .wrcb-row__body {
	gap: 18px;
}

.wrcb-row__body p {
	margin: 0;
}

/* The WYSIWYG editor often leaves a trailing empty <p></p>. It has no
   height, but as a flex child it still takes a 20px gap — adding space
   above the callout that the design doesn't have. */
.wrcb-row__body p:empty {
	display: none;
}

/* Figma: 32px before the closing text (12px more than the 20px column
   gap — same for the checklist, set on its own rule below); 24px before
   region tags (8px more than that variant's 16px gap). */
.wrcb-row__body--after {
	margin-top: 12px;
}

.wrcb-rows--regions .wrcb-row__tags {
	margin-top: 8px;
}

.wrcb-row__body strong,
.wrcb-row__body b {
	font-weight: 600;
	color: var(--wrcb-text-secondary);
}

.wrcb-row__callout {
	background: var(--wrcb-brand-50);
	border-left: 4px solid var(--wrcb-brand);
	border-radius: 4px 16px 16px 4px;
	padding: 16px 24px;
	color: #3a3a3a;
}

.wrcb-row__callout p {
	margin: 0;
	font: 500 18px/28px var(--wrcb-body-font);
}

.wrcb-row__checklist {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 12px 0 0;
	padding: 0;
}

.wrcb-row__checklist-item {
	/* The theme's global `body ul li, body ol li` rule (style.min.css)
	   sets a 0.5rem (8px) vertical margin on every <li> with nothing in
	   this file to override it — stacking on top of the 16px flex `gap`
	   above and roughly doubling the visible space between items. */
	margin: 0;
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.wrcb-row__checklist-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	padding-top: 2px;
	font-size: 16px;
	color: var(--wrcb-text-tertiary);
}

/* Elementor renders this as inline <svg>, which fills the 24px box by
   default instead of sitting as a smaller 16px glyph inside it. */
.wrcb-row__checklist-icon svg {
	width: 16px;
	height: 16px;
	fill: currentColor;
}

.wrcb-row__checklist-text {
	font: 400 18px/28px var(--wrcb-body-font);
	color: var(--wrcb-text-tertiary);
}

.wrcb-row__tags {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.wrcb-row__tags li {
	margin: 0;
	font: 500 14px/20px var(--wrcb-body-font);
	color: var(--wrcb-text-primary);
	border: 1px solid var(--wrcb-tag-border);
	border-radius: 16px;
	padding: 2px 8px;
}

@media (max-width: 900px) {
	.wrcb-row,
	.wrcb-row--image-right,
	.wrcb-rows--regions .wrcb-row {
		flex-direction: column;
		/* Unchanged from before the variant split — Figma has no mobile spec. */
		gap: 48px;
	}

	.wrcb-row__media,
	.wrcb-rows--regions .wrcb-row__media {
		flex-basis: auto;
		width: 100%;
	}
}

@media (max-width: 640px) {
	.wrcb-rows {
		gap: 64px;
	}

	.wrcb-row__heading {
		font-size: 28px;
		line-height: 34px;
	}
}
