/* Ajustes compartidos entre el sitio y la vista previa del CMS */

/* Las citas históricas migradas desde Markdown se renderizan como blockquote
   sin clase. Deben verse igual que las citas de apertura modernas. */
.article-content > blockquote:not(.opening-quote){
  position:relative;
  margin:4px 0 34px;
  padding:4px 0 4px 18px;
  border-left:3px solid var(--orange);
  font-family:Georgia,"Times New Roman",serif;
  font-size:22px;
  line-height:1.45;
  font-style:italic;
  color:var(--ink);
}
.article-content > blockquote:not(.opening-quote) p{margin:0}
.article-content > blockquote:not(.opening-quote) a{color:var(--orange);text-decoration:none}
.article-content > blockquote:not(.opening-quote) a:hover{text-decoration:underline}
html[data-theme="dark"] .article-content > blockquote:not(.opening-quote){color:#edf1f7}

/* Citas creadas desde el CMS */
.opening-quote cite{
  display:block;
  margin-top:8px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:13px;
  line-height:1.45;
  font-style:normal;
  color:var(--muted);
}

/* Páginas/secciones creadas desde el CMS */
.page-section .article-content{margin-top:22px}

/* Cuerpo editorial único: separación real de párrafos en sitio y preview. */
.article-content > p{
  margin:0 0 1.15em;
}

/* Pies de foto: todos centrados, igual que en el archivo histórico. */
.ha-caption figcaption,
.article-content figure figcaption{
  text-align:center;
}

/* Entretítulos creados con Markdown / editor visual. */
.article-content > h2,
.article-content > h3{
  position:relative;
  margin:0 0 16px;
  padding-top:42px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  line-height:1.18;
  font-weight:780;
  letter-spacing:-.02em;
  color:var(--ink);
}
.article-content > h2{font-size:28px}
.article-content > h3{font-size:23px}
.article-content > h2::before,
.article-content > h3::before{
  content:"";
  display:block;
  width:34px;
  height:3px;
  margin-bottom:12px;
  border-radius:999px;
  background:var(--orange);
}
html[data-theme="dark"] .article-content > h2,
html[data-theme="dark"] .article-content > h3{color:#f0f3f8}

/* Tablas Markdown: mismo lenguaje visual que las tablas normalizadas del sitio. */
.article-content table{
  width:100%;
  margin:30px 0 34px;
  border-collapse:collapse;
  border-spacing:0;
  border:1px solid var(--line);
  background:var(--card);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:14px;
  line-height:1.45;
}
.article-content table th,
.article-content table td{
  padding:12px 14px;
  text-align:left;
  vertical-align:top;
  border-bottom:1px solid var(--line);
}
.article-content table th{
  font-weight:800;
  color:var(--ink);
  background:rgba(127,127,127,.07);
  white-space:nowrap;
}
.article-content table tr:last-child td{border-bottom:0}
.article-content table tbody tr:hover{background:rgba(127,127,127,.035)}
.article-content table tr[hidden]{display:none!important}
html[data-theme="dark"] .article-content table{
  background:#172033;
  border-color:#33405a;
}
html[data-theme="dark"] .article-content table th{
  color:#f0f3f8;
  background:rgba(255,255,255,.05);
  border-bottom-color:#33405a;
}
html[data-theme="dark"] .article-content table td{border-bottom-color:#33405a}

/* Paginación local para tablas largas recuperadas de visualizaciones. */
.ha-paged-table{margin:30px 0 34px}
.ha-paged-table table{margin:0}
.ha-table-pagination{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  padding-top:12px;
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:12px;
  color:var(--muted);
}
.ha-table-page-button{
  appearance:none;
  border:1px solid var(--line);
  background:var(--card);
  color:var(--ink);
  border-radius:999px;
  padding:7px 12px;
  font:inherit;
  font-weight:750;
  cursor:pointer;
}
.ha-table-page-button:hover:not(:disabled){border-color:var(--blue);color:var(--blue)}
.ha-table-page-button:disabled{opacity:.38;cursor:default}
.ha-table-page-status{min-width:88px;text-align:center}
html[data-theme="dark"] .ha-table-page-button{background:#182134;border-color:#33405a;color:#f0f3f8}

/* Contenido externo incrustado desde el editor. */
.ha-embed{
  width:100%;
  margin:28px 0 34px;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--card);
}
.ha-embed iframe{
  display:block;
  width:100%;
  border:0;
}

@media(max-width:850px){
  .article-content > h2,
  .article-content > h3{
    padding-top:34px;
    margin-bottom:14px;
  }
  .article-content > h2{font-size:24px}
  .article-content > h3{font-size:21px}
  .article-content > h2::before,
  .article-content > h3::before{width:30px;margin-bottom:10px}
  .article-content table{
    display:block;
    overflow-x:auto;
    white-space:nowrap;
    font-size:13px;
  }
  .article-content table th,
  .article-content table td{padding:11px 12px}
  .ha-table-pagination{justify-content:space-between;gap:8px}
  .ha-table-page-button{padding:7px 11px}
  .ha-embed{margin:22px 0 28px}
}
