/**
 * Icon Feature Cards widget styles.
 *
 * Figma reference:
 * https://www.figma.com/design/UFbyQSXqjJ3fkYXo3ORgO7/Wellenreiten-2026-Handoff-Ext--Copy-?node-id=70-14063
 *
 * '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.
 */
.wrif-section {
	--wrif-heading-font: 'Archivo', var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrif-body-font: var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrif-border: rgba(0, 0, 0, 0.1);
	--wrif-text-primary: #171717;
	--wrif-text-tertiary: #525252;
	--wrif-brand: #0f4c81;
	--wrif-brand-50: #ebf5f5;
	--wrif-brand-300: #99c5f1;
	--wrif-radius: 16px;
}

/**
 * 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 .wrif-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. Same
 * pattern as Destination Cards / Post Cards (assets/css/destination-cards.css,
 * assets/css/post-cards.css).
 */
.wrif-section--full-bleed {
	width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
}

/**
 * --wrif-container-width is set inline by the widget from Elementor's
 * own active Kit "Content Width" setting (get_container_width() in
 * class-scg-icon-feature-cards.php), so the cards line up with every
 * other Elementor section on the page instead of a hardcoded guess.
 */
.wrif-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 48px;
	width: 100%;
	max-width: var(--wrif-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;
}

/* Figma "Header Section" is narrower (1090px) than the full content
   column — just the badge/heading/intro text, centered; the cards row
   below it spans the full .wrif-wrap width. */
.wrif-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
	width: 100%;
	max-width: 1090px;
}

.wrif-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	height: 26px;
	background: var(--wrif-brand-50);
	border: 1px solid var(--wrif-brand-300);
	border-radius: 16px;
	padding: 2px 8px 2px 6px;
}

.wrif-badge__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	font-size: 14px;
	color: var(--wrif-brand);
}

/**
 * Elementor renders these icons as inline <svg> (not an icon-font glyph),
 * which stretches to fill its wrapper's box size by default — font-size
 * alone doesn't constrain an SVG. Must size the <svg> itself explicitly
 * to the smaller glyph size Figma specifies, not the larger badge/card
 * box it sits inside.
 */
.wrif-badge__icon svg {
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.wrif-badge__text {
	font: 500 14px/20px var(--wrif-body-font);
	color: var(--wrif-brand);
	white-space: nowrap;
}

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

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

.wrif-intro p {
	margin: 0;
}

.wrif-intro strong,
.wrif-intro b {
	font-weight: 600;
	color: var(--wrif-text-primary);
}

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

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

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

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

@media (max-width: 620px) {
	.wrif-cards {
		grid-template-columns: 1fr;
	}
}

.wrif-card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	background: #ffffff;
	border: 1px solid var(--wrif-border);
	border-radius: var(--wrif-radius);
	padding: 40px;
}

.wrif-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 10px;
	background: var(--wrif-brand-50);
	color: var(--wrif-brand);
	font-size: 20px;
}

/* See .wrif-badge__icon svg comment: the inline <svg> Elementor renders
   must be sized explicitly, or it fills the whole 64px box instead of
   sitting as a small 20px glyph inside it. */
.wrif-card__icon svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.wrif-card__title {
	margin: 0;
	font: 700 24px/32px var(--wrif-heading-font);
	letter-spacing: -0.02em;
	color: var(--wrif-text-primary);
}

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

.wrif-card__text strong,
.wrif-card__text b {
	font-weight: 600;
	color: #404040;
}

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

	.wrif-card {
		padding: 24px;
	}
}
