/* ============================================================
   Header / navegación
   ============================================================ */
.apes-header {
	background: var(--apes-tinta);
	color: var(--apes-tinta-texto);
	position: sticky;
	top: 0;
	z-index: 40;
	border-bottom: 1px solid var(--apes-tinta-borde);
}

.apes-header__barra {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 24px;
}

.apes-marca {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--apes-tinta-texto);
}

.apes-marca:hover { color: var(--apes-tinta-texto); }

.apes-marca__isotipo {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}

.apes-marca__texto {
	font-family: var(--apes-fuente-display);
	font-weight: 700;
	font-size: 1.4rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	line-height: 1;
}

.apes-nav {
	display: flex;
	align-items: center;
	gap: 28px;
}

.apes-nav ul {
	display: flex;
	align-items: center;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.apes-nav a {
	color: var(--apes-tinta-texto);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 600;
}

.apes-nav a:hover { color: var(--apes-naranja); }

.apes-header__en-vivo[hidden] {
	display: none;
}

.apes-header__en-vivo {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--apes-fuente-dato);
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--apes-naranja);
	text-decoration: none;
	border: 1px solid var(--apes-naranja);
	border-radius: 999px;
	padding: 6px 14px;
}

.apes-header__en-vivo:hover { background: var(--apes-naranja); color: var(--apes-tinta); }

.apes-header__en-vivo-punto {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--apes-naranja);
	animation: apes-latido 1.6s ease-in-out infinite;
}

@keyframes apes-latido {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.75); }
}

.apes-header__toggle {
	display: none;
	background: none;
	border: 1px solid var(--apes-tinta-borde);
	border-radius: 8px;
	color: var(--apes-tinta-texto);
	padding: 8px 10px;
	font-size: 1.1rem;
	line-height: 1;
}

@media (max-width: 780px) {
	.apes-header__toggle { display: inline-flex; }

	.apes-nav {
		display: none;
		position: absolute;
		inset: 100% 0 auto 0;
		flex-direction: column;
		align-items: stretch;
		background: var(--apes-tinta);
		border-bottom: 1px solid var(--apes-tinta-borde);
		padding: 8px 24px 20px;
	}

	.apes-nav.apes-nav--abierto { display: flex; }

	.apes-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
	.apes-nav ul li { width: 100%; }
	.apes-nav a { display: block; padding: 10px 0; border-bottom: 1px solid var(--apes-tinta-borde); }

	.apes-header__en-vivo { margin-top: 12px; align-self: flex-start; }
}

/* ============================================================
   Secciones
   ============================================================ */
.apes-seccion { padding: 64px 0; }
.apes-seccion--tinta { background: var(--apes-tinta); color: var(--apes-tinta-texto); }
.apes-seccion--papel { background: var(--apes-papel); }
.apes-seccion--papel-2 { background: var(--apes-papel-2); }

.apes-seccion__cabecera {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 32px;
}

.apes-seccion__ver-todo {
	font-family: var(--apes-fuente-dato);
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ============================================================
   Ticket — la pieza de firma: todo lo que representa "vas a
   estar ahí" (jornada, evento, colegio) se presenta como una
   entrada con talón, no como una tarjeta genérica.
   ============================================================ */
.apes-ticket {
	display: flex;
	border-radius: var(--apes-radio);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	box-shadow: 0 1px 2px rgba(20, 15, 5, 0.06);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.apes-ticket:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(20, 15, 5, 0.14);
	color: inherit;
}

.apes-ticket--sobre-papel { background: #fff; border: 1px solid var(--apes-papel-borde); }
.apes-ticket--sobre-tinta { background: var(--apes-tinta-2); border: 1px solid var(--apes-tinta-borde); }

.apes-ticket__cuerpo {
	flex: 1;
	min-width: 0;
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.apes-ticket__miniatura {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.apes-ticket__titulo {
	font-family: var(--apes-fuente-display);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 1.3rem;
	line-height: 1.02;
	margin: 0;
}

.apes-ticket__meta {
	font-size: 0.88rem;
	color: var(--apes-negro-texto-tenue);
}

.apes-ticket--sobre-tinta .apes-ticket__meta { color: var(--apes-tinta-texto-tenue); }

.apes-ticket__costura {
	position: relative;
	width: 0;
	border-left: 2px dashed var(--apes-papel-borde);
	flex-shrink: 0;
}

.apes-ticket--sobre-tinta .apes-ticket__costura { border-left-color: var(--apes-tinta-borde); }

.apes-ticket__costura::before,
.apes-ticket__costura::after {
	content: "";
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--apes-papel);
}

.apes-ticket--sobre-tinta .apes-ticket__costura::before,
.apes-ticket--sobre-tinta .apes-ticket__costura::after {
	background: var(--apes-tinta);
}

.apes-ticket__costura::before { top: -9px; }
.apes-ticket__costura::after { bottom: -9px; }

.apes-ticket__talon {
	flex-shrink: 0;
	width: 84px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 12px 8px;
	text-align: center;
}

.apes-ticket__talon-num {
	font-family: var(--apes-fuente-display);
	font-weight: 700;
	font-size: 2.1rem;
	line-height: 1;
}

.apes-ticket__talon-label {
	font-family: var(--apes-fuente-dato);
	font-size: 0.65rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--apes-negro-texto-tenue);
}

.apes-ticket--sobre-tinta .apes-ticket__talon-label { color: var(--apes-tinta-texto-tenue); }

.apes-ticket--acero .apes-ticket__talon { background: color-mix(in srgb, var(--apes-acero) 14%, transparent); color: var(--apes-acero); }
.apes-ticket--naranja .apes-ticket__talon { background: color-mix(in srgb, var(--apes-naranja) 14%, transparent); color: var(--apes-naranja); }
.apes-ticket--verde .apes-ticket__talon { background: color-mix(in srgb, var(--apes-verde) 16%, transparent); color: #1c9a19; }
.apes-ticket--rojo .apes-ticket__talon { background: color-mix(in srgb, var(--apes-rojo) 14%, transparent); color: var(--apes-rojo); }

@media (max-width: 520px) {
	.apes-ticket { flex-direction: column; }
	.apes-ticket__costura { width: auto; height: 0; border-left: none; border-top: 2px dashed var(--apes-papel-borde); }
	.apes-ticket--sobre-tinta .apes-ticket__costura { border-top-color: var(--apes-tinta-borde); border-left: none; }
	.apes-ticket__costura::before, .apes-ticket__costura::after { top: 50%; left: -9px; transform: translateY(-50%); }
	.apes-ticket__costura::after { left: auto; right: -9px; }
	.apes-ticket__talon { width: auto; flex-direction: row; padding: 10px 16px; }
}

.apes-tickets-grilla {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}

/* ============================================================
   Módulo en vivo embebido en portada
   ============================================================ */
.apes-vivo-marco {
	border-radius: calc(var(--apes-radio) + 6px);
	padding: 3px;
	background: linear-gradient(135deg, var(--apes-naranja), var(--apes-rojo));
}

.apes-vivo-marco__interior {
	background: var(--apes-tinta);
	border-radius: calc(var(--apes-radio) + 4px);
	padding: 22px;
}

.apes-vivo-marco .apes-widget-en-vivo {
	max-width: none;
	border: none;
	background: transparent;
	padding: 0;
}

.apes-vivo-marco__sin-jornada {
	color: var(--apes-tinta-texto-tenue);
	margin: 0;
}

/* ============================================================
   Overrides de las clases estructurales de apes-core (public.css)
   ============================================================ */
.apes-badge {
	font-family: var(--apes-fuente-dato);
	font-size: 0.72rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	background: var(--apes-papel-2);
	color: var(--apes-negro-texto-tenue);
}

.apes-badge--en_escena { background: color-mix(in srgb, var(--apes-verde) 20%, transparent); color: #1c9a19; }
.apes-badge--pendiente { background: color-mix(in srgb, var(--apes-acero) 16%, transparent); color: var(--apes-acero); }
.apes-badge--finalizado { background: var(--apes-papel-2); color: var(--apes-negro-texto-tenue); }
.apes-badge--omitido { background: color-mix(in srgb, var(--apes-rojo) 14%, transparent); color: var(--apes-rojo); }

.apes-galeria-card,
.apes-ficha-colegio,
.apes-jornadas-lista,
.apes-historial-lista { font-family: var(--apes-fuente-cuerpo); }

.apes-galeria-card__meta { font-family: var(--apes-fuente-dato); text-transform: uppercase; letter-spacing: 0.03em; }

.apes-galeria-card img,
.apes-ficha-colegio__logo img { border-radius: 10px; }

.apes-filtros-galeria select {
	font-family: var(--apes-fuente-cuerpo);
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid var(--apes-papel-borde);
	background: #fff;
	color: var(--apes-negro-texto);
}

.apes-paginacion {
	display: flex;
	gap: 8px;
	margin-top: 32px;
	font-family: var(--apes-fuente-dato);
}

.apes-paginacion a,
.apes-paginacion span {
	padding: 8px 12px;
	border-radius: 8px;
	border: 1px solid var(--apes-papel-borde);
	text-decoration: none;
}

.apes-paginacion .current { background: var(--apes-tinta); color: var(--apes-tinta-texto); border-color: var(--apes-tinta); }

/* ============================================================
   Footer — compacto y centrado, no una segunda página.
   ============================================================ */
.apes-footer {
	background: var(--apes-tinta);
	color: var(--apes-tinta-texto-tenue);
	padding: 36px 0 20px;
}

.apes-footer__contenido {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 18px;
}

.apes-footer__marca { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.apes-footer__sello { width: 128px; height: 128px; opacity: 0.95; }

.apes-footer__marca-texto {
	font-family: var(--apes-fuente-display);
	font-weight: 700;
	text-transform: uppercase;
	color: var(--apes-tinta-texto);
	font-size: 1.6rem;
	margin: 0;
}

.apes-footer__enlaces ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 32px;
}

.apes-footer__enlaces a { color: var(--apes-tinta-texto-tenue); text-decoration: none; font-size: 0.95rem; font-weight: 600; }
.apes-footer__enlaces a:hover { color: var(--apes-naranja); }

.apes-footer__abajo {
	border-top: 1px solid var(--apes-tinta-borde);
	padding-top: 16px;
	margin-top: 4px;
	width: 100%;
	font-size: 0.8rem;
}
