.ctxb-carrusel {
	--ctxb-ancho-tarjeta: 380px;
	--ctxb-espacio: 24px;
	position: relative;
}

/* ---------- Cabecera ---------- */

.ctxb-carrusel__cabecera {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	margin-bottom: 40px;
}

.ctxb-carrusel__antetitulo {
	margin: 0 0 14px;
}

.ctxb-carrusel__titulo {
	margin: 0;
	line-height: 0.9;
}

.ctxb-carrusel__flechas {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
	padding-bottom: 6px;
}

.ctxb-carrusel__flecha {
	width: 52px;
	height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 0;
	cursor: pointer;
	padding: 0;
	transition: background .18s ease, color .18s ease, opacity .18s ease;
}

.ctxb-carrusel__flecha:disabled {
	opacity: .3;
	cursor: default;
}

.ctxb-carrusel__flecha:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* ---------- Pista ---------- */

.ctxb-carrusel__pista {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: var(--ctxb-ancho-tarjeta);
	gap: var(--ctxb-espacio);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	/* Sitio para la sombra de las tarjetas: sin esto se recorta al hacer scroll. */
	padding: 4px 4px 28px;
	margin: -4px -4px -28px;
	scrollbar-width: none;
}

.ctxb-carrusel__pista::-webkit-scrollbar { display: none; }

.ctxb-carrusel__pista:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* ---------- Tarjeta ---------- */

.ctxb-tarjeta {
	position: relative;
	scroll-snap-align: start;
	background: #fff;
	border: 1px solid #E4E4E4;
	padding: 34px 32px 30px;
	display: flex;
	flex-direction: column;
	gap: 0;
	transition: box-shadow .22s ease, transform .22s ease;
}

.ctxb-tarjeta:hover {
	box-shadow: 0 14px 34px rgba(0, 0, 0, .10);
	transform: translateY(-2px);
}

.ctxb-tarjeta__medio {
	margin: 0 0 6px;
	font-weight: 800;
	font-size: 15px;
	letter-spacing: .01em;
	text-transform: uppercase;
	line-height: 1.2;
}

.ctxb-tarjeta__fecha {
	margin: 0 0 22px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
}

.ctxb-tarjeta__titulo {
	margin: 0 0 16px;
	font-size: 20px;
	line-height: 1.32;
	font-weight: 600;
}

.ctxb-tarjeta__resumen {
	margin: 0 0 28px;
	font-size: 14.5px;
	line-height: 1.6;
}

/* El enlace queda abajo aunque las tarjetas tengan texto de distinto largo. */
.ctxb-tarjeta__enlace {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-decoration: none;
	transition: color .18s ease, gap .18s ease;
}

.ctxb-tarjeta:hover .ctxb-tarjeta__enlace { gap: 12px; }

/* Toda la tarjeta es clicable, pero el enlace real sigue siendo uno solo. */
.ctxb-tarjeta__enlace::after {
	content: "";
	position: absolute;
	inset: 0;
}

.ctxb-tarjeta__enlace:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.ctxb-tarjeta .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
	.ctxb-carrusel__cabecera { margin-bottom: 28px; }
	.ctxb-tarjeta { padding: 28px 24px 26px; }
}

@media (max-width: 767px) {
	.ctxb-carrusel__cabecera {
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}
	.ctxb-carrusel__flechas { padding-bottom: 0; }
	.ctxb-carrusel__flecha { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
	.ctxb-carrusel__pista { scroll-behavior: auto; }
	.ctxb-tarjeta,
	.ctxb-tarjeta__enlace,
	.ctxb-carrusel__flecha { transition: none; }
	.ctxb-tarjeta:hover { transform: none; }
}
