/* Historia Histórica · páginas hub · versión 1.3
   Módulos en rejilla. Se carga solo en los hubs. Todas las clases llevan el prefijo hh-. */

.hh-hero--sin-imagen .hh-hero__wrap {
	min-height: 0;
}

.hh-hero--sin-imagen .hh-hero__inner {
	padding-top: var(--hh-esp-12);
	padding-bottom: var(--hh-esp-12);
}

/* ---------- Módulos ---------- */

.hh-modulo {
	padding: var(--hh-esp-12) var(--hh-esp-6);
	background: var(--hh-marfil);
	color: var(--hh-carbon);
}

.hh-modulo--oscuro {
	background: var(--hh-carbon);
	color: var(--hh-marfil);
}

.hh-modulo__interior {
	max-width: var(--hh-contenedor);
	margin: 0 auto;
}

.hh-modulo .hh-eyebrow {
	color: var(--hh-rojo-oscuro);
}

.hh-modulo--oscuro .hh-eyebrow {
	color: var(--hh-rojo-claro);
}

.hh-modulo__titulo,
.hh-modulo__titulo a {
	margin: 0 0 var(--hh-esp-8);
	font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem);
	border: 0;
	color: inherit;
	text-decoration: none;
}

.hh-modulo__titulo a {
	margin: 0;
}

.hh-modulo__titulo a:hover,
.hh-modulo__titulo a:focus-visible {
	text-decoration: underline;
	text-decoration-color: var(--hh-rojo);
	text-underline-offset: 6px;
}

/* ---------- Rejilla y tarjetas ---------- */

.hh-rejilla {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--hh-esp-6);
}

.hh-tj {
	position: relative;
	min-width: 0;
	background: var(--hh-tarjeta);
	border: 1px solid var(--hh-borde);
	border-radius: var(--hh-radio);
	overflow: hidden;
	color: var(--hh-carbon);
}

.hh-modulo--oscuro .hh-tj {
	background: rgba(243, 240, 232, 0.06);
	border-color: rgba(243, 240, 232, 0.18);
	color: var(--hh-marfil);
}

.hh-tj__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--hh-carbon);
}

.hh-tj__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hh-tj__cuerpo {
	padding: var(--hh-esp-4);
}

/* El color se hereda de la tarjeta (antes tomaba el de los titulares de Kadence y no se leía en fondo oscuro) */
.hh-tj__titulo,
.hh-tj__titulo a {
	margin: 0 0 var(--hh-esp-2);
	font-family: var(--hh-fuente-titulos);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.25;
	color: inherit;
	text-decoration: none;
}

.hh-tj__titulo a {
	margin: 0;
}

/* Toda la tarjeta es clicable, pero el texto del enlace es solo el título */
.hh-tj__enlace::after {
	content: "";
	position: absolute;
	inset: 0;
}

.hh-tj__texto {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--hh-texto-suave);
}

.hh-modulo--oscuro .hh-tj__texto {
	color: #CFCDC6;
}

.hh-tj:hover .hh-tj__titulo a,
.hh-tj__enlace:focus-visible {
	text-decoration: underline;
	text-decoration-color: var(--hh-rojo);
	text-underline-offset: 4px;
}

.hh-tj__enlace:focus-visible {
	outline: 2px solid var(--hh-rojo);
	outline-offset: -2px;
}

/* ---------- Texto editorial del hub ---------- */

.hh-hub__contenido {
	padding: var(--hh-esp-12) var(--hh-esp-6) var(--hh-esp-16);
	background: var(--hh-marfil);
}

.hh-hub__contenido .hh-contenido {
	max-width: 52rem;
	margin: 0 auto;
}

@media (min-width: 640px) {
	.hh-rejilla {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 960px) {
	.hh-rejilla {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--hh-esp-8);
	}
}

@media (min-width: 1200px) {
	.hh-rejilla {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Columnas según el número de tarjetas, para que ninguna salte sola a la línea de abajo */
@media (min-width: 960px) {
	.hh-rejilla--n1 {
		grid-template-columns: minmax(0, 24rem);
	}

	.hh-rejilla--n2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.hh-rejilla--n3,
	.hh-rejilla--n6,
	.hh-rejilla--n9 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1100px) {
	.hh-rejilla--n5,
	.hh-rejilla--n10 {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

/* Retratos (personajes): imagen vertical y texto breve */
.hh-rejilla--retratos .hh-tj__media {
	aspect-ratio: 4 / 5;
}

.hh-rejilla--retratos .hh-tj__img {
	object-position: center top;
}

.hh-rejilla--retratos .hh-tj__texto {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}
