* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: #333;
    background: #f7f7f4;
    font-family: Georgia, "Times New Roman", serif;
}

.contenedor {
    width: min(1100px, 90%);
    margin: 0 auto;
}

/* =========================================
   AUTORIDADES
========================================= */
.autoridades {
    width: 100%;
    text-align: center;
}

.autoridades h3 {
    width: 100%;
    text-align: center !important;
    color: #174461;
    font-size: 20px;
    font-weight: normal;
    margin-top: 5px;
    margin-bottom: 5px;
}

.autoridades p {
    width: 100%;
    text-align: center !important;
    margin-top: 0;
    margin-bottom: 1px;
}

.comite-cientifico {
    width: 100%;
    text-align: center;
}

.comite-cientifico p {
    width: 100%;
    text-align: center !important;
    margin-top: 0;
    margin-bottom: 1px;
}

.miembros-honor {
    width: 100%;
    text-align: center;
}

.miembros-honor h3 {
    width: 100%;
    text-align: center !important;
    color: #174461;
    font-size: 20px;
    font-weight: normal;
    margin-top: 5px;
    margin-bottom: 5px;
}

.miembros-honor p {
    width: 100%;
    text-align: center !important;
    margin-top: 0;
    margin-bottom: 1px;
}



/* =========================================
   ENCABEZADO
========================================= */

.encabezado {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: #06172c;
    border-bottom: 6px solid #c8a44d;
    box-shadow: 0 2px 0 #174461;
    color: white;
}

/*.encabezado {              // encabezado que no es fijo
    position: relative;
    z-index: 1000;

    background: #06172c;
    border-bottom: 6px solid #c8a44d;
    box-shadow: 0 2px 0 #174461;
    color: white;
}*/

.barra-navegacion {
    min-height: 85px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}


/* Logo y nombre institucional */

.marca {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;

    color: white;
    text-decoration: none;
}

.logo-jhea {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;

    background-color: #f7f7f4;
    padding: 3px;
    border-radius: 4px;
}

.marca-texto {
    display: flex;
    flex-direction: column;
}

.marca strong {
    font-size: 22px;
    letter-spacing: 2px;
}

.marca-texto span {
    color: #d1b45c;
    font-size: 14px;
    margin-top: 3px;
}


/* =========================================
   MENÚ HORIZONTAL
========================================= */

.menu {
    margin-left: auto;
}

.menu-principal {
    display: flex;
    align-items: center;

    margin: 0;
    padding: 0;

    list-style: none;
}

.menu-principal > li {
    position: relative;
}

/* Opciones principales */

.menu-principal > li > a {
    display: block;
    padding: 24px 13px;

    color: white;
    text-decoration: none;
    text-transform: uppercase;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;    
    font-weight: normal;
    white-space: nowrap;
}

.menu-principal > li > a:hover {
    color: #d1b45c;
}

/* =========================================
   SUBMENU DE LA JUNTA
========================================= */

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2000;

    width: 205px;
    margin: 0;
    padding: 4px 0;
    list-style: none;

    background: #dfc56e;
    border-top: 3px solid #c8a44d;
    box-shadow: 2px 4px 8px rgba(0,0,0,0.22);
    border-radius: 0 0 5px 5px;
}

.submenu li {
    margin: 0;
    padding: 0;
}

.submenu li a {
    display: block;
    padding: 9px 13px;
    color: #182b40;
    text-decoration: none;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
    font-weight: bold;
}

.submenu li a:hover {
    background: #f0d981;
}

.boton-submenu {
    display: none;
}

/* Submenu en computadoras */

@media (hover: hover) and (pointer: fine) {

    .item-submenu:hover > .submenu,
    .item-submenu:focus-within > .submenu {
        display: block;
    }

}

/* =========================================
   MENU ADAPTABLE
========================================= */

.boton-menu {
    display: none;
}

@media screen and (max-width: 900px) {

    .barra-navegacion {
        min-height: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 8px 0;
    }

    .logo-jhea {
        width: 48px;
        height: 48px;
    }

    .marca strong {
        font-size: 19px;
    }

    .marca-texto span {
        font-size: 10px;
    }

    .boton-menu {
        display: block;
        margin-left: auto;
        padding: 9px 12px;
        background: transparent;
        color: white;
        border: 1px solid #c8a44d;
        border-radius: 4px;
        font-family: Arial, sans-serif;
        font-size: 13px;
        cursor: pointer;
    }

    .menu {
        display: none;
        width: 100%;
        margin: 0;
    }

    .menu.menu-abierto {
        display: block;
    }

    .menu-principal {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin: 0;
        padding: 5px 0;
    }

    .menu-principal > li {
        width: 100%;
    }

    .menu-principal > li > a {
        display: inline-block;
        padding: 10px 8px;
    }

    /* Submenu cerrado inicialmente */

    .menu .submenu {
        display: none;
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0 0 5px 5px;
    }

    /* Abrir submenu al tocar el boton */

    .menu .item-submenu.submenu-abierto > .submenu {
        display: block;
    }

    .boton-submenu {
        display: inline-block;
        width: 35px;
        height: 32px;
        margin-left: 8px;
        color: white;
        background: #174461;
        border: 1px solid #c8a44d;
        border-radius: 3px;
        font-size: 18px;
        cursor: pointer;
    }

    .hero {
        padding: 45px 15px;
    }

    .hero h1 {
        font-size: 24px;
    }
}

/* =========================================
   PORTADA
========================================= */

.hero {
    padding: 65px 20px;

    text-align: center;
    color: white;

    background:
        linear-gradient(
            rgba(8, 48, 84, 0.92),
            rgba(8, 48, 84, 0.92)
        ),
        url("../img/portada.jpg") center / cover;
}

.hero h1 {
    margin: 0;
    font-size: 30px;
    font-weight: normal;
}

.hero h2 {
    margin: 8px 0 18px;
    font-size: 22px;
    font-weight: normal;
}

.hero p {
    max-width: 620px;
    margin: 0 auto 25px;

    line-height: 1.7;
    font-size: 15px;
}

.boton {
    display: inline-block;
    padding: 11px 18px;

    color: #182b40;
    background: #dfc56e;

    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
}

.boton:hover {
    background: #f0d981;
}

/* =========================================
   CONTENIDO PRINCIPAL
========================================= */

.contenido-principal {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 55px;
    padding: 45px 0;
}

.noticias h2 {
    color: #174461;
    font-size: 21px;
    font-weight: normal;
    border-bottom: 1px solid #d6d6d6;
    padding-bottom: 10px;
}

.noticia {
    margin: 25px 0;
    padding: 0 0 20px 18px;
    border-left: 3px solid #174461;
}

.noticia small {
    color: #777;
    font-size: 11px;
}

.noticia h3 {
    margin: 8px 0;
    color: #174461;
    font-size: 17px;
}

.noticia p {
    line-height: 1.6;
    font-size: 14px;
}

.noticia a {
    color: #174461;
    font-size: 13px;
}

/* Barra lateral */

.lateral {
    font-size: 13px;
}

.lateral h3 {
    color: #174461;
    font-size: 15px;
    border-bottom: 1px solid #d6d6d6;
    padding-bottom: 8px;
}

.lateral a {
    display: block;
    margin: 12px 0;
    color: #555;
    text-decoration: none;
}

.lateral a:hover {
    color: #174461;
}

/* =========================================
   PÁGINAS INTERNAS
========================================= */

.pagina-interna {
    min-height: 550px;
    padding: 45px 0;
}

.pagina-interna h1 {
    margin-top: 0;
    color: #174461;
    font-size: 30px;
    font-weight: normal;
    border-bottom: 1px solid #d6d6d6;
    padding-bottom: 12px;
}

.pagina-interna h2 {
    margin-top: 30px;
    color: #174461;
    font-size: 21px;
    font-weight: normal;
}

.pagina-interna p {
    line-height: 1.7;
	text-align: justify;
}

.pagina-interna section {
    scroll-margin-top: 30px;
}


/* =========================================
   PIE DE PÁGINA
========================================= */

.pie {
    padding-top: 30px;

    color: #d4d8df;
    background: #06172c;

    font-family: Arial, sans-serif;
    font-size: 12px;
}

.pie-columnas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
}

.pie h4 {
    margin-top: 0;
    color: white;
}

.copyright {
    margin-top: 25px;
    padding: 15px;

    color: #d4d8df;
    background: #041020;

    text-align: center;
    font-size: 11px;
}

/* =========================================
   FORMULARIOS
========================================= */

form {
    max-width: 650px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

form label {
    margin-top: 12px;
    color: #174461;
}

form input,
form textarea {
    padding: 10px;

    border: 1px solid #ccc;
    background: white;

    font-family: Arial, sans-serif;
    font-size: 14px;
}

form button {
    width: fit-content;
    margin-top: 15px;
    padding: 11px 20px;

    border: 0;
    color: white;
    background: #174461;

    cursor: pointer;
}

form button:hover {
    background: #0d2f46;
}


/* =====================================================
   DATATABLE - ESTILO JHEA
   ===================================================== */

/* Reducir el ancho total de la tabla */
#tablaCatalogo {
    width: 90% !important;
    margin: 0 auto;
}

/* Encabezado de la tabla */
#tablaCatalogo thead th {
    background-color: #061b33;
    color: #ffffff;
    font-weight: bold;
    border-bottom: 3px solid #c5a24a;
    padding: 10px;
}

/* Filas */
#tablaCatalogo tbody tr {
    background-color: #ffffff;
}

/* Filas alternadas */
#tablaCatalogo tbody tr:nth-child(even) {
    background-color: #f4f5f5;
}

/* Efecto al pasar el mouse */
#tablaCatalogo tbody tr:hover {
    background-color: #e9dfc2;
}

/* Celdas */
#tablaCatalogo tbody td {
    padding: 8px 10px;
    border-bottom: 1px solid #d5d5d5;
}

/* =====================================================
   BUSCADOR
   ===================================================== */

.dt-search input {
    border: 1px solid #b8b8b8;
    border-radius: 3px;
    padding: 8px 10px;
    color: #061b33;
}

.dt-search input:focus {
    outline: none;
    border-color: #c5a24a;
    box-shadow: 0 0 0 2px rgba(197, 162, 74, 0.20);
}

/* Texto "Buscar:" */
.dt-search label {
    color: #061b33;
}

/* =====================================================
   INFORMACIÓN
   ===================================================== */

.dt-info {
    color: #061b33;
}

/* =====================================================
   PAGINACIÓN - ESTILO SUAVE JHEA
   ===================================================== */

.dt-paging .dt-paging-button {
    color: #12395a !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    border-radius: 3px !important;
    padding: 5px 10px !important;
}

/* Al pasar el mouse */
.dt-paging .dt-paging-button:hover {
    color: #12395a !important;
    background: #f1ead8 !important;
    border-color: #d8c89a !important;
}

/* Página actual */
.dt-paging .dt-paging-button.current {
    color: #12395a !important;
    background: #e8edf2 !important;
    border: 1px solid #b8c5d0 !important;
    font-weight: bold;
}

/* Botones deshabilitados */
.dt-paging .dt-paging-button.disabled {
    color: #999999 !important;
    background: transparent !important;
    border-color: transparent !important;
}
/* =====================================================
   tamaño de letra de la tabla 
   ===================================================== */

#tablaCatalogo th,
#tablaCatalogo td {
    font-size: 12px !important;
}

/* =========================================
   PÁGINA INTERNA CON ÍNDICE LATERAL
========================================= */

.layout-pagina {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 45px;
    align-items: start;
}

.indice-lateral {
    position: sticky;
    top: 25px;

    padding: 20px;
    background: #eef1f3;
    border-left: 4px solid #c8a44d;
}

.indice-lateral h2 {
    margin-top: 0;
    color: #174461;
    font-size: 18px;
    font-weight: normal;
}

.indice-lateral ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.indice-lateral li {
    margin-bottom: 12px;
}

.indice-lateral a {
    display: block;
    color: #174461;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
}

.indice-lateral a:hover {
    color: #c19b36;
    text-decoration: underline;
}

.contenido-pagina {
    min-width: 0;
}

/* Separación entre secciones */
.bloque-seccion {
    margin-top: 50px;
    scroll-margin-top: 30px;
}

/* Mantener centradas las autoridades */
.autoridades h3,
.miembros-honor h3 {
    color: #174461;
    font-size: 20px;
    font-weight: normal;
    margin-top: 10px;
    margin-bottom: 5px;
    text-align: center !important;
}

.autoridades p,
.miembros-honor p {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center !important;
}

/* =========================================
   HISTORIA - TEXTO CON IMAGEN
========================================= */

.bloque-historia {
    margin: 25px 0 45px;
}

.texto-historia {
    line-height: 1.7;
}

.texto-historia p {
    margin-top: 0;
    margin-bottom: 18px;
    text-align: justify;
}


/* =========================================
   FOTO + NOMBRE
========================================= */

.foto-historia {
    width: 200px;
    margin-top: 5px;
    margin-bottom: 15px;
}


/* Imagen */
.foto-historia .imagen-historia {
    width: 200px;
    height: auto;
    display: block;

    float: none;
    margin: 0;
    padding: 0;

    border: 1px solid #cccccc;
    background: #8b8989;
    box-sizing: border-box;
}


/* Nombre debajo */
.foto-historia .pie-foto {
    width: 200px;
    box-sizing: border-box;

    padding: 7px 4px;

    background: #ffffff;
    border: 1px solid #cccccc;
    border-top: none;

    text-align: center;
    font-weight: bold;
    font-size: 12px;
    line-height: 1.2;
}


/* =========================================
   FOTO A LA DERECHA
========================================= */

.foto-derecha {
    float: right;
    margin-left: 25px;
}


/* =========================================
   FOTO A LA IZQUIERDA
========================================= */

.foto-izquierda {
    float: left;
    margin-right: 25px;
}


/* =========================================
   LIMPIAR FLOAT
========================================= */

.bloque-historia::after {
    content: "";
    display: block;
    clear: both;
}

/* =========================================
   FOTO CENTRADA + NOMBRE
========================================= */

.foto-centrada {
    width: 200px;
    margin: 5px auto 20px;
    float: none;
}



/* =========================================
   FORMULARIO DE CONTACTO
========================================= */

.contacto-intro {
    max-width: 750px;
    margin-bottom: 30px;
    color: #333;
    line-height: 1.7;
}

.contacto-contenedor {
    max-width: 750px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: 3px solid #c8a44d;
}

.formulario-contacto {
    max-width: none;
    width: 100%;
}

.formulario-contacto .campo-contacto {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.formulario-contacto label {
    margin-top: 8px;
    color: #174461;
    font-weight: bold;
}

.formulario-contacto input,
.formulario-contacto textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #c8cdd2;
    border-radius: 2px;
    background: #fff;
    color: #333;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.formulario-contacto input:focus,
.formulario-contacto textarea:focus {
    outline: none;
    border-color: #174461;
    box-shadow: 0 0 0 2px rgba(23, 68, 97, 0.12);
}

.formulario-contacto textarea {
    min-height: 150px;
    resize: vertical;
}

.formulario-contacto .botones-contacto {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.formulario-contacto button {
    width: auto;
    min-width: 145px;
    margin-top: 0;
    padding: 11px 22px;
    border: 1px solid #174461;
    border-radius: 2px;
    background: #174461;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 14px;
}

.formulario-contacto button:hover {
    background: #0d2f46;
}

.formulario-contacto button.boton-limpiar {
    border-color: #c8a44d;
    background: #dfc56e;
    color: #182b40;
}

.formulario-contacto button.boton-limpiar:hover {
    background: #f0d981;
}

@media (max-width: 700px) {
    .contacto-contenedor {
        padding: 20px 15px;
    }

    .formulario-contacto .botones-contacto {
        flex-direction: column;
    }

    .formulario-contacto button {
        width: 100%;
    }
}
/* Párrafos de la página de contacto */
.contacto-intro p {
    line-height: 1.3;
    margin-top: 0;
    margin-bottom: 5px;
}


/* =====================================================
   ÍNDICE BIBLIOGRÁFICO
   ===================================================== */

   .indice-bibliografico {
    max-width: 850px;
    margin: 0 auto;
    padding: 10px 15px 30px;
    color: #111;
    font-family: "Times New Roman", serif;
    font-size: 17px;
}

.indice-encabezado {
    margin: 10px 0 65px;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
}

.indice-seccion {
    margin: 30px 0 24px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
}

.indice-registro {
    display: grid;
    grid-template-columns: 175px minmax(0, 1fr) 40px;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 10px;
    line-height: 1.25;
}

.indice-autor {
    min-width: 0;
}

.indice-libro {
    min-width: 0;
    font-style: italic;
}

.indice-pagina {
    text-align: right;
    font-style: italic;
}

/* Adaptación a celulares */
@media (max-width: 600px) {
    .indice-registro {
        grid-template-columns: minmax(0, 1fr) 35px;
        gap: 4px 8px;
    }

    .indice-autor {
        grid-column: 1;
    }

    .indice-libro {
        grid-column: 1;
        padding-left: 12px;
    }

    .indice-pagina {
        grid-column: 2;
        grid-row: 1 / span 2;
    }
}

/* =========================================
   NOTICIAS: TEXTO AL LADO DE LA FOTO
========================================= */

.noticia-contenido {
    display: flex !important;
    flex-direction: row-reverse !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    width: 100%;
}

.noticia-texto {
    flex: 1 1 auto;
    min-width: 0;
}

.noticia-texto h3 {
    margin-top: 8px;
}

.noticia-texto p {
    margin-bottom: 12px;
}

.noticia-foto {
    flex: 0 0 180px;
    width: 180px;
}

.noticia-foto img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border: 1px solid #d6d6d6;
}

/* En celulares, la foto pasa debajo del texto */
@media (max-width: 700px) {
    .contenido-principal {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .noticia-contenido {
        flex-direction: column !important;
        gap: 14px;
    }

    .noticia-foto {
        flex: none;
        width: min(100%, 220px);
    }

    .noticia-foto img {
        width: 100%;
        height: auto;
        max-height: 300px;
        object-fit: contain;
    }
}
