/* =======================================================
   1. FIREWALL TIPOGRÁFICO Y DE RENDERIZADO
   ======================================================= */
body, div, span, p, .icono-inline {
    font-weight: normal !important;
    font-style: normal !important;
    background: transparent !important; /* Destruye los fondos grises de InDesign */
}

/* =======================================================
   2. LISTA BLANCA (Protección de tu trabajo)
   ======================================================= */
em, i, ._04_Texto_Cursiva { font-style: italic !important; }
strong, b, h1, h2, ._01_Tit_Principal, .titulo-articulo, ._02_Subtitulo, .su-titulo { font-weight: 700 !important; }

/* =======================================================
   3. ARQUITECTURA VISUAL (Base Original de Revista Integración)
   ======================================================= */
body {
    max-width: 850px;
    margin: 0 auto !important;
    padding: 3rem 2rem !important;
    font-family: Georgia, "Times New Roman", serif !important;
    color: #1a1a1a;
    background-color: #ffffff;
    line-height: 1.65;
}

p:empty { display: none !important; }

/* --- JERARQUÍA DE TÍTULOS --- */
h1, ._01_Tit_Principal, .titulo-articulo {
    font-size: 2.2rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 2rem;
    color: #000000;
}

h2, ._02_Subtitulo, .su-titulo {
    font-size: 1.4rem;
    text-align: left;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 0.5rem;
}

/* --- METADATOS: AGRUPACIÓN SUTIL EN 3 BLOQUES --- */
.datos-autor, p[class*="datos-autor"] {
    text-align: center;
    font-size: 1rem;
    color: #4a4a4a;
    margin: 0.15rem 0; /* Reducimos el margen para cohesionar las líneas de cada bloque */
}

/* SEPARADOR 1: (Cierra el bloque institucional, inicia bloque de Autor)
   Detecta el párrafo "Autor" (el que precede al ORCID) y dibuja una línea suave arriba.
*/
p:has(+ p a[href*="orcid"]) {
    margin-top: 2rem !important;
    padding-top: 1.8rem !important;
    border-top: 1px solid #eaeaea;
}

/* SEPARADOR 2: (Cierra el bloque de Autor, inicia bloque de Ensayo/Fechas)
   Detecta la "Correspondencia" (contiene el @) y dibuja una línea suave abajo.
*/
p:has(a[href*="@"]) {
    margin-bottom: 2rem !important;
    padding-bottom: 1.8rem !important;
    border-bottom: 1px solid #eaeaea;
}

/* SEPARADOR 3: (Cierre total de metadatos antes del Título)
*/
.datos-autor:last-of-type, p:has(a[href*="doi.org"]) {
    padding-bottom: 2.5rem;
    margin-bottom: 2.5rem !important;
    border-bottom: 2px solid #2c3e50; /* Línea más gruesa para marcar el inicio del artículo */
}

/* --- ENLACES --- */
a {
    color: #295285;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --- CUERPO DEL DOCUMENTO --- */
p {
    font-size: 1.1rem;
    text-align: justify;
    margin-top: 0;
    margin-bottom: 1.5rem;
}/* =======================================================
   5. ESCUDO DE TABLAS (Aniquilación de métricas de InDesign)
   ======================================================= */
table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    margin: 3rem 0 !important; /* Separación respirable del texto */
    table-layout: auto !important; /* Permite al navegador ajustar columnas inteligentemente */
    background-color: transparent !important;
}

/* Destrucción de alturas fijas inyectadas por Adobe */
table, tr, td, th, tbody, thead {
    height: auto !important;
    min-height: 0 !important;
}

/* Estructura de celdas y legibilidad académica */
th, td {
    padding: 0.8rem 1rem !important;
    text-align: left !important;
    vertical-align: top !important;
    border: none !important; /* Destruye bordes sucios de InDesign */
    border-bottom: 1px solid #eaeaea !important; /* Línea divisoria sutil */
    font-family: var(--fuente-datos, system-ui, sans-serif) !important;
    font-size: 0.95rem !important; /* Ligeramente más pequeño para alta densidad de datos */
    line-height: 1.4 !important;
    color: #1a1a1a !important;
}

/* Jerarquía: Cabeceras de Tabla */
th {
    font-weight: 700 !important;
    color: #000000 !important;
    border-top: 2px solid #2c3e50 !important; /* Filete superior grueso (Estilo APA) */
    border-bottom: 2px solid #2c3e50 !important; /* Filete inferior de cabecera */
    background-color: transparent !important;
}

/* Cierre de la Tabla */
table tr:last-child td {
    border-bottom: 2px solid #2c3e50 !important; /* Filete de cierre */
}

/* EXTERMINIO DE LA INFLAMACIÓN VERTICAL: 
   InDesign mete párrafos vacíos o con márgenes enormes dentro de las celdas */
td p, th p {
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit !important;
    line-height: inherit !important;
    text-align: inherit !important;
}/* =======================================================
   6. MICRO-TIPOGRAFÍA (Control de Superíndices)
   ======================================================= */
sup, span[class*="uper"], span[class*="indice"] {
    vertical-align: super !important; /* Eleva el carácter por encima de la línea base */
    font-size: 0.75em !important;     /* Lo reduce exactamente al 75% del texto normal */
    
    /* EL AXIOMA DEL ESPACIO: Esto evita que el superíndice rompa el interlineado de tu párrafo */
    line-height: 0 !important;        
    position: relative !important;
    top: -0.2em !important;           /* Ajuste fino de la altitud */
}