/* ==========================================================================
   Reformas en Toledo · Portada (paso 5)

   Índice de revista: cada entrada una sola vez y cada tramo con su propio
   formato (apertura, reportaje, banda de cuentas, mosaico, carrusel e
   índice), para que el ritmo cambie al bajar. En móvil las listas pasan a
   filas compactas para no convertir la portada en un scroll de fotos.
   ========================================================================== */

.rt-front-page #primary.rt-front {
	float: none;
	width: 100%;
	max-width: none;
	padding-bottom: 4rem;
}

.rt-front a {
	text-decoration: none;
}

/* Contenedor vacío que CoverNews deja aunque sus módulos estén apagados. */
.rt-front-page section.af-blocks {
	display: none;
}


/* --------------------------------------------------------------------------
   Tarjeta (común)
   -------------------------------------------------------------------------- */
.rt-card {
	position: relative;
	min-width: 0;
}

.rt-card__media {
	display: block;
	overflow: hidden;
	border-radius: 2px;
	background: var(--rt-line);
}

.rt-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rt-card__body {
	min-width: 0;
}

.rt-front .rt-card__cat {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	margin-bottom: 0.5rem;
	padding: 2px 8px;
	border-radius: 2px;
	background: var(--rt-accent);
	color: #fff;
	font-family: var(--rt-sans) !important;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.4;
}

.rt-front .rt-card__cat:hover {
	background: var(--rt-accent-strong);
	color: #fff;
}

.rt-front .rt-card__title {
	margin: 0 0 0.45rem;
	font-size: 1.25rem;
	line-height: 1.3;
	text-wrap: balance;
}

.rt-front .rt-card__title a {
	color: var(--rt-ink);
}

.rt-front .rt-card__title a:hover {
	color: var(--rt-accent);
}

/* Toda la tarjeta se puede pulsar a través del enlace del título. */
.rt-front .rt-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.rt-front .rt-card__cat {
	position: relative;
	z-index: 1;
}

.rt-front .rt-card__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0 0 0.5rem;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--rt-ink-2);
}

.rt-front .rt-card__meta {
	margin: 0;
	font-size: 0.875rem;
	color: var(--rt-ink-3);
}


/* --------------------------------------------------------------------------
   Lo último
   -------------------------------------------------------------------------- */
.rt-lead {
	display: grid;
	gap: 2rem;
	margin-top: 2rem;
}

.rt-card--lead .rt-card__media {
	aspect-ratio: 16 / 9;
	margin-bottom: 1.1rem;
}

.rt-front .rt-card--lead .rt-card__title {
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.625rem);
	line-height: 1.12;
	letter-spacing: -0.015em;
}

.rt-front .rt-card--lead .rt-card__excerpt {
	-webkit-line-clamp: 4;
	max-width: 60ch;
	font-size: 1.125rem;
}

.rt-lead__side {
	display: grid;
	align-content: start;
}

.rt-card--side {
	display: grid;
	grid-template-columns: 112px 1fr;
	gap: 1rem;
	align-items: start;
	padding: 1.1rem 0;
	border-top: 1px solid var(--rt-line);
}

.rt-card--side:first-child {
	border-top: 0;
	padding-top: 0;
}

.rt-card--side .rt-card__media {
	aspect-ratio: 4 / 3;
}

.rt-front .rt-card--side .rt-card__title {
	font-size: 1.125rem;
	line-height: 1.35;
}

/* Dentro de cada sección la etiqueta repetía el nombre de la sección
   (o mostraba otra categoría de la entrada, que confundía). */
.rt-section .rt-card__cat {
	display: none;
}

@media (min-width: 992px) {
	.rt-lead {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		gap: 2.5rem;
	}

	/* Las entradas laterales se reparten todo el alto de la principal:
	   sin hueco debajo, mida lo que mida su titular. */
	.rt-lead__side {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		padding-left: 2.5rem;
		border-left: 1px solid var(--rt-line);
	}

	.rt-card--side {
		grid-template-columns: 128px 1fr;
		padding-bottom: 0;
	}
}

/* Pantallas anchas: la principal crece y las laterales también, para que
   el reparto no deje demasiado aire entre ellas. */
@media (min-width: 1400px) {
	.rt-card--side {
		grid-template-columns: 168px 1fr;
		gap: 1.25rem;
	}
}


/* --------------------------------------------------------------------------
   Secciones por categoría
   -------------------------------------------------------------------------- */
.rt-section {
	margin-top: 4rem;
}

.rt-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.25rem 1.5rem;
	margin-bottom: 1.5rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--rt-ink);
}

.rt-front .rt-section__title {
	margin: 0;
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	line-height: 1.15;
}

.rt-front .rt-section__more {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	min-height: 44px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--rt-accent);
}

.rt-front .rt-section__more:hover {
	color: var(--rt-accent-strong);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.rt-section__grid {
	display: grid;
	gap: 0;
}

/* Móvil: lista compacta. */
.rt-section__grid .rt-card--card {
	display: grid;
	grid-template-columns: 104px 1fr;
	gap: 1rem;
	align-items: start;
	padding: 1rem 0;
	border-top: 1px solid var(--rt-line);
}

.rt-section__grid .rt-card--card:first-child {
	border-top: 0;
	padding-top: 0;
}

.rt-section__grid .rt-card--card .rt-card__media {
	aspect-ratio: 4 / 3;
}

.rt-section__grid .rt-card--card .rt-card__excerpt {
	display: none;
}

.rt-front .rt-section__grid .rt-card__title {
	font-size: 1.125rem;
}

/* Tableta y escritorio: rejilla de tres. */
@media (min-width: 768px) {
	.rt-section__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 2rem;
	}

	.rt-section__grid .rt-card--card,
	.rt-section__grid .rt-card--card:first-child {
		display: block;
		padding: 0;
		border-top: 0;
	}

	.rt-section__grid .rt-card--card .rt-card__media {
		aspect-ratio: 3 / 2;
		margin-bottom: 0.9rem;
	}

	.rt-section__grid .rt-card--card .rt-card__excerpt {
		display: -webkit-box;
	}

	.rt-front .rt-section__grid .rt-card__title {
		font-size: 1.25rem;
	}
}


/* Flecha dibujada de los enlaces «Ver todo»: avanza un poco con el ratón. */
.rt-arrow {
	flex: none;
	transition: transform var(--rt-dur-fast, 150ms) var(--rt-ease-out, ease-out);
}

@media (any-hover: hover) {
	.rt-front a:hover > .rt-arrow {
		transform: translateX(3px);
	}
}


/* --------------------------------------------------------------------------
   Reportaje: una entrada en horizontal y titulares sin foto debajo
   -------------------------------------------------------------------------- */
.rt-card--feature .rt-card__media {
	aspect-ratio: 3 / 2;
	margin-bottom: 1.25rem;
}

.rt-front .rt-card--feature .rt-card__title {
	font-size: clamp(1.625rem, 1.2rem + 1.5vw, 2.25rem);
	line-height: 1.15;
	letter-spacing: -0.01em;
}

.rt-front .rt-card--feature .rt-card__excerpt {
	-webkit-line-clamp: 5;
	max-width: 52ch;
	font-size: 1.0625rem;
}

/* Titular sin foto (fila del reportaje y listas del índice). */
.rt-front .rt-card--line .rt-card__title {
	margin-bottom: 0.35rem;
	font-size: 1.125rem;
	line-height: 1.3;
}

.rt-feature__row {
	display: grid;
	margin-top: 2rem;
	border-top: 1px solid var(--rt-line);
}

.rt-feature__row .rt-card--line {
	padding: 1.1rem 0;
	border-bottom: 1px solid var(--rt-line);
}

@media (min-width: 768px) {
	.rt-card--feature {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		gap: 2.5rem;
		align-items: center;
	}

	.rt-card--feature .rt-card__media {
		margin-bottom: 0;
	}

	.rt-feature__row {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		border-bottom: 1px solid var(--rt-line);
	}

	.rt-feature__row .rt-card--line {
		padding: 1.25rem 1.5rem 1.4rem;
		border-bottom: 0;
		border-left: 1px solid var(--rt-line);
	}

	.rt-feature__row .rt-card--line:first-child {
		padding-left: 0;
		border-left: 0;
	}
}


/* --------------------------------------------------------------------------
   Las cuentas: banda de barro cocido a todo el ancho
   El terracota oscuro de la marca, con texto en papel de cal (7,6:1).
   Título y presentación arriba, entradas en dos columnas debajo: así la
   banda no deja huecos tenga el texto que tenga.
   El fondo llega a los bordes de la ventana con una sombra recortada, sin
   100vw (que con barra de desplazamiento crea scroll lateral).
   -------------------------------------------------------------------------- */
.rt-ledger {
	--rt-band: var(--rt-accent-strong);
	--rt-band-text: var(--rt-paper);
	--rt-band-muted: #ecd9cf;
	--rt-band-line: rgb(250 247 242 / 0.24);
	position: relative;
	margin-top: 5rem;
	padding: 3.5rem 0;
	background: var(--rt-band);
	box-shadow: 0 0 0 100vmax var(--rt-band);
	clip-path: inset(0 -100vmax);
	color: var(--rt-band-text);
}

.rt-ledger + .rt-section {
	margin-top: 5rem;
}

.rt-ledger__intro {
	display: grid;
	gap: 0.75rem;
	padding-bottom: 1.75rem;
	border-bottom: 1px solid var(--rt-band-line);
}

.rt-front .rt-ledger__title {
	margin: 0;
	font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: var(--rt-band-text);
	text-wrap: balance;
}

.rt-front .rt-ledger__text {
	max-width: 40ch;
	margin: 0;
	font-size: 1.125rem;
	line-height: 1.5;
	color: var(--rt-band-muted);
	text-wrap: pretty;
}

.rt-ledger__list {
	display: grid;
}

.rt-card--ledger {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 88px;
	gap: 1.25rem;
	align-items: center;
	padding: 1.25rem 0;
	border-bottom: 1px solid var(--rt-band-line);
}

.rt-card--ledger .rt-card__media {
	order: 2;
	aspect-ratio: 1;
	background: rgb(0 0 0 / 0.15);
}

.rt-front .rt-card--ledger .rt-card__title {
	margin-bottom: 0.4rem;
	font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.5rem);
	line-height: 1.2;
}

.rt-front .rt-card--ledger .rt-card__title a {
	color: var(--rt-band-text);
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.rt-front .rt-card--ledger .rt-card__title a:hover {
	color: var(--rt-band-text);
	text-decoration-color: currentColor;
}

.rt-front .rt-card--ledger .rt-card__meta {
	color: var(--rt-band-muted);
}

.rt-ledger :focus-visible {
	outline-color: var(--rt-band-text);
}

.rt-ledger ::selection {
	background: var(--rt-band-text);
	color: var(--rt-band);
}

/* Entrada de la banda: el único momento animado de la portada. Al llegar a
   ella, el título y la presentación suben un poco y aparecen, y las
   entradas les siguen escalonadas mientras sus fotos se descubren de abajo
   arriba. El estado oculto solo existe si front.js añade .rt-reveal (con
   movimiento permitido y la banda aún fuera de pantalla); si el script no
   llega a cargar, la banda se ve quieta, como siempre. */
.rt-ledger.rt-reveal :is(.rt-ledger__title, .rt-ledger__text, .rt-card--ledger) {
	opacity: 0;
	transform: translateY(18px);
}

.rt-ledger.rt-reveal .rt-card--ledger .rt-card__media {
	clip-path: inset(100% 0 0 0);
}

.rt-ledger.rt-reveal.is-in :is(.rt-ledger__title, .rt-ledger__text, .rt-card--ledger) {
	opacity: 1;
	transform: none;
	transition:
		opacity 600ms ease-out calc(var(--rt-i, 0) * 80ms),
		transform 900ms var(--rt-ease-out-slow, ease-out) calc(var(--rt-i, 0) * 80ms);
}

.rt-ledger.rt-reveal.is-in .rt-card--ledger .rt-card__media {
	clip-path: inset(0);
	transition: clip-path 1000ms var(--rt-ease-out-slow, ease-out) calc(var(--rt-i, 0) * 80ms + 150ms);
}

@media (min-width: 768px) {
	.rt-ledger__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 3rem;
	}
}

@media (min-width: 992px) {
	.rt-ledger {
		padding: 4.5rem 0;
	}

	.rt-ledger__intro {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		align-items: end;
		gap: 4rem;
		padding-bottom: 2.25rem;
	}

	.rt-front .rt-ledger__text {
		justify-self: end;
	}

	.rt-ledger__list {
		column-gap: 4rem;
	}

	.rt-card--ledger {
		grid-template-columns: minmax(0, 1fr) 112px;
		gap: 1.75rem;
		padding: 1.75rem 0;
	}
}


/* --------------------------------------------------------------------------
   Mosaico: el titular va sobre la foto
   -------------------------------------------------------------------------- */
.rt-mosaic__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.rt-card--overlay {
	display: grid;
	overflow: hidden;
	border-radius: 2px;
	background: var(--rt-night-2);
	isolation: isolate;
}

.rt-card--overlay:first-child {
	grid-column: 1 / -1;
}

.rt-card--overlay > * {
	grid-area: 1 / 1;
}

.rt-card--overlay .rt-card__media {
	aspect-ratio: 1;
	border-radius: 0;
}

.rt-card--overlay:first-child .rt-card__media {
	aspect-ratio: 4 / 3;
}

/* Velo oscuro solo en la mitad baja: la foto se ve y el titular se lee. */
.rt-card--overlay .rt-card__body {
	z-index: 1;
	align-self: end;
	padding: 3.5rem 1rem 1rem;
	background: linear-gradient(to top, rgb(22 20 17 / 0.88) 0%, rgb(22 20 17 / 0.6) 55%, rgb(22 20 17 / 0) 100%);
	pointer-events: none;
}

.rt-card--overlay .rt-card__title a {
	pointer-events: auto;
}

.rt-front .rt-card--overlay .rt-card__title {
	margin-bottom: 0.3rem;
	font-size: 1.0625rem;
	line-height: 1.25;
}

.rt-front .rt-card--overlay:first-child .rt-card__title {
	font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem);
	line-height: 1.15;
}

.rt-front .rt-card--overlay .rt-card__title a,
.rt-front .rt-card--overlay .rt-card__title a:hover {
	color: #fff;
}

.rt-front .rt-card--overlay .rt-card__meta {
	color: rgb(255 255 255 / 0.82);
}

@media (min-width: 768px) {
	.rt-mosaic__grid {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		grid-template-rows: 1fr 1fr;
		gap: 1rem;
	}

	.rt-card--overlay:first-child {
		grid-column: 1;
		grid-row: 1 / span 2;
	}

	.rt-card--overlay .rt-card__media,
	.rt-card--overlay:first-child .rt-card__media {
		aspect-ratio: auto;
		min-height: 15rem;
	}

	.rt-card--overlay:first-child .rt-card__media {
		min-height: 32rem;
	}

	.rt-card--overlay .rt-card__body {
		padding: 4rem 1.5rem 1.4rem;
	}

	.rt-card--overlay:first-child .rt-card__body {
		padding: 6rem 2rem 1.75rem;
	}

	.rt-front .rt-card--overlay .rt-card__title {
		font-size: 1.375rem;
	}

	.rt-front .rt-card--overlay:first-child .rt-card__title {
		max-width: 22ch;
	}
}


/* --------------------------------------------------------------------------
   Carrusel: fotos verticales que se deslizan
   Sin JavaScript es un desplazamiento horizontal normal (con el dedo, la
   rueda o el teclado); front.js añade las flechas y las desactiva en los
   extremos.
   -------------------------------------------------------------------------- */
.rt-carousel__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 72%;
	gap: 1rem;
	padding: 0 0 1rem;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var(--rt-line) transparent;
}

.rt-carousel__track:focus-visible {
	outline: 2px solid var(--rt-accent);
	outline-offset: 4px;
}

@media (prefers-reduced-motion: no-preference) {
	.rt-carousel__track {
		scroll-behavior: smooth;
	}
}

.rt-card--poster {
	scroll-snap-align: start;
}

.rt-card--poster .rt-card__media {
	aspect-ratio: 4 / 5;
	margin-bottom: 0.85rem;
}

.rt-front .rt-card--poster .rt-card__title {
	font-size: 1.125rem;
	line-height: 1.3;
}

.rt-carousel__nav {
	display: flex;
	gap: 0.5rem;
}

/* En móvil se desliza con el dedo; las flechas solo ocupan sitio. */
.rt-carousel__nav[hidden] {
	display: none;
}

@media (max-width: 767px) {
	.rt-carousel__nav {
		display: none;
	}
}

.rt-front .rt-carousel__btn {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--rt-ink);
	border-radius: 50%;
	background: transparent;
	color: var(--rt-ink);
	cursor: pointer;
}

.rt-front .rt-carousel__btn:hover {
	background: var(--rt-ink);
	color: var(--rt-paper);
}

.rt-front .rt-carousel__btn:disabled {
	border-color: var(--rt-line);
	background: transparent;
	color: var(--rt-ink-3);
	cursor: default;
}

.rt-carousel > .rt-section__more {
	margin-top: 0.5rem;
}

@media (min-width: 768px) {
	.rt-carousel__track {
		grid-auto-columns: calc((100% - 2rem) / 3);
	}
}

@media (min-width: 992px) {
	.rt-carousel__track {
		grid-auto-columns: calc((100% - 3 * 1.5rem) / 4);
		gap: 1.5rem;
	}
}


/* --------------------------------------------------------------------------
   Índice: categorías pequeñas en columnas, como un periódico
   -------------------------------------------------------------------------- */
.rt-index__cols {
	display: grid;
	gap: 2.5rem;
}

.rt-front .rt-index__cat {
	margin: 0 0 1rem;
	padding-top: 0.75rem;
	border-top: 3px solid var(--rt-accent);
	font-family: var(--rt-sans) !important;
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.rt-front .rt-index__cat a {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	min-height: 32px;
	color: var(--rt-ink);
}

.rt-front .rt-index__cat a:hover {
	color: var(--rt-accent);
}

.rt-index__col .rt-card--card .rt-card__media {
	aspect-ratio: 3 / 2;
	margin-bottom: 0.75rem;
}

.rt-index__col .rt-card--card .rt-card__excerpt {
	display: none;
}

.rt-front .rt-index__col .rt-card__title {
	font-size: 1.125rem;
	line-height: 1.3;
}

.rt-index__col .rt-card--line {
	margin-top: 0.9rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--rt-line);
}

.rt-front .rt-index__col .rt-card--line .rt-card__title {
	font-size: 1.0625rem;
}

@media (min-width: 600px) {
	.rt-index__cols {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2.5rem 2rem;
	}
}

@media (min-width: 992px) {
	.rt-index__cols {
		grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	}
}


/* --------------------------------------------------------------------------
   Quién escribe
   -------------------------------------------------------------------------- */
.rt-author {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 1.25rem;
	align-items: start;
	margin-top: 4.5rem;
	padding: 2rem 0 0;
	border-top: 1px solid var(--rt-ink);
}

.rt-author__photo img {
	display: block;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
}

.rt-front .rt-author__title {
	margin: 0 0 0.4rem;
	font-size: 1.5rem;
}

.rt-front .rt-author__text {
	max-width: 60ch;
	margin: 0 0 0.25rem;
	font-size: 1.125rem;
	line-height: 1.55;
	color: var(--rt-ink-2);
}

@media (min-width: 768px) {
	.rt-author {
		grid-template-columns: 96px 1fr;
		gap: 1.75rem;
	}

	.rt-author__photo img {
		width: 96px;
		height: 96px;
	}
}
