/* Detecta el bloque personalizado nuevo y elimina doble título/marco interno */
@supports selector(:has(*)) {
    .pkp_structure_sidebar .pkp_block:has(.aes-sidebar-clean) {
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 6px 18px rgba(43, 158, 52, 0.12) !important;
        padding: 0 !important;
        margin-bottom: 22px !important;
    }

    .pkp_structure_sidebar .pkp_block:has(.aes-sidebar-clean) > .title,
    .pkp_structure_sidebar .pkp_block:has(.aes-sidebar-clean) > h2,
    .pkp_structure_sidebar .pkp_block:has(.aes-sidebar-clean) > h3 {
        display: none !important;
    }

    .pkp_structure_sidebar .pkp_block:has(.aes-sidebar-clean) .content {
        background: #ffffff !important;
        padding: 0 !important;
    }
}

/* Estructura general del bloque personalizado */
.aes-sidebar-clean {
    width: 100% !important;
    background: #ffffff !important;
    color: #374151 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    box-sizing: border-box !important;
}

/* Solo esta parte va en verde */
.aes-sidebar-clean .aes-sidebar-header {
    background: linear-gradient(135deg, #2b9e34, #3ebd47) !important;
    padding: 18px 16px !important;
    text-align: center !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
}

/* Título AES */
.aes-sidebar-clean .aes-sidebar-title {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
    font-weight: bold !important;
    color: #ffffff !important;
    background: transparent !important;
}

/* Subtítulo */
.aes-sidebar-clean .aes-sidebar-subtitle {
    margin: 5px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    font-weight: normal !important;
    color: #e5e7eb !important;
    background: transparent !important;
}

/* Cuerpo blanco */
.aes-sidebar-clean .aes-sidebar-section {
    background: #ffffff !important;
    padding: 16px 15px !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-sizing: border-box !important;
}

.aes-sidebar-clean .aes-sidebar-section:last-child {
    border-bottom: none !important;
}

/* Títulos internos: texto verde, fondo blanco */
.aes-sidebar-clean .aes-sidebar-section-title {
    background: #ffffff !important;
    margin: 0 0 12px !important;
    padding: 0 0 8px !important;
    border-bottom: 2px solid #2b9e34 !important;
    color: #2b9e34 !important;
    font-size: 15px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    line-height: 1.35 !important;
}

/* Botones de instructivos */
.aes-sidebar-clean .aes-sidebar-link {
    display: block !important;
    margin: 0 0 10px !important;
    padding: 11px 12px !important;
    background: #f2fbf3 !important;
    border-left: 5px solid #2b9e34 !important;
    border-radius: 6px !important;
    color: #2b9e34 !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: bold !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.aes-sidebar-clean .aes-sidebar-link:hover,
.aes-sidebar-clean .aes-sidebar-link:focus {
    background: #2b9e34 !important;
    color: #ffffff !important;
    border-left-color: #3ebd47 !important;
    text-decoration: none !important;
}

/* Tarjetas de logos */
.aes-sidebar-clean .aes-sidebar-card {
    display: block !important;
    margin: 0 0 10px !important;
    padding: 10px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
}

.aes-sidebar-clean .aes-sidebar-card:hover {
    background: #f9fafb !important;
    border-color: #3ebd47 !important;
    text-decoration: none !important;
}

.aes-sidebar-clean .aes-sidebar-card img,
.aes-sidebar-clean .aes-sidebar-counter img,
.aes-sidebar-clean .aes-sidebar-cert img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 62px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Certificación y contador */
.aes-sidebar-clean .aes-sidebar-cert,
.aes-sidebar-clean .aes-sidebar-counter {
    text-align: center !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
}

.aes-sidebar-clean .aes-sidebar-note {
    margin: 8px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #6b7280 !important;
    background: transparent !important;
}

/* =========================================================
BLINDAJE DEFINITIVO DEL BLOQUE PERSONALIZADO AES
Solo la cabecera queda verde; todo el cuerpo queda blanco.
Pegar al FINAL de custom.css
========================================================= */

#aes-sidebox,
#aes-sidebox * {
    box-sizing: border-box !important;
}

/* El bloque completo debe ser blanco */
#aes-sidebox {
    width: 100% !important;
    background: #ffffff !important;
    color: #374151 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

/* Si OJS envuelve el bloque personalizado en .pkp_block */
@supports selector(:has(*)) {
    .pkp_structure_sidebar .pkp_block:has(#aes-sidebox) {
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 6px 18px rgba(43, 158, 52, 0.12) !important;
        padding: 0 !important;
        margin-bottom: 22px !important;
    }

    .pkp_structure_sidebar .pkp_block:has(#aes-sidebox) .content {
        background: #ffffff !important;
        padding: 0 !important;
    }

    .pkp_structure_sidebar .pkp_block:has(#aes-sidebox) > .title,
    .pkp_structure_sidebar .pkp_block:has(#aes-sidebox) > h2,
    .pkp_structure_sidebar .pkp_block:has(#aes-sidebox) > h3 {
        display: none !important;
    }
}

/* Solo la cabecera será verde */
#aes-sidebox .aes-sidebox-header {
    background: linear-gradient(135deg, #2b9e34, #3ebd47) !important;
    padding: 18px 16px !important;
    text-align: center !important;
    color: #ffffff !important;
}

/* Título y subtítulo blancos */
#aes-sidebox .aes-sidebox-title {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1.2 !important;
    font-weight: bold !important;
    color: #ffffff !important;
    background: transparent !important;
}

#aes-sidebox .aes-sidebox-subtitle {
    margin: 5px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #e5e7eb !important;
    background: transparent !important;
}

/* Todas las secciones internas serán blancas */
#aes-sidebox .aes-sidebox-section {
    background: #ffffff !important;
    padding: 16px 15px !important;
    border-bottom: 1px solid #e5e7eb !important;
}

#aes-sidebox .aes-sidebox-section:last-child {
    border-bottom: none !important;
}

/* Títulos internos: fondo blanco, texto verde */
#aes-sidebox .aes-sidebox-section-title {
    background: #ffffff !important;
    color: #2b9e34 !important;
    margin: 0 0 12px !important;
    padding: 0 0 8px !important;
    border-bottom: 2px solid #2b9e34 !important;
    font-size: 15px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    line-height: 1.35 !important;
}

/* Enlaces de instructivos */
#aes-sidebox .aes-sidebox-link {
    display: block !important;
    margin: 0 0 10px !important;
    padding: 11px 12px !important;
    background: #f2fbf3 !important;
    border-left: 5px solid #2b9e34 !important;
    border-radius: 6px !important;
    color: #2b9e34 !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: bold !important;
    text-decoration: none !important;
}

#aes-sidebox .aes-sidebox-link:hover,
#aes-sidebox .aes-sidebox-link:focus {
    background: #2b9e34 !important;
    color: #ffffff !important;
    border-left-color: #3ebd47 !important;
    text-decoration: none !important;
}

/* Tarjetas de logos */
#aes-sidebox .aes-sidebox-card {
    display: block !important;
    margin: 0 0 10px !important;
    padding: 10px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    text-align: center !important;
    text-decoration: none !important;
}

#aes-sidebox .aes-sidebox-card:hover {
    background: #f9fafb !important;
    border-color: #3ebd47 !important;
    text-decoration: none !important;
}

#aes-sidebox .aes-sidebox-card img,
#aes-sidebox .aes-sidebox-cert img,
#aes-sidebox .aes-sidebox-counter img {
    max-width: 100% !important;
    height: auto !important;
    max-height: 62px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Certificación y contador */
#aes-sidebox .aes-sidebox-cert,
#aes-sidebox .aes-sidebox-counter {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 12px !important;
    text-align: center !important;
}

#aes-sidebox .aes-sidebox-note {
    background: transparent !important;
    margin: 8px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #6b7280 !important;
}

/* =========================================================
RESTAURAR DISEÑO DE BLOQUES NATIVOS OJS
Idioma / Palabras clave / Desarrollado por / Información / etc.
No afecta al bloque personalizado #aes-sidebox
Pegar al FINAL de custom.css
========================================================= */

/* Panel lateral general */
.pkp_structure_sidebar {
    font-family: Arial, Helvetica, sans-serif !important;
}

/* Bloques nativos del panel lateral */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)),
.pkp_block.block_language,
.pkp_block.block_keywords,
.pkp_block.block_information,
.pkp_block.block_make_submission,
.pkp_block.block_developed_by,
.pkp_block.block_browse {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 6px 18px rgba(43, 158, 52, 0.12) !important;
    margin-bottom: 22px !important;
    padding: 0 !important;
}

/* Títulos de bloques nativos */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) .title,
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) h2,
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) h3 {
    display: block !important;
    background: linear-gradient(135deg, #2b9e34, #3ebd47) !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    padding: 13px 15px !important;
    border: none !important;
    border-radius: 0 !important;
}

/* Contenido interno de bloques nativos */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) .content {
    padding: 15px !important;
    background: #ffffff !important;
    color: #374151 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    box-sizing: border-box !important;
}

/* Párrafos dentro de bloques nativos */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) p {
    color: #374151 !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    margin: 8px 0 !important;
}
/* Excepción para instructivos - TEXTO BLANCO */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) .editorDemoTable thead p {
    color: #ffffff !important;
}

/* Enlaces generales de bloques nativos */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) a {
    color: #2b9e34 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) a:hover,
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) a:focus {
    color: #3ebd47 !important;
    text-decoration: underline !important;
}

/* Listas de bloques nativos */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) ul li {
    margin: 0 0 8px !important;
    padding: 0 !important;
}

/* Enlaces tipo botón en listas de bloques nativos */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) ul li a {
    display: block !important;
    background: #f2fbf3 !important;
    border-left: 5px solid #2b9e34 !important;
    border-radius: 6px !important;
    padding: 10px 11px !important;
    color: #2b9e34 !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all .2s ease !important;
}

.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) ul li a:hover,
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) ul li a:focus {
    background: #2b9e34 !important;
    color: #ffffff !important;
    border-left-color: #3ebd47 !important;
    text-decoration: none !important;
}

/* Bloque Idioma */
.pkp_block.block_language ul li a {
    background: #f2fbf3 !important;
    border-left: 5px solid #2b9e34 !important;
    color: #2b9e34 !important;
    border-radius: 6px !important;
}

.pkp_block.block_language ul li a:hover,
.pkp_block.block_language ul li a:focus {
    background: #2b9e34 !important;
    color: #ffffff !important;
}

/* Bloque Palabras clave */
.pkp_block.block_keywords a,
.pkp_structure_sidebar .block_keywords a,
.pkp_structure_sidebar .keyword_cloud a,
.pkp_structure_sidebar .tag-cloud a {
    display: inline-block !important;
    margin: 4px 3px !important;
    padding: 6px 9px !important;
    background: #f2fbf3 !important;
    color: #2b9e34 !important;
    border: 1px solid #d4edda !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.pkp_block.block_keywords a:hover,
.pkp_structure_sidebar .block_keywords a:hover,
.pkp_structure_sidebar .keyword_cloud a:hover,
.pkp_structure_sidebar .tag-cloud a:hover {
    background: #2b9e34 !important;
    color: #ffffff !important;
    border-color: #2b9e34 !important;
    text-decoration: none !important;
}

/* Bloque Desarrollado por */
.pkp_block.block_developed_by {
    text-align: center !important;
}

.pkp_block.block_developed_by .content {
    background: #f9fafb !important;
}

/* Bloque Enviar artículo / Make Submission */
.pkp_block.block_make_submission a,
.pkp_structure_sidebar .block_make_submission a {
    display: block !important;
    background: #2b9e34 !important;
    color: #ffffff !important;
    text-align: center !important;
    border-radius: 8px !important;
    padding: 12px 14px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(43, 158, 52, 0.18) !important;
}

.pkp_block.block_make_submission a:hover,
.pkp_structure_sidebar .block_make_submission a:hover {
    background: #3ebd47 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Formularios dentro de bloques nativos */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) select,
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) input[type="text"],
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) input[type="search"] {
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 9px 10px !important;
    color: #374151 !important;
    background: #ffffff !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}

.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) button,
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) input[type="submit"],
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) .button {
    background: #2b9e34 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 9px 13px !important;
    font-size: 14px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) button:hover,
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) input[type="submit"]:hover,
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) .button:hover {
    background: #3ebd47 !important;
    color: #ffffff !important;
}

/* Imágenes en bloques nativos */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Responsive */
@media (max-width: 768px) {
    .pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) {
        margin-bottom: 18px !important;
        border-radius: 10px !important;
    }

    .pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) .title,
    .pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) h2,
    .pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) h3 {
        font-size: 14px !important;
        padding: 12px 14px !important;
    }

    .pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) .content {
        padding: 14px !important;
    }
}

/* =========================================================
FLAG COUNTER - AES POR EL MUNDO (DENTRO DE #aes-sidebox)
========================================================= */

/* Contenedor del Flag Counter - IGUAL QUE CONRADO */
#aes-sidebox .aes-sidebox-counter {
    text-align: center !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    margin: 0 0 15px 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Título "AES POR EL MUNDO" - IGUAL QUE CONRADO */
#aes-sidebox .aes-sidebox-counter::before {
    content: 'AES POR EL MUNDO' !important;
    display: block !important;
    background: linear-gradient(135deg, #2b9e34, #3ebd47) !important;
    padding: 10px 0 !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    line-height: 1.35 !important;
    color: #ffffff !important;
    margin: -12px -12px 12px -12px !important;
    border-radius: 8px 8px 0 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Imagen del Flag Counter - IGUAL QUE CONRADO */
#aes-sidebox .aes-sidebox-counter img {
    width: 100% !important;
    max-width: 260px !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    margin: 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Enlace que contiene la imagen */
#aes-sidebox .aes-sidebox-counter a {
    display: block !important;
    text-decoration: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Nota debajo del contador - IGUAL QUE CONRADO */
#aes-sidebox .aes-sidebox-note {
    margin: 8px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #6b7280 !important;
    background: transparent !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* =========================================================
FLAG COUNTER - AES POR EL MUNDO (DENTRO DE aes-sidebar-section)
========================================================= */

/* Contenedor del Flag Counter dentro de la sección AES */
.aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter {
    text-align: center !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Título "AES POR EL MUNDO" */
.aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter::before {
    content: 'AES POR EL MUNDO' !important;
    display: block !important;
    background: linear-gradient(135deg, #2b9e34, #3ebd47) !important;
    padding: 10px 0 !important;
    text-align: center !important;
    font-size: 15px !important;
    font-weight: bold !important;
    text-transform: uppercase !important;
    letter-spacing: .5px !important;
    line-height: 1.35 !important;
    color: #ffffff !important;
    margin: -12px -12px 12px -12px !important;
    border-radius: 8px 8px 0 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Imagen del Flag Counter */
.aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter img {
    width: 100% !important;
    max-width: 260px !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    margin: 0 auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 50px !important;
}

/* Enlace que contiene la imagen */
.aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter a {
    display: block !important;
    text-decoration: none !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Nota debajo del contador */
.aes-sidebar-clean .aes-sidebar-section .aes-sidebox-note {
    margin: 8px 0 0 !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    color: #6b7280 !important;
    background: transparent !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* =========================================================
FORZAR VISIBILIDAD - ELIMINAR RESTRICCIONES DE OJS
========================================================= */

/* Forzar que todo lo relacionado con el Flag Counter sea visible */
.aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter,
.aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter *,
.aes-sidebar-clean .aes-sidebar-section .aes-sidebox-note {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    position: relative !important;
    z-index: 999 !important;
}

/* Forzar que la imagen sea visible y tenga tamaño */
.aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 260px !important;
    height: auto !important;
    max-height: none !important;
    min-height: 50px !important;
    margin: 0 auto !important;
    padding: 5px 0 !important;
    background: transparent !important;
}

/* =========================================================
RESPONSIVE
========================================================= */

@media (max-width: 768px) {
    .aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter::before {
        font-size: 14px !important;
        padding: 8px 0 !important;
    }
    
    .aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter img {
        max-width: 220px !important;
    }
}

@media (max-width: 480px) {
    .aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter::before {
        font-size: 13px !important;
        padding: 7px 0 !important;
    }
    
    .aes-sidebar-clean .aes-sidebar-section .aes-sidebox-counter img {
        max-width: 180px !important;
    }
}
/* =========================================================
ELIMINAR RESTRICCIONES DE OJS - SELECTORES ESPECÍFICOS
========================================================= */

/* Eliminar cualquier restricción de OJS en párrafos que contengan flagcounter */
.pkp_structure_sidebar p:has(img[src*="flagcounter"]),
.pkp_structure_sidebar .content p:has(img[src*="flagcounter"]),
.pkp_block .content p:has(img[src*="flagcounter"]),
.content p:has(img[src*="flagcounter"]) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 50px !important;
    overflow: visible !important;
    padding: 10px !important;
    margin: 10px 0 !important;
    background: #ffffff !important;
}

/* Eliminar cualquier restricción de OJS en imágenes flagcounter */
.pkp_structure_sidebar img[src*="flagcounter"],
.pkp_block .content img[src*="flagcounter"],
.content img[src*="flagcounter"],
img[src*="flagcounter"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    min-width: 100px !important;
    min-height: 50px !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 10px !important;
    background: transparent !important;
}

/* Eliminar restricciones en enlaces que contienen flagcounter */
.pkp_structure_sidebar a:has(img[src*="flagcounter"]),
.pkp_block .content a:has(img[src*="flagcounter"]),
.content a:has(img[src*="flagcounter"]) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    text-decoration: none !important;
    padding: 5px !important;
    background: transparent !important;
}
/* =========================================================
MEJORA VISUAL PARA LOGO CITMA EN BLOQUE PERSONALIZADO
Pegar al final de custom.css
========================================================= */

/* Contenedor del logo - centrado y con padding */
#aes-sidebox .aes-sidebox-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px 15px !important;
    min-height: 100px !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    text-align: center !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

/* Imagen del logo - tamaño optimizado */
#aes-sidebox .aes-sidebox-card img {
    max-width: 85% !important;
    width: auto !important;
    height: auto !important;
    max-height: 80px !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    filter: none !important;
    background: transparent !important;
}

/* Hover effect más sutil */
#aes-sidebox .aes-sidebox-card:hover {
    background: #f8faff !important;
    border-color: #2b9e34 !important;
    box-shadow: 0 4px 12px rgba(43, 158, 52, 0.08) !important;
    transform: translateY(-2px) !important;
}

/* Para imágenes transparentes o con fondo */
#aes-sidebox .aes-sidebox-card img.transparent {
    background: transparent !important;
    mix-blend-mode: normal !important;
}

/* Si hay textos dentro de la tarjeta */
#aes-sidebox .aes-sidebox-card p {
    margin: 5px 0 0 0 !important;
    font-size: 13px !important;
    color: #374151 !important;
    line-height: 1.4 !important;
}

/* Alternativa para múltiples logos en una tarjeta */
#aes-sidebox .aes-sidebox-card .logo-group {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
    align-items: center !important;
}

#aes-sidebox .aes-sidebox-card .logo-group img {
    max-height: 55px !important;
    max-width: 40% !important;
}

/* Responsive - ajuste en móviles */
@media (max-width: 768px) {
    #aes-sidebox .aes-sidebox-card {
        padding: 15px 10px !important;
        min-height: 80px !important;
    }
    
    #aes-sidebox .aes-sidebox-card img {
        max-height: 65px !important;
        max-width: 90% !important;
    }
}

/* =========================================================
BLOQUE CITMA - LOGO CENTRADO VERTICALMENTE
========================================================= */

/* Contenedor principal del bloque CITMA */
.content center,
.aes-sidebar-section center,
#aes-sidebox center {
    display: flex !important;
    flex-direction: column !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
}



/* Párrafo del logo - centrado verticalmente */
.content center p,
.aes-sidebar-section center p,
#aes-sidebox center p {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    min-height: 70px !important;
}

/* Logo CITMA - más grande y centrado */
.content center img,
.aes-sidebar-section center img,
#aes-sidebox center img,
.content center img.transparent,
.aes-sidebar-section center img.transparent,
#aes-sidebox center img.transparent {
    max-width: 75% !important;
    max-height: 75px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 6px 0 !important;
    background: transparent !important;
    object-fit: contain !important;
    transition: all 0.3s ease !important;
}

/* Hover del logo */
.content center img:hover,
.aes-sidebar-section center img:hover,
#aes-sidebox center img:hover {
    transform: scale(1.05) !important;
    filter: brightness(1.05) !important;
}
/* =========================================================
RESPONSIVE - CITMA
========================================================= */

@media (max-width: 768px) {
    .content center img,
    .aes-sidebar-section center img,
    #aes-sidebox center img {
        max-height: 60px !important;
    }
    
    .content center::before,
    .aes-sidebar-section center::before,
    #aes-sidebox center::before {
        font-size: 12px !important;
        padding: 4px 0 !important;
    }
    
    .content center p,
    .aes-sidebar-section center p,
    #aes-sidebox center p {
        padding: 5px 8px !important;
    }
}

@media (max-width: 480px) {
    .content center img,
    .aes-sidebar-section center img,
    #aes-sidebox center img {
        max-height: 50px !important;
    }
    
    .content center::before,
    .aes-sidebar-section center::before,
    #aes-sidebox center::before {
        font-size: 11px !important;
        padding: 3px 0 !important;
    }
    
    .content center p,
    .aes-sidebar-section center p,
    #aes-sidebox center p {
        padding: 4px 6px !important;
    }
}
/* =========================================================
INDEXACIONES - SIN SOMBRA, ANCHO COMPLETO, LOGOS DESTACADOS
========================================================= */

/* Contenedor del bloque de indexaciones - encabezado */
.content > div[style*="color: #3a87ad"],
.aes-sidebar-section > div[style*="color: #3a87ad"],
#aes-sidebox > div[style*="color: #3a87ad"] {
    display: block !important;
    background: linear-gradient(135deg, #2b9e34, #3ebd47) !important;
    border-radius: 10px 10px 0 0 !important;
    padding: 8px 0 !important;
    margin: 0 !important;
    text-align: center !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    text-shadow: none !important;
    border: none !important;
    line-height: 1.4 !important;
}

/* =========================================================
INDEXACIONES - MOSTRAR "INDEXADA EN:" EN EL ENCABEZADO VERDE
Solo se oculta el texto del div del logo CITMA (el que tiene <img>).
El div de "Indexada en:" conserva su texto y lo muestra en blanco.
========================================================= */

/* Ocultar SOLO el texto del div del logo CITMA (contiene una imagen) */
.content > div[style*="color: #3a87ad"]:has(img),
.aes-sidebar-section > div[style*="color: #3a87ad"]:has(img),
#aes-sidebox > div[style*="color: #3a87ad"]:has(img) {
    font-size: 0 !important;
    color: transparent !important;
}


/* Tabla de indexaciones - SIN SOMBRA, ANCHO COMPLETO */
.content > div[style*="color: #3a87ad"] + table,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table,
#aes-sidebox > div[style*="color: #3a87ad"] + table {
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid #e5e7eb !important;
    border-top: none !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    border-radius: 0 0 10px 10px !important;
    display: table !important;
    box-shadow: none !important;
}

/* Filas de la tabla */
.content > div[style*="color: #3a87ad"] + table tr,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table tr,
#aes-sidebox > div[style*="color: #3a87ad"] + table tr {
    background: transparent !important;
}

/* Ocultar filas vacías */
.content > div[style*="color: #3a87ad"] + table tr:has(td:empty),
.aes-sidebar-section > div[style*="color: #3a87ad"] + table tr:has(td:empty),
#aes-sidebox > div[style*="color: #3a87ad"] + table tr:has(td:empty) {
    display: none !important;
}

.content > div[style*="color: #3a87ad"] + table tr:has(td[colspan]):has(td:empty),
.aes-sidebar-section > div[style*="color: #3a87ad"] + table tr:has(td[colspan]):has(td:empty),
#aes-sidebox > div[style*="color: #3a87ad"] + table tr:has(td[colspan]):has(td:empty) {
    display: none !important;
}

/* Celdas de la tabla - sin padding lateral para ancho completo */
.content > div[style*="color: #3a87ad"] + table td,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table td,
#aes-sidebox > div[style*="color: #3a87ad"] + table td {
    border: none !important;
    padding: 10px 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
    background: transparent !important;
}

/* Enlaces de indexaciones */
.content > div[style*="color: #3a87ad"] + table a,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a,
#aes-sidebox > div[style*="color: #3a87ad"] + table a {
    display: block !important;
    text-decoration: none !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

/* Logos de indexaciones - tamaño estándar */
.content > div[style*="color: #3a87ad"] + table img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table img,
#aes-sidebox > div[style*="color: #3a87ad"] + table img {
    max-width: 100% !important;
    max-height: 65px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 6px !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    object-fit: contain !important;
    transition: all 0.3s ease !important;
}

/* LOGO CLARIVATE (ESCI) - MÁS GRANDE */
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="clarivate"]) img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="wos"]) img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="emerging"]) img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="clarivate"]) img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="wos"]) img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="emerging"]) img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="clarivate"]) img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="wos"]) img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="emerging"]) img {
    max-height: 110px !important;
    padding: 8px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
}

/* LOGO SciELO - SIN BORDE VERDE */
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="Scielo"]) img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="Scielo"]) img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="Scielo"]) img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img {
    max-height: 85px !important;
    padding: 8px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
}
/* =========================================================
HOVER DE LOGOS - IGUAL PARA TODOS
========================================================= */

/* Hover de logos estándar */
.content > div[style*="color: #3a87ad"] + table a:hover img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:hover img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:hover img {
    border-color: #2b9e34 !important;
    box-shadow: 0 4px 15px rgba(43, 158, 52, 0.15) !important;
    transform: translateY(-3px) !important;
    background: #ffffff !important;
}

/* Hover de logos destacados (ESCI y SciELO) - mismo efecto que los demás */
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]):hover img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="clarivate"]):hover img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]):hover img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="Scielo"]):hover img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]):hover img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]):hover img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]):hover img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]):hover img {
    border-color: #2b9e34 !important;
    box-shadow: 0 4px 15px rgba(43, 158, 52, 0.15) !important;
    transform: translateY(-3px) !important;
    background: #ffffff !important;
}
/* =========================================================
RESPONSIVE - INDEXACIONES
========================================================= */

@media (max-width: 768px) {
    .content > div[style*="color: #3a87ad"] + table td,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table td,
    #aes-sidebox > div[style*="color: #3a87ad"] + table td {
        padding: 8px 0 !important;
    }
    
    .content > div[style*="color: #3a87ad"] + table img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table img {
        max-height: 55px !important;
        padding: 5px !important;
    }
    
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img,
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img {
        max-height: 85px !important;
        padding: 6px !important;
    }
}

@media (max-width: 480px) {
    .content > div[style*="color: #3a87ad"] + table td,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table td,
    #aes-sidebox > div[style*="color: #3a87ad"] + table td {
        padding: 6px 0 !important;
    }
    
    .content > div[style*="color: #3a87ad"] + table img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table img {
        max-height: 45px !important;
        padding: 4px !important;
    }
    
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img,
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img {
        max-height: 75px !important;
        padding: 5px !important;
    }
}
/* =========================================================
OCULTAR DIV VACÍO
========================================================= */

#dc_vk_code {
    display: none !important;
}

/* =========================================================
FLAG COUNTER POR ID - 100% SEGURO
========================================================= */

#flag-counter-aes {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    text-align: center !important;
    min-height: 130px !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    z-index: 9999 !important;
}

#flag-counter-aes::before {
    content: 'AES POR EL MUNDO' !important;
    display: block !important;
    background: linear-gradient(135deg, #2b9e34, #3ebd47) !important;
    padding: 12px 0 !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    line-height: 1.4 !important;
}

#flag-counter-aes p {
    display: block !important;
    margin: 0 !important;
    padding: 10px 5px !important;
    background: #ffffff !important;
}

#flag-counter-aes a {
    display: block !important;
    text-decoration: none !important;
    padding: 5px !important;
    background: #ffffff !important;
}

#flag-counter-aes img {
    display: block !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 5px !important;
    background: transparent !important;
    border-radius: 4px !important;
    min-height: 50px !important;
}

#flag-counter-aes img:hover {
    transform: scale(1.02) !important;
    filter: brightness(1.02) !important;
}

@media (max-width: 768px) {
    #flag-counter-aes::before {
        font-size: 14px !important;
        padding: 10px 0 !important;
    }
}

@media (max-width: 480px) {
    #flag-counter-aes::before {
        font-size: 13px !important;
        padding: 8px 0 !important;
    }
}
/* =========================================================
AJUSTES RESPONSIVE
========================================================= */

@media (max-width: 768px) {
    /* CITMA */
    .content center img,
    .aes-sidebar-section center img,
    #aes-sidebox center img {
        max-height: 65px !important;
    }
    
    .content center::before,
    .aes-sidebar-section center::before,
    #aes-sidebox center::before {
        font-size: 14px !important;
        padding: 8px 0 !important;
    }
    
    /* Indexaciones */
    .content > div[style*="color: #3a87ad"]::after,
    .aes-sidebar-section > div[style*="color: #3a87ad"]::after,
    #aes-sidebox > div[style*="color: #3a87ad"]::after {
        font-size: 14px !important;
    }
    
    .content > div[style*="color: #3a87ad"] + table img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table img {
        max-height: 42px !important;
        padding: 4px !important;
    }

    /* Flag Counter */
    .content p:has(img[src*="flagcounter"])::before {
        font-size: 14px !important;
        padding: 8px 0 !important;
    }
}

@media (max-width: 480px) {
    /* CITMA */
    .content center img,
    .aes-sidebar-section center img,
    #aes-sidebox center img {
        max-height: 55px !important;
    }
    
    .content center::before,
    .aes-sidebar-section center::before,
    #aes-sidebox center::before {
        font-size: 13px !important;
        padding: 7px 0 !important;
    }
    
    /* Indexaciones */
    .content > div[style*="color: #3a87ad"]::after,
    .aes-sidebar-section > div[style*="color: #3a87ad"]::after,
    #aes-sidebox > div[style*="color: #3a87ad"]::after {
        font-size: 13px !important;
    }
    
    .content > div[style*="color: #3a87ad"] + table img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table img {
        max-height: 35px !important;
        padding: 3px !important;
    }

    /* Flag Counter */
    .content p:has(img[src*="flagcounter"])::before {
        font-size: 13px !important;
        padding: 7px 0 !important;
    }
}

/* =========================================================
BLOQUE DE INSTRUCTIVOS - ESTILO PROFESIONAL CON TEXTO BLANCO
Pegar al final de custom.css
========================================================= */

/* Contenedor principal del bloque de instructivos */
.editorDemoTable {
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    border-collapse: collapse !important;
    margin: 0 0 15px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    display: block !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

/* Encabezado - verde con texto en blanco */
.editorDemoTable thead {
    display: block !important;
    background: linear-gradient(135deg, #2b9e34, #3ebd47) !important;
    padding: 10px 0 !important;
    text-align: center !important;
    border-radius: 10px 10px 0 0 !important;
}

/* Mantener visible el texto del encabezado */
.editorDemoTable thead tr {
    display: block !important;
}

.editorDemoTable thead td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
}

/* Estilo del título "INSTRUCTIVOS" - TEXTO BLANCO */
.editorDemoTable thead td p {
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    line-height: 1.4 !important;
    background: transparent !important;
}

/* Ocultar los enlaces dentro del thead - los moveremos */
.editorDemoTable thead td p strong a {
    display: none !important;
}

/* Cuerpo del bloque - donde irán los enlaces */
.editorDemoTable tbody {
    display: block !important;
    background: #ffffff !important;
    padding: 0 !important;
    border: 1px solid #e5e7eb !important;
    border-top: none !important;
    border-radius: 0 0 10px 10px !important;
}

.editorDemoTable tbody tr {
    display: block !important;
}

.editorDemoTable tbody td {
    display: block !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* Los enlaces se muestran como lista */
.editorDemoTable tbody td p {
    margin: 0 !important;
    padding: 0 !important;
}

.editorDemoTable tbody td p strong a {
    display: block !important;
    padding: 12px 15px !important;
    background: #f8faff !important;
    border-left: 4px solid #2b9e34 !important;
    border-radius: 0 !important;
    color: #2b9e34 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    border-bottom: 1px solid #f0f2f5 !important;
}

/* Último enlace sin borde inferior */
.editorDemoTable tbody td p:last-child strong a {
    border-bottom: none !important;
    border-radius: 0 0 10px 10px !important;
}

/* Primer enlace con borde redondeado superior */
.editorDemoTable tbody td p:first-child strong a {
    border-radius: 0 !important;
}

/* Hover de enlaces */
.editorDemoTable tbody td p strong a:hover {
    background: #2b9e34 !important;
    color: #ffffff !important;
    border-left-color: #3ebd47 !important;
    padding-left: 20px !important;
}

/* =========================================================
AJUSTE RESPONSIVE PARA INSTRUCTIVOS
========================================================= */

@media (max-width: 768px) {
    .editorDemoTable thead td p {
        font-size: 14px !important;
        padding: 8px 0 !important;
    }
    
    .editorDemoTable tbody td p strong a {
        font-size: 13px !important;
        padding: 10px 12px !important;
    }
}

@media (max-width: 480px) {
    .editorDemoTable thead td p {
        font-size: 13px !important;
        padding: 7px 0 !important;
    }
    
    .editorDemoTable tbody td p strong a {
        font-size: 12px !important;
        padding: 9px 10px !important;
    }
}

/* Selector más específico */
.pkp_block.block_language h2.title,
.pkp_block.block_language h2,
.pkp_block.block_language .title {
    text-align: center !important;
}

/* Centrar todos los títulos de bloques nativos */
.pkp_structure_sidebar .pkp_block .title,
.pkp_structure_sidebar .pkp_block h2,
.pkp_structure_sidebar .pkp_block h3 {
    text-align: center !important;
}
/* =========================================================
INDEXACIONES - ALINEAR LOGOS AL CENTRO Y RECUPERAR RECUADRO
========================================================= */

/* Tabla de indexaciones - centrar */
.content > div[style*="color: #ffffff"] + table,
.content > div[style*="color: #3a87ad"] + table,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table,
#aes-sidebox > div[style*="color: #3a87ad"] + table {
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid #e5e7eb !important;
    border-top: none !important;
    border-collapse: collapse !important;
    margin: 0 !important;
    padding: 10px 0 !important;
    background: #ffffff !important;
    border-radius: 0 0 10px 10px !important;
    display: table !important;
    box-shadow: none !important;
}

/* Filas de la tabla */
.content > div[style*="color: #ffffff"] + table tr,
.content > div[style*="color: #3a87ad"] + table tr,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table tr,
#aes-sidebox > div[style*="color: #3a87ad"] + table tr {
    background: transparent !important;
    text-align: center !important;
}

/* Celdas de la tabla - centradas */
.content > div[style*="color: #ffffff"] + table td,
.content > div[style*="color: #3a87ad"] + table td,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table td,
#aes-sidebox > div[style*="color: #3a87ad"] + table td {
    border: none !important;
    padding: 10px 0 !important;
    text-align: center !important;
    vertical-align: middle !important;
    background: transparent !important;
}

/* Enlaces de indexaciones */
.content > div[style*="color: #ffffff"] + table a,
.content > div[style*="color: #3a87ad"] + table a,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a,
#aes-sidebox > div[style*="color: #3a87ad"] + table a {
    display: block !important;
    text-decoration: none !important;
    padding: 4px 0 !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

/* Imágenes de indexaciones - con recuadro y centradas */
.content > div[style*="color: #ffffff"] + table img,
.content > div[style*="color: #3a87ad"] + table img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table img,
#aes-sidebox > div[style*="color: #3a87ad"] + table img {
    max-width: 100% !important;
    max-height: 65px !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 6px !important;
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    object-fit: contain !important;
    transition: all 0.3s ease !important;
}

/* Efecto hover - recuadro verde */
.content > div[style*="color: #ffffff"] + table a:hover img,
.content > div[style*="color: #3a87ad"] + table a:hover img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:hover img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:hover img {
    border-color: #2b9e34 !important;
    box-shadow: 0 4px 15px rgba(43, 158, 52, 0.15) !important;
    transform: translateY(-3px) !important;
    background: #ffffff !important;
}

/* LOGO ESCI - más grande (110px) */
.content > div[style*="color: #ffffff"] + table a:has(img[src*="ESCI"]) img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img {
    max-height: 110px !important;
    padding: 8px !important;
}

/* LOGO SciELO - intermedio (85px) */
.content > div[style*="color: #ffffff"] + table a:has(img[src*="scielo"]) img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img {
    max-height: 85px !important;
    padding: 8px !important;
}

/* =========================================================
RESPONSIVE
========================================================= */

@media (max-width: 768px) {
    .content > div[style*="color: #ffffff"] + table img,
    .content > div[style*="color: #3a87ad"] + table img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table img {
        max-height: 55px !important;
        padding: 5px !important;
    }
    
    .content > div[style*="color: #ffffff"] + table a:has(img[src*="ESCI"]) img,
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img {
        max-height: 85px !important;
    }
    
    .content > div[style*="color: #ffffff"] + table a:has(img[src*="scielo"]) img,
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img {
        max-height: 70px !important;
    }
}

@media (max-width: 480px) {
    .content > div[style*="color: #ffffff"] + table img,
    .content > div[style*="color: #3a87ad"] + table img,
    .aes-sidebar-section > div[style*="color: #3a87ad"] + table img,
    #aes-sidebox > div[style*="color: #3a87ad"] + table img {
        max-height: 45px !important;
        padding: 4px !important;
    }
    
    .content > div[style*="color: #ffffff"] + table a:has(img[src*="ESCI"]) img,
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="ESCI"]) img {
        max-height: 75px !important;
    }
    
    .content > div[style*="color: #ffffff"] + table a:has(img[src*="scielo"]) img,
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="scielo"]) img {
        max-height: 60px !important;
    }
}

/* =========================================================
INSTRUCTIVOS - SOBRESCRIBIR REGLA EXISTENTE
========================================================= */

/* Esta regla sobrescribe la que ya existe */
.pkp_structure_sidebar .pkp_block:not(:has(#aes-sidebox)) .editorDemoTable tbody td p strong a:hover {
    color: #ffffff !important;
    background: #2b9e34 !important;
    border-left-color: #3ebd47 !important;
    text-decoration: none !important;
}

/* =========================================================
LOGO WOS-JOURNAL.INFO - MÁS GRANDE QUE ESCI Y SCIELO
========================================================= */

/* Hacer que el logo de WOS-Journal.info sea el más grande */
.content > div[style*="color: #ffffff"] + table a:has(img[title="WOS-Journal.info"]) img,
.content > div[style*="color: #3a87ad"] + table a:has(img[title="WOS-Journal.info"]) img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[title="WOS-Journal.info"]) img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[title="WOS-Journal.info"]) img,
.editorDemoTable a:has(img[title="WOS-Journal.info"]) img,
.pkp_block .content a:has(img[title="WOS-Journal.info"]) img {
    max-height: 130px !important; /* Más grande que ESCI (110px) */
    padding: 8px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
}

/* También por si el título no funciona, usar el src */
.content > div[style*="color: #ffffff"] + table a:has(img[src*="wos-journal"]) img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="wos-journal"]) img,
.aes-sidebar-section > div[style*="color: #3a87ad"] + table a:has(img[src*="wos-journal"]) img,
#aes-sidebox > div[style*="color: #3a87ad"] + table a:has(img[src*="wos-journal"]) img,
.editorDemoTable a:has(img[src*="wos-journal"]) img,
.pkp_block .content a:has(img[src*="wos-journal"]) img {
    max-height: 130px !important;
    padding: 8px !important;
    border: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
}

/* Hover effect igual que los demás */
.content > div[style*="color: #ffffff"] + table a:has(img[src*="wos-journal"]):hover img,
.content > div[style*="color: #3a87ad"] + table a:has(img[src*="wos-journal"]):hover img {
    border-color: #2b9e34 !important;
    box-shadow: 0 4px 15px rgba(43, 158, 52, 0.15) !important;
    transform: translateY(-3px) !important;
    background: #ffffff !important;
}

/* =========================================================
RESPONSIVE - WOS JOURNAL
========================================================= */

@media (max-width: 768px) {
    .content > div[style*="color: #ffffff"] + table a:has(img[src*="wos-journal"]) img,
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="wos-journal"]) img {
        max-height: 100px !important;
    }
}

@media (max-width: 480px) {
    .content > div[style*="color: #ffffff"] + table a:has(img[src*="wos-journal"]) img,
    .content > div[style*="color: #3a87ad"] + table a:has(img[src*="wos-journal"]) img {
        max-height: 85px !important;
    }
}

/* =========================================================
FOOTER A TODO EL ANCHO DE LA PÁGINA (Agroecosistemas)
========================================================= */

/* 1) El wrapper exterior ocupa todo el ancho, sin límites */
.pkp_structure_footer_wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #f8fbf8 !important;
}

/* 2) El contenedor interno del footer: anular max-width del tema */
.pkp_structure_footer {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

/* 3) El bloque de contenido personalizado también a todo el ancho */
.pkp_footer_content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

/* 4) El bloque personalizado (el div con el degradado verde) a todo el ancho */
.pkp_footer_content > div {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;   /* sin esquinas redondeadas cuando va a todo lo ancho */
    box-sizing: border-box !important;
}

/* 5) El logo OJS/PKP: centrado, con aire, sobre fondo claro */
.pkp_brand_footer {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    padding: 18px 0 22px 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

.pkp_brand_footer a {
    display: inline-block !important;
    text-decoration: none !important;
}

.pkp_brand_footer img {
    display: inline-block !important;
    max-height: 55px !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    filter: none !important;
}

/* 6) Responsive: en móviles, un poco de padding lateral para que no pegue al borde */
@media (max-width: 768px) {
    .pkp_footer_content > div {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}