/* ==========================================================================
   Trayectoria (`molina.trayectoria`) y Justicia 2034 (`molina.justicia2034`)
   --------------------------------------------------------------------------
   La línea de tiempo: una regla de etapas pegada arriba, la línea al centro y
   un color por ámbito. Justicia 2034: una lista de reproducción, lo que suena
   a la izquierda y la lista a la derecha.
   ========================================================================== */
.hm-tl,
.hm-pl {
  --vida: #c08a2d;
  --formacion: #6b5bd2;
  --justicia: var(--azul);
  --educacion: #1f8a70;
  --gobierno: var(--rojo);
  --economia: #0094c6;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 60px 4% 90px;
}

/* --- Trayectoria ---------------------------------------------------------- */
.hm-tl-bajada { max-width: 820px; margin: 0 auto 36px; color: var(--azul); font-size: 21px; line-height: 1.55; text-align: center; }

.hm-tl-cifras,
.hm-pl-cifras { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 18px; margin-bottom: 40px; }

.hm-tl-cifras div,
.hm-pl-cifras div { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 12px; background: #f4f6fa; }

.hm-tl-cifras strong,
.hm-pl-cifras strong { color: var(--azul); font-family: var(--titular); font-size: 32px; line-height: 1; }

.hm-tl-cifras span,
.hm-pl-cifras span { color: var(--gris); font-size: 14px; line-height: 1.4; }

.hm-tl-filtros { justify-content: center; margin-bottom: 18px; }

.hm-tl-filtros button.activa.vida { background: var(--vida); border-color: var(--vida); }
.hm-tl-filtros button.activa.formacion { background: var(--formacion); border-color: var(--formacion); }
.hm-tl-filtros button.activa.educacion { background: var(--educacion); border-color: var(--educacion); }
.hm-tl-filtros button.activa.gobierno { background: var(--gobierno); border-color: var(--gobierno); }
.hm-tl-filtros button.activa.economia { background: var(--economia); border-color: var(--economia); }

.hm-tl-regla {
  position: sticky;
  top: 92px;
  z-index: 5;
  display: flex;
  gap: 4px;
  margin-bottom: 40px;
  padding: 10px 0;
  overflow-x: auto;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(30, 50, 92, .1);
  scrollbar-width: thin;
}

.hm-tl-regla button {
  flex: none;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--gris);
  font: inherit;
  font-size: 13px;
  white-space: nowrap;
  cursor: pointer;
}

.hm-tl-regla button:hover { color: var(--azul); }
.hm-tl-regla button.activa { background: var(--azul); color: var(--blanco); }

.hm-tl-linea { position: relative; display: flex; flex-direction: column; gap: 22px; max-width: 860px; margin: 0 auto !important; padding-left: 36px; }

.hm-tl-linea::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 11px; width: 2px; background: linear-gradient(var(--azul), rgba(30, 50, 92, .15)); }

.hm-tl-hito { --c: var(--justicia); position: relative; }
.hm-tl-hito.vida { --c: var(--vida); }
.hm-tl-hito.formacion { --c: var(--formacion); }
.hm-tl-hito.educacion { --c: var(--educacion); }
.hm-tl-hito.gobierno { --c: var(--gobierno); }
.hm-tl-hito.economia { --c: var(--economia); }

.hm-tl-punto { position: absolute; top: 22px; left: -31px; width: 14px; height: 14px; border: 3px solid var(--blanco); border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--c); }

.hm-tl-tarjeta { border-left: 4px solid var(--c); border-radius: 12px; background: var(--blanco); box-shadow: 0 8px 26px rgba(30, 50, 92, .08); transition: box-shadow .3s; }

.hm-tl-hito.abierto .hm-tl-tarjeta { box-shadow: 0 16px 40px rgba(30, 50, 92, .16); }

.hm-tl-cabeza {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "cuando ambito mas" "titulo titulo mas";
  align-items: center;
  gap: 4px 14px;
  width: 100%;
  padding: 18px 22px;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hm-tl-cuando { grid-area: cuando; color: var(--c); font-family: var(--titular); font-size: 18px; font-weight: 700; }
.hm-tl-ambito { grid-area: ambito; color: var(--gris); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.hm-tl-cabeza h3 { grid-area: titulo; color: var(--azul); font-size: 21px; font-weight: 600; line-height: 1.25; }
.hm-tl-mas { grid-area: mas; color: var(--c); font-size: 28px; font-weight: 300; }

.hm-tl-cuerpo { display: flex; flex-direction: column; gap: 18px; padding: 0 22px 22px; color: #444; font-size: 17px; font-weight: 300; line-height: 1.7; }

.hm-tl-nota { padding: 12px 16px; border-radius: 8px; background: #f4f6fa; color: var(--azul); font-size: 15px; }

.hm-tl-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }

.hm-tl-mini,
.hm-pl-video-portada { position: relative; display: block; overflow: hidden; padding: 0; border: 0; border-radius: 8px; background: #000; aspect-ratio: 16 / 9; cursor: pointer; }

.hm-tl-mini img,
.hm-pl-video-portada img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }

.hm-tl-mini:hover img,
.hm-pl-video-portada:hover img { opacity: 1; }

.hm-tl-video,
.hm-pl-video { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

.hm-tl-video iframe,
.hm-pl-video iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; }

.hm-tl-enlaces { display: flex; flex-wrap: wrap; gap: 10px; }

/* --- Justicia 2034: la lista de reproducción ------------------------------ */
.hm-pl { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; gap: 40px; }

.hm-pl-lateral { position: sticky; top: 112px; max-height: calc(100vh - 132px); overflow-y: auto; border-radius: 14px; background: var(--azul); color: var(--blanco); }

.hm-pl-lateral h3 { padding: 18px 20px 10px; font-family: var(--titular); font-size: 20px; }

.hm-pl-lista li a { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: rgba(255, 255, 255, .8); }

.hm-pl-lista li a:hover { background: rgba(255, 255, 255, .06); }
.hm-pl-lista li.eje a { margin-top: 6px; border-top: 1px solid rgba(255, 255, 255, .12); }
.hm-pl-lista li.actual a { background: rgba(255, 255, 255, .14); color: var(--blanco); }

.hm-pl-num { flex: none; width: 46px; color: rgba(255, 255, 255, .5); font-size: 12px; font-weight: 600; }
.hm-pl-lista li.eje .hm-pl-num { color: var(--rojo); }
.hm-pl-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hm-pl-txt strong { font-size: 14px; font-weight: 500; line-height: 1.3; }
.hm-pl-txt small { color: rgba(255, 255, 255, .5); font-size: 12px; }
.hm-pl-sonando { margin-left: auto; color: #6fd0ff; font-size: 12px; }

.hm-pl-controles { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 28px; padding: 10px; border-radius: 12px; background: #f4f6fa; overflow: hidden; }

.hm-pl-controles button { padding: 8px 14px; border: 0; border-radius: 8px; background: var(--blanco); color: var(--azul); font: inherit; font-size: 16px; cursor: pointer; }

.hm-pl-controles .hm-pl-play { background: var(--rojo); color: var(--blanco); font-weight: 600; }
.hm-pl-posicion { margin-left: auto; color: var(--gris); font-size: 14px; }

.hm-pl-progreso { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--rojo); transform-origin: left; animation: hm-progreso var(--dura) linear forwards; }

@keyframes hm-progreso { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.hm-pl-escenario { display: flex; flex-direction: column; gap: 18px; color: #444; font-size: 17px; font-weight: 300; line-height: 1.7; }

.hm-pl-escenario h2 { color: var(--azul); font-family: var(--titular); font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; line-height: 1.15; }

.hm-pl-antetitulo { color: var(--rojo); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hm-pl-codigo { margin-right: 12px; color: var(--rojo); }
.hm-pl-claro { color: var(--azul); font-size: 21px; font-weight: 400; line-height: 1.5; }
.hm-pl-lema { color: var(--gris); font-style: italic; }

.hm-pl-claro-caja { padding: 20px 24px; border-left: 4px solid var(--rojo); border-radius: 10px; background: #f4f6fa; }
.hm-pl-claro-caja span { color: var(--rojo); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.hm-pl-claro-caja p { margin-top: 6px; color: var(--azul); font-size: 21px; font-weight: 400; line-height: 1.45; }

.hm-pl-bloque { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
.hm-pl-bloque h4 { color: var(--azul); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.hm-pl-vision { padding-left: 18px; border-left: 4px solid var(--rojo); color: var(--azul); font-family: var(--titular); font-size: 24px; line-height: 1.35; }

.hm-pl-valores { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-pl-valores span { padding: 6px 14px; border-radius: 999px; background: var(--azul); color: var(--blanco); font-size: 14px; }

.hm-pl-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.hm-pl-video-titulo { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .8)); color: var(--blanco); font-size: 14px; font-weight: 500; line-height: 1.3; text-align: left; }

.hm-pl-articulos { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.hm-pl-articulos .cid-blog-tarjeta p { display: none; }
.hm-pl-fuente { color: var(--gris); font-size: 14px; }
.hm-pl-fuente a { color: var(--rojo); }

.hm-pl-eje-cabeza { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 24px; }
.hm-pl-eje-cabeza img { width: 100%; border-radius: 12px; }

.hm-pl-objetivos { display: flex; flex-direction: column; gap: 8px; }
.hm-pl-objetivos a { display: flex; gap: 14px; padding: 14px 18px; border-radius: 10px; background: #f4f6fa; color: var(--azul); font-weight: 500; transition: background .2s; }
.hm-pl-objetivos a:hover { background: #e8ecf4; }
.hm-pl-objetivos a span { color: var(--rojo); font-weight: 700; }

.hm-pl-talleres { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.hm-pl-talleres figure { overflow: hidden; border-radius: 12px; background: var(--blanco); box-shadow: 0 8px 26px rgba(30, 50, 92, .08); }
.hm-pl-talleres img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.hm-pl-talleres figcaption { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; font-size: 14px; line-height: 1.4; }
.hm-pl-talleres figcaption span { color: var(--gris); }
.hm-pl-talleres figcaption strong { color: var(--azul); }

.hm-pl-pie { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(30, 50, 92, .1); }

/* Resultados clave */
.hm-kr-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.hm-kr { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: 12px; background: var(--blanco); box-shadow: 0 8px 26px rgba(30, 50, 92, .08); }
.hm-kr-codigo { color: var(--rojo); font-size: 12px; font-weight: 700; }
.hm-kr h4 { color: var(--azul); font-size: 17px; font-weight: 600; line-height: 1.3; }
.hm-kr p { color: var(--gris); font-size: 14px; line-height: 1.45; }
.hm-kr-barra { margin-top: auto; padding-top: 8px; }
.hm-kr-pista { position: relative; height: 10px; border-radius: 999px; background: #e8ecf4; }
.hm-kr-base { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--azul); }
.hm-kr-meta { position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px; border-radius: 2px; background: var(--rojo); }
.hm-kr-cuenta { color: var(--azul); font-size: 18px; }
.hm-kr-leyenda { display: flex; justify-content: space-between; margin-top: 8px; color: var(--gris); font-size: 13px; }
.hm-kr-leyenda strong { color: var(--azul); }

@media (max-width: 960px) {
  .hm-pl { grid-template-columns: 1fr; }
  .hm-pl-lateral { position: static; max-height: 420px; order: -1; }
  .hm-pl-eje-cabeza { grid-template-columns: 110px 1fr; }
  .hm-tl-regla { top: 64px; }
}

.hm-tl-linea,
.hm-pl-lista,
.hm-pl-objetivos { list-style: none; margin: 0; }

.hm-pl-bloque .hm-kr h4 { font-size: 17px; letter-spacing: 0; text-transform: none; }

/* --- Justicia 2034, segunda versión: color por eje, iconos, anillos ------- */
.hm-pl-cara { display: flex; flex-direction: column; gap: 18px; }
.hm-pl-cara .hm-pl-antetitulo { display: inline-flex; align-items: center; gap: 6px; color: var(--c); }
.hm-pl-cara .hm-pl-antetitulo svg { width: 16px; height: 16px; }
.hm-pl-cara .hm-pl-codigo { color: var(--c); }
.hm-pl-cara .hm-pl-claro-caja { border-left-color: var(--c); background: color-mix(in srgb, var(--c) 7%, #fff); }
.hm-pl-cara .hm-pl-claro-caja span { color: var(--c); }

.hm-pl-icono { display: inline-grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--c) 12%, #fff); color: var(--c); }
.hm-pl-icono svg { width: 22px; height: 22px; }
.hm-pl-icono.grande { width: 72px; height: 72px; border-radius: 20px; }
.hm-pl-icono.grande svg { width: 36px; height: 36px; }

.hm-pl-objetivo-cabeza { display: flex; align-items: center; gap: 20px; }

.hm-pl-objetivos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.hm-pl-objetivo { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border: 1px solid #e8ecf4; border-radius: 14px; background: var(--blanco); color: var(--azul); transition: transform .2s, box-shadow .2s; }
.hm-pl-objetivo:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(30, 50, 92, .12); }
.hm-pl-objetivo-txt { display: flex; flex-direction: column; gap: 3px; font-size: 15px; line-height: 1.35; }
.hm-pl-objetivo-txt small { color: var(--c); font-weight: 700; }
.hm-pl-objetivo-txt em { color: var(--gris); font-size: 13px; font-style: normal; }

.hm-pl-leyenda { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: var(--gris); font-size: 14px; }
.hm-pl-leyenda i { display: inline-block; width: 22px; height: 8px; margin-right: -8px; border-radius: 4px; background: var(--c); }
.hm-pl-leyenda i.meta { opacity: .25; }

.hm-kr-lista { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.hm-kr { flex-direction: row; align-items: center; gap: 18px; border-top: 4px solid var(--c); }
.hm-kr-grafico { position: relative; flex: none; display: grid; place-items: center; width: 112px; height: 112px; }
.hm-anillo { position: absolute; inset: 0; width: 100%; height: 100%; }
.hm-anillo-hoy { animation: hm-anillo 1.2s ease-out both; }
@keyframes hm-anillo { from { stroke-dasharray: 0 999; } }
.hm-kr-centro { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.hm-kr-centro strong { color: var(--azul); font-size: 20px; }
.hm-kr-centro small { color: var(--gris); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.hm-kr-numero { display: flex; flex-direction: column; align-items: center; color: var(--azul); font-size: 26px; line-height: 1.1; }
.hm-kr-numero span { color: var(--c); font-size: 18px; }
.hm-kr-texto { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hm-kr-codigo { color: var(--c); }
.hm-kr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.hm-kr-chip { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.hm-kr-chip.hoy { background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.hm-kr-chip.meta { background: var(--azul); color: var(--blanco); }

.hm-pl-num { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 40px; color: var(--c, rgba(255, 255, 255, .55)); }
.hm-pl-num svg { width: 18px; height: 18px; }
.hm-pl-num small { color: rgba(255, 255, 255, .5); font-size: 11px; }
.hm-pl-lista li.eje .hm-pl-num { color: var(--c); }

/* --- Proyectos ------------------------------------------------------------ */
.hm-proyectos { max-width: var(--ancho); margin: 0 auto; padding: 60px 4% 90px; display: grid; gap: 30px; }
.hm-proyecto { display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; border-radius: 18px; background: var(--blanco); box-shadow: 0 14px 40px rgba(30, 50, 92, .12); color: inherit; transition: transform .3s, box-shadow .3s; }
.hm-proyecto:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(30, 50, 92, .18); }
.hm-proyecto-foto img { width: 100%; height: 100%; min-height: 300px; object-fit: cover; }
.hm-proyecto-texto { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 40px; }
.hm-proyecto-texto h2 { color: var(--azul); font-family: var(--display); font-size: clamp(28px, 3vw, 40px); font-weight: 400; line-height: 1.15; }
.hm-proyecto-texto p { color: #555; font-size: 17px; line-height: 1.6; }
.hm-proyecto-cifras { display: flex; flex-wrap: wrap; gap: 8px; }
.hm-proyecto-cifras span { padding: 6px 12px; border-radius: 999px; background: #f4f6fa; color: var(--azul); font-size: 14px; font-weight: 600; }
@media (max-width: 860px) { .hm-proyecto { grid-template-columns: 1fr; } .hm-proyecto-texto { padding: 26px; } }

/* Trayectoria con iconos: el punto de la línea es un círculo con el icono. */
.hm-tl-linea { padding-left: 52px; }
.hm-tl-linea::before { left: 19px; }
.hm-tl-punto { top: 14px; left: -52px; display: grid; place-items: center; width: 40px; height: 40px; border: 3px solid var(--blanco); background: var(--c); color: var(--blanco); box-shadow: 0 0 0 2px var(--c), 0 6px 16px rgba(30, 50, 92, .2); }
.hm-tl-punto svg { width: 18px; height: 18px; }
.hm-tl-ambito { display: inline-flex; align-items: center; gap: 5px; }
.hm-tl-ambito svg { width: 14px; height: 14px; color: var(--c); }
.hm-tl-filtros button { display: inline-flex; align-items: center; gap: 6px; }
.hm-tl-filtros button svg { width: 15px; height: 15px; }
.hm-tl-cuerpo { padding: 0 22px; }
.hm-tl-cuerpo > :last-child { margin-bottom: 22px; }

/* Los botones de borde vienen pensados para fondos oscuros: en las tarjetas
   blancas de Trayectoria y Justicia 2034 van en azul. */
.hm-tl-enlaces .cid-boton-borde,
.hm-pl .cid-boton-borde {
  border: 1px solid var(--azul);
  border-radius: 999px;
  background: transparent;
  color: var(--azul);
}

.hm-tl-enlaces .cid-boton-borde:hover,
.hm-pl .cid-boton-borde:hover { background: var(--azul); color: var(--blanco); }

.hm-tl-enlaces .cid-boton-borde svg,
.hm-pl .cid-boton-borde svg { fill: currentColor; }

/* Los iconos Lucide son de trazo: sin relleno, aunque otra hoja rellene los svg. */
.hm-tl-punto svg, .hm-tl-ambito svg, .hm-tl-filtros svg,
.hm-pl-icono svg, .hm-pl-num svg, .hm-pl-antetitulo svg {
  fill: none !important;
  stroke: currentColor;
}
