/**
 * '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 {
	--wrct-heading-font: 'Archivo', var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrct-body-font: var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrct-card-bg: #ffffff;
	--wrct-border: rgba(0, 0, 0, 0.1);
	--wrct-text-primary: #171717;
	--wrct-text-secondary: #404040;
	--wrct-text-muted: #6b7280;
	--wrct-badge-text: #9c6006;
	--wrct-link: #0f4c81;
	--wrct-radius: 16px;
}

/**
 * .wrct-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}} .wrct-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 .wrct-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.
 */
.wrct-section--full-bleed {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

/**
 * --wrct-container-width is set inline by the widget from Elementor's
 * own active Kit "Content Width" setting (get_container_width() in
 * class-scg-content-teaser.php), so the cards line up with every
 * other Elementor section on the page — including when full_width_bg
 * pulls .wrct-section out of its parent container entirely.
 */
.wrct-wrap {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 40px;
	width: 100%;
	max-width: var(--wrct-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) {
	.wrct-wrap {
		padding-left: 30px;
		padding-right: 30px;
	}
}

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

.wrct-header {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	text-align: left;
}

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

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

.wrct-cards {
	display: grid;
	align-items: stretch;
	gap: 32px;
	width: 100%;
	grid-template-columns: repeat(4, 1fr);
}

.wrct-cards--cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.wrct-cards--cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

.wrct-cards--cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

.wrct-card {
	display: flex;
	flex-direction: column;
	background: var(--wrct-card-bg);
	border: 1px solid var(--wrct-border);
	border-radius: var(--wrct-radius);
	overflow: hidden;
}

.wrct-card__media {
	display: block;
	aspect-ratio: 306 / 228;
	border-bottom: 0.5px solid var(--wrct-border);
	background: #e5e7eb;
}

.wrct-card__media img {
	width: 100%;
	height: 100%;
	aspect-ratio: 306 / 228;
	object-fit: cover;
	object-position: center;
	display: block;
}

.wrct-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 24px 16px;
}

.wrct-card__heading {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wrct-card__badge {
	display: block;
	font: 500 16px/24px var(--wrct-body-font);
	text-transform: uppercase;
	color: var(--wrct-badge-text);
}

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

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

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

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

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

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

@media (max-width: 1024px) {
	.wrct-cards--cols-4,
	.wrct-cards--cols-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.wrct-cards--cols-4,
	.wrct-cards--cols-3,
	.wrct-cards--cols-2 {
		grid-template-columns: 1fr;
	}

	.wrct-title {
		font-size: 28px;
		line-height: 34px;
	}
}
