/* ==========================================================
   CABECERA OJS CON SLIDER
   Acta Peruana de Ciencias Sociales y Humanidades

   IMPORTANTE:
   ESTE CSS NO MODIFICA EL MENÚ DE OJS
   ========================================================== */


/* ==========================================================
   1. CABECERA / BANNER
   ========================================================== */

.pkp_site_name {
    position: relative !important;

    /* El banner ocupa todo el ancho de la pantalla */
    width: 100vw !important;
    max-width: none !important;

    /*
       Permite que la cabecera salga del contenedor
       central de OJS sin modificar el menú
    */
    left: 50% !important;
    margin-left: -50vw !important;

    /* Altura compacta */
    height: 280px !important;

    margin-top: 0 !important;
    margin-bottom: 0 !important;

    padding: 0 !important;

    overflow: hidden !important;

    background-color: #01123c !important;
}


/* ==========================================================
   2. OCULTAR LA IMAGEN ORIGINAL CONFIGURADA EN OJS
   ========================================================== */

.pkp_site_name img {
    display: none !important;
}


/* El enlace original sigue ocupando la cabecera */
.pkp_site_name > a {
    display: block !important;

    width: 100% !important;
    height: 100% !important;

    margin: 0 !important;
    padding: 0 !important;
}


/* ==========================================================
   3. CAPAS DEL SLIDER
   ========================================================== */

.pkp_site_name::before,
.pkp_site_name::after {
    content: "";

    position: absolute !important;

    top: 0 !important;
    left: 0 !important;

    width: 100% !important;
    height: 100% !important;

    background-repeat: no-repeat !important;
    background-position: center center !important;

    /* Hace que la imagen cubra completamente la cabecera */
    background-size: cover !important;

    pointer-events: none;

    transform-origin: center center;

    will-change: opacity, transform;
}


/* ==========================================================
   4. IMAGEN 1
   ========================================================== */

.pkp_site_name::before {
    background-image:
        url("https://apcsh-journal.org/carga/fondo1.png") !important;

    z-index: 1;

    opacity: 1;

    animation:
        sliderImagen1 18s ease-in-out infinite,
        movimientoImagen1 18s ease-in-out infinite;
}


/* ==========================================================
   5. IMAGEN 2
   ========================================================== */

.pkp_site_name::after {
    background-image:
        url("https://apcsh-journal.org/carga/fondo2.png") !important;

    z-index: 2;

    opacity: 0;

    animation:
        sliderImagen2 18s ease-in-out infinite,
        movimientoImagen2 18s ease-in-out infinite;
}


/* ==========================================================
   6. TRANSICIÓN DE LA IMAGEN 1
   ========================================================== */

@keyframes sliderImagen1 {

    0%,
    40% {
        opacity: 1;
    }

    50%,
    90% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}


/* ==========================================================
   7. TRANSICIÓN DE LA IMAGEN 2
   ========================================================== */

@keyframes sliderImagen2 {

    0%,
    40% {
        opacity: 0;
    }

    50%,
    90% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}


/* ==========================================================
   8. ZOOM MUY SUAVE - IMAGEN 1
   ========================================================== */

@keyframes movimientoImagen1 {

    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.018);
    }

    50% {
        transform: scale(1.02);
    }

    90% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}


/* ==========================================================
   9. ZOOM MUY SUAVE - IMAGEN 2
   ========================================================== */

@keyframes movimientoImagen2 {

    0% {
        transform: scale(1.02);
    }

    40% {
        transform: scale(1.01);
    }

    50% {
        transform: scale(1);
    }

    90% {
        transform: scale(1.018);
    }

    100% {
        transform: scale(1.02);
    }
}


/* ==========================================================
   10. RESPONSIVE - PANTALLAS MEDIANAS
   ========================================================== */

@media (max-width: 1400px) {

    .pkp_site_name {
        height: 260px !important;
    }

}


/* ==========================================================
   11. LAPTOPS
   ========================================================== */

@media (max-width: 1200px) {

    .pkp_site_name {
        height: 230px !important;
    }

}


/* ==========================================================
   12. TABLETS
   ========================================================== */

@media (max-width: 992px) {

    .pkp_site_name {
        height: 200px !important;
    }

}


/* ==========================================================
   13. MÓVILES
   ========================================================== */

@media (max-width: 768px) {

    .pkp_site_name {
        height: 165px !important;
    }

    .pkp_site_name::before,
    .pkp_site_name::after {
        background-position: center center !important;
    }

}


/* ==========================================================
   14. MÓVILES PEQUEÑOS
   ========================================================== */

@media (max-width: 480px) {

    .pkp_site_name {
        height: 135px !important;
    }

}


/* ==========================================================
   15. ACCESIBILIDAD
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .pkp_site_name::before,
    .pkp_site_name::after {
        animation: none !important;
        transform: none !important;
    }

    .pkp_site_name::before {
        opacity: 1 !important;
    }

    .pkp_site_name::after {
        opacity: 0 !important;
    }

}

/* ==========================================================
   FOOTER PERSONALIZADO
   ACTA PERUANA DE CIENCIAS SOCIALES Y HUMANIDADES
   ========================================================== */


/* ==========================================================
   1. CONTENEDOR ORIGINAL DEL FOOTER DE OJS
   ========================================================== */

.pkp_structure_footer {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    background: #f5f6f8 !important;

    border: 0 !important;
}


/* Contenido interno generado por OJS */
.pkp_footer_content {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
}


/* ==========================================================
   2. FOOTER GENERAL
   ========================================================== */

.apcsh-footer {
    width: 100%;

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    background: #f5f6f8;

    color: #01123c;
}


/* ==========================================================
   3. ÁREA PRINCIPAL
   ========================================================== */

.apcsh-footer-main {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 290px;

    padding: 42px 8%;

    box-sizing: border-box;

    background:
        linear-gradient(
            135deg,
            rgba(1, 18, 60, 0.025),
            rgba(1, 18, 60, 0)
        ),
        #f5f6f8;
}


/* Línea superior muy sutil */
.apcsh-footer-main::before {
    content: "";

    position: absolute;

    top: 0;
    left: 50%;

    transform: translateX(-50%);

    width: 86%;
    height: 1px;

    background: rgba(1, 18, 60, 0.12);
}


/* ==========================================================
   4. INFORMACIÓN CENTRAL
   ========================================================== */

.apcsh-footer-info {
    width: 100%;
    max-width: 720px;

    text-align: center;

    margin: 0 auto;
}


/* ==========================================================
   5. LOGO
   ========================================================== */

.apcsh-footer-logo {
    display: block;

    width: auto;
    height: auto;

    max-width: 380px;
    max-height: 100px;

    margin: 0 auto 20px auto;

    object-fit: contain;
}


/* ==========================================================
   6. ISSN
   ========================================================== */

.apcsh-footer-issn {
    margin: 0;

    font-size: 14px;
    line-height: 1.5;

    font-weight: 600;

    letter-spacing: 0.2px;

    color: #01123c;
}


/* ==========================================================
   7. PEQUEÑO SEPARADOR
   ========================================================== */

.apcsh-footer-divider {
    width: 44px;
    height: 2px;

    margin: 15px auto;

    background: #01123c;

    opacity: 0.35;

    border-radius: 10px;
}


/* ==========================================================
   8. TEXTO DE LICENCIA
   ========================================================== */

.apcsh-footer-license {
    margin: 3px auto;

    max-width: 600px;

    font-size: 13px;
    line-height: 1.6;

    font-weight: 400;

    color: #555f70;
}


/* ==========================================================
   9. BLOQUE OJS / PKP
   ========================================================== */

.apcsh-footer-platform {
    position: absolute;

    top: 50%;
    right: 7%;

    transform: translateY(-50%);

    display: flex;
    flex-direction: column;
    align-items: center;

    min-width: 180px;

    text-align: center;

    color: #01123c;
}


/* Texto pequeño */
.apcsh-platform-small {
    display: block;

    margin: 2px 0;

    font-size: 13px;
    line-height: 1.4;

    font-weight: 400;

    color: #697386;
}


/* OJS / PKP grande */
.apcsh-platform-ojs {
    display: block;

    margin: 6px 0;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 32px;
    line-height: 1;

    font-weight: 400;

    letter-spacing: -0.5px;

    color: #01123c;
}


/* ==========================================================
   10. FRANJA INFERIOR
   ========================================================== */

.apcsh-footer-bottom {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 8px;

    width: 100%;

    min-height: 48px;

    padding: 12px 25px;

    box-sizing: border-box;

    text-align: center;

    background: #01123c;

    color: #ffffff;

    font-size: 13px;
    line-height: 1.5;

    font-weight: 500;

    letter-spacing: 0.1px;
}


.apcsh-footer-copy {
    opacity: 0.85;
}


/* ==========================================================
   11. OCULTAR ELEMENTOS INNECESARIOS QUE OJS PUEDA
   COLOCAR DEBAJO DEL FOOTER PERSONALIZADO
   ========================================================== */

.pkp_brand_footer {
    margin: 0 !important;
    padding: 0 !important;
}


/* ==========================================================
   12. RESPONSIVE - TABLET
   ========================================================== */

@media (max-width: 1000px) {

    .apcsh-footer-main {
        flex-direction: column;

        min-height: auto;

        padding: 40px 30px;
    }


    .apcsh-footer-platform {
        position: relative;

        top: auto;
        right: auto;

        transform: none;

        margin-top: 30px;

        padding-top: 25px;

        width: 100%;
    }


    .apcsh-footer-platform::before {
        content: "";

        position: absolute;

        top: 0;
        left: 50%;

        transform: translateX(-50%);

        width: 50px;
        height: 1px;

        background: rgba(1, 18, 60, 0.2);
    }


    .apcsh-footer-logo {
        max-width: 340px;
    }

}


/* ==========================================================
   13. RESPONSIVE - MÓVIL
   ========================================================== */

@media (max-width: 600px) {

    .apcsh-footer-main {
        padding: 34px 20px;
    }


    .apcsh-footer-logo {
        max-width: 280px;
        max-height: 85px;

        margin-bottom: 18px;
    }


    .apcsh-footer-issn {
        font-size: 13px;
    }


    .apcsh-footer-license {
        font-size: 12px;
    }


    .apcsh-platform-ojs {
        font-size: 28px;
    }


    .apcsh-platform-small {
        font-size: 12px;
    }


    .apcsh-footer-bottom {
        flex-direction: column;

        gap: 1px;

        min-height: 55px;

        padding: 10px 15px;

        font-size: 12px;
    }

}


/* ==========================================================
   14. MÓVILES PEQUEÑOS
   ========================================================== */

@media (max-width: 400px) {

    .apcsh-footer-logo {
        max-width: 235px;
    }


    .apcsh-footer-main {
        padding-left: 15px;
        padding-right: 15px;
    }

}

/* ==========================================================
   CORRECCIONES FINALES
   ========================================================== */


/* ----------------------------------------------------------
   1. OCULTAR EL BRANDING ORIGINAL OJS / PKP
   Ya tenemos nuestro propio bloque en el footer
   ---------------------------------------------------------- */

.pkp_brand_footer {
    display: none !important;
}


/* Por si el tema utiliza otra estructura interna */
.pkp_structure_footer .pkp_brand_footer {
    display: none !important;
}


/* ----------------------------------------------------------
   2. ELIMINAR SCROLL HORIZONTAL
   ---------------------------------------------------------- */

html,
body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}


/* Evitar que cualquier contenedor del sitio genere
   unos píxeles adicionales de ancho */
.pkp_structure_page,
.pkp_structure_head,
.pkp_structure_content,
.pkp_structure_footer {
    max-width: 100% !important;
    box-sizing: border-box !important;
}


/* ----------------------------------------------------------
   3. ASEGURAR QUE EL FOOTER NO GENERE OVERFLOW
   ---------------------------------------------------------- */

.apcsh-footer,
.apcsh-footer-main,
.apcsh-footer-bottom {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
}


/* ----------------------------------------------------------
   4. IMÁGENES RESPONSIVE
   ---------------------------------------------------------- */

.apcsh-footer img {
    max-width: 100% !important;
    height: auto !important;
}