/**
 * AlVilla Hero Slider LCP-Safe CSS
 * Weight: < 3.5 KB
 */

.alvilla-hero-wrapper {
	position: relative;
	width: 100%;
}

.alvilla-hero-slide {
	position: relative;
	flex: 0 0 100%;
	min-width: 0;
	min-height: 80vh;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background-color: #1C1917;
}

.alvilla-hero-bg-img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 1;
	transform: translateZ(0);
}

.alvilla-hero-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(28, 25, 23, 0.45);
	z-index: 2;
}

.alvilla-hero-content-wrap {
	position: relative;
	z-index: 3;
	max-width: 1140px;
	margin: 0 auto;
	padding: 60px 24px;
	width: 100%;
}

.alvilla-hero-content {
	max-width: 760px;
	margin-inline: var(--alvilla-hero-mi, 0 auto);
}

.alvilla-hero-tagline {
	display: inline-block;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #ffffff;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin-bottom: 16px;
}

.alvilla-hero-title {
	font-size: clamp(32px, 5vw, 64px);
	font-weight: 800;
	color: #ffffff;
	line-height: 1.1;
	margin: 0 0 16px;
	letter-spacing: -0.5px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.alvilla-hero-desc {
	font-size: clamp(15px, 1.8vw, 18px);
	color: rgba(255, 255, 255, 0.9);
	line-height: 1.6;
	margin-top: 0;
	margin-bottom: 28px;
	margin-inline: var(--alvilla-hero-mi, 0 auto);
	max-width: 600px;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.alvilla-hero-buttons {
	display: flex;
	justify-content: var(--alvilla-hero-align, flex-start);
	gap: 14px;
	flex-wrap: wrap;
}

.alvilla-hero-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 28px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.alvilla-hero-btn-primary {
	background: #2A6F68;
	color: #ffffff;
	box-shadow: 0 4px 14px rgba(42, 111, 104, 0.4);
}

.alvilla-hero-btn-primary:hover {
	background: #225953;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(42, 111, 104, 0.5);
	color: #ffffff;
}

.alvilla-hero-btn-secondary {
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.4);
	color: #ffffff;
}

.alvilla-hero-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
	color: #ffffff;
}

/* Etiqueta sin pastilla */
.alvilla-hero-tag-plain .alvilla-hero-tagline {
	background: none;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	border: 0;
	padding: 0;
	border-radius: 0;
}

/* Variantes del botón secundario */
.alvilla-hero-btn2-outline .alvilla-hero-btn-secondary {
	background: transparent;
	backdrop-filter: none;
	border: 2px solid currentColor;
}
.alvilla-hero-btn2-outline .alvilla-hero-btn-secondary:hover {
	background: rgba(255, 255, 255, 0.12);
}
.alvilla-hero-btn2-solid .alvilla-hero-btn-secondary {
	background: #ffffff;
	backdrop-filter: none;
	border: 1px solid #ffffff;
	color: #1C1917;
}
.alvilla-hero-btn2-solid .alvilla-hero-btn-secondary:hover {
	background: #F5F2ED;
	color: #1C1917;
}
.alvilla-hero-btn2-link .alvilla-hero-btn-secondary {
	background: none;
	backdrop-filter: none;
	border: 0;
	padding-left: 4px;
	padding-right: 4px;
	text-decoration: underline;
	text-underline-offset: 4px;
}
.alvilla-hero-btn2-link .alvilla-hero-btn-secondary:hover {
	background: none;
	transform: none;
}

/* Efecto Brillo (compatible con OmniEffects .omni-btn-shimmer) */
.alvilla-hero-btn.alvilla-fx-shine {
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.alvilla-hero-btn.alvilla-fx-shine::after {
	content: "";
	position: absolute;
	top: 0;
	left: -120%;
	width: 60%;
	height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
	transform: skewX(-20deg);
	pointer-events: none;
	transition: left 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.alvilla-hero-btn.alvilla-fx-shine:hover::after,
.alvilla-hero-btn.alvilla-fx-shine:focus-visible::after {
	left: 140%;
}

/* Atracción magnética: el JS escribe --alvilla-mx / --alvilla-my */
.alvilla-hero-btn[data-alvilla-magnetic] {
	translate: var(--alvilla-mx, 0) var(--alvilla-my, 0);
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1), translate 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
.alvilla-hero-btn[data-alvilla-magnetic].is-magnet-active {
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1), translate 0s;
}

@media (prefers-reduced-motion: reduce) {
	.alvilla-hero-btn.alvilla-fx-shine::after {
		display: none;
	}
	.alvilla-hero-btn[data-alvilla-magnetic] {
		translate: none;
	}
}

@media (max-width: 767px) {
	.alvilla-hero-slide {
		min-height: 65vh;
	}
	.alvilla-hero-content-wrap {
		padding: 40px 16px;
	}
	.alvilla-hero-btn {
		width: 100%;
	}
}

/* ==================================================================
 * Transiciones avanzadas (fundido, zoom, cortina, círculo)
 * Las diapositivas se apilan en la misma celda de la rejilla y el JS
 * alterna .is-active (entrante) e .is-prev (saliente).
 * ================================================================== */
.alvilla-hero-wrapper {
	--hero-fx-speed: 1000ms;
	--hero-delay: 5500ms;
	--hero-ease: cubic-bezier(0.65, 0, 0.35, 1);
}

.alvilla-hero-wrapper:not(.alvilla-hero--fx-slide) .alvilla-carousel-container {
	display: grid;
	transform: none !important;
}

.alvilla-hero-wrapper:not(.alvilla-hero--fx-slide) .alvilla-hero-slide {
	grid-area: 1 / 1;
	opacity: 0;
	visibility: hidden;
	z-index: 0;
}

.alvilla-hero-wrapper:not(.alvilla-hero--fx-slide) .alvilla-hero-slide.is-prev {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.alvilla-hero-wrapper:not(.alvilla-hero--fx-slide) .alvilla-hero-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
}

/* Fundido y fundido con zoom */
.alvilla-hero--fx-fade .alvilla-hero-slide.is-active,
.alvilla-hero--fx-zoom .alvilla-hero-slide.is-active {
	animation: alvilla-hero-fade var(--hero-fx-speed) var(--hero-ease) both;
}

.alvilla-hero--fx-zoom .alvilla-hero-slide.is-active .alvilla-hero-bg-img {
	animation: alvilla-hero-zoom-in calc(var(--hero-fx-speed) * 1.6) var(--hero-ease) both;
}

/* Cortina: la entrante se descubre de derecha a izquierda sobre la saliente */
.alvilla-hero--fx-curtain .alvilla-hero-slide.is-active {
	animation: alvilla-hero-curtain var(--hero-fx-speed) var(--hero-ease) both;
}

/* Círculo: la entrante crece desde el centro */
.alvilla-hero--fx-circle .alvilla-hero-slide.is-active {
	animation: alvilla-hero-circle var(--hero-fx-speed) var(--hero-ease) both;
}

/* La primera diapositiva al cargar la página aparece sin transición (LCP). */
.alvilla-hero-wrapper:not(.is-animated) .alvilla-hero-slide.is-active {
	animation: none;
}

@keyframes alvilla-hero-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes alvilla-hero-zoom-in {
	from { transform: scale(1.18); }
	to { transform: scale(1); }
}

@keyframes alvilla-hero-curtain {
	from { clip-path: inset(0 0 0 100%); }
	to { clip-path: inset(0 0 0 0); }
}

@keyframes alvilla-hero-circle {
	from { clip-path: circle(0% at 50% 50%); }
	to { clip-path: circle(150% at 50% 50%); }
}

/* ------------------------------------------------------------------
 * Ken Burns (zoom lento del fondo de la diapositiva activa)
 * ---------------------------------------------------------------- */
.alvilla-hero--kb-in .alvilla-hero-slide.is-active .alvilla-hero-bg-img {
	animation: alvilla-hero-kb-in calc(var(--hero-delay) + 2000ms) linear both;
}

.alvilla-hero--kb-out .alvilla-hero-slide.is-active .alvilla-hero-bg-img {
	animation: alvilla-hero-kb-out calc(var(--hero-delay) + 2000ms) linear both;
}

.alvilla-hero--kb-pan .alvilla-hero-slide.is-active .alvilla-hero-bg-img {
	animation: alvilla-hero-kb-pan calc(var(--hero-delay) + 2000ms) linear both;
}

/* En "fundido con zoom" el zoom de entrada manda sobre el Ken Burns. */
.alvilla-hero--fx-zoom.alvilla-hero--kb-in .alvilla-hero-slide.is-active .alvilla-hero-bg-img,
.alvilla-hero--fx-zoom.alvilla-hero--kb-out .alvilla-hero-slide.is-active .alvilla-hero-bg-img,
.alvilla-hero--fx-zoom.alvilla-hero--kb-pan .alvilla-hero-slide.is-active .alvilla-hero-bg-img {
	animation: alvilla-hero-zoom-in calc(var(--hero-fx-speed) * 1.6) var(--hero-ease) both;
}

@keyframes alvilla-hero-kb-in {
	from { transform: scale(1); }
	to { transform: scale(1.14); }
}

@keyframes alvilla-hero-kb-out {
	from { transform: scale(1.14); }
	to { transform: scale(1); }
}

@keyframes alvilla-hero-kb-pan {
	from { transform: scale(1.05) translate3d(-2%, 1%, 0); }
	to { transform: scale(1.16) translate3d(2%, -1%, 0); }
}

/* ------------------------------------------------------------------
 * Texto escalonado (desde la segunda diapositiva: la primera no se
 * retrasa para no empeorar el LCP)
 * ---------------------------------------------------------------- */
.alvilla-hero-wrapper.is-animated[class*='alvilla-hero--text-'] .alvilla-hero-slide.is-active .alvilla-hero-content > * {
	animation-duration: 0.9s;
	animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
	animation-fill-mode: both;
}

.alvilla-hero-wrapper.is-animated .alvilla-hero-slide.is-active .alvilla-hero-content > :nth-child(1) { animation-delay: 0.15s; }
.alvilla-hero-wrapper.is-animated .alvilla-hero-slide.is-active .alvilla-hero-content > :nth-child(2) { animation-delay: 0.27s; }
.alvilla-hero-wrapper.is-animated .alvilla-hero-slide.is-active .alvilla-hero-content > :nth-child(3) { animation-delay: 0.39s; }
.alvilla-hero-wrapper.is-animated .alvilla-hero-slide.is-active .alvilla-hero-content > :nth-child(4) { animation-delay: 0.51s; }

.alvilla-hero--text-up.is-animated .alvilla-hero-slide.is-active .alvilla-hero-content > * { animation-name: alvilla-hero-txt-up; }
.alvilla-hero--text-blur.is-animated .alvilla-hero-slide.is-active .alvilla-hero-content > * { animation-name: alvilla-hero-txt-blur; }
.alvilla-hero--text-left.is-animated .alvilla-hero-slide.is-active .alvilla-hero-content > * { animation-name: alvilla-hero-txt-left; }
.alvilla-hero--text-mask.is-animated .alvilla-hero-slide.is-active .alvilla-hero-content > * { animation-name: alvilla-hero-txt-mask; }

@keyframes alvilla-hero-txt-up {
	from { opacity: 0; transform: translate3d(0, 28px, 0); }
	to { opacity: 1; transform: none; }
}

@keyframes alvilla-hero-txt-blur {
	from { opacity: 0; filter: blur(12px); transform: scale(1.04); }
	to { opacity: 1; filter: none; transform: none; }
}

@keyframes alvilla-hero-txt-left {
	from { opacity: 0; transform: translate3d(-40px, 0, 0); }
	to { opacity: 1; transform: none; }
}

@keyframes alvilla-hero-txt-mask {
	from { clip-path: inset(0 0 100% 0); transform: translate3d(0, 16px, 0); }
	to { clip-path: inset(0 0 0 0); transform: none; }
}

/* ------------------------------------------------------------------
 * Barra de tiempo del autoplay
 * ---------------------------------------------------------------- */
.alvilla-hero-progress {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 11;
	height: 3px;
	background: rgba(255, 255, 255, 0.2);
}

.alvilla-hero-progress span {
	display: block;
	height: 100%;
	background: var(--hero-progress-color, #ffffff);
	transform: scaleX(0);
	transform-origin: 0 50%;
}

.alvilla-hero-progress.is-running span {
	animation: alvilla-hero-progress var(--hero-delay) linear forwards;
}

.alvilla-hero-wrapper.is-paused .alvilla-hero-progress span {
	animation-play-state: paused;
}

@keyframes alvilla-hero-progress {
	to { transform: scaleX(1); }
}

/* ------------------------------------------------------------------
 * Parallax del fondo (el JS escribe --hero-py)
 * ---------------------------------------------------------------- */
.alvilla-hero--parallax img.alvilla-hero-bg-img {
	top: -12%;
	height: 124%;
	max-width: none;
	translate: 0 var(--hero-py, 0px);
}

@media (prefers-reduced-motion: reduce) {
	.alvilla-hero-wrapper .alvilla-hero-slide,
	.alvilla-hero-wrapper .alvilla-hero-bg-img,
	.alvilla-hero-wrapper .alvilla-hero-content > * {
		animation: none !important;
	}

	.alvilla-hero--parallax img.alvilla-hero-bg-img {
		translate: none;
	}
}
