/**
 * Reuses the 'Archivo' heading font + 'Source Sans 3' body font already
 * loaded for the Destination Cards widget (see functions.php), so both
 * widgets share the same font-face requests instead of loading twice.
 */
:root {
	--wrsc-heading-font: 'Archivo', var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrsc-body-font: var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrsc-border: rgba(0, 0, 0, 0.1);
	--wrsc-text-primary: #171717;
	--wrsc-text-secondary: #525252;
	--wrsc-badge-bg: #ebf5f5;
	--wrsc-badge-border: #99c5f1;
	--wrsc-badge-text: #0f4c81;
	--wrsc-radius: 16px;
}

/**
 * max-width + auto margins caps how wide this widget can grow on
 * ultra-wide monitors — whatever section/column it's placed in (often
 * a stretched/full-width one, as on the homepage) can be far wider
 * than is comfortable for this bordered CTA card, and it would
 * otherwise just keep stretching edge to edge with it (the inner
 * `.wrsc-cta__inner` content was already capped at 870px, but the
 * visible white bordered box around it wasn't). Same fix as Header
 * Slider (assets/css/header-slider.css) and Destination Hero
 * (assets/css/destination-hero.css).
 */
.wrsc-cta {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	width: 100%;
	max-width: 1800px;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
	padding: 80px 24px;
	border: 2px solid var(--wrsc-border);
	border-radius: var(--wrsc-radius);
	background-color: #ffffff;
	overflow: hidden;
}

@media (min-width: 768px) {
	.wrsc-cta {
		padding: 80px 114px;
	}
}

/**
 * The photo is NOT a full-cover background — in the Figma design it's
 * inset from the top so the badge/heading/description sit on plain
 * white first, and the photo only takes over lower down. `top` (the
 * "background_reveal" control) shrinks this wrapper to just the window
 * the photo is allowed to occupy; the <img> inside then does a plain,
 * undistorted object-fit:cover of THAT window — no oversized/forced
 * crop hack, so "background_zoom" (a plain transform: scale()) is the
 * only thing that ever zooms in past the natural cover fit.
 */
.wrsc-cta__bg {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	top: 18%;
	overflow: hidden;
	/* NOT `border-radius: inherit` — combined with overflow:hidden and a
	   transform:scale()'d child (the zoom control), Chromium fails to
	   composite the child at all and the photo disappears entirely. An
	   explicit value (matching --wrsc-radius) avoids the bug. */
	border-radius: var(--wrsc-radius);
	pointer-events: none;
}

.wrsc-cta__bg img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	transform: scale(1);
}

.wrsc-cta__inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	width: 100%;
	max-width: 870px;
}

.wrsc-cta__badge-row {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
}

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

.wrsc-cta__badge-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	color: var(--wrsc-badge-text);
	font-size: 14px;
}

.wrsc-cta__badge-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.wrsc-cta__badge-text {
	font: 500 14px/20px var(--wrsc-body-font);
	color: var(--wrsc-badge-text);
	white-space: nowrap;
}

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

/**
 * Widget_Base::parse_text_editor() does not wrap plain (un-autop'd)
 * content in <p> tags, which is what a WYSIWYG control's raw default
 * value is until an editor actually saves through TinyMCE — so the
 * typography must live on the wrapper itself, not a `p` descendant,
 * or it silently falls back to the theme's global text styles.
 */
.wrsc-cta__desc {
	width: 100%;
	text-align: center;
	font: 500 16px/24px var(--wrsc-body-font);
	color: var(--wrsc-text-secondary);
}

.wrsc-cta__desc p {
	margin: 0;
}

.wrsc-cta__desc strong,
.wrsc-cta__desc b {
	font-weight: 700;
}

.wrsc-cta__button {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 56px;
	min-width: 360px;
	padding: 12px 18px;
	background-image: linear-gradient(96deg, #fadf9e 0%, #fdbf53 100%);
	border-radius: 8px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	font: 700 18px/28px var(--wrsc-body-font);
	color: var(--wrsc-text-primary);
	text-decoration: none;
	text-align: center;
	cursor: pointer;
}

.wrsc-cta__button:hover {
	color: var(--wrsc-text-primary);
	filter: brightness(0.97);
}

@media (max-width: 640px) {
	.wrsc-cta {
		padding: 48px 20px;
		gap: 24px;
	}

	.wrsc-cta__title {
		font-size: 28px;
		line-height: 34px;
	}

	.wrsc-cta__button {
		min-width: 100%;
	}
}
