/* ----------------------------------------------------------- */
/* 1. CONFIGURACIÓN BASE (Corrección de errores de estructura) */
/* ----------------------------------------------------------- */
html {
    background: #DCE3E6;
    height: 100%;
}

body {
    background: #fff;
    color: #333;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 12pt;
    line-height: 1.6;
    /* Eliminado position: absolute que rompía el diseño */
    margin: 2em auto; 
    padding: 2em;
    width: 90%;
    max-width: 900px; /* Tamaño estándar para lectura */
    box-shadow: 0 0.3em 1em rgba(0,0,0,0.2);
    word-break: break-word;
}

img {
    max-width: 100%;
    height: auto;
}

/* ----------------------------------------------------------- */
/* 2. CABECERA (Uso de Flexbox en lugar de Floats)             */
/* ----------------------------------------------------------- */
#visor-cabecera {
    width: 100%;
    min-height: 80px;
    border-bottom: 8px solid #b2b2b2;
    margin-bottom: 2em;
}

.herramientas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-encabezado img {
    height: 70px;
    width: auto;
}

.redalyc-s {
    text-align: right;
    font-family: Helvetica, Arial, sans-serif;
    color: #777777;
    font-size: 14px;
}

/* ----------------------------------------------------------- */
/* 3. ESTRUCTURA DEL ARTÍCULO                                  */
/* ----------------------------------------------------------- */
#articulo {
    width: 100%;
    margin: 0 auto;
}

#articulo-meta {
    text-align: right;
    margin-bottom: 2em;
    color: #b2b2b2;
}

.articulo-titulo {
    font-size: 18pt;
    color: #3c3c3b;
    font-weight: bold;
}

.articulo-titulo-traduccion {
    font-size: 14pt;
    font-style: italic;
    color: #545353;
}

#ficha-general {
    border-top: 1px solid #545353;
    border-bottom: 1px solid #545353;
    padding: 15px 0;
    margin: 20px 0;
}

/* ----------------------------------------------------------- */
/* 4. CUERPO Y TEXTO                                           */
/* ----------------------------------------------------------- */
#articulo-body {
    text-align: justify;
}

.resumen, .resumen-trans {
    background: #f9f9f9;
    padding: 15px;
    margin: 10px 0;
    border-left: 5px solid #b2b2b2;
}

.italica { font-style: italic; }
.negrita { font-weight: bold; }

.bibliografia {
    font-size: 11pt;
    margin-left: 2em;
    text-indent: -2em; /* Sangría francesa */
    margin-top: 1em;
}

/* ----------------------------------------------------------- */
/* 5. PIE DE PÁGINA                                            */
/* ----------------------------------------------------------- */
#creditos {
    margin-top: 40px;
    padding: 20px;
    background-color: #9d9d9c;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.flex-container {
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: center;
}

/* ----------------------------------------------------------- */
/* 6. RESPONSIVE                                               */
/* ----------------------------------------------------------- */
@media (max-width: 768px) {
    body {
        width: 95%;
        padding: 10px;
    }
    .herramientas {
        flex-direction: column;
        text-align: center;
    }
    .redalyc-s {
        text-align: center;
        margin-top: 10px;
    }
}