/* ============================================================
   Maqueteo Línea de Trabajo — frontend
   Prefijo .mlt para no chocar con el tema ni con Línea de Historia.
   ============================================================ */

.mlt {
	--mlt-acento: #C0102A;
	--mlt-tinta: #1F2933;
	--mlt-texto: #4A5560;
	--mlt-linea: #D8DDE2;
	--mlt-suave: #F5F7F8;
	--mlt-riel: 2px;

	max-width: 980px;
	margin: 0 auto;
	padding: 8px 0 16px;
	font-family: "Source Serif 4", Georgia, serif;
}

.mlt *,
.mlt *::before,
.mlt *::after { box-sizing: border-box; }

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

.mlt__intro { margin-bottom: 36px; }

.mlt__titulo {
	margin: 0 0 12px;
	color: var(--mlt-tinta);
	font-family: "Archivo", system-ui, sans-serif;
	font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.3rem);
	font-weight: 700;
	line-height: 1.15;
}

.mlt__titulo::after {
	content: "";
	display: block;
	width: 56px;
	height: 4px;
	margin-top: 14px;
	background: var(--mlt-acento);
}

.mlt__bajada { max-width: 64ch; }

.mlt__bajada p {
	margin: 0 0 10px;
	color: var(--mlt-texto);
	font-size: 1.02rem;
	line-height: 1.7;
}

.mlt__bajada p:last-child { margin-bottom: 0; }

/* ------------------------------------------------- Barra de años */

.mlt__anios {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 32px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--mlt-linea);
}

.mlt__anios a {
	padding: 5px 12px;
	border: 1px solid var(--mlt-linea);
	border-radius: 999px;
	color: var(--mlt-texto);
	font-family: "Archivo", system-ui, sans-serif;
	font-size: .85rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .18s, color .18s;
}

.mlt__anios a:hover,
.mlt__anios a:focus-visible,
.mlt__anios a[aria-current="true"] {
	border-color: var(--mlt-acento);
	color: var(--mlt-acento);
}

/* ------------------------------------------------ Lista de hitos */

.mlt__lista {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mlt__lista::before {
	content: "";
	position: absolute;
	top: 8px;
	bottom: 8px;
	width: var(--mlt-riel);
	background: var(--mlt-linea);
}

/* Sendero que se rellena al bajar */
.mlt__lista::after {
	content: "";
	position: absolute;
	top: 8px;
	width: var(--mlt-riel);
	height: var(--mlt-avance, 0px);
	background: var(--mlt-acento);
	transition: height .2s linear;
}

.mlt:not(.mlt--animada) .mlt__lista::after { display: none; }

.mlt__hito {
	position: relative;
	padding-bottom: 36px;
	scroll-margin-top: 90px;
}

.mlt__hito:last-child { padding-bottom: 0; }

.mlt__marca { position: relative; }

.mlt__anio {
	display: inline-block;
	color: var(--mlt-tinta);
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 1.05rem;
	font-weight: 700;
	white-space: nowrap;
}

.mlt__punto {
	position: absolute;
	top: 9px;
	width: 12px;
	height: 12px;
	border: 3px solid var(--mlt-acento);
	border-radius: 50%;
	background: #FFFFFF;
}

.mlt__etiqueta {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 10px;
	background: var(--mlt-suave);
	border-radius: 3px;
	color: var(--mlt-texto);
	font-family: "Archivo", system-ui, sans-serif;
	font-size: .76rem;
	font-weight: 600;
	letter-spacing: .02em;
}

.mlt__hito-titulo {
	margin: 0 0 8px;
	color: var(--mlt-tinta);
	font-family: "Archivo", system-ui, sans-serif;
	font-size: 1.14rem;
	font-weight: 700;
	line-height: 1.35;
}

.mlt__texto p {
	margin: 0 0 10px;
	max-width: 66ch;
	color: var(--mlt-texto);
	font-size: .99rem;
	line-height: 1.7;
}

.mlt__texto p:last-child { margin-bottom: 0; }

.mlt__hito--destacado .mlt__anio,
.mlt__hito--destacado .mlt__hito-titulo { color: var(--mlt-acento); }

.mlt__hito--destacado .mlt__punto { background: var(--mlt-acento); }

/* ----------------------------------------------------- Fotografía */

.mlt__foto { margin: 18px 0 0; }

.mlt__foto img {
	display: block;
	width: 100%;
	max-width: 460px;
	height: auto;
	border-radius: 2px;
}

.mlt__foto figcaption {
	margin-top: 8px;
	max-width: 460px;
	color: var(--mlt-texto);
	font-size: .84rem;
	font-style: italic;
	line-height: 1.5;
}

/* --------------------------------------------------------- Enlace */

.mlt__enlace { margin: 14px 0 0; }

.mlt__enlace a {
	color: var(--mlt-acento);
	font-family: "Archivo", system-ui, sans-serif;
	font-size: .92rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.mlt__enlace a:hover,
.mlt__enlace a:focus-visible { text-decoration: none; }

.mlt a:focus-visible {
	outline: 2px solid var(--mlt-acento);
	outline-offset: 3px;
}

/* ================================================ Estilo REGISTRO */

.mlt--registro .mlt__lista::before,
.mlt--registro .mlt__lista::after { left: 108px; }

.mlt--registro .mlt__hito {
	display: grid;
	grid-template-columns: 108px 1fr;
	gap: 0 36px;
}

.mlt--registro .mlt__marca {
	padding-top: 2px;
	text-align: right;
}

.mlt--registro .mlt__punto { right: -42px; }

/* ================================================= Estilo ALTERNO */

.mlt--alterno .mlt__lista::before,
.mlt--alterno .mlt__lista::after { left: 50%; margin-left: -1px; }

.mlt--alterno .mlt__hito {
	width: 50%;
	padding-right: 48px;
}

.mlt--alterno .mlt__marca { text-align: right; }

.mlt--alterno .mlt__punto { right: -54px; }

.mlt--alterno .mlt__hito:nth-child(even) {
	margin-left: 50%;
	padding-right: 0;
	padding-left: 48px;
	text-align: left;
}

.mlt--alterno .mlt__hito:nth-child(even) .mlt__marca { text-align: left; }

.mlt--alterno .mlt__hito:nth-child(even) .mlt__punto {
	right: auto;
	left: -54px;
}

/* ================================================ Estilo COMPACTO */

.mlt--compacto .mlt__lista::before,
.mlt--compacto .mlt__lista::after { left: 6px; }

.mlt--compacto .mlt__hito {
	padding-left: 34px;
	padding-bottom: 24px;
}

.mlt--compacto .mlt__marca {
	display: inline-block;
	margin-bottom: 4px;
}

.mlt--compacto .mlt__punto {
	top: 7px;
	left: -34px;
}

.mlt--compacto .mlt__anio { font-size: .95rem; }

.mlt--compacto .mlt__hito-titulo { font-size: 1.05rem; }

.mlt--compacto .mlt__foto img { max-width: 320px; }

/* -------------------------------------------------------- Celular */

@media (max-width: 680px) {

	.mlt--registro .mlt__lista::before,
	.mlt--registro .mlt__lista::after,
	.mlt--alterno .mlt__lista::before,
	.mlt--alterno .mlt__lista::after {
		left: 6px;
		margin-left: 0;
	}

	.mlt--registro .mlt__hito,
	.mlt--alterno .mlt__hito {
		display: block;
		width: 100%;
		margin-left: 0;
		padding: 0 0 30px 32px;
		text-align: left;
	}

	.mlt--registro .mlt__marca,
	.mlt--alterno .mlt__marca,
	.mlt--alterno .mlt__hito:nth-child(even) .mlt__marca {
		margin-bottom: 6px;
		text-align: left;
	}

	.mlt--registro .mlt__punto,
	.mlt--alterno .mlt__punto,
	.mlt--alterno .mlt__hito:nth-child(even) .mlt__punto {
		top: 6px;
		right: auto;
		left: -32px;
	}

	.mlt__foto img,
	.mlt__foto figcaption { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.mlt__lista::after { transition: none; }
}
