/* © Fernando Martínez Marín · VEOVIRTUAL® · veovirtual.com */

/* Pase de fotos */
.vvsl {
	position: relative;
	overflow: hidden;
	min-height: 320px;
	background: var(--vv-oscuro, #0E2229);
	box-sizing: border-box;
}
.vvsl--fondo {
	position: absolute;
	inset: 0;
	z-index: 0;
	min-height: 0;
}
.vvsl__pista {
	position: absolute;
	inset: 0;
}
.vvsl__foto {
	position: absolute;
	inset: 0;
	margin: 0;
	opacity: 0;
	transition: opacity 1.4s ease;
}
.vvsl__foto.is-activa {
	opacity: 1;
	z-index: 1;
}
.vvsl__foto img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	transform-origin: 50% 50%;
}
.vvsl--zoom .vvsl__foto.is-activa img {
	animation: vvsl-zoom var(--vvsl-dur, 8s) ease-out both;
}
.vvsl--zoom .vvsl__foto:nth-child(even).is-activa img {
	transform-origin: 30% 40%;
}
.vvsl--zoom .vvsl__foto:nth-child(3n).is-activa img {
	transform-origin: 70% 60%;
}
@keyframes vvsl-zoom {
	from { transform: scale(1); }
	to { transform: scale(1.09); }
}
.vvsl.is-pausado .vvsl__foto img {
	animation-play-state: paused;
}

/* Botón de pausa */
.vvsl__pausa {
	position: absolute;
	right: 16px;
	bottom: 16px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: 50%;
	background: rgba(0, 0, 0, .35);
	color: #FFFFFF;
	cursor: pointer;
	opacity: .75;
	transition: opacity .2s ease, background-color .2s ease;
}
.vvsl__pausa:hover,
.vvsl__pausa:focus-visible {
	opacity: 1;
	background: rgba(0, 0, 0, .6);
}
.vvsl__pausa:focus-visible {
	outline: 3px solid var(--vv-foco, #FFD400);
	outline-offset: 2px;
}
.vvsl__pausa svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.vvsl__pausa .vvsl__i-seguir {
	display: none;
	fill: currentColor;
	stroke-width: 1.5;
}
.vvsl.is-pausado .vvsl__pausa .vvsl__i-pausa {
	display: none;
}
.vvsl.is-pausado .vvsl__pausa .vvsl__i-seguir {
	display: inline;
}

/* Cabecera con pase de fondo */
.wp-block-cover.vvsl-fondo > .vvsl--fondo ~ .wp-block-cover__background {
	z-index: 1;
}
.wp-block-cover.vvsl-fondo > .wp-block-cover__inner-container {
	z-index: 2;
}
.wp-block-cover.vvsl-fondo > .vvsl--fondo .vvsl__pausa {
	z-index: 3;
}

@media (max-width: 767px) {
	.vvsl--fondo .vvsl__pausa {
		top: 12px;
		right: 12px;
		bottom: auto;
	}
}

/* Movimiento reducido y versión accesible */
@media (prefers-reduced-motion: reduce) {
	.vvsl__foto {
		transition: none;
	}
	.vvsl--zoom .vvsl__foto.is-activa img {
		animation: none;
	}
}
html.vv-accesible .vvsl__foto img,
html.vv-a11y-quieto .vvsl__foto img {
	animation: none !important;
}
html.vv-accesible .vvsl__foto,
html.vv-a11y-quieto .vvsl__foto {
	transition: none;
}
