/* 1. Configuración general y fondo de lectura */
body {
    background-color: #f8f9fa; /* Gris muy suave de fondo exterior */
    color: #2c3e50;            /* Gris oscuro para lectura cómoda (menos agresivo que el negro puro) */
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    line-height: 1.75;         /* Interlineado amplio para facilitar la lectura */
    margin: 0;
    padding: 30px 15px;
}

/* 2. Contenedor principal tipo "hoja de artículo" */
body > * {
    max-width: 820px;          /* Ancho óptimo de lectura científica */
    margin-left: auto;
    margin-right: auto;
    background-color: #ffffff;
    padding-left: 45px;
    padding-right: 45px;
}

/* Ajuste de márgenes superior e inferior del bloque */
body > *:first-child {
    padding-top: 40px;
    border-top: 5px solid #8b1e3f; /* Línea superior de acento (puedes cambiar este color) */
    border-radius: 6px 6px 0 0;
}

body > *:last-child {
    padding-bottom: 50px;
    border-radius: 0 0 6px 6px;
}

/* 3. Títulos y jerarquía */
h1 {
    font-size: 1.85em;
    color: #1a252f;
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}

h2 {
    font-size: 1.35em;
    color: #8b1e3f;            /* Color corporativo para secciones */
    margin-top: 35px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
}

h3 {
    font-size: 1.15em;
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 10px;
    font-weight: 600;
}

/* 4. Párrafos y texto */
p {
    margin-top: 0;
    margin-bottom: 18px;
    text-align: justify;       /* Texto justificado estilo revista */
}

/* 5. Caja destacada para el Resumen / Abstract (si usas <div class="resumen"> o <blockquote>) */
blockquote, .resumen, .abstract {
    background-color: #f1f4f8;
    border-left: 4px solid #8b1e3f;
    padding: 20px 25px;
    margin: 25px auto;
    font-size: 0.95em;
    color: #333333;
}

/* 6. Tablas científicas */
table {
    width: 100%;
    max-width: 820px;
    border-collapse: collapse;
    margin: 30px auto;
    font-size: 0.9em;
}

th {
    background-color: #f1f4f8;
    color: #1a252f;
    font-weight: 600;
    text-align: left;
    padding: 12px;
    border-top: 2px solid #2c3e50;
    border-bottom: 2px solid #2c3e50;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #dddddd;
}

/* 7. Imágenes y figuras */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto;
    border-radius: 4px;
}

/* 8. Enlaces */
a {
    color: #8b1e3f;
    text-decoration: none;
    border-bottom: 1px dotted #8b1e3f;
}

a:hover {
    color: #5a1228;
    border-bottom: 1px solid #5a1228;
}

/* 9. Adaptación para teléfonos móviles */
@media (max-width: 768px) {
    body {
        padding: 10px 5px;
        font-size: 16px;
    }
    body > * {
        padding-left: 20px;
        padding-right: 20px;
    }
    p {
        text-align: left;
    }
}