/* ================================================================
   YUYAY® / JLA EDICIONES®
   Hoja de estilo institucional para OJS 3.5.0-5 LTS
   Pie de página + corrección responsive de páginas de artículos
   ================================================================ */

:root {
    --yuyay-navy: #30477f;
    --yuyay-navy-dark: #23386f;
    --yuyay-cyan: #9edee5;
    --yuyay-cyan-soft: #eefcfd;
    --yuyay-green: #7eae38;
    --yuyay-text: #26344b;
    --yuyay-muted: #667287;
    --yuyay-line: rgba(47, 67, 126, 0.18);
}

/* ---------------------------------------------------------------
   1. Pie de página nativo de OJS
   --------------------------------------------------------------- */

.pkp_structure_footer_wrapper {
    position: relative;
    overflow: hidden;
    margin-top: 3rem;
    border-top: 4px solid var(--yuyay-cyan);
    background: #f0ffff !important;
}

.pkp_structure_footer_wrapper::before {
    display: none;
    content: none;
}

.pkp_structure_footer_wrapper::after {
    display: none;
    content: none;
}

.pkp_structure_footer {
    max-width: none;
    padding: 0;
    text-align: left;
}

.pkp_footer_content {
    position: relative;
    z-index: 2;
    padding: 0;
}

/* ---------------------------------------------------------------
   2. Sistema general del pie YUYAY–JLA
   --------------------------------------------------------------- */

.jla-yuyay-footer,
.jla-yuyay-footer * {
    box-sizing: border-box;
}

.jla-yuyay-footer {
    width: calc(100% - 40px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 0 0;
    color: var(--yuyay-text);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.65;
}

.jla-yuyay-footer a {
    color: #294681;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.jla-yuyay-footer a:hover,
.jla-yuyay-footer a:focus {
    color: #668f26;
    text-decoration: underline;
}

/* Navegación institucional */

.jla-footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--yuyay-line);
}

.jla-footer-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 20px;
    border: 1px solid var(--yuyay-navy);
    border-radius: 4px;
    background: var(--yuyay-navy);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
}

.jla-footer-nav a::before {
    width: 5px;
    height: 5px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--yuyay-cyan);
    content: "";
}

.jla-footer-nav a:hover,
.jla-footer-nav a:focus {
    border-color: var(--yuyay-green);
    background: var(--yuyay-green);
    color: #fff;
    text-decoration: none;
}

/* Identidad editorial */

.jla-footer-identity {
    display: grid;
    grid-template-columns: minmax(250px, 340px) minmax(0, 1fr);
    gap: 38px;
    align-items: center;
    padding: 30px 8px;
    border-bottom: 1px solid var(--yuyay-line);
}

.jla-footer-logo {
    min-width: 0;
    padding-right: 30px;
    border-right: 3px solid #88cbd3;
}

.jla-footer-logo img {
    display: block;
    width: 100%;
    max-width: 330px;
    height: auto;
    margin: 0;
}

.jla-footer-presentation {
    min-width: 0;
    max-width: 760px;
}

.jla-footer-presentation p {
    margin: 0 0 10px;
}

.jla-footer-presentation p:last-child {
    margin-bottom: 0;
}

.jla-footer-eyebrow {
    color: var(--yuyay-navy);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.22em;
}

.jla-footer-description {
    color: #344158;
}

.jla-footer-description strong {
    color: #21366e;
}

.jla-footer-issn {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    color: #526078;
    font-size: 13px;
}

.jla-footer-issn span {
    color: var(--yuyay-green);
}

.jla-footer-platform {
    color: #526078;
    font-size: 13px;
}

/* Retícula informativa */

.jla-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.35fr) minmax(230px, 0.9fr);
    border-bottom: 1px solid var(--yuyay-line);
}

.jla-footer-column {
    min-width: 0;
    padding: 25px 25px 26px;
    border-right: 1px solid rgba(47, 67, 126, 0.16);
}

.jla-footer-column:first-child {
    padding-left: 0;
}

.jla-footer-column:last-child {
    padding-right: 0;
    border-right: 0;
}

.jla-footer-column h2 {
    position: relative;
    margin: 0 0 15px;
    padding-bottom: 9px;
    color: var(--yuyay-navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.jla-footer-column h2::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 42px;
    height: 2px;
    background: linear-gradient(
        90deg,
        #84cad2 0%,
        #84cad2 65%,
        var(--yuyay-green) 65%,
        var(--yuyay-green) 100%
    );
    content: "";
}

.jla-footer-column p {
    margin: 0 0 11px;
}

.jla-footer-column p:last-child {
    margin-bottom: 0;
}

.jla-footer-references ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.jla-footer-references li {
    position: relative;
    margin: 0;
    padding: 0 0 9px 16px;
}

.jla-footer-references li:last-child {
    padding-bottom: 0;
}

.jla-footer-references li::before {
    position: absolute;
    top: 0.68em;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--yuyay-green);
    content: "";
}

.jla-reference-detail {
    display: block;
    margin-top: 2px;
    color: var(--yuyay-muted);
    font-size: 12px;
    line-height: 1.45;
}

.jla-footer-contact p,
.jla-footer-contact a {
    overflow-wrap: anywhere;
}

.jla-footer-contact a {
    font-weight: 600;
}

/* Identidad jurídica y sedes */

.jla-footer-locations {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(230px, 1.2fr) minmax(230px, 1.2fr);
    gap: 25px;
    align-items: start;
    padding: 22px 0;
    border-bottom: 1px solid var(--yuyay-line);
}

.jla-footer-legal {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 13px 16px;
    border-left: 4px solid var(--yuyay-navy);
    background: rgba(255, 255, 255, 0.68);
}

.jla-footer-legal strong {
    color: var(--yuyay-navy-dark);
    font-size: 12px;
    letter-spacing: 0.02em;
}

.jla-footer-legal span {
    color: var(--yuyay-muted);
    font-size: 12px;
    line-height: 1.5;
}

.jla-footer-locations address {
    margin: 0;
    color: #59667b;
    font-size: 12px;
    font-style: normal;
    line-height: 1.65;
}

.jla-footer-locations address strong {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--yuyay-navy-dark);
}

.jla-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    padding: 16px 0 18px;
    color: #6a7486;
    font-size: 11px;
    line-height: 1.5;
}

.jla-footer-bottom p {
    margin: 0;
}

.jla-footer-bottom p:first-child {
    max-width: 68%;
}

.jla-footer-bottom p:last-child {
    text-align: right;
}

/* Marca automática OJS/PKP */

.pkp_brand_footer {
    position: relative;
    z-index: 2;
    width: calc(100% - 40px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 0 22px;
}

.pkp_brand_footer a {
    float: right;
    display: block;
    max-width: 125px;
    opacity: 0.62;
    transition: opacity 0.2s ease;
}

.pkp_brand_footer a:hover,
.pkp_brand_footer a:focus {
    opacity: 1;
}

.pkp_brand_footer img {
    display: block;
    width: 100%;
    height: auto;
}

/* ---------------------------------------------------------------
   3. Corrección del desbordamiento en páginas de artículos
   --------------------------------------------------------------- */

.obj_article_details img,
.obj_article_details svg,
.obj_article_details canvas,
.obj_article_details iframe,
.obj_article_details table {
    max-width: 100%;
}

.obj_article_details img,
.obj_article_details svg {
    height: auto;
}

.obj_article_details .entry_details p,
.obj_article_details .entry_details li,
.obj_article_details .entry_details a,
.obj_article_details .main_entry .references,
.obj_article_details .main_entry .references p,
.obj_article_details .main_entry .references a,
.obj_article_details .item.references,
.obj_article_details .item.references p,
.obj_article_details .item.references a,
.obj_article_details .doi,
.obj_article_details .doi a {
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.obj_article_details .entry_details ul,
.obj_article_details .entry_details ol {
    max-width: 100%;
    margin-right: 0;
    padding-left: 1.35rem;
}

/* ---------------------------------------------------------------
   4. Adaptación del pie para tabletas
   --------------------------------------------------------------- */

@media (max-width: 900px) {
    .jla-footer-identity {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .jla-footer-logo {
        padding-right: 0;
        padding-bottom: 20px;
        border-right: 0;
        border-bottom: 2px solid #88cbd3;
    }

    .jla-footer-logo img {
        max-width: 310px;
    }

    .jla-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .jla-footer-column {
        border-bottom: 1px solid rgba(47, 67, 126, 0.16);
    }

    .jla-footer-column:nth-child(2) {
        padding-right: 0;
        border-right: 0;
    }

    .jla-footer-column:last-child {
        grid-column: 1 / -1;
        padding: 22px 0;
        border-bottom: 0;
    }

    .jla-footer-locations {
        grid-template-columns: 1fr 1fr;
    }

    .jla-footer-legal {
        grid-column: 1 / -1;
    }
}

/* ---------------------------------------------------------------
   5. Adaptación del pie para móviles
   --------------------------------------------------------------- */

@media (max-width: 620px) {
    .jla-yuyay-footer {
        width: calc(100% - 28px);
        padding-top: 20px;
        font-size: 13px;
    }

    .jla-footer-nav {
        display: grid;
        grid-template-columns: 1fr;
    }

    .jla-footer-nav a {
        justify-content: center;
        width: 100%;
    }

    .jla-footer-identity {
        padding: 24px 0;
    }

    .jla-footer-logo img {
        max-width: 270px;
    }

    .jla-footer-eyebrow {
        font-size: 11px;
        letter-spacing: 0.15em;
    }

    .jla-footer-grid {
        display: block;
    }

    .jla-footer-column,
    .jla-footer-column:first-child,
    .jla-footer-column:last-child {
        padding: 22px 0;
        border-right: 0;
        border-bottom: 1px solid rgba(47, 67, 126, 0.16);
    }

    .jla-footer-column:last-child {
        border-bottom: 0;
    }

    .jla-footer-locations {
        display: block;
    }

    .jla-footer-legal,
    .jla-footer-locations address {
        margin-bottom: 20px;
    }

    .jla-footer-locations address:last-child {
        margin-bottom: 0;
    }

    .jla-footer-bottom {
        display: block;
    }

    .jla-footer-bottom p,
    .jla-footer-bottom p:first-child,
    .jla-footer-bottom p:last-child {
        max-width: none;
        margin-bottom: 10px;
        text-align: left;
    }

    .jla-footer-bottom p:last-child {
        margin-bottom: 0;
    }

    .pkp_brand_footer {
        width: calc(100% - 28px);
    }

    .pkp_brand_footer a {
        float: left;
        max-width: 105px;
    }
}
