/* ============================================
   TEMA PGE - BASADO EN REVISTA PODER JUDICIAL
   ============================================ */

/* Variables */
:root {
    --pge-primary: #e11f1c;
    --pge-secondary: #e11f1c;
    --pge-gold: #C5A572;
    --pge-text: #333;
    --pge-bg: #FFFFFF;
    --pge-gray: #F5F5F5;
}

/* Reset general */
body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--pge-text);
    background: var(--pge-bg);
}

/* ==================== OCULTAR LINKS DE ACCESIBILIDAD ==================== */
.cmp_skip_to_content {
    position: absolute;
    left: -9999px;
    top: 0;
}

.cmp_skip_to_content a:focus {
    position: fixed;
    left: 0;
    top: 0;
    background: #000;
    color: #fff;
    padding: 10px;
    z-index: 9999;
}

/* ==================== HEADER 3 FRANJAS (PGE) ==================== */
/* ==================== HEADER ANCHO COMPLETO ==================== */

/* Franja 1: Ancho completo */
.pge_top_bar {
    background: var(--pge-secondary);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding: 8px 0;
    font-size: 0.85em;
}

.pge_top_bar_content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    color: white;
}

.pge_issn,
.pge_top_links,
.pge_top_links a,
.pge_top_links span {
    color: white !important;
}

.pge_dropdown > a {
    color: white !important;
}

.pge_issn a {
    color: white !important;
    text-decoration: none !important;
}

.pge_issn a:hover {
    text-decoration: underline !important;
}

.pge_issn .separator {
    color: white !important;
    margin: 0 10px;
}


/* Franja 2: Header principal - Ancho completo */
.pkp_structure_head {
    background: var(--pge-primary) !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    border-bottom: none !important;
    padding: 10px 0 !important;
}

.pkp_head_wrapper {
    background: transparent !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Franja 3: Navegación - Ancho completo */
.pge_navigation_bar {
    background: var(--pge-secondary);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-bottom: 4px solid var(--pge-gold);
}

.pge_nav_content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 25px;
}

/* Ocultar navegación de usuario por defecto (ya está en franja 3) */
.pkp_navigation_user_wrapper {
    display: none !important;
}





/* Buscador en navegación */
.pge_search_wrapper {
    margin-left: auto;
}

.pge_search_wrapper form {
    display: flex;
    gap: 5px;
}

.pge_search_wrapper input {
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    width: 200px;
}

.pge_search_wrapper button {
    background: var(--pge-gold);
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 16px;
}

.pge_search_wrapper button:hover {
    opacity: 0.9;
}

/* ==================== LINKS SIN SUBRAYADO ==================== */
.pge_top_links a,
.pge_nav_content a {
    color: white !important;
    text-decoration: none !important;
}

.pge_top_links a:hover,
.pge_nav_content a:hover {
    text-decoration: none !important;
    opacity: 0.8;
}

/* ==================== LOGO TAMAÑO ==================== */
.pkp_site_name_wrapper {
    text-align: center;
    padding: 10px 0;
}

.pkp_site_name img {
    max-height: 60px;
    width: auto;
    max-width: 100%;
}

.pkp_site_name a {
    display: inline-block;
}

/* ==================== DROPDOWNS TOP BAR ==================== */
.pge_dropdown {
    position: relative;
    display: inline-block;
}

.pge_dropdown_menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

.pge_dropdown:hover .pge_dropdown_menu {
    display: block;
}

.pge_dropdown_menu a {
    display: block;
    padding: 10px 15px;
    color: #333 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #eee;
}

.pge_dropdown_menu a:hover {
    background: #f5f5f5;
}





/* Responsive */
@media (max-width: 992px) {
    .pge_nav_content {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .pge_search_wrapper {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .pge_search_wrapper input {
        width: 100%;
    }
}

/* ==================== NAVEGACIÓN ==================== */
.pkp_navigation_primary {
    background: var(--pge-secondary) !important;
    border: none;
}

.pkp_navigation_primary ul {
    margin: 0;
    padding: 0;
}

.pkp_navigation_primary li {
    list-style: none;
    display: inline-block;
}

.pkp_navigation_primary a {
    color: var(--pge-bg) !important;
    padding: 12px 20px;
    display: block;
    text-decoration: none;
    transition: background 0.3s;
}

.pkp_navigation_primary a:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==================== CONTENIDO PRINCIPAL ==================== */
.pkp_structure_main {
    padding: 30px 20px;
    background: var(--pge-bg);
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
}

.pkp_page_index {
    max-width: 1200px;
    margin: 0 auto;
}

/* Líneas separadoras entre secciones */
.cmp_announcements,
.current_issue,
.obj_issue_toc .sections,
.page_index_journal > div {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #ddd;
}

.page_index_journal > div:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

/* Separadores dentro del issue */
.obj_issue_toc .section {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #eee;
}

.obj_issue_toc .section:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

/* ==================== SIDEBAR DERECHO ==================== */
.pkp_structure_sidebar {
    background: var(--pge-gray);
    padding: 20px;
    border-radius: 5px;
    margin-top: 20px;
}

.pkp_structure_sidebar .pkp_block {
    background: white;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pkp_structure_sidebar h2.title,
.pkp_structure_sidebar h2,
.pkp_structure_sidebar h3 {
    color: var(--pge-primary);
    font-size: 1.1em;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--pge-gold);
    padding-bottom: 8px;
    font-weight: bold;
}

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

.pkp_structure_sidebar ul li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.pkp_structure_sidebar ul li:last-child {
    border-bottom: none;
}

.pkp_structure_sidebar a {
    color: var(--pge-primary);
    text-decoration: none;
}

.pkp_structure_sidebar a:hover {
    color: var(--pge-secondary);
    text-decoration: underline;
}

/* Botón enviar artículo */
.block_enviar .btn {
    display: block;
    background: var(--pge-primary);
    color: white;
    padding: 12px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
}

.block_enviar .btn:hover {
    color: white;
    background: var(--pge-secondary);
}

/* Listas especiales */
.indexadores-list li,
.redes-sociales-list li {
    font-size: 0.95em;
}

/* ==================== BOTONES ==================== */
.pkp_button,
button.pkp_button {
    background: var(--pge-primary) !important;
    border: 2px solid var(--pge-primary) !important;
    color: var(--pge-bg) !important;
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.3s;
}

.pkp_button:hover {
    background: var(--pge-secondary) !important;
    border-color: var(--pge-secondary) !important;
}

/* ==================== ENLACES ==================== */
a {
    color: var(--pge-primary);
    transition: color 0.3s;
}

a:hover {
    color: var(--pge-secondary);
    text-decoration: underline;
}

/* ==================== FOOTER ==================== */
/* ==================== FOOTER PGE ==================== */
.pkp_structure_footer {
    background: var(--pge-primary) !important;
    color: white !important;
    padding: 0 !important;
    margin-top: 50px;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.pge_footer_content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    text-align: center;
}

.pge_footer_revista h3 {
    color: white;
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: bold;
}

.pge_footer_issn {
    color: white;
    margin-bottom: 20px;
}

.pge_footer_issn a {
    color: var(--pge-gold) !important;
    text-decoration: none;
}

.pge_footer_issn a:hover {
    text-decoration: underline;
}

.pge_footer_contacto {
    margin: 20px 0;
    line-height: 1.8;
}

.pge_footer_contacto p {
    color: white;
    margin: 0;
}

.pge_footer_licencia {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.3);
}

.pge_footer_licencia img {
    margin-bottom: 10px;
}

.pge_footer_licencia a {
    color: var(--pge-gold) !important;
    text-decoration: none;
}

.pge_footer_licencia a:hover {
    text-decoration: underline;
}

/* ==================== PORTADA DE REVISTA ==================== */
.obj_issue_toc .cover {
    margin-bottom: 20px;
}

.obj_issue_toc .cover img {
    border: 4px solid var(--pge-gold);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    max-width: 100%;
    height: auto;
}

/* ==================== ARTÍCULOS ==================== */
.obj_article_summary {
    border-left: 5px solid var(--pge-primary);
    padding-left: 20px;
    margin-bottom: 30px;
}

.obj_article_summary h3 a {
    color: var(--pge-primary);
    font-size: 1.3em;
}

/* ==================== FORMULARIOS ==================== */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: var(--pge-primary);
    outline: none;
}

/* ==================== BREADCRUMBS ==================== */
.pkp_navigation_breadcrumb {
    margin: 20px 0;
    color: #666;
}

.pkp_navigation_breadcrumb a {
    color: var(--pge-primary);
}

/* ==================== RESPONSIVO ==================== */
@media (max-width: 768px) {
    .pkp_site_name,
    .pkp_site_name a {
        font-size: 1.5em;
    }
    
    .pkp_navigation_primary li {
        display: block;
    }
}

/* ==================== LAYOUT DE 2 COLUMNAS ==================== */
/* ==================== LAYOUT 2 COLUMNAS (CORRECTO) ==================== */

/* Contenedor principal con sidebar */
.pkp_structure_content.has_sidebar {
    display: grid !important;
    grid-template-columns: 1fr 350px !important;
    gap: 30px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* Contenido principal (primer hijo) */
.pkp_structure_content.has_sidebar > .page,
.pkp_structure_content.has_sidebar > div:not(.pkp_structure_sidebar) {
    grid-column: 1 !important;
}

/* Sidebar derecho */
.pkp_structure_sidebar.left {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: sticky !important;
    top: 20px !important;
    align-self: start !important;
    background: transparent !important;
    padding: 0 !important;
}

/* Bloques individuales del sidebar */
.pkp_structure_sidebar > div {
    background: white !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    border-radius: 5px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    border-left: 4px solid var(--pge-primary) !important;
}

/* Responsive - móvil */
@media (max-width: 992px) {
    .pkp_structure_content.has_sidebar {
        grid-template-columns: 1fr !important;
    }
    
    .pkp_structure_sidebar.left {
        grid-column: 1 !important;
        position: static !important;
    }
}

/* ==================== DROPDOWNS TOP BAR ==================== */
.pge_dropdown {
    position: relative;
    display: inline-block;
}

.pge_dropdown_menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

.pge_dropdown:hover .pge_dropdown_menu {
    display: block;
}

.pge_dropdown_menu a {
    display: block;
    padding: 10px 15px;
    color: #333 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #eee;
}

.pge_dropdown_menu a:hover {
    background: #f5f5f5;
}

/* ==================== ERRORES DE FORMULARIO ==================== */
#formErrors {
    margin: 20px 0;
    padding: 15px;
    background: #c00;
    color: #fff;
    border-radius: 4px;
}

#formErrors .pkp_form_error {
    font-weight: bold;
    margin-bottom: 10px;
}

#formErrors .pkp_form_error_list {
    margin: 0;
    padding-left: 20px;
}

#formErrors .pkp_form_error_list a {
    color: #fff;
    text-decoration: underline;
}

/* ==================== ACCESIBILIDAD - OCULTAR TEXTO PARA LECTORES DE PANTALLA ==================== */
.pkp_screen_reader {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ==================== DROPDOWN EN NAVEGACIÓN PRINCIPAL ==================== */
.pge_nav_dropdown {
    position: relative;
    display: inline-block;
}

.pge_nav_dropdown > a {
    color: white !important;
    text-decoration: none !important;
}

.pge_nav_dropdown .pge_dropdown_menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

.pge_nav_dropdown:hover .pge_dropdown_menu {
    display: block;
}

.pge_nav_dropdown .pge_dropdown_menu a {
    display: block;
    padding: 12px 15px;
    color: #333 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #eee;
}

.pge_nav_dropdown .pge_dropdown_menu a:last-child {
    border-bottom: none;
}

.pge_nav_dropdown .pge_dropdown_menu a:hover {
    background: #f5f5f5;
    color: var(--pge-primary) !important;
}

/* ==================== PÁGINA DE ARCHIVO (NÚMEROS ANTERIORES) ==================== */
.page_issue_archive .issues_archive {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.page_issue_archive .obj_issue_summary {
    max-width: 250px;
}

.page_issue_archive .obj_issue_summary .cover img {
    max-width: 180px;
    height: auto;
    border: 2px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.page_issue_archive .obj_issue_summary .title {
    font-size: 0.95em;
    margin-top: 10px;
}

/* ==================== BREADCRUMBS HORIZONTALES ==================== */
.cmp_breadcrumbs {
    margin-bottom: 20px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.cmp_breadcrumbs ol {
    list-style: none !important;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.cmp_breadcrumbs ol li {
    display: inline-flex;
    align-items: center;
    font-size: 0.9em;
    color: #666;
}

.cmp_breadcrumbs ol li::before {
    display: none !important;
}

.cmp_breadcrumbs ol li a {
    color: var(--pge-primary);
    text-decoration: none;
}

.cmp_breadcrumbs ol li a:hover {
    text-decoration: underline;
}

.cmp_breadcrumbs ol li .separator {
    margin: 0 5px;
    color: #999;
}

.cmp_breadcrumbs ol li.current {
    color: #333;
    font-weight: 500;
}

/* ==================== PÁGINA DE ARTÍCULO (PGE) ==================== */

/* Contenedor principal del artículo */
.pge_article_details {
    max-width: 100%;
}

/* Header del artículo */
.pge_article_header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--pge-primary);
}

.pge_article_header .page_title {
    color: var(--pge-primary);
    font-size: 1.8em;
    line-height: 1.3;
    margin: 0 0 10px 0;
}

.pge_article_header .subtitle {
    color: #666;
    font-size: 1.2em;
    font-weight: normal;
    margin: 0;
}

/* Layout de 2 columnas */
.pge_article_row {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
    align-items: start;
}

.pge_main_content {
    min-width: 0;
}

.pge_sidebar {
    min-width: 0;
    position: sticky;
    top: 20px;
}

/* Bloque de portada del número en el sidebar */
.pge_issue_cover_block {
    text-align: center;
}

.pge_issue_cover_block .pge_sidebar_title {
    text-align: center;
}

.pge_cover_image {
    margin: 15px 0;
}

.pge_cover_image img {
    width: 100%;
    max-width: 180px;
    height: auto;
    border: 2px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-radius: 3px;
}

.pge_issue_link {
    font-size: 0.9em;
}

.pge_issue_link a {
    color: var(--pge-primary);
    font-weight: 500;
}

/* Bloques de contenido */
.pge_block {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--pge-primary);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.pge_block_title {
    color: var(--pge-primary);
    font-size: 1.1em;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Texto pendiente/vacío */
.pge_pending {
    color: #999;
    font-style: italic;
}

/* ========== BLOQUE DE AUTORES ========== */
.pge_authors_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pge_author_item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.pge_author_item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pge_author_item .name {
    font-weight: bold;
    color: #333;
    display: block;
}

.pge_author_item .affiliation {
    color: #666;
    font-size: 0.9em;
    display: block;
    margin-top: 3px;
}

.pge_author_item .orcid {
    display: block;
    margin-top: 5px;
}

.pge_author_item .orcid a {
    color: #a6ce39;
    font-size: 0.85em;
}

/* ========== BLOQUE DOI ========== */
.pge_doi_block {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
}

.pge_doi_block .label {
    font-weight: bold;
    color: #333;
}

.pge_doi_block .value a {
    color: var(--pge-primary);
    word-break: break-all;
}

/* ========== BLOQUE PALABRAS CLAVE ========== */
.pge_keywords_block {
    padding: 15px 20px;
}

.pge_keywords_block .label {
    font-weight: bold;
    color: #333;
    margin-right: 10px;
}

.pge_keyword {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.9em;
    display: inline-block;
    margin: 2px 0;
}

/* ========== BLOQUE RESUMEN ========== */
.pge_abstract_block .pge_abstract_content {
    line-height: 1.7;
    text-align: justify;
    color: #444;
}

/* ========== BLOQUE DE ESTADÍSTICAS COMBINADO ========== */
.pge_stats_block {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--pge-primary);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

/* Contador de vistas */
.pge_views_counter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 20px;
}

.pge_stat_icon {
    font-size: 1.5em;
}

.pge_stat_label {
    font-weight: bold;
    color: #333;
}

.pge_stat_value {
    font-size: 1.3em;
    font-weight: bold;
    color: var(--pge-primary);
}

/* Sección de descargas (plugin) */
.pge_downloads_section .downloads_chart {
    background: transparent;
    border: none;
    border-left: none;
    padding: 0;
    margin: 0;
    border-radius: 0;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.pge_downloads_section .downloads_chart .label {
    color: #333;
    font-size: 1em;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: none;
    display: block;
}

.pge_downloads_section .downloads_chart .value {
    min-height: 80px;
}

.pge_downloads_section canvas {
    max-width: 100%;
    height: auto;
}

.pge_downloads_section .usageStatsUnavailable {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* ========== BLOQUE ESTADÍSTICAS ========== */
.pge_stats_block {
    background: #fafafa;
}

.pge_stats_placeholder {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== BLOQUE BIOGRAFÍA ========== */
.pge_bio_item {
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.pge_bio_item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pge_bio_name {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.pge_bio_name .affiliation {
    font-weight: normal;
    color: #666;
}

.pge_bio_content {
    color: #555;
    line-height: 1.6;
    font-size: 0.95em;
}

/* ========== BLOQUE REFERENCIAS ========== */
.pge_references_content {
    max-height: 400px;
    overflow-y: auto;
}

.pge_reference {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
    line-height: 1.5;
}

.pge_reference:last-child {
    border-bottom: none;
}

/* ========== SIDEBAR BLOQUES ========== */
.pge_sidebar_block {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pge_sidebar_title {
    color: var(--pge-primary);
    font-size: 0.95em;
    font-weight: bold;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--pge-gold);
}

.pge_sidebar_value {
    color: #333;
    font-size: 0.9em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Galleys/Descargas */
.pge_galleys_block {
    background: var(--pge-primary);
    border: none;
}

.pge_galleys_block .pge_sidebar_title {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.3);
}

.pge_galleys_list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pge_galleys_list li {
    margin-bottom: 8px;
}

.pge_galleys_list li:last-child {
    margin-bottom: 0;
}

.pge_galleys_list a {
    display: block;
    background: #fff;
    color: var(--pge-primary) !important;
    padding: 10px 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    text-decoration: none !important;
    transition: all 0.2s;
}

.pge_galleys_list a:hover {
    background: var(--pge-gold);
    color: #fff !important;
}

/* Cita */
.pge_citation_output {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 4px;
    font-size: 0.85em;
    line-height: 1.5;
    margin-bottom: 10px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.pge_citation_block .citation_formats_button {
    width: 100%;
    font-size: 0.85em;
}

/* Licencia */
.pge_license_block img {
    max-width: 100%;
    height: auto;
}

.pge_copyright_text {
    font-size: 0.85em;
    color: #666;
    margin-top: 10px;
}

/* ========== DROPDOWN DE FORMATOS DE CITA ========== */
.citation_formats {
    position: relative;
}

.citation_formats_button {
    background: var(--pge-primary) !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 15px !important;
    font-size: 0.85em !important;
    cursor: pointer;
    border-radius: 4px !important;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.citation_formats_button::after {
    content: "▼";
    font-size: 0.7em;
    transition: transform 0.2s;
}

.citation_formats_button[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.citation_formats_button:hover {
    background: var(--pge-secondary) !important;
    opacity: 0.9;
}

/* Dropdown oculto por defecto */
.citation_formats_list {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    margin-bottom: 5px;
    max-height: 300px;
    overflow-y: auto;
}

/* Mostrar cuando aria-hidden es false */
.citation_formats_list[aria-hidden="false"] {
    display: block;
}

.citation_formats_styles {
    list-style: none;
    padding: 0;
    margin: 0;
}

.citation_formats_styles li {
    border-bottom: 1px solid #eee;
}

.citation_formats_styles li:last-child {
    border-bottom: none;
}

.citation_formats_styles a {
    display: block;
    padding: 10px 15px;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 0.9em;
    transition: background 0.2s;
}

.citation_formats_styles a:hover {
    background: #f5f5f5;
    color: var(--pge-primary) !important;
}

.citation_formats_list .label {
    padding: 10px 15px 5px;
    font-weight: bold;
    font-size: 0.85em;
    color: #666;
    border-top: 1px solid #ddd;
    margin-top: 5px;
}

.citation_formats_styles .fa-download {
    margin-right: 8px;
    color: var(--pge-primary);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .pge_article_row {
        grid-template-columns: 1fr !important;
    }

    .pge_sidebar {
        position: static;
        order: -1;
        margin-bottom: 20px;
    }

    .pge_issue_cover_block {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* ===== FIX RESPONSIVE SIDEBAR ===== */
@media (max-width: 991px) {
    .pkp_structure_sidebar {
        width: 100%;
        float: none;
    }
    
    .pkp_structure_main {
        width: 100%;
        float: none;
    }
}

@media (max-width: 767px) {
    .pkp_structure_sidebar {
        display: none;
    }
    
    .pkp_structure_content {
        width: 100%;
    }
}

/* ===== LISTADO DE ARTÍCULOS ESTILO PGE ===== */
.pge_article_summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.pge_article_info {
    flex: 1;
}

.pge_article_title a {
    color: #1a5276;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
}

.pge_article_title a:hover {
    color: #c00;
}

.pge_article_authors {
    color: #333;
    font-size: 0.95em;
    margin: 5px 0 10px 0;
}

.pge_article_pages {
    color: #666;
    font-size: 0.95em;
    white-space: nowrap;
    margin-left: 20px;
}

.pge_galleys {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.pge_galley_btn {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border: 1px solid #1a5276;
    border-radius: 5px;
    color: #1a5276;
    text-decoration: none;
    font-size: 0.85em;
    transition: all 0.2s;
}

.pge_galley_btn:hover {
    background-color: #1a5276;
    color: #fff;
}

.pge_galley_icon {
    margin-right: 5px;
}

/* Quitar estilos por defecto de OJS */
.obj_article_summary {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.obj_article_summary::before {
    display: none;
}

/* ===== QUITAR BARRA ROJA Y PUNTO ===== */
.obj_article_summary,
.pge_article_summary {
    list-style: none !important;
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.obj_article_summary::before,
.pge_article_summary::before,
.obj_article_summary::marker,
.pge_article_summary::marker {
    display: none !important;
    content: none !important;
}

/* Quitar estilos del contenedor padre */
.articles > li,
.cmp_article_list > li,
section.section > ul > li {
    list-style: none !important;
    border-left: none !important;
    padding-left: 0 !important;
}

section.section > ul {
    list-style: none !important;
    padding-left: 0 !important;
}

/* ===== ISSUE TOC ESTILO PGE ===== */
.pge_issue_toc {
    padding: 0;
}

.pge_full_issue {
    margin-bottom: 30px;
}

.pge_full_issue h2 {
    font-size: 1.3em;
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #c00;
    padding-bottom: 10px;
}

.pge_sections {
    margin-top: 20px;
}

.pge_section {
    margin-bottom: 30px;
}

.pge_section_title {
    font-size: 1.2em;
    color: #333;
    border-bottom: 2px solid #c00;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.pge_article_list {
    padding: 0;
    margin: 0;
}

/* ===== HEADER NÚMERO ACTUAL ESTILO PGE ===== */
.pge_issue_header {
    margin-bottom: 30px;
}

.pge_issue_header_row {
    display: flex;
    align-items: flex-start;
    gap: 25px;
}

.pge_issue_cover_small {
    flex-shrink: 0;
    width: 120px; /* aproximadamente 4cm */
}

.pge_issue_cover_small img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.pge_issue_info {
    flex: 1;
}

.pge_issue_label {
    font-size: 1.1em;
    color: #666;
    font-style: normal;
    margin-bottom: 5px;
}

.pge_issue_title {
    font-size: 1.5em;
    color: #333;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.pge_issue_date {
    color: #666;
    font-size: 0.95em;
}

/* ===== ACCESIBILIDAD WCAG 2.1 AA ===== */

/* Focus visible para navegación por teclado */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}

/* Focus visible en dropdowns */
.pge_dropdown a:focus,
.pge_nav_dropdown a:focus {
    outline: 2px solid #005fcc;
    background-color: rgba(0, 95, 204, 0.1);
}

/* Mejorar contraste - ajustar rojo para cumplir 4.5:1 */
.pge_top_bar a,
.pge_navigation_bar a {
    color: #fff;
}

/* Links del sidebar con color visible */
.pkp_structure_sidebar a {
    color: #c00;
}

.pge_navigation_bar a:focus {
    outline-color: #fff;
}

/* Links en contenido con mejor contraste */
.pge_article_title a,
.pge_main_content a {
    color: #0056b3;
}

.pge_article_title a:hover,
.pge_article_title a:focus {
    color: #003d7a;
    text-decoration: underline;
}

/* Ocultar visualmente pero accesible para lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip links más visibles cuando tienen focus */
.cmp_skip_to_content a:focus {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 9999;
    padding: 10px 15px;
    background: #005fcc;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* ===== JUSTIFICAR BIOGRAFÍA DEL AUTOR ===== */
.pge_bio_content {
    text-align: justify;
}

/* ===== ISSN FOOTER COLOR BLANCO ===== */
.pge_footer_issn,
.pge_footer_issn a {
    color: #fff !important;
}

/* ===== VISOR PDF ALTURA COMPLETA ===== */
.galley_view,
.galley_view_content,
.galley_view iframe,
#pdfCanvasContainer,
.pdfViewer,
#viewerContainer {
    min-height: 95vh !important;
    height: 95vh !important;
}

.galley_view_content object,
.galley_view_content embed,
.galley_view_content iframe {
    width: 100% !important;
    min-height: 95vh !important;
    height: 95vh !important;
}

/* Quitar padding/margin extra */
.galley_view {
    padding: 0 !important;
    margin: 0 !important;
}

body.pkp_op_view .pkp_structure_main {
    padding: 0 !important;
}

/* ===== FIX RESPONSIVE MÓVIL ===== */
@media (max-width: 768px) {
    /* Contenedor principal */
    body,
    .pkp_structure_page,
    .pkp_structure_content,
    .pkp_structure_main {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* Franjas del header */
    .pge_top_bar,
    .pkp_structure_head,
    .pge_navigation_bar {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .pge_top_bar_content,
    .pkp_head_wrapper,
    .pge_nav_content {
        padding: 10px 15px !important;
        flex-wrap: wrap !important;
    }
    
    /* Navegación en móvil */
    .pge_nav_content {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .pge_nav_content a,
    .pge_dropdown {
        font-size: 0.9em !important;
    }
    
    /* Buscador */
    .pge_search_wrapper {
        width: 100% !important;
        margin-top: 10px !important;
    }
    
    .pge_search_wrapper input {
        width: calc(100% - 50px) !important;
    }
    
    /* ISSN en dos líneas */
    .pge_issn {
        flex-direction: column !important;
        text-align: left !important;
    }
    
    /* Contenido */
    .page,
    .obj_article_details,
    .cmp_announcements {
        padding: 15px !important;
        word-wrap: break-word !important;
    }
}

/* ===== MENÚ MÓVIL COMPACTO ===== */
@media (max-width: 768px) {
    .pge_nav_content {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 5px 15px !important;
        padding: 10px !important;
    }
    
    .pge_nav_content > a,
    .pge_nav_content > .pge_dropdown > a {
        font-size: 0.85em !important;
        padding: 5px 8px !important;
    }
    
.pge_nav_dropdown .pge_dropdown_menu {
        display: none !important;
        position: relative !important;
        background: rgba(0,0,0,0.2) !important;
        box-shadow: none !important;
        padding-left: 15px !important;
    }
    
    .pge_nav_dropdown.is-open .pge_dropdown_menu {
        display: block !important;
    }
    
    .pge_nav_dropdown .pge_dropdown_menu a {
        color: #fff !important;
        padding: 8px 10px !important;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    }
    
    .pge_search_wrapper {
        width: 100% !important;
        order: 99 !important;
        margin-top: 10px !important;
    }
}

/* ===== FIX CONTENIDO MÓVIL ===== */
@media (max-width: 768px) {
    .pkp_structure_main,
    .pkp_structure_content,
    .page {
        padding: 10px !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .cmp_announcements,
    .obj_announcement_summary {
        width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }
    
    .cmp_announcements h2,
    .obj_announcement_summary h3,
    .obj_announcement_summary a {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    
    .pge_issue_header_row {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .pge_issue_cover_small {
        width: 80px !important;
    }
    
    .pge_article_summary {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .pge_article_pages {
        margin-left: 0 !important;
    }
    
    .pkp_structure_sidebar {
        display: none !important;
    }
}