/**
 * 'Archivo' (Figma's display/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 same
 * 'Source Sans 3' stack already declared by the theme's --font-family.
 */
:root {
	--wrpc-heading-font: 'Archivo', var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrpc-body-font: var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrpc-card-bg: #ffffff;
	--wrpc-border: rgba(0, 0, 0, 0.1);
	--wrpc-text-primary: #171717;
	--wrpc-text-secondary: #525252;
	--wrpc-text-muted: #6b7280;
	--wrpc-badge-text: #9c6006;
	--wrpc-link: #0f4c81;
	--wrpc-radius: 16px;
}

/**
 * .wrpc-section's background-color and padding are set by Elementor
 * itself (the "Hintergrund & Abstand" style controls, bg_color and
 * section_padding), which always render an effective value — default
 * or edited — via {{WRAPPER}} .wrpc-section selectors.
 */

/**
 * Opt-in (full_width_bg control): break the section out of its parent's
 * boxed container so the background spans the full viewport width,
 * while .wrpc-wrap's own max-width keeps the actual content aligned
 * where it would normally sit. Relies on the theme's existing global
 * `body { overflow-x: hidden }` to avoid a horizontal scrollbar.
 */
.wrpc-section--full-bleed {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

/**
 * --wrpc-container-width is set inline by the widget from Elementor's
 * own active Kit "Content Width" setting (get_container_width() in
 * class-scg-post-cards.php), so the cards line up with every other
 * Elementor section on the page — including when full_width_bg pulls
 * .wrpc-section out of its parent container entirely.
 */
.wrpc-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 48px;
	width: 100%;
	max-width: var(--wrpc-container-width, 1140px);
	margin: 0 auto;
	box-sizing: border-box;
	/* Matches the theme's own .uk-container gutter (uikit.min.css),
	   so full_width_bg cards keep the same inset as the rest of the
	   page below the container's max-width, not flush to the screen
	   edge. */
	padding-left: 15px;
	padding-right: 15px;
}

@media (min-width: 640px) {
	.wrpc-wrap {
		padding-left: 30px;
		padding-right: 30px;
	}
}

@media (min-width: 960px) {
	.wrpc-wrap {
		padding-left: 40px;
		padding-right: 40px;
	}
}

.wrpc-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	max-width: 720px;
	text-align: center;
}

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

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

.wrpc-cards {
	display: flex;
	flex-direction: column;
	gap: 32px;
	width: 100%;
}

.wrpc-card {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	background: var(--wrpc-card-bg);
	border: 1px solid var(--wrpc-border);
	border-radius: var(--wrpc-radius);
	overflow: hidden;
	min-width: 0;
}

.wrpc-card__media {
	display: block;
	flex: 0 0 418px;
	width: 418px;
	height: 242px;
	border-right: 0.5px solid var(--wrpc-border);
	background: #e5e7eb;
}

.wrpc-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.wrpc-card__body {
	box-sizing: border-box;
	display: flex;
	flex: 1 1 0%;
	flex-direction: column;
	justify-content: center;
	gap: 24px;
	min-width: 248px;
	height: 242px;
	overflow: hidden;
	padding: 24px 34px 16px;
}

.wrpc-card__content {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wrpc-card__heading {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.wrpc-card__badge {
	display: block;
	font: 500 14px/20px var(--wrpc-body-font);
	text-transform: uppercase;
	color: var(--wrpc-badge-text);
}

.wrpc-card__title {
	margin: 0;
	font: 700 30px/38px var(--wrpc-heading-font);
	letter-spacing: -0.02em;
	color: var(--wrpc-text-primary);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wrpc-card__title a {
	color: inherit;
	text-decoration: none;
}

.wrpc-card__title a:hover {
	text-decoration: underline;
}

.wrpc-card__desc {
	margin: 0;
	font: 400 16px/24px var(--wrpc-body-font);
	color: var(--wrpc-text-secondary);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wrpc-card__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: fit-content;
	font: 600 16px/24px var(--wrpc-body-font);
	color: var(--wrpc-link);
	text-decoration: none;
}

.wrpc-card__link:hover {
	text-decoration: underline;
}

.wrpc-card__link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	font-size: 16px;
	line-height: 1;
	color: var(--wrpc-link);
}

@media (max-width: 900px) {
	.wrpc-card__media {
		flex-basis: 100%;
		width: 100%;
		height: 220px;
		border-right: 0;
		border-bottom: 0.5px solid var(--wrpc-border);
	}

	.wrpc-card__body {
		flex-basis: 100%;
		padding: 24px;
	}
}

@media (max-width: 640px) {
	.wrpc-title {
		font-size: 28px;
		line-height: 34px;
	}

	.wrpc-card__title {
		font-size: 24px;
		line-height: 30px;
	}
}
