/* =========================================================================
   css/rejilla2026.css - Rejilla en movimiento 2026 (partials/rejilla2026.php).
   Mismo comportamiento que la franja de logos del pie (css/logos2026.css): la
   pista se duplica y se desplaza un 50% en bucle; el JS fija el ancho de cada
   columna (1/5 de la ventana, 1/2 en movil) y la duracion.
   ========================================================================= */

.rej26 {
	position: relative;
	width: 100%;
}

.rej26-ventana {
	overflow: hidden;
}

.rej26-pista {
	display: flex;
	width: max-content;
}

.rej26-pista.rej26-anima {
	animation: rej26-bucle 60s linear infinite;   /* la duracion la ajusta el JS */
}

.rej26:hover .rej26-pista,
.rej26:focus-within .rej26-pista {
	animation-play-state: paused;
}

@keyframes rej26-bucle {
	0%   { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

.rej26-columna {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	width: 260px;   /* lo ajusta el JS */
}

.rej26-celda {
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/* ---------- Logos: enteros y centrados, en gris; en color al pasar el raton ---------- */
.rej26--logos .rej26-celda {
	height: 180px;
	padding: 20px;
}

.rej26--logos .rej26-celda img {
	max-width: 80%;
	max-height: 120px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: grayscale(100%);
	opacity: .55;
	transition: all .4s ease-in-out;
}

.rej26--logos .rej26-celda:hover img {
	filter: grayscale(0%);
	opacity: 1;
	transform: scale(1.08);
}

/* ---------- Fotos: recortadas, pegadas, en gris; en color al pasar el raton ---------- */
.rej26--fotos .rej26-celda {
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0;
	padding: 1px;
	border: 0;
	background: none;
	cursor: zoom-in;
}

.rej26--fotos .rej26-celda img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(100%);
	transition: filter .4s ease-in-out, transform .4s ease-in-out;
}

.rej26--fotos .rej26-celda:hover img,
.rej26--fotos .rej26-celda:focus-visible img {
	filter: grayscale(0%);
	transform: scale(1.05);
}

.rej26--fotos .rej26-celda:focus-visible {
	outline: 3px solid #f4b333;
	outline-offset: -3px;
}

/* ---------- Foto en grande ---------- */
.rej26-visor {
	position: fixed;
	inset: 0;
	z-index: 8000;   /* sobre el menu fijo, bajo el aviso de cookies */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	background: rgba(23, 30, 40, .85);
	cursor: zoom-out;
}

.rej26-visor[hidden] {
	display: none;
}

.rej26-visor img {
	max-width: 100%;
	max-height: calc(100% - 60px);
	border-radius: 4px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
	animation: rej26-zoom .3s ease-out;
}

.rej26-visor p {
	margin: 0;
	color: #fff;
	font-family: var(--fuente-texto);
	text-align: center;
}

@keyframes rej26-zoom {
	from { transform: scale(.85); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

@media (max-width: 767.98px) {
	.rej26--logos .rej26-celda { height: 120px; padding: 10px; }
	.rej26--logos .rej26-celda img { max-height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
	.rej26-pista.rej26-anima { animation: none; }
	.rej26-visor img { animation: none; }
}
