/* =============================================================
   HeroFeatureCarousel — Hero Slider
   Reusable child-site hero feature carousel
   Depends on: Splide.js from the active child-site theme
   ============================================================= */

:root {
	--hfc-aspect-ratio: 2 / 1;
	--hfc-min-height: 320px;

	--hfc-font: var(--title-font);
	--hfc-title-font: var(--title-font);
	--hfc-title-size: clamp(2rem, 4.5vw, 4rem);
	--hfc-title-weight: 700;
	--hfc-title-color: #ffffff;
	--hfc-title-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);

	--hfc-kicker-color: #DDEBDD;
	--hfc-kicker-size: 0.78rem;
	--hfc-kicker-tracking: 0.14em;

	--hfc-desc-size: clamp(0.9rem, 1.6vw, 1.2rem);
	--hfc-desc-font: var(--body-font);
	--hfc-desc-color: rgba(255, 255, 255, 0.9);
	--hfc-desc-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);

	--hfc-cta-size: 0.8rem;
	--hfc-cta-color: #ffffff;
	--hfc-cta-tracking: 0.12em;
	--hfc-cta-bg: rgba(6, 64, 43, 0.35);
	--hfc-cta-border: rgba(255, 255, 255, 0.82);
	--hfc-cta-bg-hover: rgba(6, 64, 43, 0.72);
	--hfc-cta-border-hover: #ffffff;
	--hfc-cta-radius: 3px;
	--hfc-cta-pad: 0.65rem 1.6rem;

	--hfc-content-pad-x: 1.5rem;
	--hfc-content-max-width: 870px;
	--hfc-text-max-width: 590px;

	--hfc-overlay-gradient: linear-gradient(
		to bottom,
		rgba(4, 27, 19, 0.56) 0%,
		rgba(4, 27, 19, 0.24) 34%,
		rgba(4, 27, 19, 0.26) 100%
	);

	--hfc-transition-speed: 900ms;
	--hfc-ken-burns-scale: 1.06;
	--hfc-ken-burns-duration: 7s;

	--hfc-arrow-size: clamp(42px, 4vw, 54px);
	--hfc-arrow-color: #ffffff;
	--hfc-arrow-bg: rgba(6, 64, 43, 0.46);
	--hfc-arrow-bg-hover: rgba(6, 64, 43, 0.82);
	--hfc-arrow-border: rgba(255, 255, 255, 0.32);
	--hfc-arrow-offset: clamp(1rem, 3vw, 2.5rem);
	--hfc-control-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
	--hfc-control-ring: rgba(221, 235, 221, 0.9);

	--hfc-dot-color: rgba(255, 255, 255, 0.46);
	--hfc-dot-active: #ffffff;
	--hfc-dot-size: 7px;
	--hfc-dot-active-width: 28px;

	--hfc-progress-height: 3px;
	--hfc-progress-track: rgba(255, 255, 255, 0.18);
	--hfc-progress-fill: #ffffff;
}

.HeroFeatureCarouselWrapper {
	position: relative;
	width: 100%;
	aspect-ratio: var(--hfc-aspect-ratio);
	min-height: var(--hfc-min-height);
	overflow: hidden;
	background: #000000;
}

.HeroFeatureCarousel.splide,
.HeroFeatureCarousel .splide__track,
.HeroFeatureCarousel .splide__list {
	width: 100%;
	height: 100%;
}

.HeroFeatureCarouselItem {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.hfc-slide-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
	outline: none;
}

.hfc-slide-bg {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.hfc-slide-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	display: block;
	object-fit: cover;
	object-position: center center;
	opacity: 1;
	transform: scale(1);
	transition:
		transform var(--hfc-transition-speed) ease,
		opacity 0.35s ease;
}

.hfc-slide-img--deferred,
.hfc-slide-img--loading {
	opacity: 0;
}

.hfc-slide-img--loaded {
	opacity: 1;
}

.splide__slide.is-active .hfc-slide-img {
	transform: scale(var(--hfc-ken-burns-scale));
	transition:
		transform var(--hfc-ken-burns-duration) ease-out,
		opacity 0.35s ease;
	will-change: transform;
}

.splide__slide:not(.is-active) .hfc-slide-img {
	transform: scale(1);
	transition:
		transform var(--hfc-transition-speed) ease,
		opacity 0.35s ease;
}

.hfc-slide-overlay {
	position: absolute;
	inset: 0;
	background: var(--hfc-overlay-gradient);
	pointer-events: none;
	z-index: 1;
}

.hfc-slide-content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: var(--hfc-content-max-width);
	padding: 0 var(--hfc-content-pad-x);
	transform: translateY(16px);
	opacity: 0;
	transition:
		transform var(--hfc-transition-speed) ease,
		opacity var(--hfc-transition-speed) ease;
}

.HeroFeatureCarousel:not(.is-initialized) .splide__slide:first-child .hfc-slide-content {
	transform: translateY(0);
	opacity: 1;
}

.splide__slide.is-active .hfc-slide-content {
	transform: translateY(0);
	opacity: 1;
	transition-delay: 200ms;
}

.hfc-text {
	max-width: var(--hfc-text-max-width);
	width: 100%;
}

.hfc-kicker {
	display: block;
	margin-bottom: 0.5rem;
	color: var(--hfc-kicker-color);
	font-family: var(--hfc-desc-font);
	font-size: var(--hfc-kicker-size);
	font-weight: 700;
	letter-spacing: var(--hfc-kicker-tracking);
	line-height: 1.2;
	text-shadow: var(--hfc-desc-shadow);
	text-transform: uppercase;
}

.hfc-kicker:empty {
	display: none;
}

.hfc-title {
	font-family: var(--hfc-title-font);
	font-size: var(--hfc-title-size);
	font-weight: var(--hfc-title-weight);
	color: var(--hfc-title-color);
	line-height: 1.08;
	letter-spacing: 0;
	margin-bottom: 0.6rem;
	text-shadow: var(--hfc-title-shadow);
}

.hfc-description {
	font-family: var(--hfc-desc-font);
	font-size: var(--hfc-desc-size);
	color: var(--hfc-desc-color);
	line-height: 1.55;
	text-shadow: var(--hfc-desc-shadow);
}

.hfc-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin-top: 1.4rem;
	padding: var(--hfc-cta-pad);
	border: 2px solid var(--hfc-cta-border);
	border-radius: var(--hfc-cta-radius);
	background: var(--hfc-cta-bg);
	font-family: var(--hfc-font);
	font-size: var(--hfc-cta-size);
	font-weight: 600;
	letter-spacing: var(--hfc-cta-tracking);
	text-transform: uppercase;
	color: var(--hfc-cta-color);
	transition:
		background 0.22s ease,
		border-color 0.22s ease,
		gap 0.22s ease;
}

.hfc-slide-link:hover .hfc-cta,
.hfc-slide-link:focus .hfc-cta {
	background: var(--hfc-cta-bg-hover);
	border-color: var(--hfc-cta-border-hover);
	gap: 0.7rem;
}

.HeroFeatureCarousel .splide__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--hfc-arrow-size);
	height: var(--hfc-arrow-size);
	background: var(--hfc-arrow-bg);
	border: 1px solid var(--hfc-arrow-border);
	border-radius: 50%;
	color: var(--hfc-arrow-color);
	opacity: 1;
	box-shadow: var(--hfc-control-shadow);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transform: translateY(-50%);
	transition:
		background 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		transform 0.2s ease;
}

.HeroFeatureCarousel .splide__arrow:hover:not(:disabled),
.HeroFeatureCarousel .splide__arrow:focus-visible {
	background: var(--hfc-arrow-bg-hover);
	border-color: rgba(255, 255, 255, 0.62);
	box-shadow: 0 18px 42px rgba(0, 0, 0, 0.36);
	outline: 2px solid var(--hfc-control-ring);
	outline-offset: 3px;
	transform: translateY(-50%) scale(1.04);
}

.HeroFeatureCarousel .splide__arrow:active:not(:disabled) {
	transform: translateY(-50%) scale(0.98);
}

.HeroFeatureCarousel .splide__arrow svg {
	fill: currentColor;
	width: 15px;
	height: 15px;
}

.HeroFeatureCarousel .splide__arrow--prev {
	left: var(--hfc-arrow-offset);
}

.HeroFeatureCarousel .splide__arrow--next {
	right: var(--hfc-arrow-offset);
}

.HeroFeatureCarousel .splide__pagination {
	left: 50%;
	right: auto;
	bottom: 1.15rem;
	width: auto;
	gap: 7px;
	padding: 7px 9px;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	background: rgba(6, 64, 43, 0.36);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transform: translateX(-50%);
	z-index: 3;
}

.HeroFeatureCarousel .splide__pagination li {
	line-height: 0;
}

.HeroFeatureCarousel .splide__pagination__page {
	width: var(--hfc-dot-size);
	height: var(--hfc-dot-size);
	border-radius: 999px;
	background: var(--hfc-dot-color);
	border: none;
	opacity: 1;
	margin: 0;
	padding: 0;
	cursor: default;
	pointer-events: none;
	transition: width 0.3s ease, background 0.3s ease;
}

.HeroFeatureCarousel .splide__pagination__page.is-active {
	width: var(--hfc-dot-active-width);
	background: var(--hfc-dot-active);
	transform: none;
}

.hfc-progress {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: var(--hfc-progress-height);
	background: var(--hfc-progress-track);
	z-index: 4;
	pointer-events: none;
}

.hfc-progress-bar {
	height: 100%;
	width: 100%;
	background: var(--hfc-progress-fill);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 100ms linear;
	will-change: transform;
}

@media (max-width: 1020px) {
	:root {
		--hfc-content-pad-x: 1.25rem;
	}

	.HeroFeatureCarousel .splide__arrow {
		display: none;
	}
}

@media (max-width: 480px) {
	.HeroFeatureCarouselWrapper {
		aspect-ratio: var(--hfc-aspect-ratio) !important;
	}

	:root {
		--hfc-min-height: 320px;
		--hfc-content-pad-x: 1rem;
	}

	.HeroFeatureCarousel .splide__pagination {
		bottom: 0.9rem;
	}
}
