
    /* ===== VARIABLES GLOBALES ===== */
:root {
  --header-height: 150px;
  --header-height-mobile: 140px;
  --header-inner-width: 920px;
  --paper-width: 920px;

  /* Paleta académica tradicional UNAM (se mantiene) */
  --unam-blue: #000000;
  --unam-blue-light: #1a4d7a;
  --unam-gold: #b8860b;
  --gold-unam: var(--unam-gold);
  --unam-gold-light: #d4a84b;
  --unam-gray: #4a4a4a;
  --unam-gray-light: #6b6b6b;

  --paper: #fefefe;
  --paper-cream: #faf9f6;
  --paper-rule: #d4d0c8;
  --panel: #f5f4f0;
  --ink: #1a1a1a;
  --muted: #5a5a5a;
  --accent: var(--unam-blue);
  --accent-light: var(--unam-blue-light);

  /* Fuentes actualizadas según el sexto bloque */
  --body-font: Arial, sans-serif;
  --display-font: Arial, sans-serif;
  --header-font: Arial, sans-serif;
}

/* ===== RESET Y BASE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  line-height: 1.35;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  background-color: var(--paper-cream);
  font-family: Arial, sans-serif;
}

body {
  margin: 0 auto;
  max-width: var(--paper-width);
  padding: 40px 28px 60px;
  padding-top: calc(var(--header-height) + 30px);
  background: #ffffff;
  color: var(--ink);
  font-family: Arial, sans-serif;
  line-height: 1.7;
  text-align: justify;
}

/* ===== SELECTORES DE TIPO (ETIQUETAS) ===== */
a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
  line-height: 1em;
}
a:hover {
  color: var(--unam-gold);
  text-decoration: underline;
}

a.footnote-back-link {
  font-weight: normal;
  margin-left: 0.3em;
}
a.footnote-ref {
  font-weight: normal;
}
a[id^="fnref"] {
  font-weight: normal;
}

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 2rem;
  background: var(--panel);
  border-left: 4px solid var(--unam-gold);
  font-style: italic;
  color: var(--unam-gray);
}

em {
  font-style: italic;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Arial, sans-serif;
  color: var(--unam-blue-light) !important;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

/* Tamaños de fuente actualizados según sexto bloque (en pt) */
h1 {
  font-size: 20pt;
  border-bottom: 2px solid var(--unam-gold);
  padding-bottom: 0.5rem;
  text-align: center;
}

h2 {
  font-size: 16pt;
  border-bottom: 1px solid var(--unam-gold-light);
  padding-bottom: 0.3rem;
  text-align: center;
  color: var(--unam-blue-light) !important;
}

h3 {
  font-size: 16pt;
  text-align: center;
  color: var(--unam-blue-light) !important;
}

h4 {
  font-size: 16pt;
  text-align: left;
}

h5 {
  font-size: 12pt;
  text-align: left;
}

h6 {
  font-size: 12pt;
  text-align: justify;
  margin-left: 2em;
}

/* IDs específicos para encabezados (heredan tamaños de h1-h6) */
h1#anexos,
h1#articulos,
h1#bibliografia,
h1#conclusiones-generales,
h1#el-encargado-del-despacho,
h1#hemerografía,
h1#la-industria-de-las-marchas,
h1#libros-y-tesis,
h1#publicaciones-periodicas,
h1#titulo,
h1#videos {
  font-size: 20pt;
  border-bottom: 2px solid var(--unam-gold);
  padding-bottom: 0.5rem;
  text-align: center;
}

h2#indice-principal,
h2#lista-de-siglas,
h2#nota-a-los-cuadros-de-resumen,
h2#primera-parte,
h2#segunda-parte,
h2#zona-sur {
  font-size: 16pt;
  border-bottom: 1px solid var(--unam-gold-light);
  padding-bottom: 0.3rem;
  text-align: center;
  color: var(--unam-blue-light) !important;
}

h3#el-hombre-fuerte,
h3#los-conflictos-en-las-secciones-sindicales-petroleras,
h3#zona-centro {
  font-size: 16pt;
  text-align: center;
  color: var(--unam-blue-light) !important;
}

h4#cronología-nacional,
h4#introducción-el-pacto-corporativo,
h4#los-conflictos-intersindicales,
h4#zona-norte {
  font-size: 16pt;
  text-align: left;
}

h5#i-el-sindicalismo-petrolero-en-perspectiva,
h5#ii-mecánica-del-quinazo,
h5#iii-el-ajuste-laboral,
h5#iv-el-ajuste-sindical,
h5#ix-el-conflicto-de-la-petroquimica,
h5#primera-rreleccion-de-carlos-romero-deschamps,
h5#v-movimientos-contra-las-afectaciones-ambientales-causadas-por-pemex,
h5#vi-las-grandes-movilizaciones-de-los-transitorios-despedidos,
h5#vii-otros-movimientos-de-trabajadores-en-el-sureste-petrolero,
h5#viii-el-nuevo-viejo-caciquismo,
h5#x-alternancia-política-y-permanencia-sindical,
h5#xi-sección-1-de-ciudad-madero-tamaulipas,
h5#xii-sección-36-de-reynosa-tamaulipas,
h5#xiii-otras-secciones-de-la-zona-norte,
h5#xiv-sección-35-de-tula-hidalgo-y-distrito-federal,
h5#xix-otras-secciones-de-la-zona-centro,
h5#xv-sección-34-del-distrito-federal,
h5#xvi-sección-30-de-poza-rica-veracruz,
h5#xvii-sección-24-de-salamanca-guanajuato,
h5#xviii-sección-46-de-san-martín-texmelucan-puebla,
h5#xx-sección-10-de-minatitlán-veracruz,
h5#xxi-sección-11-de-nanchital-veracruz,
h5#xxii-sección-26-de-las-choapas-veracruz,
h5#xxiii-sección-22-de-agua-dulce-veracruz,
h5#xxiv-sección-44-de-villahermosa-tabasco,
h5#xxix-otras-secciones-en-la-zona-sur,
h5#xxv-sección-48-de-reforma-chiapas,
h5#xxvi-sección-14-de-ciudad-pemex-tabasco,
h5#xxvii-sección-42-en-ciudad-del-carmen-campeche,
h5#xxviii-sección-38-de-salina-cruz-oaxaca {
  font-size: 12pt;
  text-align: left;
}

h6[id] {
  font-size: 12pt;
  text-align: justify;
  margin-left: 2em;
}

header, header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: linear-gradient(180deg, var(--unam-blue) 0%, #002244 100%);
  border-bottom: 4px solid var(--unam-gold);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 1000;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

i {
  font-style: italic;
}

li {
  margin: 0;
  line-height: 1.35;
  padding: 0;
  margin-bottom: 0.3em;
}

ol {
  padding-left: 1.7em;
  margin-top: 1em;
}

p {
  margin: 1em 0;
  font-size: 12pt; /* Actualizado según sexto bloque */
  text-align: justify;
  line-height: 1.5; /* Ajustado a 1.5 como en sexto bloque */
}

p.autor {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--unam-blue);
}

strong {
  font-weight: 700;
}

sup {
  vertical-align: super;
  font-size: smaller;
}

table {
  margin: 1.5em auto;
  border-collapse: collapse;
  width: auto;
  max-width: 100%;
  background: var(--paper);
  border: 1px solid var(--paper-rule);
  font-size: 0.9rem;
}

td {
  border: none;
  padding: 4px 5px;
  text-align: center;
}
td:first-child {
  text-align: left;
  white-space: normal;
  word-break: break-word;
  max-width: 14rem;
}
td.row-label {
  text-align: left;
  font-weight: normal;
}

th {
  background-color: #ffffff;
  color: #000;
  font-weight: 600;
  letter-spacing: 0.05em;
  border: 1px solid var(--paper-rule);
  padding: 4px 5px;
  text-align: center;
}
th.header-main {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
}

tr:nth-child(even) {
  background-color: #fff;
}
tr.totals-row {
  font-weight: bold;
  background-color: var(--panel);
}

ul {
  padding-left: 1.7em;
  margin-top: 1em;
}

/* ===== HEADER PRINCIPAL (clases específicas) ===== */
.header-container {
  width: min(100%, var(--header-inner-width));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 24px;
}

.header-mark, .logo-section {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-width: 0;
}

/* Escudo estilo UNAM */
.header-seal {
 width: 100%;
  height: 100%;
  background-image: url('2.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.header-seal::after {
  content: 'UNAM';
  font-family: Arial, sans-serif;
  font-size: 0.55rem;
  font-weight: bold;
  color: var(--unam-blue);
  letter-spacing: 0.1em;
}

/* Contenedor para imagen de bomba (sin la imagen base64) */
.oil-pump-container {
  width: 7rem;
  height: 7rem;
  flex: 0 0 auto;
  background: linear-gradient(145deg, var(--unam-gold-light) 0%, var(--unam-gold) 50%, #8b6914 100%);
  border: 2px solid #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  position: relative;
}

.oil-pump {
  width: 100%;
  height: 100%;
  background-image: url('2.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.title-section {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-start;
  text-align: left;
  font-family: Arial, sans-serif;
}

.header-kicker {
  color: var(--unam-gold-light);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.title-section .line, .line {
  color: #fff;
  line-height: 1.15;
}

.title-section .line:first-child {
  font-size: 0.72rem;
  color: var(--gold-unam);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.title-section .line:nth-child(2) {
  font-size: 1.14rem;
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
}

.title-section .line:nth-child(3) {
  font-size: 0.88rem;
  color: var(--unam-gold-light);
  line-height: 1.25;
}

.header-meta, .meta-section {
  flex: 0 0 auto;
  text-align: right;
  padding-left: 1rem;
  border-left: 1px solid rgba(255,255,255,0.2);
}

.header-meta .author, .author {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  font-family: Arial, sans-serif;
}

.header-meta .author-title {
  font-size: 0.7rem;
  color: var(--unam-gold-light);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.header-meta .edition, .edition {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

.year {
  font-weight: bold;
  color: var(--unam-gold-light);
}

/* ===== CONTENEDOR PRINCIPAL DEL DOCUMENTO ===== */
.document {
  background: var(--paper);
  border: 1px solid var(--paper-rule);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 50px 55px 60px;
}

/* ===== HERO SECTION ===== */
.hero {
  margin: 0 0 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--unam-gold);
  text-align: center;
}

.hero h1 {
  margin: 0;
  line-height: 1.35;
  color: var(--unam-blue);
  font-family: Arial, sans-serif;
  font-size: 20pt; /* Ajustado */
  line-height: 1.2;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.hero .author-name {
  margin-top: 1rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink);
  font-family: Arial, sans-serif;
margin-bottom: 3em;
}

.hero .author-title {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

.hero .subtitle {
  margin-top: 1.2rem;
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.6;
}

.hero .meta {
  margin-top: 1rem;
  color: var(--unam-gray-light);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

/* ===== INTRO CARD ===== */
.intro-card {
  margin: 0 0 2rem;
  padding: 1.3rem 1.5rem;
  background: var(--panel);
  border-left: 4px solid var(--unam-blue);
  font-size: 0.98rem;
  line-height: 1.75;
}

.intro-card p {
  margin: 0;
  line-height: 1.35;
  text-align: justify;
}

/* ===== TABLA DE CONTENIDOS (TOC) ===== */
.toc {
  margin: 0 0 2rem;
  padding: 1.1rem 1.15rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--paper-rule);
}

.toc h2 {
  margin: 0 0 0.85rem;
  border: 0;
  padding: 0;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--unam-blue-light) !important;
}

.toc-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--paper-rule);
  background: rgba(255,255,255,0.64);
}

.toc-table th,
.toc-table td {
  padding: 0.72rem 0.9rem;
  border-top: none;
  vertical-align: top;
  text-align: left;
}

.toc-table thead th {
  border-top: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.74), rgba(255,255,255,0.34));
  color: var(--unam-blue);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toc-table tbody tr.active-row th,
.toc-table tbody tr.active-row td,
.toc-table tbody tr:hover th,
.toc-table tbody tr:hover td {
  background: #ffffff;
}

.toc-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-weight: regular;
  font-family: Arial, sans-serif;
  line-height: 1em;
}



.toc-link small {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink);
  font-weight: 400;
  line-height: 1em;
}

/* ===== ENCABEZADOS DE SECCIÓN ===== */
h2.section-title,
h3.figure-title,
h3.references-title {
  color: var(--unam-blue-light) !important;
  margin: 2.5rem 0 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-family: Arial, sans-serif;
}

h2.section-title {
  font-size: 1.42rem;
  border-left: 0;
  border-bottom: 1px solid var(--unam-gold);
  padding-left: 0;
  padding-bottom: 0.35rem;
  color: var(--unam-blue-light) !important;
}

h3.figure-title,
h3.references-title {
  font-size: 1.05rem;
}

h2.section-title a,
h3.figure-title a,
h3.references-title a {
  color: var(--unam-blue-light) !important;
  text-decoration: none;
}

/* ===== PÁRRAFOS ===== */
p {
  margin: 0 0 1rem;
  text-align: justify;
  font-size: 12pt; /* Ajustado */
  line-height: 1.5;
}
p.autor {
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--unam-blue);
}

/* ===== FIGURAS Y DATOS ===== */
.figure-index {
  margin: 1.2rem 0 2rem;
  padding-left: 1.15rem;
}

.figure-index li,
.notes-list li,
#footnotes li[id^="fn"],
ol > li[id^="footnote-"] {
  margin-bottom: 0.45rem;
  padding-left: 0.25rem;
  font-size: 10pt;
  color: var(--ink);
  line-height: 1em;
}

.note-number {
  color: var(--ink);
  font-weight: 700;
  margin-right: 0.35rem;
  line-height: 1em;
}

.footnote-ref {
  color: var(--ink);
  line-height: 1em;
}

.footnote-ref sup {
  font-size: 0.72em;
  line-height: 0;
}

.footnote-back {
  display: inline;
  color: var(--ink);
  font-weight: 400;
  line-height: 1em;
}

.footnote-back:hover {
  color: var(--unam-gold);
}

.notes-list a,
.content a {
  color: var(--ink);
  line-height: 1em;
}

.notes-list a.footnote-back,
.notes-list a.footnote-back-link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
  line-height: 1em;
}

.notes-list a.footnote-back:hover,
.notes-list a.footnote-back-link:hover {
  color: var(--unam-gold);
}

section.footnotes,
section.footnotes-end-of-document,
section#footnotes {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 2px solid var(--unam-gold);
  font-size: 10pt;
  color: var(--ink);
  line-height: 1em;
}

sup > a[href^="#footnote-"],
sup > a[href^="#fn"] {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.72em;
  line-height: 1em;
}

sup > a[href^="#footnote-"]:hover,
sup > a[href^="#fn"]:hover {
  color: var(--unam-gold);
  text-decoration: none;
}

span#notas + h2,
#footnotes > h2,
#footnotes > h3 {
  margin-top: 2.4rem;
  padding-top: 1.2rem;
  border-top: none;
  border-bottom: 0;
  font-size: 0.96rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--unam-blue-light) !important;
  text-align: left;
}

span#notas + h2 + ol,
#footnotes > ol {
  padding-left: 1.2rem;
  list-style-position: outside;
}

ol > li[id^="footnote-"] p,
.notes-list li p,
#footnotes li[id^="fn"] p,
#footnotes li[id^="fn"] > a,
ol > li[id^="footnote-"] > a {
  margin: 0;
  font-size: 10pt;
  line-height: 1em;
}

ol > li[id^="footnote-"] a[href^="#footnote-ref-"],
#footnotes li[id^="fn"] a.footnote-back,
#footnotes li[id^="fn"] a.footnote-back-link,
#footnotes li[id^="fn"] > a,
ol > li[id^="footnote-"] > a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 400;
  line-height: 1em;
}

ol > li[id^="footnote-"] a[href^="#footnote-ref-"]:hover,
#footnotes li[id^="fn"] a.footnote-back:hover,
#footnotes li[id^="fn"] a.footnote-back-link:hover,
#footnotes li[id^="fn"] > a:hover,
ol > li[id^="footnote-"] > a:hover {
  color: var(--unam-gold);
}

section.footnotes > h2,
section.footnotes > h3,
section.footnotes-end-of-document > h2,
section.footnotes-end-of-document > h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  border-bottom: 0;
  font-size: 0.96rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--unam-blue-light) !important;
  text-align: left;
}

.footnote-target {
 
  border-radius: 0.2rem;
 
}

li.footnote-target,
#footnotes li.footnote-target,
.notes-list li.footnote-target,
ol > li[id^="footnote-"].footnote-target {
  
  padding-left: 0.45rem;
}

/* ===== SECCIÓN DE CRÉDITOS ===== */
.creditos-section {
  background: linear-gradient(180deg, var(--panel) 0%, #f0efe9 100%);
  border: 1px solid var(--paper-rule);
  border-top: 3px solid var(--unam-gold);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.creditos-titulo {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--unam-blue);
  margin: 0 0 1rem;
  text-align: center;
}

.creditos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.credito-item {
  text-align: center;
}

.credito-label {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.credito-nombre {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  font-family: Arial, sans-serif;
}

.credito-rol {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* ===== SECCIÓN COLECCIÓN ===== */
.coleccion-section {
  margin: 2.5rem 0;
}

.coleccion-section h2 {
  color: var(--unam-blue-light) !important;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--unam-gold);
  font-family: Arial, sans-serif;
}

/* Grid de documentos */
.documentos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.documento-card {
  background: var(--paper);
  border: 1px solid var(--paper-rule);
  padding: 1.4rem;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.documento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--unam-blue);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.documento-card:hover {
  box-shadow: 0 4px 12px rgba(0,51,102,0.12);
  border-color: var(--unam-blue);
}

.documento-card:hover::before {
  opacity: 1;
}

.documento-tipo {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--unam-blue);
  background: rgba(0,51,102,0.08);
  padding: 0.2rem 0.6rem;
  margin-bottom: 0.75rem;
  align-self: flex-start;
}

.documento-titulo {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.6rem;
  line-height: 1.4;
  font-family: Arial, sans-serif;
}

.documento-descripcion {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1rem;
  flex-grow: 1;
  text-align: justify;
}

.documento-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--paper-rule);
}

.documento-enlace {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--unam-blue);
  font-weight: 600;
  font-size: 0.8rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.documento-enlace:hover {
  color: var(--unam-gold);
}

.documento-enlace svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.documento-card:hover .documento-enlace svg {
  transform: translateX(3px);
}

/* Lista de documentos */
.lista-documentos {
  margin: 1.5rem 0;
}

.lista-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--paper-rule);
  transition: background 0.2s ease;
}

.lista-item:hover {
  background: rgba(0,51,102,0.04);
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.lista-numero {
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--unam-blue);
  color: #fff;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.lista-contenido {
  flex-grow: 1;
}

.lista-titulo {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.25rem;
  font-family: Arial, sans-serif;
}

.lista-titulo a {
  color: inherit;
  text-decoration: none;
}

.lista-titulo a:hover {
  color: var(--unam-blue);
}

.lista-descripcion {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.35;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--unam-gold);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.35;
}

.footer-credits {
  font-size: 0.75rem;
  color: var(--unam-gray-light);
  margin: 0;
  line-height: 1.35;
}

.footer-separator {
  margin: 0 0.5rem;
  color: var(--paper-rule);
}

/* ===== SELECTORES DE ID ESPECÍFICOS ===== */
h1#anexos,
h1#articulos,
h1#bibliografia,
h1#conclusiones-generales,
h1#el-encargado-del-despacho,
h1#hemerografía,
h1#la-industria-de-las-marchas,
h1#libros-y-tesis,
h1#publicaciones-periódicas,
h1#titulo,
h1#videos {
  font-size: 20pt;
  border-bottom: 2px solid var(--unam-gold);
  padding-bottom: 0.5rem;
  text-align: center;
}

h2#indice-principal,
h2#lista-de-siglas,
h2#nota-a-los-cuadros-de-resumen,
h2#primera-parte,
h2#segunda-parte,
h2#zona-sur {
  font-size: 16pt;
  border-bottom: 1px solid var(--unam-gold-light);
  padding-bottom: 0.3rem;
  text-align: center;
  color: var(--unam-blue-light) !important;
}

h3#el-hombre-fuerte,
h3#los-conflictos-en-las-secciones-sindicales-petroleras,
h3#zona-centro {
  font-size: 16pt;
  text-align: center;
  color: var(--unam-blue-light) !important;
}

h4#cronología-nacional,
h4#introducción-el-pacto-corporativo,
h4#los-conflictos-intersindicales,
h4#zona-norte {
  font-size: 16pt;
  text-align: left;
}

h5#i-el-sindicalismo-petrolero-en-perspectiva,
h5#ii-mecánica-del-quinazo,
h5#iii-el-ajuste-laboral,
h5#iv-el-ajuste-sindical,
h5#ix-el-conflicto-de-la-petroquimica,
h5#primera-rreleccion-de-carlos-romero-deschamps,
h5#v-movimientos-contra-las-afectaciones-ambientales-causadas-por-pemex,
h5#vi-las-grandes-movilizaciones-de-los-transitorios-despedidos,
h5#vii-otros-movimientos-de-trabajadores-en-el-sureste-petrolero,
h5#viii-el-nuevo-viejo-caciquismo,
h5#x-alternancia-política-y-permanencia-sindical,
h5#xi-sección-1-de-ciudad-madero-tamaulipas,
h5#xii-sección-36-de-reynosa-tamaulipas,
h5#xiii-otras-secciones-de-la-zona-norte,
h5#xiv-sección-35-de-tula-hidalgo-y-distrito-federal,
h5#xix-otras-secciones-de-la-zona-centro,
h5#xv-sección-34-del-distrito-federal,
h5#xvi-sección-30-de-poza-rica-veracruz,
h5#xvii-sección-24-de-salamanca-guanajuato,
h5#xviii-sección-46-de-san-martín-texmelucan-puebla,
h5#xx-sección-10-de-minatitlán-veracruz,
h5#xxi-sección-11-de-nanchital-veracruz,
h5#xxii-sección-26-de-las-choapas-veracruz,
h5#xxiii-sección-22-de-agua-dulce-veracruz,
h5#xxiv-sección-44-de-villahermosa-tabasco,
h5#xxix-otras-secciones-en-la-zona-sur,
h5#xxv-sección-48-de-reforma-chiapas,
h5#xxvi-sección-14-de-ciudad-pemex-tabasco,
h5#xxvii-sección-42-en-ciudad-del-carmen-campeche,
h5#xxviii-sección-38-de-salina-cruz-oaxaca {
  font-size: 12pt;
  text-align: left;
}

h6[id] {
  font-size: 12pt;
  text-align: justify;
  margin-left: 2em;
}

/* IDs para contenedores de cuadros */
div#cuadro-1,
div#cuadro-2,
div#cuadro-3,
div#cuadro-4,
div#cuadro-5,
div#listado-1,
div#listado-2 {
  margin: 0 0 1em 0;
}
div#cuadro-1 > h5,
div#cuadro-2 > h5,
div#cuadro-3 > h5,
div#cuadro-4 > h5,
div#cuadro-5 > h5,
div#listado-1 > h5,
div#listado-2 > h5 {
  width: 100%;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

li[id^="fn"],
li[id^="idx-"] {
    list-style-position: outside;
  list-style-type: none;
}

li[id^="fn"] {
  font-size: 0.9rem;
  color: var(--muted);
}

li.capitulo-item {
  margin-top: 1.5em;
  margin-bottom: 1.2em;
}
li.seccion-tematica {
  margin-top: 2em;
  margin-bottom: 2em;
}

/* Índice principal sin viñetas */
ul#indice-principal {
  list-style: none;
  padding-left: 0;
}
ul#indice-principal > li {
  margin-bottom: 3em;
}
ul#indice-principal ul,
ul#indice-principal ol,
ul#indice-principal li {
  list-style: none !important;
  padding-left: 0 !important;
}

/* Clases auxiliares */
h3.parte-subtitulo {
  font-size: 1.2rem;
  text-align: center;
  color: var(--unam-blue);
}

/* ===== REGLAS NUEVAS DEL SEXTO BLOQUE (sin duplicar) ===== */

/* Elemento personalizado table-body */
table-body {
  font-family: Arial, sans-serif;
  padding: 0;
  display: block;
  min-height: 0;
  margin: 0.75em 0;
  text-align: center;
}
table-body > table {
  display: inline-table !important;
}

/* Clases para tablas específicas */
.table-block {
  width: 100%;
  margin: 0.75em 0;
  text-align: center;
}
.table-block > table {
  margin-left: auto !important;
  margin-right: auto !important;
}
th.table-block {
    border: none !important;
    border-style: hidden !important;
}
th .table-block {
    border: none !important;
    border-style: hidden !important;
}

.cuadro-petrolero {
  font-family: Arial, sans-serif;
  margin: 0 auto;
  width: 100%;
}
.cuadro-petrolero table {
  border-collapse: collapse;
  margin: 0 auto;
  width: 100%;
}
.cuadro-petrolero th,
.cuadro-petrolero td {
  border: none;
  padding: 8px;
  text-align: left;
  font-size: 12px;
}
.cuadro-petrolero th {
  background-color: #f0f0f0;
  font-weight: bold;
}
.cuadro-petrolero .zona {
  background-color: #e0e0e0;
  font-weight: bold;
}
.cuadro-petrolero .total {
  font-weight: bold;
  background-color: #f5f5f5;
}
.cuadro-petrolero h3 {
  text-align: center;
  margin-top: 1em;
  margin-bottom: 1em;
  font-size: 24pt;
  font-weight: bold;
}
.cuadro-petrolero .fuente {
  font-size: 10px;
  margin-top: 10px;
  text-align: left;
}

/* Estilos específicos para tablas dentro de IDs */
#cuadro-1 table,
#cuadro-2 table,
#cuadro-3 table,
#cuadro-4 table,
#cuadro-5 table,
#listado-1 table,
#listado-2 table {
  font-size: 10px;
  line-height: 1.2;
  text-align: initial;
}

#listado-2 table {
  width: 100% !important;
  max-width: 100% !important;
  display: table !important;
  table-layout: fixed;
}
#listado-2 th,
#listado-2 td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  vertical-align: top;
}
#listado-2 th:first-child,
#listado-2 td:first-child {
  width: 4.5rem;
  max-width: 4.5rem;
  text-align: center;
}

/* Imágenes y elementos multimedia */
img, svg, video, iframe {
  
  display: block;
  width: 100%;
  max-width: var(--paper-width);
  height: auto;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  padding: 50px 55px 60px;
}

/* Portadas y páginas */
.portada-container {
  margin: 0 auto;
  max-width: 65em;
  padding: 50px;
  padding-top: 20px;
  text-align: center;
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pagina-portada {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  page-break-after: always;
  margin-bottom: 50px;
  margin-top: 20px;
  padding: 40px 20px;
  border-bottom: 2px solid #e0e0e0;
  width: 100%;
}

#pagina1 {
  justify-content: center;
}
#pagina2 {
  justify-content: center;
  align-items: center;
}
#pagina3 {
  justify-content: flex-start;
  text-align: left;
  padding-top: 60px;
}

.titulo-principal {
  font-size: 32pt;
  font-weight: bold;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 60px;
  max-width: 800px;
}
.titulo-principal a {
  color: inherit;
  text-decoration: none !important;
}

.nombre-autor {
  font-size: 28pt;
  font-weight: normal;
  text-align: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #ccc;
  width: 100%;
}

/* Ediciones, biografía, agradecimientos */
.ediciones-container {
  text-align: center;
  max-width: 800px;
}

.edicion {
  font-size: 16pt;
  line-height: 1.8;
  margin-bottom: 50px;
  text-align: left;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.edicion-titulo {
  font-weight: bold;
  font-size: 18pt;
  margin-bottom: 15px;
  text-align: center;
}

.edicion:nth-child(2) {
  border-left-color: #e74c3c;
}

.biografia {
  font-size: 14pt;
  line-height: 1.6;
  margin-bottom: 50px;
  text-align: justify;
  max-width: 700px;
  padding: 25px;
  background-color: #f5f5f5;
  border-radius: 8px;
  border-right: 4px solid #2ecc71;
}

.agradecimientos {
  font-size: 14pt;
  line-height: 1.6;
  margin-top: 30px;
  text-align: justify;
  max-width: 700px;
  padding: 25px;
  background-color: #f0f7ff;
  border-radius: 8px;
  border-left: 4px solid #9b59b6;
  font-style: italic;
}

.agradecimientos-titulo {
  font-weight: bold;
  font-size: 16pt;
  margin-bottom: 15px;
  text-align: center;
  font-style: normal;
}

/* Elementos adicionales */
.autor {
  display: block;
  cursor: pointer;
  color: #000000;
  font-size: 2em;
  text-align: center;
  margin: 20px auto;
  width: fit-content;
  padding-bottom: 5px;
  font-weight: bold;
}

.return-link {
  text-align: center;
  margin: 15px 0;
}
.return-link a {
  display: inline-block;
  padding: 8px 16px;
  background-color: #ecf0f1;
  color: #2c3e50;
  border-radius: 4px;
  transition: all 0.3s;
  border: 1px solid #bdc3c7;
}
.return-link a:hover {
  background-color: #3498db;
  color: white;
  border-color: #3498db;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.page-break {
  page-break-after: always;
  break-after: page;
}

/* Sidebar y menús */
.sidebar {
  position: fixed;
  left: 0;
  width: 260px;
  background-color: black;
  color: white;
  overflow-y: auto;
  padding: 10px 15px;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  z-index: 1000;
  font-family: Arial, sans-serif;
  text-align: left;
  top: 100px !important;
  height: calc(100vh - 100px) !important;
  font-size: 12pt;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}
.sidebar.active {
  transform: translateX(0);
}
.sidebar h3 {
  color: white;
  font-size: 16pt;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
  font-weight: normal;
  text-align: center;
}
.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  line-height: 1.35;
}
.sidebar nav li {
  margin: 0;
  line-height: 1.35;
  padding: 0;
}
.sidebar nav a {
  color: white;
  text-decoration: none !important;
  font-size: 12pt;
  display: block;
  padding: 0 8px;
  line-height: 1.1;
  border-radius: 2px;
  transition: all 0.2s;
  font-weight: normal;
}
.sidebar nav a:hover {
  background-color: white;
  padding-left: 12px;
  color: black;
}
.sidebar nav .nav-parte {
  font-size: 12pt;
  padding: 0 8px;
  line-height: 1.1;
}
.sidebar nav .nav-tema {
  font-size: 12pt;
  padding: 0 8px 0 12px;
  line-height: 1.1;
}
.sidebar nav .nav-subtítulo {
  font-size: 12pt;
  padding: 0 8px 0 18px;
  line-height: 1.1;
  font-style: italic;
  opacity: 0.95;
}
.sidebar nav .nav-capitulo {
  font-size: 12pt;
  padding: 0 8px 0 24px;
  line-height: 1.1;
}
.sidebar nav .nav-parte + .nav-parte {
  margin-top: 12px;
  padding-top: 0;
}

.menu-toggle,
.menu-toggle-tablet {
  position: fixed;
  top: 15px;
  left: 15px;
  background: #2c3e50;
  color: white;
  padding: 12px 18px;
  border-radius: 4px;
  z-index: 10000 !important;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  text-decoration: none !important;
  display: none; /* Se activan en media queries */
}
.menu-toggle:hover,
.menu-toggle-tablet:hover {
  background: #34495e;
}

.main-content {
  margin-left: 0;
  padding: 50px;
  max-width: 900px;
  flex: 1;
  transition: margin-left 0.3s ease;
}

.back-to-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background-color: #2c3e50;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 1000;
  font-size: 24px;
  opacity: 0;
  visibility: hidden;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background-color: #34495e;
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.nav-links {
  margin: 20px 0;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-links a {
  padding: 8px 16px;
  background-color: #3498db;
  color: white;
  text-decoration: none !important;
  border-radius: 4px;
  transition: background-color 0.3s;
}
.nav-links a:hover {
  background-color: #2980b9;
}
.nav-links .center {
  text-align: center;
  flex: 1;
}

/* Anclas y scroll padding */
:target {
  scroll-margin-top: 120px;
}
h1:target,
h2:target,
h3:target,
h4:target,
h5:target,
h6:target,
.pagina-portada:target,
.seccion-tematica:target,
.capitulo-item:target,
.apartado-item:target {
  scroll-margin-top: 120px;
}

/* ===== CORRECCIÓN DE CENTRADO (ampliada) ===== */
h1, h2, h3, h4,
.presentacion,
.parte-titulo,
.parte-principal,
.parte-subtitulo,
.tema-zona,
.seccion-tematica > div,
.titulo-principal,
.nombre-autor,
.portada-container,
.pagina-portada {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

h5, h6,
.capitulo,
.capitulo-indice,
.apartado,
.apartado-item,
.anexo-titulo,
.anexo-item {
  text-align: left !important;
}

/* ===== MEDIA QUERIES (se mantienen las existentes) ===== */
/* Nota: se deben conservar todas las media queries previas del archivo unificado,
   incluyendo las de tablet, móvil, iPhone, etc. Por brevedad no se repiten aquí,
   pero deben copiarse del archivo anterior. */

@media (max-width: 720px) {
  /* ... estilos existentes ... */
}

@media (max-width: 480px) {
  /* ... estilos existentes ... */
}

/* ===== MEDIA QUERIES DE IMPRESIÓN (nuevas del sexto bloque) ===== */
@media print {
  html {
    background-color: white !important;
    scroll-padding-top: 0;
  }
  body {
    background-color: transparent !important;
    color: black !important;
    font-size: 12pt !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: justify !important;
    padding-top: 0 !important;
  }
  header,
  .sidebar,
  .sidebar::before,
  .sidebar-toggle,
  .menu-toggle,
  .menu-toggle-tablet {
    display: none !important;
  }
  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }
  h1, h2, h3 {
    page-break-after: avoid !important;
    page-break-before: always !important;
    break-before: page !important;
  }
  h4, h5, h6 {
    page-break-after: avoid !important;
  }
  p, ul, ol, blockquote {
    page-break-inside: avoid !important;
    orphans: 3 !important;
    widows: 3 !important;
  }
  h1 { font-size: 28pt !important; }
  h2 { font-size: 24pt !important; }
  h3 { font-size: 20pt !important; }
  h4 { font-size: 18pt !important; }
  h5 { font-size: 16pt !important; }
  h6 { font-size: 14pt !important; }
  p { 
    font-size: 13pt !important; 
    line-height: 1.6 !important; 
  }
  .presentacion { font-size: 26pt !important; }
  .parte-titulo, .parte-principal { font-size: 24pt !important; }
  .parte-subtitulo { font-size: 24pt !important; }
  .tema-zona, .seccion-tematica > div { font-size: 22pt !important; }
  .capitulo, .capitulo-indice { font-size: 18pt !important; }
  .apartado, .apartado-item { font-size: 16pt !important; }
  .anexo-titulo { font-size: 20pt !important; }
  .anexo-item { font-size: 14pt !important; }
  .portada-container {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .pagina-portada {
    min-height: 100vh !important;
    page-break-after: always !important;
    break-after: page !important;
    margin: 0 !important;
    padding: 50px !important;
    border: none !important;
  }
  .titulo-principal {
    font-size: 34pt !important;
    color: black !important;
  }
  .nombre-autor {
    font-size: 24pt !important;
    color: black !important;
    border-top: 3px solid #ccc !important;
  }
  .edicion, .biografia, .agradecimientos {
    font-size: 14pt !important;
    color: black !important;
    background-color: white !important;
    border: 1px solid #ddd !important;
  }
  img, svg, video, iframe {
    max-width: 100% !important;
    height: auto !important;
    page-break-inside: avoid !important;
  }
  a {
    color: black !important;
    text-decoration: none !important;
  }
  #indice-principal a {
    color: black !important;
  }
  .return-link a:hover,
  .sidebar nav a:hover,
  img:hover {
    transform: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
    color: inherit !important;
  }
  @page {
    margin: 2cm;
  }
  @page :first {
    margin-top: 3cm;
  }
  :target {
    scroll-margin-top: 0;
  }
}
.toc-group {
  list-style: none;
  font-family: Arial, sans-serif;
  font-size: 14pt;
  font-weight: regular;
  color: var(--unam-blue);
 
  text-transform: none;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--unam-gold);
}

.toc-group > ul {
  list-style: none;
  padding-left: 1.7em;
  margin-top: 0.5em;
}
.toc-group > ul > li {
font-size: 0.8em;
font-weight: regular;
}
    /* ===== FOOTER ===== */
.site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--unam-gold);
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-text {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.35;
}
.footer-credits {
  font-size: 0.75rem;
  color: var(--unam-gray-light);
  margin: 0;
  line-height: 1.35;
}
.footer-separator {
  margin: 0 0.5rem;
  color: var(--paper-rule);
}
.footer-index a {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--unam-gold);
  padding-bottom: 1px;
  transition: color 0.2s;
}
.footer-index a:hover {
  color: var(--unam-gold);
}


/* ===== ESTILOS PARA ÍNDICES TABULADOS ===== */
nav.toc ul {
  list-style-type: none;   /* Opcional: quita los puntos de lista */
  margin-top: 0.25em;
  margin-bottom: 0.25em;
  padding-left: 1.7em;
}

nav.toc ul ul {
  margin-left: 1.5em;      /* Segundo nivel */
}

nav.toc ul ul ul {
  margin-left: 2.5em;      /* Tercer nivel */
}

nav.toc ul ul ul ul {
  margin-left: 3.5em;      /* Cuarto nivel */
}

nav.toc ul ul ul ul ul {
  margin-left: 4.5em;      /* Quinto nivel */
}

nav.toc ul ul ul ul ul ul {
  margin-left: 5.5em;      /* Sexto nivel (para índices muy profundos) */
}

/* Opcional: separación visual entre secciones del índice */
nav.toc h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-size: 1.1em;
  color: var(--unam-blue-light) !important; /* usa el color definido en las variables */
}

nav.toc li {
  margin: 0.2em 0;
  line-height: 1.4;
}

/* Estilo para enlaces dentro del índice (ya definido, pero se refuerza) */
nav.toc a.toc-link {
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s ease;
  line-height: 1em;
}

nav.toc a.toc-link:hover {
  color: var(--unam-gold);
  text-decoration: underline;
}

/* ===== TABLAS ESPECIALES: CONFLICTO PETROLERO ===== */
table thead th {
  padding: 10px 8px;
  font-weight: 600;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.2);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

/* Celdas de datos */
table td {
  padding: 8px;
  border: none;
  text-align: center;
  vertical-align: middle;
}

table tbody tr:nth-child(even) {
  background-color: #ffffff;
}

table tbody tr:hover {
  background-color: #ffffff;
}

/* Tablas anchas (Cuadros 4-7) - Permitir scroll horizontal */
.table-wide {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  margin: 1.5em 0;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-wide table {
  min-width: 800px;
  font-size: 0.75rem;
  margin: 0;
  line-height: 1.35;
  box-shadow: none;
}

/* Tablas de datos numéricos - alineación derecha */
table td.numeric {
  text-align: right;
  font-family: Arial, sans-serif;
  font-size: 0.8rem;
}

/* Tablas complejas (Cuadro 11) */
.table-complex {
  font-size: 0.7rem;
}

.table-complex th,
.table-complex td {
  padding: 6px 4px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Indicadores de zona en tablas */
table .zona-header {
  background-color: var(--unam-gold-light);
  color: var(--unam-blue);
  font-weight: 700;
  text-align: center;
}

/* Totales y subtotales */
table .total-row {
  background-color: var(--panel) !important;
  font-weight: 700;
  border-top: 2px solid var(--unam-gold);
}

/* Leyendas de tabla */
.table-caption {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: left;
  margin-top: 0.5em;
  font-style: italic;
  padding: 0 1em;
}

/* Tablas de condiciones (Cuadros 8-10) - celdas de check */
table .check-cell {
  text-align: center;
  font-size: 1.1rem;
}

table .check-cell[data-value="X"] {
  color: var(--unam-gold);
  font-weight: bold;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  table {
    font-size: 0.75rem;
  }
  
  table th,
  table td {
    padding: 6px 4px;
  }
  
  .table-wide table {
    min-width: 600px;
  }
}

/* Scroll suave para tablas anchas */
.table-wide::-webkit-scrollbar {
  height: 8px;
}

.table-wide::-webkit-scrollbar-track {
  background: var(--paper-rule);
  border-radius: 4px;
}

.table-wide::-webkit-scrollbar-thumb {
  background: var(--unam-blue-light);
  border-radius: 4px;
}

.table-wide::-webkit-scrollbar-thumb:hover {
  background: var(--unam-blue);
}

/* Mejoras para cuadros de anexos */
#anexos table {
  font-size: 0.8rem;
}

#anexos table th {
  background: var(--unam-blue);
  color: white;
  position: sticky;
  top: 0;
}

/* Cuadro 11 específico */
.table-complex-wrapper {
  max-height: 80vh;
  overflow: auto;
}

.table-complex-wrapper table {
  min-width: 1200px;
}

.table-complex-wrapper thead th {
  position: sticky;
  top: 0;
  z-index: 10;
}
/* ===== HEADERS ROTADOS 90º PARA CUADROS 8-11 ===== */

/* Mantenemos el fondo azul UNAM existente pero adaptado para headers rotados */
#cuadro-8 table thead th,
#cuadro-9 table thead th,
#cuadro-10 table thead th,
#cuadro-11 table thead th {
  /* Rotación */
  transform: rotate(90deg);
  white-space: nowrap;
  
  /* Dimensiones - ajustadas para la rotación */
  height: 120px;        /* Alto de la celda (será el ancho visual) */
  width: 30px;          /* Ancho de la celda (será el alto visual) */
  
  /* Alineación */
  vertical-align: middle;
  text-align: left;
  
  /* Tipografía - heredando de th existente */
  font-size: 0.75rem;   /* Reducido para que quepa mejor */
  font-weight: 600;     /* Mismo peso que th original */
  letter-spacing: 0.05em; /* Heredado de th */
  
  /* Color - usando las variables UNAM existentes */
  background-color: var(--unam-blue);  /* Mismo fondo que th original */
  color: #fff;                          /* Mismo color que th original */
  
  /* Bordes - adaptados */
  border: none;  /* Mismo borde que td/th */
  border-bottom: none; /* Énfasis adicional */
  
  /* Padding ajustado para rotación */
  padding: 0 4px;
  line-height: 1.2;
}

/* Ajuste de altura de la fila de encabezado */
#cuadro-8 table thead tr,
#cuadro-9 table thead tr,
#cuadro-10 table thead tr,
#cuadro-11 table thead tr {
  height: 140px;  /* Espacio suficiente para headers rotados */
}

/* Primera columna (indicadores de fila) - usando estilos existentes mejorados */
#cuadro-8 table tbody th,
#cuadro-9 table tbody th,
#cuadro-10 table tbody th,
#cuadro-11 table tbody th {
  /* Mantenemos comportamiento sticky existente de #listado-2 */
  position: sticky;
  left: 0;
  z-index: 5;
  
  /* Estilos basados en td:first-child existente pero mejorados */
  background-color: var(--unam-gold-light, #f0e6d2);
  color: var(--unam-blue, #003366);
  font-weight: 700;
  text-align: left;
  padding: 8px;
  
  /* Bordes - combinando estilos existentes */
  border-right: 2px solid var(--unam-gold, #b8860b);
  border: 1px solid var(--paper-rule);
  
  /* Dimensiones - basado en td:first-child existente */
  min-width: 150px;
  max-width: 200px;
  white-space: normal;
  word-break: break-word;  /* Heredado de td:first-child */
}

/* Celdas de datos - basadas en td existente */
#cuadro-8 table td,
#cuadro-9 table td,
#cuadro-10 table td,
#cuadro-11 table td {
  /* Centrado como en td original */
  text-align: center;
  vertical-align: middle;  /* Heredado de td */
  
  /* Padding adaptado */
  padding: 8px 4px;
  
  /* Tipografía */
  font-size: 0.75rem;  /* Reducido para tablas densas */
  
  /* Bordes heredados de td */
  border: none;
  
  /* Ancho mínimo para consistencia */
  min-width: 40px;
}

/* Mantener el efecto de filas pares existente */
#cuadro-8 table tbody tr:nth-child(even),
#cuadro-9 table tbody tr:nth-child(even),
#cuadro-10 table tbody tr:nth-child(even),
#cuadro-11 table tbody tr:nth-child(even) {
  background-color: #ffffff;  /* Mismo que tr:nth-child(even) original */
}

/* Mantener el efecto hover existente */
#cuadro-8 table tbody tr:hover,
#cuadro-9 table tbody tr:hover,
#cuadro-10 table tbody tr:hover,
#cuadro-11 table tbody tr:hover {
  background-color: #ffffff;  /* Similar a .toc-table tbody tr:hover */
}
.informe-tabla {
  background-color: #ffffff; /* o el valor que corresponda */
}
table {
  border-collapse: collapse;
  border-style: hidden;
}
table.cronograma td {
  text-align: justify;
}
.cronograma table td {
  text-align: justify;
}
#cuadro-1 table th { border: none; }
a.toc-backref {
  color: var(--unam-blue-light) !important;
}
a#indice-cuadros {
  color: var(--unam-blue-light) !important;
}
a[href="#idx-presentacion"] {
  color: var(--unam-blue-light) !important;
}
a[href^="#indice-cuadro-"] {
  color: var(--unam-blue-light) !important;
}
/* ── COLOR DE HEADINGS ── */
h1, h2, h3, h4, h5, h6 {
  color: var(--unam-blue-light);
}

/* ── ENLACES DENTRO DE HEADINGS ── */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  color: inherit;
}

h1 a:hover, h2 a:hover, h3 a:hover,
h4 a:hover, h5 a:hover, h6 a:hover {
  color: var(--unam-gold);
  text-decoration: underline;
}

/* ── ENLACE GENÉRICO ── */
a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--unam-gold);
  text-decoration: underline;
}

/* ── NOTAS AL PIE — negro fijo ── */
a.footnote-ref,
a.footnote-back-link,
a[id^="fnref"] {
  color: var(--ink);
  font-weight: normal;
}

a.footnote-ref:hover,
a.footnote-back-link:hover {
  color: var(--unam-gold);
  text-decoration: underline;
}

/* ── TOC: CAPÍTULOS Y SECCIONES TEMÁTICAS ── */
.capitulo-item > a.toc-link,
.seccion-tematica > a.toc-link {
  color: var(--unam-blue-light);
}

.capitulo-item > a.toc-link:hover,
.seccion-tematica > a.toc-link:hover {
  color: var(--unam-gold);
  text-decoration: underline;
}

/* ── TOC: TÍTULOS DE PARTE (li de primer nivel sin clase) ── */
#indice-principal > li > a.toc-link {
  color: var(--unam-blue-light);
}

#indice-principal > li > a.toc-link:hover {
  color: var(--unam-gold);
  text-decoration: underline;
}
.toc-link,
.toc-link:visited,
.toc-group a,
.toc-group a:visited,
.footer-index a,
.footer-index a:visited {
  color: var(--ink);
  line-height: 1em;
}

/* Excepciones al !important — deben ir después y con !important propio */
.capitulo-item > a.toc-link,
.capitulo-item > a.toc-link:visited,
.seccion-tematica > a.toc-link,
.seccion-tematica > a.toc-link:visited,
#indice-principal > li > a.toc-link,
#indice-principal > li > a.toc-link:visited {
  color: var(--unam-blue-light) !important;
}

.capitulo-item > a.toc-link:hover,
.seccion-tematica > a.toc-link:hover,
#indice-principal > li > a.toc-link:hover {
  color: var(--unam-gold) !important;
  text-decoration: underline;
}
a.footnote-ref {
    font-weight: normal;
    vertical-align: super;
    font-size: 0.72em;
    line-height: 1;
    color: var(--ink);
    text-decoration: none;
}

a.footnote-ref sup {
    font-size: 1em;          /* hereda el 0.72em del <a>, no lo reduce de nuevo */
    vertical-align: baseline; /* el <a> ya maneja el desplazamiento */
    line-height: 1;
}
/* ===== SUPERÍNDICES DE NOTAS AL PIE ===== */

a.footnote-ref {
    font-size: 0.75em;
    vertical-align: super;
    line-height: 1;
    font-weight: normal;
    color: var(--ink);
    text-decoration: none;
}

a.footnote-ref sup {
    font-size: 1em;        /* hereda el 0.75em del <a>, sin reducción adicional */
    vertical-align: baseline; /* el <a> ya maneja el desplazamiento */
    line-height: 1;
}

a.footnote-ref:hover {
    color: var(--unam-gold);
}