/* =====================================================
   VOCES DE LA ABOGACÍA
   ANUARIO BOLIVIANO DE CIENCIAS JURÍDICAS
   Personalización visual para OJS 3
   ===================================================== */


/* 1. VARIABLES INSTITUCIONALES
----------------------------------------------------- */

:root {
    --azul: #06243a;
    --azul-hover: #123b58;
    --dorado: #c99d27;
    --dorado-claro: #e1c36c;
    --texto: #252b31;
    --texto-secundario: #68737d;
    --fondo: #ffffff;
    --fondo-gris: #f5f6f7;
    --borde: #e1e5e8;
    --radio: 5px;
}


/* 2. ESTILO GENERAL
----------------------------------------------------- */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--fondo);
    color: var(--texto);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

a {
    color: #17618b;
    transition: color .2s ease;
}

a:hover,
a:focus {
    color: #a77b12;
}

.pkp_structure_page {
    background: #fff;
}

/* 5. BANNER PRINCIPAL
----------------------------------------------------- */

/* Imágenes del contenido de inicio */

.pkp_page_index .homepage_image img,
.pkp_page_index .additional_content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Bloque del banner */

.pkp_page_index .homepage_image {
    margin: 0 0 30px;
    padding: 0;
}

/* Evita espacios excesivos alrededor del contenido */

.pkp_page_index .additional_content {
    margin-top: 20px;
    margin-bottom: 30px;
}


/* 6. CONTENIDO PRINCIPAL
----------------------------------------------------- */

.pkp_structure_content {
    background: #fff;
}

.pkp_structure_main {
    padding-top: 32px;
    padding-bottom: 45px;
}

.pkp_page_index .pkp_structure_main {
    padding-top: 0;
}

.pkp_page_index .page_index {
    padding-top: 0;
}

.page_title {
    color: var(--azul);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 25px;
}

h1, h2, h3, h4 {
    color: var(--azul);
    line-height: 1.35;
}

h2 {
    font-size: 23px;
    margin-top: 28px;
    margin-bottom: 15px;
}

h3 {
    font-size: 19px;
    margin-top: 22px;
    margin-bottom: 12px;
}

p {
    margin-bottom: 16px;
}


/* 7. BARRA LATERAL
----------------------------------------------------- */

.pkp_structure_sidebar {
    padding-top: 30px;
    padding-bottom: 35px;
    background: #fff;
    border-left: 1px solid var(--borde);
}

.pkp_block {
    margin-bottom: 30px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--borde);
}

.pkp_block:last-child {
    border-bottom: 0;
}

.pkp_block .title {
    color: var(--azul);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 9px;
    border-bottom: 2px solid var(--dorado);
}

.pkp_block ul {
    padding-left: 0;
    list-style: none;
}

.pkp_block li {
    margin-bottom: 9px;
}

.pkp_block a {
    color: #17618b;
    text-decoration: none;
}

.pkp_block a:hover {
    color: #a77b12;
    text-decoration: underline;
}


/* 8. FORMULARIOS Y BOTONES
----------------------------------------------------- */

button,
.button,
.pkp_button,
input[type="submit"] {
    border-radius: var(--radio);
    transition: background .2s ease, color .2s ease;
}

.pkp_button,
input[type="submit"] {
    background: var(--azul);
    border: 1px solid var(--azul);
    color: #fff;
    padding: 10px 18px;
}

.pkp_button:hover,
input[type="submit"]:hover {
    background: var(--azul-hover);
    border-color: var(--azul-hover);
    color: #fff;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    border: 1px solid #cbd2d8;
    border-radius: 4px;
    padding: 9px 11px;
    max-width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--dorado);
    outline: 2px solid rgba(201, 157, 39, .15);
}


/* 9. TABLAS Y LISTADOS
----------------------------------------------------- */

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--azul);
    color: #fff;
    font-weight: 600;
}

th, td {
    padding: 11px 13px;
    border: 1px solid var(--borde);
    text-align: left;
}

tbody tr:nth-child(even) {
    background: var(--fondo-gris);
}


/* 10. DETALLES DE ARTÍCULOS
----------------------------------------------------- */

.obj_article_details .abstract {
    line-height: 1.8;
}

.obj_article_details .item {
    margin-bottom: 24px;
}

.obj_article_details .item > h2,
.obj_article_details .item > h3 {
    color: var(--azul);
    border-bottom: 1px solid var(--borde);
    padding-bottom: 8px;
}

.obj_article_summary {
    padding: 20px 0;
    border-bottom: 1px solid var(--borde);
}

.obj_article_summary .title a {
    color: var(--azul);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 600;
    text-decoration: none;
}

.obj_article_summary .title a:hover {
    color: #a77b12;
}

.obj_article_summary .authors {
    color: var(--texto-secundario);
    font-size: 14px;
}


/* 11. MIGAS DE PAN
----------------------------------------------------- */

.cmp_breadcrumbs {
    margin-bottom: 25px;
    font-size: 14px;
}

.cmp_breadcrumbs a {
    color: #17618b;
}

.cmp_breadcrumbs .current {
    color: var(--texto-secundario);
}


/* 12. PIE DE PÁGINA
----------------------------------------------------- */

.pkp_structure_footer {
    background: #e7e7e7;
    border-top: 3px solid var(--dorado);
    color: var(--texto);
    padding: 0;
}

/* Pie personalizado creado con el HTML anterior */

.revista-footer {
    width: 100%;
    background: #e7e7e7;
    color: var(--texto);
    border: 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

.revista-footer .footer-contenido {
    max-width: 1240px;
    margin: 0 auto;
    padding: 35px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 35px;
}

.revista-footer .footer-institucion h3 {
    color: var(--azul);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    letter-spacing: 1px;
    margin: 0 0 5px;
}

.revista-footer .footer-institucion p {
    color: #505961;
    font-size: 14px;
    margin: 5px 0;
}

.revista-footer .footer-linea {
    width: 65px;
    height: 2px;
    background: var(--dorado);
    margin: 13px 0;
}

.revista-footer .footer-enlaces {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 22px;
}

.revista-footer .footer-enlaces a {
    color: #344b5b;
    font-size: 14px;
    text-decoration: none;
}

.revista-footer .footer-enlaces a:hover {
    color: #9d7417;
    text-decoration: underline;
}

.revista-footer .footer-inferior {
    max-width: 1240px;
    margin: 0 auto;
    padding: 18px 25px;
    border-top: 1px solid #c9cdd0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.revista-footer .footer-inferior p {
    color: #5d646a;
    font-size: 12px;
    margin: 0;
}

.revista-footer .footer-plataforma {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.revista-footer .footer-plataforma span {
    font-size: 12px;
    color: #5d646a;
}

.revista-footer .footer-plataforma a {
    color: #222;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    text-decoration: none;
}

/* Marca oficial de OJS, si se muestra aparte */

.pkp_brand_footer {
    padding: 18px 25px;
    text-align: right;
    background: #e7e7e7;
}

.pkp_brand_footer img {
    max-width: 150px;
    height: auto;
}


/* 13. RESPONSIVE: TABLETAS Y MÓVILES
----------------------------------------------------- */

@media (max-width: 991px) {

    .pkp_head_wrapper {
        padding: 15px 20px;
    }

    .pkp_site_name_wrapper {
        height: auto;
        min-height: 70px;
    }

    .pkp_site_name {
        position: relative;
        left: auto;
        right: auto;
        padding: 0;
        text-align: center;
        white-space: normal;
    }

    .pkp_site_name .is_img img {
        max-height: 75px;
        max-width: 100%;
        width: auto;
        margin: 0 auto;
    }

    .pkp_site_nav_toggle {
        color: #fff;
    }

    .pkp_site_nav_menu {
        background: var(--azul);
    }

    .pkp_navigation_primary > li > a,
    .pkp_navigation_user > li > a {
        color: #fff;
    }

    .pkp_navigation_search_wrapper {
        border-color: rgba(255,255,255,.2);
    }

    .pkp_structure_main {
        padding: 25px 20px 35px;
    }

    .pkp_structure_sidebar {
        border-left: 0;
        border-top: 1px solid var(--borde);
        padding: 25px 20px;
    }
}

@media (max-width: 600px) {

    body {
        font-size: 15px;
    }

    .page_title {
        font-size: 25px;
    }

    h2 {
        font-size: 21px;
    }

    .pkp_site_name .is_img img {
        max-height: 65px;
    }

    .revista-footer .footer-contenido {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 20px;
        gap: 22px;
    }

    .revista-footer .footer-enlaces {
        justify-content: flex-start;
        gap: 12px 18px;
    }

    .revista-footer .footer-inferior {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 20px;
    }

    .revista-footer .footer-plataforma {
        align-items: flex-start;
    }

    .pkp_brand_footer {
        text-align: center;
    }
}


/* 14. ACCESIBILIDAD Y DETALLES
----------------------------------------------------- */

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--dorado);
    outline-offset: 3px;
}

img {
    max-width: 100%;
}

::selection {
    background: var(--dorado-claro);
    color: #17212a;
}

/* =========================================
   2. PIE DE PÁGINA
   ========================================= */

/* Ocultar la marca original de PKP
   para evitar que aparezca duplicada */
.pkp_brand_footer {
    display: none !important;
}

/* Mantener el pie de página ordenado */
.pkp_structure_footer {
    border-top: 2px solid #c9a227;
    padding: 35px 30px !important;
}

/* =========================================
   3. ADAPTACIÓN A MÓVILES
   ========================================= */

@media (max-width: 768px) {
    .pkp_site_name_wrapper {
        flex-direction: column !important;
        justify-content: center !important;
        gap: 10px;
    }

    .pkp_site_name img {
        max-height: 65px;
    }

    .pkp_navigation_primary {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    .pkp_navigation_search_wrapper {
        margin-left: 0 !important;
    }
}
/* ==========================================
   ENCABEZADO OJS - DISEÑO HORIZONTAL
   ========================================== */

/* Estructura principal del encabezado */
@media (min-width: 992px) {

    .pkp_head_wrapper {
        display: grid !important;
        grid-template-columns: 125px minmax(0, 1fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "logo usuario"
            "logo navegacion";
        align-items: center;
        column-gap: 30px;
        row-gap: 8px;
        width: 100%;
        box-sizing: border-box;
        padding: 18px 30px !important;
    }

    /* LOGOTIPO */
    .pkp_head_wrapper > .pkp_site_name_wrapper {
        grid-area: logo;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 125px !important;
        min-width: 0;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }

    .pkp_site_name {
        position: static !important;
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        text-align: center !important;
        background: transparent !important;
        white-space: normal !important;
    }

    .pkp_site_name > a {
        display: block !important;
        padding: 0 !important;
    }

    .pkp_site_name .is_img {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pkp_site_name .is_img img {
        display: block !important;
        width: 115px !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: 115px !important;
        margin: 0 auto !important;
        object-fit: contain;
    }

    /* USUARIO Y ADMINISTRACIÓN */
    .pkp_head_wrapper > .pkp_navigation_user_wrapper {
        grid-area: usuario;
        position: static !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center;
        width: 100% !important;
        min-height: 20px;
        margin: 0 !important;
        padding: 0 !important;
        text-align: right;
    }

    .pkp_navigation_user {
        display: flex !important;
        justify-content: flex-end;
        align-items: center;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pkp_navigation_user > li > a {
        color: #e6edf2 !important;
        font-size: 13px;
    }

    /* CONTENEDOR DEL MENÚ */
    .pkp_head_wrapper > .pkp_site_nav_menu {
        grid-area: navegacion;
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        min-width: 0;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* FILA DE NAVEGACIÓN */
    .pkp_site_nav_menu .pkp_navigation_primary_row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        min-width: 0;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* MENÚ PRINCIPAL */
    .pkp_navigation_primary_wrapper {
        display: flex !important;
        flex: 1 1 auto;
        align-items: center !important;
        min-width: 0;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pkp_navigation_primary {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 4px;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    .pkp_navigation_primary > li {
        display: inline-flex !important;
        flex: 0 0 auto !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .pkp_navigation_primary > li > a {
        display: inline-flex !important;
        align-items: center;
        padding: 10px 13px !important;
        color: #fff !important;
        font-size: 15px;
        font-weight: 500;
        line-height: 1.4;
        white-space: nowrap;
        border-radius: 4px;
        text-decoration: none;
    }

    .pkp_navigation_primary > li > a:hover,
    .pkp_navigation_primary > li > a:focus {
        color: #fff !important;
        background: #123b58 !important;
    }

    /* BUSCADOR */
    .pkp_navigation_search_wrapper {
        display: flex !important;
        flex: 0 0 auto;
        align-items: center;
        margin: 0 0 0 auto !important;
        padding: 0 0 0 12px !important;
        border: 0 !important;
    }

    .pkp_navigation_search_wrapper a {
        padding: 10px !important;
        color: #fff !important;
        white-space: nowrap;
    }

    .pkp_navigation_search_wrapper a:hover {
        color: #e1c36c !important;
    }

    /* MENÚ DESPLEGABLE */
    .pkp_navigation_primary ul {
        z-index: 1000;
        background: #fff !important;
        border: 1px solid #e1e5e8;
        border-top: 2px solid #c99d27;
        box-shadow: 0 8px 20px rgba(0,0,0,.14);
    }

    .pkp_navigation_primary ul a {
        color: #252b31 !important;
        white-space: normal;
    }

    .pkp_navigation_primary ul a:hover {
        background: #f5f6f7 !important;
        color: #9d7417 !important;
    }

    /* OCULTAR EL BOTÓN MÓVIL EN ESCRITORIO */
    .pkp_site_nav_toggle {
        display: none !important;
    }
}

/* ==========================================
   TABLETAS Y TELÉFONOS
   ========================================== */

@media (max-width: 991px) {

    .pkp_head_wrapper {
        display: block !important;
        padding: 15px 20px !important;
    }

    .pkp_site_name_wrapper {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        padding: 0 !important;
        text-align: center !important;
    }

    .pkp_site_name {
        position: static !important;
        width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        text-align: center !important;
    }

    .pkp_site_name .is_img img {
        display: block;
        width: auto !important;
        max-width: 100% !important;
        max-height: 75px !important;
        margin: 0 auto !important;
    }

    .pkp_site_nav_menu {
        background: #06243a !important;
    }

    .pkp_site_nav_toggle {
        color: #fff !important;
    }

    .pkp_navigation_primary > li > a,
    .pkp_navigation_user > li > a {
        color: #fff !important;
    }
}

/* ==========================================
   PANTALLAS PEQUEÑAS
   ========================================== */

@media (max-width: 600px) {

    .pkp_head_wrapper {
        padding: 12px 15px !important;
    }

    .pkp_site_name .is_img img {
        max-height: 65px !important;
    }

    .pkp_navigation_primary > li > a {
        font-size: 14px;
        padding: 8px 10px !important;
    }
}