/**
 * RC Hero — Rotary club hero section
 */

.rch-hero {
	--rch-navy: #013e7f;
	--rch-accent: #f7a81b;
	--rch-white: #ffffff;
	--rch-overlay-color: #013e7f;
	--rch-overlay-opacity: 0.75;
	--rch-quote-bg-color: #013e7f;
	--rch-quote-bg-opacity: 0.92;
	--rch-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	position: relative;
	width: 100%;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	font-family: var(--rch-font);
}

.rch-hero a {
	text-decoration: none;
}

.rch-hero a:hover,
.rch-hero a:focus,
.rch-hero a:active {
	text-decoration: none;
}

/* Background */
.rch-hero__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.rch-hero__slides,
.rch-hero__slide {
	position: absolute;
	inset: 0;
}

.rch-hero__slide {
	background-size: cover;
	background-position: center;
	z-index: 0;
}

/* Fade (default) */
.rch-hero__slides--fade .rch-hero__slide {
	opacity: 0;
	transition: opacity var(--rch-slide-duration, 800ms) ease;
}

.rch-hero__slides--fade .rch-hero__slide.is-active {
	opacity: 1;
	z-index: 1;
}

/* Horizontal slide */
.rch-hero__slides--slide {
	overflow: hidden;
}

.rch-hero__slides--slide .rch-hero__slide {
	opacity: 1;
	transform: translateX(100%);
	transition: transform var(--rch-slide-duration, 800ms) ease;
}

.rch-hero__slides--slide .rch-hero__slide.is-active {
	transform: translateX(0);
	z-index: 2;
}

.rch-hero__slides--slide .rch-hero__slide.is-exiting {
	transform: translateX(-100%);
	z-index: 1;
}

.rch-hero__slides--slide.is-direction-prev .rch-hero__slide:not(.is-active):not(.is-exiting) {
	transform: translateX(-100%);
}

.rch-hero__slides--slide.is-direction-prev .rch-hero__slide.is-exiting {
	transform: translateX(100%);
}

/* Vertical slide */
.rch-hero__slides--slide_up {
	overflow: hidden;
}

.rch-hero__slides--slide_up .rch-hero__slide {
	opacity: 1;
	transform: translateY(100%);
	transition: transform var(--rch-slide-duration, 800ms) ease;
}

.rch-hero__slides--slide_up .rch-hero__slide.is-active {
	transform: translateY(0);
	z-index: 2;
}

.rch-hero__slides--slide_up .rch-hero__slide.is-exiting {
	transform: translateY(-100%);
	z-index: 1;
}

.rch-hero__slides--slide_up.is-direction-prev .rch-hero__slide:not(.is-active):not(.is-exiting) {
	transform: translateY(-100%);
}

.rch-hero__slides--slide_up.is-direction-prev .rch-hero__slide.is-exiting {
	transform: translateY(100%);
}

/* Zoom */
.rch-hero__slides--zoom .rch-hero__slide {
	opacity: 0;
	transform: scale(1.12);
	transition:
		opacity var(--rch-slide-duration, 800ms) ease,
		transform var(--rch-slide-duration, 800ms) ease;
}

.rch-hero__slides--zoom .rch-hero__slide.is-active {
	opacity: 1;
	transform: scale(1);
	z-index: 1;
}

/* Ken Burns — crossfade between slides, slow zoom on the active one */
.rch-hero__slides--ken_burns .rch-hero__slide {
	opacity: 0;
	transition: opacity var(--rch-slide-duration, 800ms) ease;
}

.rch-hero__slides--ken_burns .rch-hero__slide.is-active {
	opacity: 1;
	z-index: 1;
}

.rch-hero__slides--ken_burns .rch-hero__slide.is-ken-burns {
	animation: rch-ken-burns 14s ease-out forwards;
}

@keyframes rch-ken-burns {
	from {
		transform: scale(1);
	}
	to {
		transform: scale(1.1);
	}
}

.rch-hero__overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
}

/* Page: left-heavy gradient (tint uses --rch-overlay-color) */
.rch-hero__overlay--page {
	background: linear-gradient(
		90deg,
		color-mix(in srgb, var(--rch-overlay-color) calc(var(--rch-overlay-opacity) * 100%), transparent) 0%,
		color-mix(in srgb, var(--rch-overlay-color) calc(var(--rch-overlay-opacity) * 85%), transparent) 45%,
		color-mix(in srgb, var(--rch-overlay-color) 25%, transparent) 70%,
		transparent 100%
	);
}

/* Home: strong overlay on text (left) side */
.rch-hero__overlay--home {
	background: linear-gradient(
		100deg,
		color-mix(in srgb, var(--rch-overlay-color) calc(var(--rch-overlay-opacity) * 100%), transparent) 0%,
		color-mix(in srgb, var(--rch-overlay-color) calc(var(--rch-overlay-opacity) * 95%), transparent) 22%,
		color-mix(in srgb, var(--rch-overlay-color) calc(var(--rch-overlay-opacity) * 82%), transparent) 42%,
		color-mix(in srgb, var(--rch-overlay-color) calc(var(--rch-overlay-opacity) * 50%), transparent) 58%,
		color-mix(in srgb, var(--rch-overlay-color) calc(var(--rch-overlay-opacity) * 28%), transparent) 72%,
		color-mix(in srgb, #000000 calc(var(--rch-overlay-opacity) * 18%), transparent) 100%
	);
}

.rch-hero__dots {
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 25;
	display: flex;
	gap: 0.5rem;
	pointer-events: auto;
}

.rch-hero__dot {
	position: relative;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid var(--rch-white);
	background: transparent;
	padding: 0;
	margin: 0;
	cursor: pointer;
	opacity: 0.75;
	transition: opacity 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
	-webkit-tap-highlight-color: transparent;
}

/* Larger tap/click target without changing visual size */
.rch-hero__dot::before {
	content: "";
	position: absolute;
	inset: -10px;
}

.rch-hero__dot:hover {
	opacity: 1;
	transform: scale(1.15);
}

.rch-hero__dot.is-active,
.rch-hero__dot:hover {
	opacity: 1;
	background: var(--rch-accent);
	border-color: var(--rch-accent);
}

/* Foreground — pointer-events off so slider dots stay clickable */
.rch-hero__foreground {
	position: relative;
	z-index: 3;
	flex: 1;
	display: flex;
	align-items: center;
	padding: 3rem 1.5rem 2rem;
	max-width: 1200px;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
	pointer-events: none;
}

.rch-hero__foreground a,
.rch-hero__foreground button,
.rch-hero__foreground .rch-btn,
.rch-hero__foreground .rch-hero__quotes,
.rch-hero__foreground .rch-hero__quote {
	pointer-events: auto;
}

.rch-hero--home .rch-hero__foreground {
	align-items: stretch;
	padding: 3rem clamp(1.5rem, 5vw, 4rem);
}

.rch-hero__content {
	width: 100%;
}

.rch-hero__content--home {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100%;
	width: 100%;
}

.rch-hero--home .rch-hero__inner {
	flex: 0 0 auto;
	max-width: min(640px, calc(100% - min(340px, 42vw) - 2rem));
}

.rch-hero--home .rch-hero__quotes {
	position: absolute;
	right: 0;
	bottom: 0;
	left: auto;
	width: min(340px, 42vw);
	max-width: 100%;
	margin: 0;
	z-index: 2;
}

@media (max-width: 992px) {
	.rch-hero--home {
		min-height: min(100svh, 880px);
	}

	.rch-hero--home .rch-hero__foreground {
		align-items: stretch;
		padding: 2.25rem 1.25rem 4.75rem;
	}

	.rch-hero--home .rch-hero__content--home {
		justify-content: flex-start;
		gap: 1.25rem;
		min-height: 0;
	}

	.rch-hero--home .rch-hero__inner {
		max-width: 100%;
		flex: 0 0 auto;
	}

	.rch-hero--home .rch-hero__description {
		margin-bottom: 1rem;
	}

	.rch-hero--home .rch-hero__actions {
		position: relative;
		z-index: 2;
	}

	/* Quote box stacks below CTAs — never absolute on mobile */
	.rch-hero--home .rch-hero__quotes {
		position: relative !important;
		right: auto !important;
		bottom: auto !important;
		left: auto !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		min-height: 0 !important;
		align-self: stretch;
	}

	.rch-hero--home .rch-hero__quotes--slider .rch-hero__quote,
	.rch-hero--home .rch-hero__quotes--slider .rch-hero__quote.is-active {
		position: relative !important;
		right: auto !important;
		bottom: auto !important;
		left: auto !important;
		width: 100% !important;
		transform: none !important;
	}

	.rch-hero--home .rch-hero__quotes--slider .rch-hero__quote:not(.is-active) {
		display: none !important;
		opacity: 0 !important;
		visibility: hidden !important;
		pointer-events: none !important;
	}

	.rch-hero--home .rch-hero__quotes--slider .rch-hero__quote.is-active {
		display: block !important;
		opacity: 1 !important;
		visibility: visible !important;
	}

	.rch-hero__quote {
		align-self: stretch;
	}
}

@media (max-width: 640px) {
	.rch-hero--home .rch-hero__foreground {
		padding: 1.75rem 1rem 4.25rem;
	}

	.rch-hero--home .rch-hero__heading {
		font-size: clamp(1.5rem, 7vw, 2rem);
		margin-bottom: 0.75rem;
	}

	.rch-hero--home .rch-hero__description {
		font-size: 0.9375rem;
		margin-bottom: 0.875rem;
	}

	.rch-hero--home .rch-hero__actions {
		flex-direction: column;
		align-items: stretch;
	}

	.rch-hero--home .rch-hero__actions .rch-btn {
		justify-content: center;
		width: 100%;
	}

	.rch-hero__quote {
		padding: 1rem 1.1rem;
		font-size: 0.8125rem;
	}

	.rch-hero__dots {
		bottom: 1rem;
	}
}

.rch-hero__inner {
	max-width: 640px;
}

/* Home heading */
.rch-hero__heading {
	margin: 0 0 1rem;
	font-size: clamp(1.75rem, 4vw, 2.75rem);
	font-weight: 800;
	line-height: 1.15;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.rch-hero__heading-line {
	display: block;
	color: var(--rch-white);
}

.rch-hero__heading-accent {
	color: var(--rch-accent);
}

.rch-hero__description {
	margin: 0 0 1.5rem;
	color: var(--rch-white);
	font-size: 1rem;
	line-height: 1.6;
	max-width: 520px;
}

/* Page layout */
.rch-hero__breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem;
	margin-bottom: 1rem;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.9);
}

.rch-hero__breadcrumbs a {
	color: var(--rch-white);
}

.rch-hero__breadcrumbs a:hover {
	color: var(--rch-accent);
}

.rch-hero__crumb-sep {
	opacity: 0.7;
	margin: 0 0.15rem;
}

.rch-hero__page-title {
	margin: 0;
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 800;
	color: var(--rch-white);
	line-height: 1.1;
}

.rch-hero__subtitle {
	margin: 0.35rem 0 0;
	font-size: clamp(1.75rem, 4vw, 3rem);
	font-weight: 800;
	color: var(--rch-accent);
	line-height: 1.1;
}

.rch-hero__divider {
	display: block;
	width: 56px;
	height: 4px;
	background: var(--rch-accent);
	margin: 1rem 0;
	border-radius: 2px;
}

/* Buttons */
.rch-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.rch-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.75rem 1.35rem;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	border: 2px solid transparent;
}

.rch-btn__arrow {
	font-size: 1.1em;
	line-height: 1;
}

.rch-btn--primary {
	background: var(--rch-accent);
	color: var(--rch-navy);
}

.rch-btn--primary:hover {
	background: #e09510;
	color: var(--rch-navy);
}

.rch-btn--outline {
	background: transparent;
	border-color: var(--rch-white);
	color: var(--rch-white);
}

.rch-btn--outline:hover {
	background: rgba(255, 255, 255, 0.12);
	color: var(--rch-white);
}

/* Quote */
.rch-hero__quotes {
	position: relative;
	align-self: end;
	min-height: 120px;
}

.rch-hero__quotes--slider .rch-hero__quote {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	opacity: 0;
	visibility: hidden;
	transition:
		opacity var(--rch-slide-duration, 800ms) ease,
		visibility var(--rch-slide-duration, 800ms) ease,
		transform var(--rch-slide-duration, 800ms) ease;
	pointer-events: none;
}

.rch-hero__quotes--slider .rch-hero__quote:not(.is-active) {
	z-index: 0;
}

.rch-hero__quotes--slider .rch-hero__quote.is-active {
	z-index: 1;
}

.rch-hero__quotes--slider.rch-hero__quotes--fx-slide .rch-hero__quote {
	transform: translateX(1.5rem);
}

.rch-hero__quotes--slider.rch-hero__quotes--fx-slide .rch-hero__quote.is-active {
	transform: translateX(0);
}

.rch-hero__quotes--slider.rch-hero__quotes--fx-slide_up .rch-hero__quote {
	transform: translateY(1.25rem);
}

.rch-hero__quotes--slider.rch-hero__quotes--fx-slide_up .rch-hero__quote.is-active {
	transform: translateY(0);
}

.rch-hero__quotes--slider.rch-hero__quotes--fx-zoom .rch-hero__quote {
	transform: scale(0.96);
}

.rch-hero__quotes--slider.rch-hero__quotes--fx-zoom .rch-hero__quote.is-active {
	transform: scale(1);
}

.rch-hero__quotes--slider .rch-hero__quote.is-active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.rch-hero--home .rch-hero__quotes--slider .rch-hero__quote,
.rch-hero--home .rch-hero__quotes--slider .rch-hero__quote.is-active {
	position: absolute;
	right: 0;
	bottom: 0;
	left: auto;
	width: 100%;
}

.rch-hero__quote {
	margin: 0;
	padding: 1.25rem 1.35rem;
	background-color: color-mix(
		in srgb,
		var(--rch-quote-bg-color) calc(var(--rch-quote-bg-opacity) * 100%),
		transparent
	);
	border-radius: 8px;
	color: var(--rch-white);
	font-size: 0.9rem;
	line-height: 1.55;
	align-self: end;
}

.rch-hero__quote p {
	margin: 0;
	line-height: 1.45;
}

.rch-hero__quote-mark {
	display: inline;
	font-size: 1.35em;
	line-height: 1;
	color: var(--rch-accent);
	font-family: Georgia, serif;
	margin: 0 0.12em 0 0;
	padding: 0;
	vertical-align: baseline;
}

/* Full-screen home hero */
.rch-hero--home {
	min-height: 100vh;
	min-height: 100svh;
}

.rch-hero--page {
	min-height: 380px;
}
