/* ================================================================
   Blog (16-10-2026): portada /blog (.bl-*) y artículos (.ar-*).
   Lo genera _fuente/blog.py. Va después de styles.css.
   ================================================================ */

/* ------------------------------------------------------------ portada del blog */
.bl-cab { padding-top: clamp(8rem, 13vw, 10.5rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.bl-cab__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.bl-cab__titulo { margin: 0.7rem 0 1.4rem; max-width: 14ch; font-size: clamp(2.8rem, 6.2vw, 5.2rem); line-height: 1; letter-spacing: -0.045em; }
.bl-cab__lead { max-width: 52ch; font-size: var(--fs-lead); line-height: 1.6; color: var(--text-muted); }
.bl-cab__datos { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; margin-top: 1.6rem; font-size: var(--fs-xs); color: var(--text-faint); }
.bl-cab__datos b { color: var(--text); font-weight: 600; }

.bl-ruta { padding: 1.4rem 1.4rem 1.1rem; border: 1px solid var(--border); border-radius: var(--r-lg); background: linear-gradient(180deg, #0d0d12, #060608); }
.bl-ruta__titulo { margin: 0 0.6rem 0.7rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.bl-ruta ol { display: grid; gap: 0.15rem; margin: 0; padding: 0; list-style: none; }
.bl-ruta a {
  display: flex; align-items: baseline; gap: 1rem; padding: 0.75rem 0.6rem; border-radius: 12px;
  font-size: 1.04rem; font-weight: 560; color: var(--text); transition: background-color var(--t-fast);
}
.bl-ruta a:hover, .bl-ruta a:focus-visible { background: rgba(255, 255, 255, 0.05); }
.bl-ruta a span { flex: none; font-size: 0.85rem; font-weight: 650; color: var(--blue-bright); font-variant-numeric: tabular-nums; }

/* tarjetas */
.bl-tarjeta {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: #08080b;
  transition: border-color 0.35s var(--ease), transform 0.5s var(--ease), background-color 0.35s var(--ease);
}
.bl-tarjeta:hover, .bl-tarjeta:focus-visible { border-color: var(--border-strong); background: #0c0c10; transform: translateY(-3px); }
.bl-tarjeta:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; }
.bl-tarjeta[hidden] { display: none; }
.bl-tarjeta__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #050507; border-bottom: 1px solid var(--border); }
.bl-tarjeta__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.bl-tarjeta:hover .bl-tarjeta__img img { transform: scale(1.04); }
.bl-tarjeta__txt { display: flex; flex: 1; flex-direction: column; gap: 0.6rem; padding: 1.3rem 1.4rem 1.5rem; }
.bl-tarjeta__meta { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; font-size: 0.82rem; color: var(--text-faint); }
.bl-tarjeta__meta b { font-weight: 600; letter-spacing: 0.02em; color: var(--blue-bright); }
.bl-tarjeta__titulo { font-size: 1.3rem; font-weight: 650; line-height: 1.22; letter-spacing: -0.02em; color: var(--text); }
.bl-tarjeta__ex {
  display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  font-size: 0.98rem; line-height: 1.55; color: var(--text-muted);
}
.bl-tarjeta__mas { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: auto; padding-top: 0.5rem; font-size: 0.85rem; color: var(--text-faint); }

.bl-tarjeta--grande { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.bl-tarjeta--grande .bl-tarjeta__img { height: 100%; aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--border); }
.bl-tarjeta--grande .bl-tarjeta__txt { justify-content: center; gap: 1rem; padding: clamp(1.8rem, 3.5vw, 3rem); }
.bl-tarjeta--grande .bl-tarjeta__titulo { font-size: clamp(1.9rem, 3.2vw, 2.7rem); line-height: 1.08; letter-spacing: -0.035em; }
.bl-tarjeta--grande .bl-tarjeta__ex { -webkit-line-clamp: 4; font-size: 1.08rem; }
.bl-tarjeta--grande .bl-tarjeta__mas { margin-top: 0.6rem; font-size: 1rem; font-weight: 600; color: var(--blue-bright); }
.bl-tarjeta--grande .bl-tarjeta__mas svg { width: 16px; height: 16px; transition: transform var(--t-fast); }
.bl-tarjeta--grande:hover .bl-tarjeta__mas svg { transform: translateX(4px); }
.bl-destacado { margin-bottom: clamp(3.5rem, 7vw, 5rem); }

/* barra de temas y búsqueda */
.bl-barra { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.bl-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.bl-chip {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; border: 1px solid var(--border); border-radius: 999px;
  background: transparent; color: var(--text-muted); font: inherit; font-size: 0.95rem; cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.bl-chip span { font-size: 0.8rem; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.bl-chip:hover { border-color: var(--border-strong); color: var(--text); }
.bl-chip.is-on { background: #fff; border-color: #fff; color: #000; }
.bl-chip.is-on span { color: rgba(0, 0, 0, 0.55); }
.bl-chip:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.bl-buscar { position: relative; flex: 0 1 340px; }
.bl-buscar svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--text-faint); }
.bl-buscar input {
  width: 100%; padding: 0.72rem 1rem 0.72rem 2.7rem; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; font-size: 0.95rem;
}
.bl-buscar input::placeholder { color: rgba(255, 255, 255, 0.36); }
.bl-buscar input:focus { outline: none; border-color: var(--blue-bright); background: rgba(255, 255, 255, 0.06); }
.bl-buscar input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.bl-rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.bl-vacio { padding: 3rem 0; text-align: center; color: var(--text-muted); }
.bl-vacio a { color: var(--blue-bright); }
.bl-lista { margin-bottom: clamp(2rem, 5vw, 4rem); }

/* ------------------------------------------------------------ artículo */
.ar-progreso { position: fixed; inset: 0 0 auto; z-index: 120; height: 3px; pointer-events: none; }
.ar-progreso span { display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%; background: var(--gradient); }

.ar-cab { padding-top: clamp(8rem, 13vw, 10.5rem); padding-bottom: clamp(2rem, 4vw, 3rem); }
.ar-migas { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.8rem; padding: 0; list-style: none; font-size: var(--fs-xs); color: var(--text-faint); }
.ar-migas a { color: var(--text-muted); }
.ar-migas a:hover { color: var(--text); }
.ar-migas li + li::before { content: "/"; margin-right: 0.4rem; }
.ar-cat { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 0.9rem; margin-bottom: 1.2rem; font-size: 0.9rem; color: var(--text-faint); }
.ar-cat a {
  padding: 0.32rem 0.8rem; border: 1px solid rgba(59, 130, 255, 0.35); border-radius: 999px; background: rgba(10, 100, 255, 0.08);
  font-weight: 600; color: var(--blue-bright);
}
.ar-titulo { max-width: 20ch; font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1.03; letter-spacing: -0.04em; }
.ar-entradilla { max-width: 58ch; margin-top: 1.4rem; font-size: clamp(1.15rem, 1.6vw, 1.38rem); line-height: 1.55; color: var(--text-muted); }
.ar-firma { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1rem; margin-top: 2.2rem; }
.ar-firma img { width: 48px; height: 48px; border: 1px solid var(--border-strong); border-radius: 50%; object-fit: cover; object-position: 50% 16%; filter: grayscale(1); }
.ar-firma p { margin: 0; }
.ar-firma b { display: block; font-weight: 600; }
.ar-firma span { font-size: 0.88rem; color: var(--text-faint); }
.ar-fechas { padding-left: 1.1rem; border-left: 1px solid var(--border); font-size: 0.88rem; color: var(--text-faint); }

.ar-portada { margin-bottom: clamp(2.5rem, 5vw, 4.5rem); }
.ar-portada img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--border); border-radius: var(--r-xl); background: #050507; }

/* tres columnas: índice, texto (columna de lectura) y llamada a la acción */
.ar-cuerpo { display: grid; grid-template-columns: 200px minmax(0, 68ch) 260px; justify-content: space-between; align-items: start; gap: clamp(2rem, 3.5vw, 3.5rem); max-width: 1360px; }
.ar-texto h2, .ar-texto h3 { text-wrap: pretty; }   /* «balance» los partía por la mitad aunque cupieran en una línea */
.ar-indice, .ar-lado { position: sticky; top: 112px; }
.ar-indice summary { display: block; margin-bottom: 0.9rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); list-style: none; pointer-events: none; }
.ar-indice summary::-webkit-details-marker { display: none; }
.ar-indice ol { display: grid; margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--border); }
.ar-indice a {
  display: block; margin-left: -1px; padding: 0.45rem 0 0.45rem 1rem; border-left: 2px solid transparent;
  font-size: 0.92rem; line-height: 1.35; color: var(--text-faint); transition: color var(--t-fast), border-color var(--t-fast);
}
.ar-indice a:hover { color: var(--text); }
.ar-indice a.is-activo { color: var(--text); border-left-color: var(--blue-bright); }

.ar-promo { padding: 1.4rem; border: 1px solid var(--border); border-radius: var(--r-lg); background: linear-gradient(180deg, #0e0f15, #07070a); }
.ar-promo .post-promo__eyebrow { margin-bottom: 0.7rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-faint); }
.ar-promo .post-promo__title { font-size: 1.22rem; font-weight: 650; line-height: 1.25; letter-spacing: -0.02em; }
.ar-promo .post-promo__text { margin-top: 0.6rem; font-size: 0.95rem; line-height: 1.55; color: var(--text-muted); }
.ar-promo .post-promo__actions { display: grid; gap: 0.9rem; margin-top: 1.2rem; }
.ar-promo .link-arrow { font-size: 0.9rem; }

/* el texto */
.ar-texto { font-size: 1.13rem; line-height: 1.76; color: rgba(255, 255, 255, 0.8); }
.ar-texto > :first-child { margin-top: 0; }
.ar-texto > p:first-child { font-size: 1.24rem; line-height: 1.65; color: var(--text); }
.ar-texto p { margin: 0 0 1.25em; }
.ar-texto h2 { margin: 2.4em 0 0.75em; font-size: clamp(1.6rem, 2.6vw, 2.05rem); font-weight: 650; line-height: 1.2; letter-spacing: -0.028em; color: var(--text); scroll-margin-top: 120px; }
.ar-texto h3 { margin: 1.9em 0 0.55em; font-size: 1.3rem; font-weight: 620; line-height: 1.3; letter-spacing: -0.015em; color: var(--text); }
.ar-texto a { color: var(--blue-bright); text-decoration: underline; text-decoration-color: rgba(59, 130, 255, 0.45); text-underline-offset: 3px; }
.ar-texto a:hover { text-decoration-color: currentColor; }
.ar-texto strong { font-weight: 600; color: var(--text); }
.ar-texto ul, .ar-texto ol { display: grid; gap: 0.65em; margin: 0 0 1.6em; padding: 0; list-style: none; }
.ar-texto ul > li { position: relative; padding-left: 1.5rem; }
.ar-texto ul > li::before { content: ""; position: absolute; left: 0.2rem; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-bright); }
.ar-texto ol { counter-reset: paso; }
.ar-texto ol > li { position: relative; padding-left: 2.4rem; counter-increment: paso; }
.ar-texto ol > li::before {
  content: counter(paso); position: absolute; left: 0; top: 0.2em; display: grid; place-items: center; width: 1.65rem; height: 1.65rem;
  border: 1px solid rgba(59, 130, 255, 0.35); border-radius: 50%; background: rgba(10, 100, 255, 0.14);
  font-size: 0.8rem; font-weight: 600; color: var(--blue-bright);
}
.ar-texto .callout {
  margin: 2em 0; padding: 1.3rem 1.5rem; border: 1px solid rgba(59, 130, 255, 0.28); border-radius: 18px;
  background: linear-gradient(135deg, rgba(10, 100, 255, 0.13), rgba(154, 124, 255, 0.05));
}
.ar-texto .callout p { font-size: 1.05rem; color: var(--text); }
.ar-texto .callout p:last-child { margin-bottom: 0; }
.ar-texto .flow-example { margin: 2em 0; padding: 1.5rem 1.6rem; border: 1px solid var(--border); border-radius: 18px; background: #0a0a0e; font-size: 1.02rem; }
.ar-texto .flow-example__title { margin-bottom: 1rem; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.ar-texto .flow-example ol { margin: 0; }
.ar-texto table { width: 100%; margin: 2em 0; border-collapse: collapse; font-size: 1rem; }
.ar-texto th, .ar-texto td { padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.ar-texto th { font-weight: 600; color: var(--text); }
.ar-texto blockquote { margin: 2em 0; padding-left: 1.4rem; border-left: 2px solid var(--blue-bright); font-size: 1.25rem; color: var(--text); }

/* pie del artículo */
.ar-quien { margin-top: clamp(4rem, 8vw, 6rem); }
.ar-quien__caja { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 2rem; max-width: 900px; padding: 2rem; border: 1px solid var(--border); border-radius: var(--r-xl); background: #08080b; }
.ar-quien__caja img { width: 150px; height: 188px; border-radius: 18px; object-fit: cover; object-position: 50% 12%; filter: grayscale(1); }
.ar-quien__nombre { margin-top: 0.4rem; font-size: 1.6rem; font-weight: 680; letter-spacing: -0.03em; }
.ar-quien__txt { max-width: 56ch; margin-top: 0.5rem; line-height: 1.6; color: var(--text-muted); }
.ar-quien__links { display: flex; flex-wrap: wrap; gap: 0.8rem 1.6rem; margin-top: 1rem; }
.ar-mas { margin-top: clamp(4rem, 8vw, 6rem); margin-bottom: clamp(1rem, 3vw, 2rem); }
.ar-mas__cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.ar-mas__cab h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); letter-spacing: -0.03em; }

/* ------------------------------------------------------------ pantallas medianas y móvil */
@media (max-width: 1240px) {
  .ar-cuerpo { grid-template-columns: 200px minmax(0, 68ch); justify-content: start; }
  .ar-lado { position: static; grid-column: 2; max-width: 68ch; }
}
@media (max-width: 1000px) {
  .bl-cab__grid { grid-template-columns: 1fr; align-items: start; }
  .bl-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bl-tarjeta--grande { grid-template-columns: 1fr; }
  .bl-tarjeta--grande .bl-tarjeta__img { min-height: 0; aspect-ratio: 16 / 9; border-right: 0; border-bottom: 1px solid var(--border); }
  .ar-cuerpo { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .ar-lado { grid-column: auto; }
  .ar-indice { position: static; padding: 1rem 1.2rem; border: 1px solid var(--border); border-radius: var(--r-md); background: rgba(255, 255, 255, 0.03); }
  .ar-indice summary { display: flex; align-items: center; justify-content: space-between; margin: 0; pointer-events: auto; cursor: pointer; }
  .ar-indice summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; letter-spacing: 0; }
  .ar-indice details[open] summary { margin-bottom: 0.8rem; }
  .ar-indice details[open] summary::after { content: "–"; }
}
@media (max-width: 640px) {
  .bl-rejilla { grid-template-columns: 1fr; }
  .bl-barra { flex-direction: column; align-items: stretch; }
  .bl-buscar { flex-basis: auto; }
  .bl-barra > * { min-width: 0; }   /* si no, la fila de temas (que no salta de línea) ensancha la página */
  .bl-chips { flex-wrap: nowrap; max-width: calc(100% + 32px); overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .bl-chips::-webkit-scrollbar { display: none; }
  .bl-chip { flex: none; }
  .ar-texto { font-size: 1.06rem; }
  .ar-texto > p:first-child { font-size: 1.14rem; }
  .ar-fechas { flex-basis: 100%; padding-left: 0; border-left: 0; }
  .ar-portada img { border-radius: var(--r-lg); }
  .ar-quien__caja { grid-template-columns: 1fr; padding: 1.4rem; }
  .ar-quien__caja img { width: 110px; height: 138px; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-tarjeta, .bl-tarjeta__img img { transition: none; }
  .bl-tarjeta:hover { transform: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
