/**
 * Reuses the 'Archivo' heading font already loaded for the Destination
 * Cards / Featured Camp widgets (see functions.php), so this widget
 * doesn't request the font again.
 */
:root {
	--wrhs-heading-font: 'Archivo', var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrhs-body-font: var(--font-family, 'Source Sans 3'), Arial, Helvetica, sans-serif;
	--wrhs-navy: #0f4c81;
	--wrhs-yellow-200: #fdefce;
	--wrhs-yellow-300: #fadf9e;
	--wrhs-yellow-400: #fdbf53;
	--wrhs-text-primary: #171717;
	--wrhs-radius: 16px;
}

/**
 * max-width + auto margins caps how wide this hero can grow on
 * ultra-wide monitors — whatever section/column it's placed in
 * (often a stretched/full-width one) can be far wider than is
 * comfortable for the hero itself, and it would otherwise just keep
 * stretching edge to edge with it. 1800px is a generous cap that only
 * kicks in past very wide viewports; typical desktop widths render
 * unchanged since the section is narrower than the cap already.
 */
.wrhs-hero {
	position: relative;
	width: 100%;
	max-width: 1800px;
	margin-left: auto;
	margin-right: auto;
	min-height: 480px;
	border-radius: var(--wrhs-radius);
	overflow: hidden;
	background-color: var(--wrhs-navy);
}

/* Figma "Hero" frame is 719px tall at its native 1920px desktop canvas. */
@media (min-width: 1024px) {
	.wrhs-hero {
		min-height: 719px;
	}
}

.wrhs-hero__images {
	position: absolute;
	inset: 0;
}

.wrhs-hero__image {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.wrhs-hero__image.is-active {
	opacity: 1;
}

.wrhs-hero__scrim {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(259deg, rgba(15, 76, 129, 0.2) 4%, var(--wrhs-navy) 85%),
		linear-gradient(180deg, rgba(15, 76, 129, 0.2) 53%, var(--wrhs-navy) 100%);
}

.wrhs-hero__body {
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 32px;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 40px;
}

/**
 * 76px (not 48px) at this tier: `.wrhs-hero__nav` sits 16px from the
 * hero's edge and is 44px wide (see below), so anything closer than
 * 60px overlaps it — the prior 48px let the nav button sit on top of
 * the CTA button/heading. 76px clears it with a 16px gap to spare.
 */
@media (min-width: 640px) {
	.wrhs-hero__body {
		left: 76px;
		right: 76px;
		bottom: 48px;
	}
}

/**
 * left/right: 0 + max-width + auto margins (rather than a fixed px
 * inset from the hero's own edges, like the breakpoints above)
 * re-centers the text/button to the SAME ~1400px reading column the
 * rest of the page's content uses, instead of the hero's own box.
 * Needed once the hero itself can be wider than that column (e.g.
 * placed in an Elementor "stretch"/full-width section, as it is on
 * the homepage) — without this, the text drifts out of alignment with
 * the page content above/below the hero.
 *
 * 1400px was measured directly against page content on two different
 * templates (a classic Elementor section's .elementor-container:
 * max-width 1480px/40px padding nets 1400px of content; a newer Flex
 * Container .e-con row measured at 1400px directly) — this site runs
 * both container systems depending on the page/template, and they
 * don't share a reusable CSS custom property, so 1400px is hardcoded
 * as their common value. Keep this in sync if the site's boxed
 * content width setting changes. A max-width auto-centered absolute
 * element is a standard CSS pattern; harmless when the hero isn't
 * wider than 1400px, since margin:auto then computes to 0.
 */
/**
 * Figma positions "Hero Content" at `top: calc(50% + 35.5px)` with a
 * `-translate-y-1/2` — i.e. vertically centered, nudged down 35.5px —
 * not anchored to the hero's bottom edge. A `bottom: 64px` anchor
 * (matching the base/640px breakpoints above) looked fine when the
 * hero's height and the content's own height happened to leave a
 * similar gap on both sides, but it isn't actually centering anything:
 * once the hero got taller (to match Figma's 719px height fix), all
 * the extra space piled up above the content instead of being split
 * evenly. `top: 50%` + `transform: translateY()` is the correct,
 * height-independent way to center this content block.
 */
/**
 * padding-left/right (not just the max-width/auto-margin centering)
 * because that centering only adds real space once the hero itself is
 * wider than 1400px — at hero widths at or below that (common; the
 * hero's own max-width is 1800px but its actual rendered width depends
 * on the section/column it's placed in) the auto margins collapse to
 * 0, leaving content flush against the hero's edges. `.wrhs-hero__nav`
 * sits 24px from the hero's edge and is 44px wide (see below), so
 * anything closer than 68px overlaps it regardless of centering.
 * 84px clears it with a 16px gap to spare; box-sizing: border-box
 * (inherited) keeps the padding inside the 1400px max-width instead of
 * adding to it.
 */
@media (min-width: 1024px) {
	.wrhs-hero__body {
		left: 0;
		right: 0;
		max-width: 1400px;
		margin-left: auto;
		margin-right: auto;
		padding-left: 84px;
		padding-right: 84px;
		top: 50%;
		bottom: auto;
		transform: translateY(calc(-50% + 35.5px));
		gap: 80px;
	}
}

.wrhs-hero__texts {
	display: grid;
	max-width: 870px;
}

.wrhs-hero__text-slide {
	grid-area: 1 / 1;
	display: flex;
	flex-direction: column;
	gap: 48px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease;
}

.wrhs-hero__text-slide.is-active {
	opacity: 1;
	visibility: visible;
}

/* Figma "Hero Text Section": heading group + subtext, gap 8px. */
.wrhs-hero__text-section {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Figma "Heading Section": kicker + heading sit flush, gap 0. */
.wrhs-hero__heading-group {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.wrhs-hero__kicker {
	display: block;
	font: 600 18px/26px var(--wrhs-body-font);
	text-transform: uppercase;
	background: linear-gradient(87.5deg, var(--wrhs-yellow-400), var(--wrhs-yellow-200));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

@media (min-width: 1024px) {
	.wrhs-hero__kicker {
		font-size: 20px;
		line-height: 30px;
	}
}

.wrhs-hero__heading {
	margin: 0;
	font: 700 40px/48px var(--wrhs-heading-font);
	letter-spacing: -0.02em;
	color: #ffffff;
}

@media (min-width: 1024px) {
	.wrhs-hero__heading {
		font-size: 60px;
		line-height: 72px;
	}
}

/* Figma "Hero Text" is display-2xl (72px/90px) at its native 1920px
   desktop canvas — matched from a wide-enough viewport up, while the
   1024px step above keeps a smaller in-between size for laptop widths. */
@media (min-width: 1440px) {
	.wrhs-hero__heading {
		font-size: 72px;
		line-height: 90px;
	}
}

.wrhs-hero__subtext {
	margin: 0;
	font: 500 18px/28px var(--wrhs-body-font);
	color: #ffffff;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Figma "text-xl": 20px/30px — same step as the kicker above. */
@media (min-width: 1024px) {
	.wrhs-hero__subtext {
		font-size: 20px;
		line-height: 30px;
	}
}

.wrhs-hero__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	height: 56px;
	padding: 12px 18px;
	background: linear-gradient(95deg, var(--wrhs-yellow-300), var(--wrhs-yellow-400));
	border-radius: 8px;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	font: 700 18px/28px var(--wrhs-body-font);
	color: var(--wrhs-text-primary);
	text-decoration: none;
	cursor: pointer;
}

/* Figma "Highlights Container": gap 64px between the rating block and the highlight pair. */
.wrhs-hero__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 64px;
}

/* Figma "Highlight Container": the two highlight items sit in their own nested 32px-gap row. */
.wrhs-hero__highlights {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
}

.wrhs-hero__rating,
.wrhs-hero__highlight {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 157px;
}

.wrhs-hero__stars {
	display: flex;
	gap: 4px;
}

.wrhs-hero__star {
	font-size: 16px;
	background: linear-gradient(91deg, var(--wrhs-yellow-300), var(--wrhs-yellow-400));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* Figma "Rating Texts" / "Highlight Texts": label + count/sub-label, gap 4px. */
.wrhs-hero__rating-texts,
.wrhs-hero__highlight-texts {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wrhs-hero__rating-label,
.wrhs-hero__highlight-number {
	margin: 0;
	font: 700 24px/32px var(--wrhs-heading-font);
	letter-spacing: -0.02em;
	color: #ffffff;
}

.wrhs-hero__rating-count,
.wrhs-hero__highlight-label {
	margin: 0;
	font: 400 16px/24px var(--wrhs-body-font);
	color: #e5e5e5;
}

.wrhs-hero__highlight-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	flex-shrink: 0;
}

/**
 * Elementor renders this icon as inline <svg>, which stretches to fill
 * its wrapper's box size by default (30px) instead of Figma's smaller
 * 24px glyph — and the parent's background-clip:text gradient trick
 * (kept for the star icons, which ARE icon-font glyphs) is a silent
 * no-op on an SVG's path, so it rendered plain black instead of the
 * yellow gradient. `fill: currentColor` + `color` on the svg itself is
 * the correct way to color an SVG icon; a flat yellow-400 approximates
 * the gradient without needing an actual SVG <linearGradient> def.
 */
.wrhs-hero__highlight-icon svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
	color: var(--wrhs-yellow-400);
}

/**
 * Scoped as `.wrhs-hero .wrhs-hero__nav` (not just `.wrhs-hero__nav`) so
 * these plain <button> elements out-specify the site's global Elementor
 * Kit button reset (`.elementor-kit-<id> button`, specificity 0,1,1),
 * which otherwise overrides their size/padding with the kit's default
 * button styling.
 */
.wrhs-hero .wrhs-hero__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: rgba(255, 255, 255, 0.9);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border: 0;
	border-radius: 9999px;
	color: var(--wrhs-text-primary);
	font-size: 16px;
	cursor: pointer;
}

/**
 * Without this, the site's global Elementor Kit `:hover` rule
 * (`.elementor-kit-<id> button:hover { background-color: ... }`,
 * specificity 0,2,1) out-specifies the plain `.wrhs-hero .wrhs-hero__nav`
 * rule above on hover (0,2,0 loses to 0,2,1), repainting the button's
 * background to the kit's dark secondary color and making the icon
 * disappear against it. Tripling the class count here (0,3,0) beats it
 * regardless of stylesheet load order — same fix as Destination Hero's
 * nav buttons (assets/css/destination-hero.css).
 */
.wrhs-hero .wrhs-hero__nav:hover {
	background: #ffffff;
}

/**
 * Elementor Pro's site-wide Font Awesome Pro Kit integration (a
 * database setting, not theme code) injects its own CSS that
 * out-cascades this theme's bundled Font Awesome 6 Free icon set.
 * The Kit's currently-configured icon subset doesn't include
 * angle-left/angle-right, so its rule sets an empty `content`,
 * making these nav icons invisible wherever that Kit is active.
 * Setting content + font-family explicitly (matching the theme's own
 * bundled all.min.css mapping) makes these two icons independent of
 * whichever Font Awesome source wins the cascade.
 */
.wrhs-hero .wrhs-hero__nav--prev i::before {
	content: '\f104';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
}

.wrhs-hero .wrhs-hero__nav--next i::before {
	content: '\f105';
	font-family: 'Font Awesome 6 Free';
	font-weight: 900;
}

.wrhs-hero .wrhs-hero__nav--prev {
	left: 16px;
}

.wrhs-hero .wrhs-hero__nav--next {
	right: 16px;
}

@media (min-width: 1024px) {
	.wrhs-hero .wrhs-hero__nav--prev {
		left: 24px;
	}

	.wrhs-hero .wrhs-hero__nav--next {
		right: 24px;
	}
}

.wrhs-hero__dots {
	position: absolute;
	right: 24px;
	bottom: 24px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 8px;
	background: rgba(15, 76, 129, 0.25);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	border-radius: 9999px;
}

@media (min-width: 1024px) {
	.wrhs-hero__dots {
		right: 40px;
		bottom: 40px;
	}
}

.wrhs-hero .wrhs-hero__dot {
	width: 16px;
	height: 4px;
	padding: 0;
	background: rgba(244, 248, 251, 0.5);
	border: 0;
	border-radius: 9999px;
	cursor: pointer;
}

.wrhs-hero .wrhs-hero__dot.is-active {
	background: #ffffff;
}

/**
 * Same global Elementor Kit `button:hover` override as the nav
 * buttons above (specificity 0,2,1) — without re-asserting each
 * state's own background on hover, it beats the plain, non-`:hover`
 * `.wrhs-hero .wrhs-hero__dot` / `.is-active` rules (0,2,0 / 0,3,0)
 * and repaints every dot, active or not, to the kit's dark secondary
 * color. `:hover` itself counts as a class in the specificity, so
 * these rules (0,3,0 / 0,4,0) out-specify the kit's regardless of
 * stylesheet load order.
 */
.wrhs-hero .wrhs-hero__dot:hover {
	background: rgba(244, 248, 251, 0.5);
}

.wrhs-hero .wrhs-hero__dot.is-active:hover {
	background: #ffffff;
}

@media (max-width: 640px) {
	.wrhs-hero__badges {
		gap: 20px;
	}

	.wrhs-hero__nav {
		display: none;
	}
}
