/* Calendario cursos · PXS
   Estilo editorial y plano: tipografía del tema, azul y naranja de la marca, hairlines, sin sombras. */

.cc-agenda {
	--cc-primary: #1b2c6d;
	--cc-accent: #ef5a24;
	--cc-ink: #1d1d1f;
	--cc-muted: #6e6e73;
	--cc-line: #e2e2e5;
	--cc-band: #f5f5f6;
	--cc-band-hover: #eeeef1;
	--cc-ancho: 1280px;
	--cc-gutter: clamp(16px, 3vw, 40px);

	font-family: inherit;
	color: var(--cc-ink);
	line-height: 1.4;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--cc-ancho);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--cc-gutter);
	padding-right: var(--cc-gutter);
}

/* Títulos y nombres de curso con la tipografía de los encabezados del tema
   (el JS la detecta y la deja en --cc-font-titulos; si no, heredan la del cuerpo). */
.cc-titulo,
.cc-nav-titulo,
.cc-mes-titulo,
.cc-dia-titulo,
.cc-fila-dia b,
.cc-fila-nombre,
.cc-evento-nombre {
	font-family: var(--cc-font-titulos, inherit);
}

.cc-agenda *,
.cc-agenda *::before,
.cc-agenda *::after {
	box-sizing: inherit;
}

.cc-agenda a {
	text-decoration: none;
	color: inherit;
}

.cc-agenda h2,
.cc-agenda h3,
.cc-agenda h4 {
	margin: 0;
	font-family: inherit;
}

/* ---------- Encabezado ---------- */

.cc-cabecera {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	margin-bottom: 36px;
}

.cc-titulo {
	font-size: clamp(1.9rem, 3.4vw, 2.9rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--cc-ink);
}

.cc-titulo em {
	font-style: normal;
	color: var(--cc-primary);
}

.cc-oculto {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Cabecera con imagen */

.cc-cab-imagen,
.cc-cab-logo {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
}

.cc-cab-imagen {
	max-height: 160px;
}

.cc-cab-logo {
	max-height: 100px;
	margin-left: auto;
}

.cc-cabecera-imagen,
.cc-cabecera-imagen_logo {
	align-items: center;
}

.cc-cabecera-imagen_logo .cc-tabs {
	flex-basis: 100%;
	justify-content: flex-end;
	margin-top: 8px;
}

.cc-cabecera-centrada {
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.cc-cabecera-centrada .cc-cab-imagen {
	max-height: 200px;
}

.cc-tabs {
	display: flex;
	gap: 28px;
	border-bottom: 1px solid var(--cc-line);
}

.cc-tabs button {
	appearance: none;
	border: 0;
	background: none;
	padding: 8px 0 12px;
	margin-bottom: -1px;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cc-muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.cc-tabs button:hover {
	color: var(--cc-ink);
}

.cc-tabs button[aria-pressed="true"] {
	color: var(--cc-primary);
	border-bottom-color: var(--cc-accent);
}

/* ---------- Vista calendario (meses del año) ---------- */

.cc-meses {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 48px 56px;
}

.cc-mes-titulo {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 12px;
	margin-bottom: 4px;
	border-bottom: 2px solid var(--cc-ink);
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--cc-ink);
}

.cc-mes-actual .cc-mes-titulo {
	border-bottom-color: var(--cc-accent);
}

.cc-mes-titulo small {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	color: var(--cc-muted);
}

.cc-fila {
	display: grid;
	grid-template-columns: 56px 1fr;
	gap: 16px;
	padding: 16px 14px;
	margin: 0 -14px;
	border-radius: 6px;
	position: relative;
	transition: background 0.18s ease;
}

/* Hairline inferior alineada con la línea del título del mes. */
.cc-fila::after {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 0;
	height: 1px;
	background: var(--cc-line);
}

/* Barra lateral del color de la categoría, visible al pasar el cursor. */
.cc-fila::before {
	content: "";
	position: absolute;
	left: 0;
	top: 14px;
	bottom: 14px;
	width: 3px;
	border-radius: 2px;
	background: var(--cc-cat, var(--cc-accent));
	opacity: 0;
	transition: opacity 0.18s ease;
}

.cc-fila:hover {
	background: var(--cc-band);
}

.cc-fila:hover::before {
	opacity: 1;
}

.cc-fila:hover .cc-fila-nombre {
	color: var(--cc-primary);
}

.cc-fila:hover .cc-fila-dia b {
	color: var(--cc-cat, var(--cc-primary));
}

.cc-fila-dia {
	line-height: 1;
}

.cc-fila-dia b {
	display: block;
	font-size: 1.7rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--cc-primary);
}

.cc-fila-dia small {
	display: block;
	margin-top: 5px;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cc-muted);
}

.cc-fila-cuerpo {
	min-width: 0;
	align-self: center;
}

.cc-fila-nombre {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--cc-ink);
	transition: color 0.15s ease;
}

.cc-fila-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 0;
	margin-top: 6px;
	font-size: 0.78rem;
	color: var(--cc-muted);
}

.cc-fila-meta > span + span::before {
	content: "·";
	margin: 0 8px;
	color: var(--cc-line);
	font-weight: 700;
}

.cc-fila-meta .cc-cat {
	color: var(--cc-cat, var(--cc-primary));
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.cc-punto {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--cc-cat, var(--cc-primary));
	flex: none;
	display: inline-block;
}

.cc-vacio {
	padding: 22px 0;
	font-size: 0.85rem;
	color: var(--cc-muted);
	border-bottom: 1px solid var(--cc-line);
}

/* ---------- Vista lista (un mes a la vez) ---------- */

.cc-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 24px;
}

.cc-nav-titulo {
	font-size: clamp(1.8rem, 3.4vw, 2.6rem);
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: var(--cc-ink);
}

.cc-nav-titulo small {
	display: block;
	margin-top: 8px;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	color: var(--cc-muted);
}

.cc-nav-botones {
	display: flex;
	gap: 8px;
	flex: none;
}

.cc-nav-botones button {
	appearance: none;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1.5px solid var(--cc-line);
	background: transparent;
	color: var(--cc-ink);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.cc-nav-botones button svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cc-nav-botones button:hover:not(:disabled) {
	border-color: var(--cc-primary);
	background: var(--cc-primary);
	color: #fff;
}

.cc-nav-botones button:disabled {
	opacity: 0.28;
	cursor: default;
}

.cc-dias {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cc-dia {
	background: var(--cc-band);
	padding: 18px 24px 10px;
}

.cc-dia-titulo {
	font-size: 0.8rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cc-ink);
	margin-bottom: 8px;
}

.cc-dia-titulo span {
	font-weight: 600;
	color: var(--cc-muted);
}

.cc-evento {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px 24px;
	padding: 12px 12px;
	margin: 0 -12px;
	border-radius: 4px;
	box-shadow: inset 0 0 0 0 var(--cc-cat, var(--cc-primary));
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.cc-evento:hover {
	background: var(--cc-band-hover);
	box-shadow: inset 3px 0 0 0 var(--cc-cat, var(--cc-primary));
}

.cc-evento-hora {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 0.92rem;
	font-weight: 600;
	color: var(--cc-ink);
	white-space: nowrap;
}

.cc-evento-cuerpo {
	min-width: 0;
}

.cc-evento-nombre {
	display: block;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--cc-ink);
	transition: color 0.15s ease;
}

.cc-evento:hover .cc-evento-nombre {
	color: var(--cc-primary);
}

.cc-evento-cat {
	display: block;
	margin-top: 3px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--cc-cat, var(--cc-primary));
}

.cc-evento-datos {
	display: flex;
	gap: 22px;
	font-size: 0.78rem;
	color: var(--cc-muted);
	white-space: nowrap;
}

.cc-evento-datos span {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.cc-evento-datos small {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--cc-muted);
}

.cc-evento-datos b {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--cc-ink);
}

.cc-desglose {
	font-style: normal;
	font-size: 0.72rem;
	color: var(--cc-muted);
	white-space: normal;
}

.cc-evento-datos .cc-desglose {
	display: block;
	margin-top: 2px;
}

.cc-evento-ir {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	color: var(--cc-accent);
	opacity: 0;
	transform: translateX(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.cc-evento-ir svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

a.cc-evento:hover .cc-evento-ir {
	opacity: 1;
	transform: none;
}

.cc-lista-vacia {
	padding: 40px 24px;
	background: var(--cc-band);
	font-size: 0.9rem;
	color: var(--cc-muted);
}

.cc-lista-vacia b {
	display: block;
	color: var(--cc-ink);
	margin-bottom: 4px;
}

/* ---------- Leyenda ---------- */

.cc-leyenda {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	margin-top: 40px;
	padding-top: 16px;
	border-top: 1px solid var(--cc-line);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cc-muted);
}

.cc-leyenda span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* ---------- Transiciones ---------- */

.cc-vista {
	animation: cc-aparecer 0.22s ease;
}

@keyframes cc-aparecer {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.cc-agenda * { animation: none !important; transition: none !important; }
}

/* ---------- Textos largos ---------- */

.cc-titulo,
.cc-nav-titulo,
.cc-mes-titulo,
.cc-fila-nombre,
.cc-evento-nombre {
	overflow-wrap: anywhere;
	min-width: 0;
}

/* ---------- Tableta ---------- */

@media (max-width: 860px) {
	.cc-meses {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.cc-evento {
		grid-template-columns: 1fr;
		gap: 6px;
	}
	.cc-evento-datos {
		gap: 18px;
		flex-wrap: wrap;
		white-space: normal;
	}
	.cc-evento-ir {
		display: none;
	}
	.cc-cabecera {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		margin-bottom: 28px;
	}
	.cc-dia {
		padding: 14px 16px 8px;
	}
}

/* ---------- Móvil ---------- */

@media (max-width: 600px) {
	.cc-titulo {
		font-size: 1.6rem;
	}
	.cc-titulo em {
		display: block;
		margin-top: 4px;
	}
	.cc-tabs {
		width: 100%;
		gap: 22px;
	}
	.cc-cab-imagen {
		max-height: 110px;
	}
	.cc-cab-logo {
		max-height: 64px;
	}
	.cc-cabecera-imagen_logo .cc-tabs {
		justify-content: flex-start;
	}
	.cc-nav {
		flex-wrap: wrap;
		gap: 12px;
		margin-bottom: 16px;
	}
	.cc-nav-titulo {
		font-size: 1.5rem;
		flex: 1 1 100%;
		order: 1;
	}
	.cc-nav-botones {
		order: 2;
		width: 100%;
		justify-content: flex-end;
	}
	.cc-nav-botones button {
		width: 40px;
		height: 40px;
	}
	.cc-mes-titulo {
		font-size: 1rem;
	}
	.cc-fila {
		grid-template-columns: 46px 1fr;
		gap: 12px;
		padding: 14px 10px;
		margin: 0 -10px;
	}
	.cc-fila::after {
		left: 10px;
		right: 10px;
	}
	.cc-fila-dia b {
		font-size: 1.45rem;
	}
	.cc-fila-nombre {
		font-size: 0.95rem;
	}
	.cc-fila-meta {
		font-size: 0.74rem;
	}
	.cc-fila-meta > span + span::before {
		margin: 0 6px;
	}
	.cc-evento {
		padding: 10px 0;
		margin: 0;
	}
	.cc-evento-nombre {
		font-size: 1rem;
	}
	.cc-dia {
		padding: 12px 14px 6px;
	}
	.cc-leyenda {
		gap: 8px 16px;
		margin-top: 28px;
	}
}
