/* Home Splash Widget */
.home-splash {
	position: relative;
	width: 100%;
	overflow: hidden;
}

/* Full-bleed leaves room for the fixed header + search (138px on desktop). */
.home-splash--fullbleed {
	--home-splash-height: calc(100dvh - 138px);
}

.home-splash--fullbleed,
.home-splash--fullbleed .home-splash-swiper,
.home-splash--fullbleed .swiper-slide {
	height: var(--home-splash-height, calc(100dvh - 138px));
}

.home-splash--fixed,
.home-splash--fixed .home-splash-swiper,
.home-splash--fixed .swiper-slide {
	height: var(--home-splash-height, 600px);
}

.home-splash-swiper {
	width: 100%;
}

.home-splash-slide {
	position: relative;
	overflow: hidden;
	background-color: #000;
}

.home-splash-media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.home-splash-media--image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Vimeo poster while the iframe loads. Es un <img> real (no background-image)
 * para que cuente como elemento LCP y pinte temprano (preload fetchpriority).
 * Queda bajo el iframe; cuando el video carga, lo cubre. */
.home-splash-media--video {
	background-color: #000;
}

.home-splash-poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	z-index: 1;
}

/*
 * The Vimeo iframe is injected by JS. To COVER the slide with no black bars,
 * the iframe must stay 16:9 and scale so its smaller side still fills the slide.
 * Both constraint pairs below are 16:9 (width/height, and min-width/min-height),
 * so whichever wins, the iframe keeps its aspect ratio — Vimeo never letterboxes,
 * and the overflow is simply cropped. Assumes the splash spans the viewport width.
 */
.home-splash-media--video iframe {
	position: absolute;
	z-index: 2;
	top: 50%;
	left: 50%;
	width: 100vw;
	height: 56.25vw;                                              /* 16:9 for full width */
	min-width: calc(var(--home-splash-height, 90dvh) * 1.7778);  /* 16:9 for full height */
	min-height: var(--home-splash-height, 90dvh);
	transform: translate(-50%, -50%);
	border: 0;
	pointer-events: none;
}

.home-splash-overlay {
	position: absolute;
	left: 0;
	bottom: 0;
	z-index: 2;
	padding: 2.5rem;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
	gap: 1rem;
	color: #fff;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
	width: 100%;
}

.home-splash-property-name {
	margin: 0;
	font-family: var(--sir-font-serif);
	font-size: 2rem;
	line-height: 1.1;
	color: #fff;
}

.home-splash-cta {
	display: inline-block;
	padding: 0.75rem 1.5rem;
	background: #002349;
	color: #fff;
	text-decoration: none;
	font-size: 0.9rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	transition: background 0.2s ease;
}

.home-splash-cta:hover,
.home-splash-cta:visited {
	color: #fff;
}

.home-splash-cta:hover {
	background: #1a4d7a;
}

/* Prev/next navigation arrows */
.hs-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.28);
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease, opacity 0.2s ease;
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.hs-nav:hover {
	background: rgba(0, 0, 0, 0.5);
}

.hs-nav svg {
	display: block;
	width: 17px;
	height: 31px;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.hs-nav-prev {
	left: 1.25rem;
}

.hs-nav-next {
	right: 1.25rem;
}

/* loop is enabled with 2+ slides so this rarely triggers; hide if it does */
.hs-nav.swiper-button-disabled {
	opacity: 0;
	pointer-events: none;
}

@media (max-width: 768px) {
	/* Mobile header is shorter; just leave a peek of what's below. */
	.home-splash--fullbleed {
		--home-splash-height: 90dvh;
	}

	.home-splash-overlay {
		padding: 1.5rem;
	}

	.home-splash-property-name {
		font-size: 1.4rem;
	}

	.hs-nav {
		width: 52px;
		height: 52px;
	}

	.hs-nav svg {
		width: 14px;
		height: 26px;
	}

	.hs-nav-prev {
		left: 0.5rem;
	}

	.hs-nav-next {
		right: 0.5rem;
	}
}
