/**
 * Estilos del carrusel del hero y de la banda de aviso (CPT "Avisos").
 * Las variables --azur / --oro se heredan del wrapper del tema (header.php).
 */

/* ============ HERO CARRUSEL ============ */
.marchena-hero {
	overflow: hidden;
}

.marchena-hero__viewport {
	overflow: hidden;
}

.marchena-hero__track {
	display: flex;
	transition: transform 0.5s ease;
	will-change: transform;
}

.marchena-hero__slide {
	flex: 0 0 100%;
	min-width: 100%;
}

/* Flechas anterior/siguiente */
.marchena-hero__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border: 1px solid #cdd4e0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: var(--azur, #123a70);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
	transition: background 0.15s, border-color 0.15s;
	z-index: 2;
}

.marchena-hero__nav:hover {
	background: #fff;
	border-color: var(--azur, #123a70);
}

.marchena-hero__nav:focus-visible {
	outline: 2px solid var(--azur, #123a70);
	outline-offset: 2px;
}

.marchena-hero__nav--prev {
	left: 14px;
}

.marchena-hero__nav--next {
	right: 14px;
}

/* Puntos */
.marchena-hero__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 14px;
	display: flex;
	justify-content: center;
	gap: 9px;
	z-index: 2;
}

.marchena-hero__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 1px solid var(--azur, #123a70);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	transition: background 0.15s;
}

.marchena-hero__dot.is-active {
	background: var(--azur, #123a70);
}

.marchena-hero__dot:focus-visible {
	outline: 2px solid var(--azur, #123a70);
	outline-offset: 2px;
}

/* Boton pausa/reanudar */
.marchena-hero__toggle {
	position: absolute;
	right: 14px;
	bottom: 10px;
	width: 30px;
	height: 30px;
	border: 1px solid #cdd4e0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: var(--azur, #123a70);
	cursor: pointer;
	line-height: 1;
	z-index: 2;
}

.marchena-hero__toggle::before {
	content: "\275A\275A"; /* pausa */
	font-size: 11px;
	letter-spacing: -2px;
}

.marchena-hero__toggle.is-paused::before {
	content: "\25B6"; /* play */
	font-size: 12px;
	letter-spacing: 0;
}

.marchena-hero__toggle:focus-visible {
	outline: 2px solid var(--azur, #123a70);
	outline-offset: 2px;
}

/* Sin JS o con transiciones reducidas: pila legible en columna */
.marchena-hero.no-js .marchena-hero__track {
	flex-direction: column;
}

@media (prefers-reduced-motion: reduce) {
	.marchena-hero__track {
		transition: none;
	}
}

/* Responsive: el grid interno pasa a una columna */
@media (max-width: 860px) {
	.marchena-hero__inner {
		grid-template-columns: 1fr !important;
		gap: 28px !important;
	}

	.marchena-hero__nav {
		display: none;
	}
}

/* ============ BANDA DE AVISO ============ */
.marchena-banda[hidden] {
	display: none;
}
