/* ==========================================================================
   Velas Velia — Carrusel de banners de portada
   --------------------------------------------------------------------------
   Banners de arte completo (texto/CTA dentro de la imagen), SIN scrim ni capa
   delante. Markup en template-parts/home/hero.php; control en main.js.
   Las imágenes se muestran enteras (sin recorte): todas las de escritorio
   deben compartir proporción, igual las de móvil (se avisa en el admin).
   ========================================================================== */

.vv-hero-carousel {
	position: relative;
	overflow: hidden;
	background: var(--cream);
}

.vv-hero-carousel__track {
	display: flex;
	align-items: center;
	transition: transform 0.55s var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
	.vv-hero-carousel__track {
		transition: none;
	}
}

/* Alto estable: la proporción de la 1ª imagen llega como --vv-hc-ratio desde
   el PHP; las imágenes que no encajen exacto se recortan levemente (cover)
   en vez de dejar franjas o hacer saltar el carrusel. */
.vv-hero-carousel__slide {
	position: relative;
	flex: 0 0 100%;
	min-width: 0;
	display: block;
	aspect-ratio: var(--vv-hc-ratio, 2.5);
	overflow: hidden;
	text-decoration: none !important;
}

.vv-hero-carousel__slide picture {
	display: block;
	width: 100%;
	height: 100%;
}

.vv-hero-carousel__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* --- Texto opcional SIN capa (para imágenes limpias) ------------------------ */
.vv-hero-carousel__copy {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	pointer-events: none; /* el clic lo recibe el <a> del slide */
}

.vv-hero-carousel__copy-inner {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	/* El texto vive en la mitad izquierda, donde las fotos dejan aire. */
	padding-right: 50%;
	box-sizing: border-box;
}

.vv-hero-carousel__title {
	font-family: var(--font-display);
	font-size: clamp(2.6rem, 6vw, var(--text-5xl));
	line-height: 0.98;
}

.vv-hero-carousel__subtitle {
	margin-top: var(--space-3);
	font-family: var(--font-sans);
	font-weight: var(--fw-medium);
	font-size: clamp(0.85rem, 1.6vw, var(--text-xl));
	letter-spacing: var(--tracking-eyebrow);
	text-transform: uppercase;
	line-height: 1.1;
}

.vv-hero-carousel__btn {
	margin-top: var(--space-6);
	pointer-events: none;
}

/* Tono oscuro = texto tinta sobre fotos claras (por defecto). */
.vv-hero-carousel__copy--oscuro .vv-hero-carousel__title { color: var(--ink-900); }
.vv-hero-carousel__copy--oscuro .vv-hero-carousel__subtitle { color: var(--gold-700); }

/* Tono claro = texto blanco sobre fotos oscuras. */
.vv-hero-carousel__copy--claro .vv-hero-carousel__title { color: var(--white); }
.vv-hero-carousel__copy--claro .vv-hero-carousel__subtitle { color: #FBEFDC; }

/* El botón reacciona al hover del banner completo (es un span dentro del <a>). */
.vv-hero-carousel__slide:hover .vv-hero-carousel__btn {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

/* --- Flechas ---------------------------------------------------------------
   Mismo lenguaje que la galería de razas: círculo claro translúcido. */
.vv-hero-carousel__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: var(--radius-pill) !important;
	background: rgba(255, 255, 255, 0.75) !important;
	color: var(--ink-900) !important;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition: background var(--dur) var(--ease-out);
}

.vv-hero-carousel__nav:hover {
	background: var(--white) !important;
}

.vv-hero-carousel__nav:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

.vv-hero-carousel__nav--prev { left: var(--space-4); }
.vv-hero-carousel__nav--next { right: var(--space-4); }

/* --- Puntos ---------------------------------------------------------------- */
.vv-hero-carousel__dots {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	/* Sobre el borde rasgado (52px de alto). */
	bottom: calc(52px + var(--space-3));
	z-index: 2;
	display: flex;
	gap: var(--space-2);
}

.vv-hero-carousel__dot {
	/* !important: el estilo de button del tema padre los dejaba de 0px. */
	flex: 0 0 9px;
	width: 9px !important;
	min-width: 9px !important;
	height: 9px !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: var(--radius-pill) !important;
	background: rgba(255, 255, 255, 0.55) !important;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
	cursor: pointer;
	transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}

.vv-hero-carousel__dot.is-active {
	background: var(--gold-600) !important;
	transform: scale(1.25);
}

.vv-hero-carousel__dot:focus-visible {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

/* El borde rasgado inferior ya existe como .vv-hero__torn (absoluto al pie). */

/* --- Móvil ------------------------------------------------------------------ */
@media (max-width: 719px) {
	/* Proporción de las imágenes móviles si existen; si no, la de escritorio. */
	.vv-hero-carousel__slide {
		aspect-ratio: var(--vv-hc-ratio-m, var(--vv-hc-ratio, 2.5));
	}

	.vv-hero-carousel__copy-inner {
		padding-right: 45%;
		/* Sube el bloque para que no lo pise el borde rasgado. */
		padding-bottom: var(--space-4);
	}

	.vv-hero-carousel__title {
		font-size: clamp(1.5rem, 8vw, 2.4rem);
	}

	.vv-hero-carousel__subtitle {
		margin-top: var(--space-1);
		font-size: clamp(0.6rem, 2.6vw, 0.85rem);
	}

	.vv-hero-carousel__btn {
		margin-top: var(--space-3);
		padding: var(--space-2) var(--space-4) !important;
		min-height: 0 !important;
		font-size: var(--text-xs) !important;
	}

	/* En táctil se navega deslizando y con los puntos: las flechas tapaban el
	   arte en banners bajos. */
	.vv-hero-carousel__nav {
		display: none !important;
	}

	/* Borde rasgado más fino: en un banner de ~160–200px el de 52px se comía
	   un tercio de la imagen. */
	.vv-hero-carousel .vv-hero__torn {
		height: 18px;
	}

	.vv-hero-carousel__dots {
		bottom: calc(18px + var(--space-2));
	}
}
