/* ============================================================
   VacationPlaces — Hero Carousel
   ============================================================ */

.vp-hero {
	position: relative;
	width: 100%;
	/* Explicit height (not min-height) so child flex containers have a
	   definite height to align-items: center within. min-height gives no
	   definite height to absolutely-positioned inset:0 descendants. */
	height: calc(100vh - var(--vp-nav-height));
	overflow: hidden;
	background: var(--vp-navy);
}

/* ---------- Slides track ---------- */
.vp-hero__slides {
	position: relative;
	width: 100%;
	height: 100%; /* resolves correctly now that .vp-hero has explicit height */
}

/* Each slide sits stacked; only the active one is visible */
.vp-hero__slide {
	position: absolute;
	inset: 0;           /* stretches to .vp-hero__slides' definite height */
	display: flex;
	align-items: center; /* true vertical centre — works with definite height */
	opacity: 0;
	z-index: 0;
	pointer-events: none;
	transition: opacity 0.9s ease;
}

.vp-hero__slide.is-active {
	opacity: 1;
	z-index: 1;
	pointer-events: auto;
}

/* ---------- Background image ---------- */
.vp-hero__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center 60%;
	background-repeat: no-repeat;
	/* Scale-in entrance on active — subtle Ken Burns feel */
	transform: scale(1.04);
	transition: transform 7s ease;
}

/* ---------- Background video ---------- */
.vp-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Sits above .vp-hero__bg (DOM order), below .vp-hero__overlay (z-index:1) */
}

@media (max-width: 768px) {
	.vp-hero__video {
		display: none; /* hide video on mobile to preserve battery */
	}
}

.vp-hero__slide.is-active .vp-hero__bg {
	transform: scale(1);
}

/* ---------- Navy overlay at 78% ---------- */
.vp-hero__overlay {
	position: absolute;
	inset: 0;
	background: rgba(47, 65, 86, 0.78);
	z-index: 1;
}

/* ---------- Content layer ---------- */
.vp-hero__content {
	position: relative;
	z-index: 2;
	width: 100%;
	/* Shift the flex-center point slightly above geometric center (≈40–45%)
	   by adding more padding below than above. Dots sit outside this flow. */
	padding: 2rem 0 4rem;
}

.vp-hero__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 2.5rem;
}

/* Overline */
.vp-hero__overline {
	display: block;
	font-family: 'Inter', sans-serif;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--vp-mist);
	margin-bottom: 0.75rem;
}

/* Headline */
.vp-hero__heading {
	font-family: 'Nunito', sans-serif;
	font-weight: 900;
	font-size: clamp(28px, 4.5vw, 52px);
	line-height: 1.05;
	letter-spacing: -0.01em;
	color: var(--vp-beige);
	margin: 0 0 1rem;
	max-width: 680px;
}

/* Sub-text */
.vp-hero__sub {
	font-family: 'Inter', sans-serif;
	font-size: clamp(15px, 1.5vw, 18px);
	line-height: 1.5;
	color: var(--vp-mist);
	max-width: 560px;
	margin: 0 0 2rem;
}

/* CTA button — Sunset Coral */
.vp-hero__cta {
	display: inline-block;
	background: var(--vp-coral);
	color: var(--vp-beige);
	font-family: 'Nunito', sans-serif;
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0.02em;
	padding: 0.7rem 1.5rem;
	border-radius: 6px;
	text-decoration: none;
	transition: background 0.2s ease, transform 0.15s ease;
	border: none;
}

.vp-hero__cta:hover {
	background: #c95e38;
	transform: translateY(-1px);
	color: var(--vp-beige);
	text-decoration: none;
}

/* ---------- Dot indicators ---------- */
.vp-hero__dots {
	position: absolute;
	bottom: 1.75rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	gap: 10px;
	align-items: center;
}

.vp-hero__dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 1.5px solid var(--vp-mist);
	background: transparent;
	padding: 0;
	cursor: pointer;
	transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.vp-hero__dot.is-active {
	background: var(--vp-coral);
	border-color: var(--vp-coral);
	transform: scale(1.25);
}

.vp-hero__dot:hover:not(.is-active) {
	background: rgba(141, 180, 196, 0.5);
}

/* Visually-hidden helper for screen reader labels */
.vp-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
	.vp-hero {
		height: 75vh; /* switch to vh on mobile so short phones get a sensible hero */
	}

	.vp-hero__inner {
		padding: 0 1.25rem;
	}

	.vp-hero__content {
		padding-bottom: 4rem;
	}

	.vp-hero__dots {
		bottom: 1.25rem;
	}
}

@media (max-width: 480px) {
	.vp-hero {
		height: 80vh;
	}
}

/* Respect prefers-reduced-motion — disable Ken Burns and fade */
@media (prefers-reduced-motion: reduce) {
	.vp-hero__slide {
		transition: none;
	}
	.vp-hero__bg {
		transform: none !important;
		transition: none;
	}
}
