/* ==========================================================================
   1. CONFIGURACIÓN DE LA CABECERA Y ELEMENTOS VISUALES (GENERAL Y PC)
   ========================================================================== */

/* Cabecera con la imagen de fondo panorámica */
header.pkp_structure_head {
    background-image: url("https://journals.uted.us/ojs/public/journals/2/homepageImage_es.jpg") !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    min-height: 350px !important; 
    display: flex !important;
    flex-direction: column !important;
    position: relative !important; 
    /* Mantiene el bloque del banner empujado hacia abajo */
    margin-top: 40px !important; 
    margin-bottom: 50px !important; /* Colchón para separar el contenido inferior en PC */
}

/* Ocultar el logotipo principal de la cabecera por completo para limpiar el banner */
.pkp_site_name_wrapper, 
.pkp_head_wrapper .pkp_site_name {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Transparencia para los bloques residuales del centro de la cabecera */
.pkp_head_wrapper {
    background: transparent !important;
}

/* ==========================================================================
   2. INYECTAR EL MENÚ ABAJO (PARA PC)
   ========================================================================== */

header.pkp_structure_head .pkp_navigation_primary_wrapper,
.pkp_navigation_primary_wrapper {
    position: absolute !important;
    /* Forzamos a que se dibuje exactamente a los 350px del alto del banner */
    top: 350px !important; 
    left: 0 !important;
    bottom: auto !important;
    
    width: 100% !important;
    max-width: 100% !important;
    height: 50px !important; /* Alto estándar de la barra de menú */
    
    background-color: #0c2340 !important; /* Tu azul oscuro */
    margin: 0 !important;
    z-index: 9999 !important;

    /* Márgenes internos para despegar los elementos de las esquinas */
    box-sizing: border-box !important; 
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 5% !important;  
    padding-right: 5% !important; 
}

/* ==========================================================================
   3. REDISEÑO HORIZONTAL: NÚMERO ACTUAL Y SOBRE LA REVISTA (TRES COLUMNAS)
   ========================================================================== */

@media (min-width: 768px) {
    /* Contenedor padre general de la página de inicio en OJS 3 */
    .pkp_structure_main .page_index_journal,
    #main-content .page_index_journal {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        gap: 0px !important;
        margin-top: 30px !important;
        width: 100% !important;
    }

    /* COLUMNA 3 (Derecha): SOBRE LA REVISTA */
    .page_index_journal .obj_journal_description {
        width: 35% !important;
        order: 3 !important; /* Lo empuja a la derecha */
        padding-left: 25px !important;
        box-sizing: border-box !important;
        margin-top: 0 !important;
    }

    /* COLUMNA INTERNA 1 y 2 (Izquierda y Centro): NÚMERO ACTUAL */
    .page_index_journal .index_current_issue {
        width: 63% !important;
        order: 1 !important; 
        margin-top: 0 !important;
    }

    /* Aplicamos flex-reverse estrictamente a la cabecera del número actual */
    .page_index_journal .index_current_issue .obj_issue_toc > .issue_info {
        display: flex !important;
        flex-direction: row-reverse !important; 
        justify-content: space-between !important;
        align-items: flex-start !important;
    }

    /* COLUMNA 2 (Centro): Portada del número con líneas divisorias */
    .page_index_journal .index_current_issue .cover {
        width: 45% !important;
        text-align: center !important;
        padding: 0 25px !important;
        border-left: 2px solid #0c2340 !important;
        border-right: 2px solid #0c2340 !important;
        box-sizing: border-box !important;
        margin-bottom: 0 !important;
    }

    .page_index_journal .index_current_issue .cover img {
        max-width: 100% !important;
        height: auto !important;
        display: inline-block !important;
    }

    /* COLUMNA 1 (Izquierda): CORREGIDO para evitar afectar bloques internos accidentales */
    .page_index_journal .index_current_issue .issue_info > .details,
    .page_index_journal .index_current_issue .description {
        width: 52% !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }
    
    /* El botón PDF "Número completo" se mantiene abajo alineado */
    .page_index_journal .index_current_issue .galleys_links {
        width: 100% !important;
        display: block !important;
        margin-top: 25px !important;
        clear: both !important;
    }
}

/* ==========================================================================
   4. OCULTAR ÚNICAMENTE EL LOGO DE OJS DEL FONDO
   ========================================================================== */

div.pkp_brand_footer a[href*="aboutThisPublishingSystem"],
div.pkp_brand_footer img[src*="ojs_brand"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
}

/* ================= FOOTER ================= */

.pkp_structure_footer {
    padding-top: 25px !important;
    padding-bottom: 15px !important;
}

.pkp_footer_content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.pkp_brand_footer,
.pkp_structure_footer .pkp_brand_footer,
.pkp_footer_content .pkp_brand_footer {
    display: none !important;
}

/* ==========================================================================
   5. CORRECCIÓN DE ESPACIOS EN SECCIONES (OJS 3)
   ========================================================================== */

/* Reduce el espacio que deja el botón PDF arriba de las secciones */
.page_index_journal .index_current_issue .galleys_links {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
}

/* Forzar espacio prudente para que entren las galeradas internas */
.obj_issue_toc .sections .section {
    margin-bottom: 20px !important;
    padding-bottom: 10px !important;
    display: block !important;
}

/* Reducir el espacio de títulos de sección */
.obj_issue_toc .sections .section > h2,
.obj_issue_toc .sections .section > h3 {
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    padding-bottom: 5px !important;
}

/* Ajuste del bloque del resumen del artículo individual */
.obj_article_summary {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
    display: block !important;
}

