/* Hero propio de Farmavida: video + banners */

.fv-hero {
	--fv-hero-ratio: 2560/754;
	/* Transparente: el video y los banners cubren todo el marco, así ningún
	   color puede asomarse por los bordes */
	--fv-hero-fondo: transparent;
	--fv-hero-azul: #12529d;
	--fv-hero-blanco: #fff;
	/* Controles oscuros translúcidos: legibles sobre banners claros y oscuros */
	--fv-hero-control: rgba(15, 23, 42, 0.62);
	--fv-hero-control-fuerte: rgba(15, 23, 42, 0.88);
	/* El anillo claro dibuja la silueta del control sobre banners negros,
	   donde un disco oscuro sin borde desaparece por completo */
	--fv-hero-anillo: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
	--fv-hero-sombra: 0 3px 12px rgba(0, 0, 0, 0.28);
	--fv-hero-duracion: 3s;
	position: relative;
	/* El espaciado lo pone la fila de Flatsome que envuelve al hero */
	margin: 0;
}

.fv-hero *,
.fv-hero *::before,
.fv-hero *::after {
	box-sizing: border-box;
}

.fv-hero__marco {
	position: relative;
	aspect-ratio: var(--fv-hero-ratio);
	overflow: hidden;
	margin: 0;
	padding: 0;
	border: 0;
	background-color: var(--fv-hero-fondo);
}

/* Navegadores sin aspect-ratio: reserva la altura con el mismo alto proporcional */
@supports not (aspect-ratio: 1/1) {
	.fv-hero__marco::before {
		content: "";
		display: block;
		padding-top: 29.45%;
	}
}

.fv-hero__pista {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* El tema le pone a los <li> un margin-bottom: .6em y, al estar posicionadas
   con inset: 0, las diapositivas encogían y dejaban ver el fondo del marco. */
.fv-hero__slide {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.fv-hero__slide.is-activa {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.5s ease, visibility 0s;
}

.fv-hero__enlace {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

.fv-hero__img,
.fv-hero__video {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
}

/* Base de los botones del hero.
   Flatsome impone a todo <button> min-height: 2.5em, márgenes, padding y
   height: 36px !important en los SVG: eso deformaba los puntos y las flechas. */
.fv-hero button {
	box-sizing: border-box;
	min-width: 0;
	min-height: 0;
	max-width: none;
	margin: 0;
	padding: 0;
	border: 0;
	font-size: inherit;
	line-height: 0;
	letter-spacing: normal;
	text-transform: none;
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
}

.fv-hero button svg {
	display: block;
	width: auto !important;
	height: auto !important;
}

/* Flechas: repartidas por flex dentro de una capa que cubre el marco.
   Con posiciones left/right una podía quedar fuera y el marco la recortaba. */
.fv-hero__navegacion {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	/* Margen proporcional: las flechas nunca quedan pegadas al filo */
	padding: 0 clamp(0.75rem, 2.5%, 2rem);
	pointer-events: none;
}

.fv-hero__flecha {
	position: relative;
	z-index: 2;
	display: flex;
	pointer-events: auto;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 2.5rem;
	height: 2.5rem;
	aspect-ratio: 1;
	border-radius: 50%;
	background-color: var(--fv-hero-control);
	color: var(--fv-hero-blanco);
	box-shadow: var(--fv-hero-sombra), var(--fv-hero-anillo);
	cursor: pointer;
	opacity: 0.82;
	transition: opacity 0.25s ease, background-color 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@supports (backdrop-filter: blur(6px)) {
	.fv-hero__flecha,
	.fv-hero__bandeja {
		backdrop-filter: blur(6px);
	}
}

.fv-hero__flecha svg {
	width: 1rem !important;
	height: 1rem !important;
}

.fv-hero:hover .fv-hero__flecha {
	opacity: 1;
}

.fv-hero__flecha:hover {
	background-color: var(--fv-hero-control-fuerte);
	box-shadow: var(--fv-hero-sombra), inset 0 0 0 1px rgba(255, 255, 255, 0.75);
	transform: scale(1.06);
}

.fv-hero__flecha:active {
	transform: scale(0.95);
}

/* Bandeja inferior: puntos y pausa juntos, sobre un fondo propio */
.fv-hero__controles {
	position: absolute;
	right: 0;
	bottom: 0.75rem;
	left: 0;
	z-index: 2;
	display: flex;
	justify-content: center;
	padding: 0 0.75rem;
	pointer-events: none;
}

.fv-hero__bandeja {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.25rem 0.5rem;
	border-radius: 999px;
	background-color: var(--fv-hero-control);
	box-shadow: var(--fv-hero-sombra), var(--fv-hero-anillo);
	pointer-events: auto;
}

.fv-hero__pausa {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 1.5rem;
	height: 1.5rem;
	aspect-ratio: 1;
	border-radius: 50%;
	color: var(--fv-hero-blanco);
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.fv-hero__pausa:hover {
	background-color: rgba(255, 255, 255, 0.22);
}

.fv-hero__pausa svg {
	width: 0.875rem !important;
	height: 0.875rem !important;
}

.fv-hero__pausa .fv-hero__icono-play,
.fv-hero.esta-en-pausa .fv-hero__pausa .fv-hero__icono-pausa {
	display: none;
}

.fv-hero.esta-en-pausa .fv-hero__pausa .fv-hero__icono-play {
	display: block;
}

/* Puntos: segmentos iguales, el activo se rellena al ritmo de la diapositiva.
   Sin animar anchos: nada se desplaza al cambiar de banner. */
.fv-hero__puntos {
	display: flex;
	align-items: center;
}

.fv-hero__punto {
	position: relative;
	width: 1.5rem;
	height: 1.5rem;
	background-color: transparent;
	cursor: pointer;
}

.fv-hero__punto::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.125rem;
	height: 0.25rem;
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.4);
	transform: translate(-50%, -50%);
	transition: background-color 0.2s ease;
}

.fv-hero__punto:hover::before {
	background-color: rgba(255, 255, 255, 0.85);
}

.fv-hero__punto.is-activo::before {
	background-color: rgba(255, 255, 255, 0.3);
}

.fv-hero__punto.is-activo::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 1.125rem;
	height: 0.25rem;
	margin-left: -0.5625rem;
	border-radius: 999px;
	background-color: var(--fv-hero-blanco);
	transform: translateY(-50%) scaleX(0);
	transform-origin: left center;
	animation: fv-hero-progreso var(--fv-hero-duracion) linear forwards;
}

@keyframes fv-hero-progreso {
	from {
		transform: translateY(-50%) scaleX(0);
	}

	to {
		transform: translateY(-50%) scaleX(1);
	}
}

/* Versión compacta para celular: avance y conteo en vez de 16 puntos */
.fv-hero__compacto {
	display: none;
	align-items: center;
	gap: 0.5rem;
}

.fv-hero__barra {
	position: relative;
	display: block;
	width: 4rem;
	height: 0.25rem;
	overflow: hidden;
	border-radius: 999px;
	background-color: rgba(255, 255, 255, 0.35);
}

.fv-hero__barra-relleno {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background-color: var(--fv-hero-blanco);
	transform: scaleX(0);
	transform-origin: left center;
	animation: fv-hero-barra var(--fv-hero-duracion) linear forwards;
}

@keyframes fv-hero-barra {
	from {
		transform: scaleX(0);
	}

	to {
		transform: scaleX(1);
	}
}

.fv-hero__conteo {
	color: var(--fv-hero-blanco);
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
}

/* Mientras el carrusel espera, el avance también se detiene */
.fv-hero.esta-detenido .fv-hero__punto.is-activo::after,
.fv-hero.esta-detenido .fv-hero__barra-relleno {
	animation-play-state: paused;
}

.fv-hero__flecha:focus-visible,
.fv-hero__punto:focus-visible,
.fv-hero__pausa:focus-visible {
	outline: 2px solid var(--fv-hero-blanco);
	outline-offset: 2px;
	box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.55);
}

@media (max-width: 549px) {
	.fv-hero__navegacion,
	.fv-hero__puntos {
		display: none;
	}

	.fv-hero__compacto {
		display: flex;
	}

	.fv-hero__controles {
		bottom: 0.4rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fv-hero__slide,
	.fv-hero__flecha,
	.fv-hero__punto::before {
		transition: none;
	}

	.fv-hero__punto.is-activo::after {
		animation: none;
		transform: translateY(-50%) scaleX(1);
	}

	.fv-hero__barra-relleno {
		animation: none;
		transform: scaleX(1);
	}
}
