/* 1. IMPORTAR FUENTE MODERNA */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

/* 2. ESTILOS GENERALES */
body {
    font-family: 'Inter', sans-serif !important;
    background-color: #f0f2f5;
    color: #1f2328;
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #0A365C;
}

/* 3. CABECERA (HEADER) */
.pkp_structure_head {
    background-color: #0A365C;
    border-bottom: 4px solid #154775;
    box-shadow: 0 4px 15px rgba(10, 54, 92, 0.25);
}

.pkp_site_name .is_text {
    color: #ffffff !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 4. MENÚ DE NAVEGACIÓN */
.pkp_navigation_primary > li > a,
.pkp_navigation_user > li > a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #ffffff !important;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.pkp_navigation_primary > li > a:hover,
.pkp_navigation_user > li > a:hover {
    background-color: #154775;
    border-radius: 4px;
    color: #fff !important;
    opacity: 1;
}

/* 5. ARTÍCULOS COMO TARJETAS - CORREGIDO */
.obj_article_summary {
    background: #ffffff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    border-left: 5px solid #00C2A8;
    transition: all 0.3s ease;
    
    /* SOLUCIÓN: Previene el desorden al usar el botón "Atrás" */
    clear: both !important;
    float: none !important;
    position: relative !important;
    transform: none !important;
    will-change: auto !important;
    display: block !important;
}

.obj_article_summary:hover {
    /* Se elimina translateY para evitar el bug de posición */
    transform: none !important;
    box-shadow: 0 10px 25px rgba(10, 54, 92, 0.15);
    border-left-color: #154775;
}

.obj_article_summary .title a {
    text-decoration: none;
    color: #0A365C;
    font-size: 1.25rem;
    font-weight: 700;
}

.obj_article_summary .title a:hover {
    color: #154775;
}

/* 6. BOTONES DE PDF */
a.obj_galley_link,
.obj_article_details .galleys .obj_galley_link {
    background-color: #0A365C;
    color: #ffffff !important;
    padding: 10px 22px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    border: 2px solid #0A365C;
    transition: all 0.3s ease;
}

a.obj_galley_link:hover {
    background-color: #ffffff;
    color: #0A365C !important;
    border-color: #0A365C;
    box-shadow: 0 5px 15px rgba(10, 54, 92, 0.3);
}

/* 7. BARRA LATERAL (SIDEBAR) */
.pkp_block {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e8e8e8;
    margin-bottom: 20px;
}

.pkp_block .title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: #0A365C;
    border-bottom: 2px solid #154775;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* 8. PIE DE PÁGINA (FOOTER) */
.pkp_structure_footer {
    background: #0A365C;
    color: #ffffff !important;
    padding: 50px 0;
    text-align: center;
    border-top: 6px solid #154775;
}

.pkp_structure_footer a,
.pkp_structure_footer p,
.pkp_structure_footer li,
.pkp_structure_footer span,
.pkp_structure_footer div,
.pkp_structure_footer h1,
.pkp_structure_footer h2,
.pkp_structure_footer h3,
.pkp_structure_footer h4,
.pkp_structure_footer h5 {
    color: #ffffff !important;
    text-decoration: none;
}

.pkp_structure_footer a:hover {
    color: #154775 !important;
    text-decoration: underline;
    opacity: 1;
}

/* 9. GRÁFICO DE ESTADÍSTICAS */
.usageStatsGraph .bar {
    fill: #0A365C !important;
    stroke: #00C2A8 !important;
}

.item.usage_stats_graph {
    border-left: 5px solid #0A365C;
    box-shadow: 0 4px 10px rgba(10, 54, 92, 0.1);
}

/* --- ESTILOS DE REDES SOCIALES (VERSIÓN IMAGEN) --- */
.sidebar-social-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px 0;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #0A365C;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    border: 2px solid #0A365C;
}

.social-icon img {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}

.social-icon:hover {
    background-color: #154775;
    border-color: #154775;
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(10, 54, 92, 0.25);
}

/* --- VIDEO LOCAL RESPONSIVO --- */
.video-local-wrapper {
    margin-bottom: 15px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.video-local-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.issn-sidebar {
    text-align: center;
    font-size: 0.95rem;
    color: #1f2328;
    padding: 10px;
    background: #f0f2f5;
    border-radius: 6px;
    border: 1px dashed #00C2A8;
}

.issn-sidebar strong {
    color: #0A365C;
}

/* --- ESTILO DEL BOTÓN PERSONALIZADO --- */
.pkp_block.block_custom .content .contenedor-boton-envio {
    margin: 0;
    padding: 0;
    width: 100%;
}

a.mi-boton-envio {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: #0A365C;
    color: #ffffff !important;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    padding: 18px 10px;
    border-radius: 8px;
    border: 2px solid #0A365C;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(10, 54, 92, 0.2);
    box-sizing: border-box;
}

.icono-boton {
    margin-right: 10px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

a.mi-boton-envio:hover {
    background-color: #ffffff;
    color: #0A365C !important;
    border-color: #154775;
    transform: translateY(-3px);
}

a.mi-boton-envio:hover .icono-boton {
    transform: translateX(5px);
    color: #154775;
}

/* --- CONTADOR DE VISITAS MODERNO --- */
.contador-visitas-moderno {
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(10, 54, 92, 0.08);
    border-top: 5px solid #0A365C;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.contador-visitas-moderno:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10, 54, 92, 0.15);
}

.titulo-contador {
    font-size: 0.85rem;
    font-weight: 700;
    color: #00C2A8;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 8px;
}

.contador-visitas-moderno img.img-responsive {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: inline-block;
}

/* --- BLOQUE RSS/ATOM MODERNO --- */
.pkp_block.block_web_feed .content li a img {
    display: none !important;
}

.pkp_block.block_web_feed .content li a {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: 12px 15px;
    border-radius: 6px;
    text-decoration: none;
    color: #0A365C !important;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.pkp_block.block_web_feed .content li a::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url('https://img.icons8.com/ios-filled/50/0A365C/rss.png');
    transition: all 0.3s ease;
}

.pkp_block.block_web_feed .content li a[href*="atom"]::after { content: "ATOM Feed"; }
.pkp_block.block_web_feed .content li a[href*="rss2"]::after { content: "RSS 2.0"; }
.pkp_block.block_web_feed .content li a[href*="rss"]::after { content: "RSS 1.0"; }

.pkp_block.block_web_feed .content li a:hover {
    background-color: #0A365C;
    color: #ffffff !important;
    border-color: #0A365C;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(10, 54, 92, 0.2);
}

.pkp_block.block_web_feed .content li a:hover::before {
    filter: brightness(0) invert(1);
}

/* --- BLOQUE INDEXACIONES --- */
.indexaciones-modernas {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

a.index-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 10px 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
}

.index-icon {
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4px;
    background-color: transparent;
}

.index-icon img {
    max-width: 160px;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none !important;
    opacity: 1;
    transition: all 0.3s ease;
}

.index-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0A365C;
    line-height: 1.1;
    transition: all 0.3s ease;
}

a.index-card:hover {
    background-color: #0A365C;
    border-color: #0A365C;
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(10, 54, 92, 0.2);
}

a.index-card:hover .index-icon img {
    transform: scale(1.05);
    filter: none !important;
}

a.index-card:hover .index-label {
    color: #ffffff !important;
}

/* --- BLOQUES IDIOMA E INFORMACIÓN --- */
.pkp_block.block_language,
.pkp_block.block_information {
    background-color: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding-bottom: 10px;
    box-shadow: 0 4px 10px rgba(10, 54, 92, 0.08);
    margin-bottom: 20px;
}

.pkp_block.block_language ul,
.pkp_block.block_information ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pkp_block.block_language li,
.pkp_block.block_information li {
    margin-bottom: 8px;
}

.pkp_block.block_language a,
.pkp_block.block_information a {
    display: block;
    background-color: #f0f2f5;
    color: #0A365C !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
}

.pkp_block.block_language a:hover,
.pkp_block.block_information a:hover {
    background-color: #0A365C;
    color: #ffffff !important;
    border-color: #154775;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(10, 54, 92, 0.2);
}

.pkp_block.block_information a::before,
.pkp_block.block_language a::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.pkp_block.block_language a::before {
    background-image: url('https://img.icons8.com/ios-filled/50/0A365C/globe.png');
    filter: grayscale(100%);
    opacity: 0.6;
}

.pkp_block.block_information a::before {
    background-image: url('https://img.icons8.com/ios-filled/50/0A365C/info.png');
}

.pkp_block.block_language a:hover::before {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.15);
}

.pkp_block.block_information a:hover::before {
    filter: brightness(0) invert(1);
    transform: scale(1.15);
}

/* --- CABECERA RESPONSIVE --- */
.pkp_site_name .is_img img {
    max-height: 60px !important;
    width: auto;
    margin: 5px 0;
}

.pkp_head_wrapper {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

@media (min-width: 992px) {
    .pkp_site_name .is_img img {
        max-height: 110px !important;
        width: auto;
    }

    .pkp_head_wrapper {
        padding-top: 0px !important;
        padding-bottom: 0px !important;
        min-height: auto !important;
    }

    .pkp_site_name {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .pkp_navigation_user_wrapper {
        margin-top: 20px;
    }
}

/* --- BLOQUES PERSONALIZADOS --- */
.pkp_block.block_custom {
    border-top: 4px solid #00C2A8;
    box-shadow: 0 4px 10px rgba(10, 54, 92, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pkp_block.block_custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10, 54, 92, 0.15);
}

.pkp_block.block_custom h2,
.pkp_block.block_custom h3,
.pkp_block.block_custom h4 {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: #0A365C;
    border-bottom: 2px solid #154775;
    padding-bottom: 10px;
    margin: 0 0 15px 0;
}

.pkp_block.block_custom .content {
    color: #1f2328;
    font-size: 0.95rem;
    line-height: 1.6;
}

.pkp_block.block_custom .content p { margin: 0 0 10px 0; }
.pkp_block.block_custom .content strong { color: #0A365C; }

.pkp_block.block_custom .content p:has(strong) {
    background-color: #f0f2f5;
    border: 1px dashed #00C2A8;
    border-radius: 6px;
    padding: 8px 12px;
}

.pkp_block.block_custom .content a:not(.social-icon):not(.index-card):not(.mi-boton-envio):not(.obj_galley_link):not(.pkp_button) {
    color: #154775;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.pkp_block.block_custom .content a:not(.social-icon):not(.index-card):not(.mi-boton-envio):not(.obj_galley_link):not(.pkp_button):hover {
    color: #0A365C;
    text-decoration: underline;
}

.pkp_block.block_custom .content > img,
.pkp_block.block_custom .content p > img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 10px;
    border-radius: 6px;
}

.pkp_block.block_custom .content:has(.social-icon) {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.pkp_block.block_custom .content:has(.social-icon) p,
.pkp_block.block_custom .content:has(.social-icon) div:not(.social-icon) {
    display: contents;
}

/* --- BOTONES GENERALES --- */
.pkp_page a.btn,
.pkp_page button.btn,
.pkp_page .btn-primary {
    background-color: #0A365C;
    border: 2px solid #0A365C;
    color: #ffffff !important;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 10px 22px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.pkp_page a.btn:hover,
.pkp_page button.btn:hover,
.pkp_page .btn-primary:hover {
    background-color: #ffffff;
    color: #0A365C !important;
    box-shadow: 0 5px 15px rgba(10, 54, 92, 0.3);
}

/* --- PAGINACIÓN --- */
.cmp_pagination {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.cmp_pagination a,
.cmp_pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #0A365C;
    background: #f0f2f5;
    border: 1px solid #e8e8e8;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cmp_pagination a:hover {
    background: #154775;
    border-color: #154775;
    color: #ffffff;
}

.cmp_pagination .current {
    background: #0A365C;
    border-color: #0A365C;
    color: #ffffff;
}

/* --- BREADCRUMBS --- */
.pkp_navigation_breadcrumb,
.breadcrumb {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 20px 0;
    font-size: 0.85rem;
    color: #1f2328;
}

.pkp_navigation_breadcrumb a,
.breadcrumb a {
    color: #154775;
    font-weight: 600;
    text-decoration: none;
}

.pkp_navigation_breadcrumb a:hover,
.breadcrumb a:hover {
    color: #0A365C;
    text-decoration: underline;
}

/* --- FORMULARIOS --- */
.pkp_page input[type="text"],
.pkp_page input[type="search"],
.pkp_page input[type="email"],
.pkp_page input[type="password"],
.pkp_page input[type="url"],
.pkp_page textarea,
.pkp_page select {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: #1f2328;
    transition: all 0.3s ease;
}

.pkp_page input:focus,
.pkp_page textarea:focus,
.pkp_page select:focus {
    border-color: #00C2A8;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 194, 168, 0.15);
}

/* --- TABLAS --- */
.pkp_page table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(10, 54, 92, 0.08);
    margin-bottom: 20px;
}

.pkp_page th {
    background: #0A365C;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 12px 15px;
    text-align: left;
}

.pkp_page td {
    padding: 12px 15px;
    border-top: 1px solid #e8e8e8;
    color: #1f2328;
}

.pkp_page tr:nth-child(even) td { background: #f0f2f5; }

/* --- DOI --- */
.obj_article_details .item.doi {
    display: inline-block;
    background: #f0f2f5;
    border: 1px dashed #00C2A8;
    border-radius: 6px;
    padding: 8px 12px;
}

.obj_article_details .item.doi .label {
    color: #0A365C;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-right: 6px;
}

.obj_article_details .item.doi a {
    color: #154775;
    font-weight: 600;
    text-decoration: none;
}

.obj_article_details .item.doi a:hover {
    color: #0A365C;
    text-decoration: underline;
}

/* --- ANUNCIOS - CORREGIDO --- */
.obj_announcement_summary {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-left: 5px solid #00C2A8;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    
    /* SOLUCIÓN: Previene el desorden */
    clear: both !important;
    float: none !important;
    position: relative !important;
}

.obj_announcement_summary:hover {
    transform: none !important;
    box-shadow: 0 10px 25px rgba(10, 54, 92, 0.15);
    border-left-color: #154775;
}

.obj_announcement_summary .title a {
    color: #0A365C;
    font-weight: 700;
    text-decoration: none;
}

.obj_announcement_summary .title a:hover { color: #154775; }

.obj_issue_toc {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(10, 54, 92, 0.08);
}

/* --- PESTAÑAS --- */
.pkp_tab {
    display: inline-block;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-bottom: 3px solid #0A365C;
    border-radius: 8px 8px 0 0;
    color: #0A365C;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 10px 20px;
}

/* --- BOTÓN PKP --- */
a.pkp_button,
.pkp_block .pkp_button {
    display: inline-block !important;
    background-color: #0A365C !important;
    color: #ffffff !important;
    border: 2px solid #0A365C !important;
    border-radius: 50px !important;
    padding: 14px 28px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(10, 54, 92, 0.2);
    transition: all 0.3s ease;
}

a.pkp_button:hover {
    background-color: #ffffff !important;
    color: #0A365C !important;
    border-color: #154775 !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(10, 54, 92, 0.3);
    text-decoration: none !important;
}

a.pkp_button::after {
    content: " \2192";
    display: inline-block;
    transition: transform 0.3s ease;
}

a.pkp_button:hover::after {
    transform: translateX(4px);
}