/* ============================================================
   JCRTP EDITORIAL JOURNAL - footer.css
   Site footer (templates/frontend/components/footer.tpl), laid out after
   the footer band of design-references/Homepage.png: brand + summary,
   Quick Links, Connect With Us (contact, ISSN, copyright), Open Access.
   ============================================================ */

/* Keep the footer at the bottom of the viewport on short pages, so no
   body background shows beneath it. */
.pkp_structure_page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
.pkp_structure_page > .pkp_structure_content {
    flex: 1 0 auto;
    width: 100%;
}
.pkp_structure_page > .pkp_structure_head,
.pkp_structure_page > .pkp_structure_footer_wrapper { flex: none; }

.pkp_structure_page .pkp_structure_footer_wrapper {
    --footer-ink: #e6edf5;
    --footer-muted: var(--jc-on-navy-muted);
    --footer-line: rgba(255, 255, 255, .14);
    --footer-accent: var(--jc-oa);
    position: relative;
    overflow: hidden;
    margin: 0;
    color: var(--footer-ink);
    background: var(--jc-navy-deep);
    border-top: 0;
}
/* Faint DNA artwork at the right edge, as in the wireframe. */
.pkp_structure_page .pkp_structure_footer_wrapper::before {
    position: absolute;
    inset: 0 0 0 auto;
    width: min(46%, 640px);
    content: "";
    background: url("../images/jcrtp-hero-art.svg") right center / cover no-repeat;
    opacity: .06;
    mask-image: linear-gradient(90deg, transparent, #000 60%);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%);
    pointer-events: none;
}

.pkp_structure_page .pkp_structure_footer_wrapper .pkp_structure_footer {
    position: relative;
    display: block;
    width: auto;
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(22px, 2.4vw, 30px) clamp(16px, 3vw, 48px) 12px;
    text-align: left;
}

.pkp_structure_page .jcrtp-footer {
    display: grid;
    grid-template-columns: minmax(240px, 1.3fr) minmax(260px, 1.1fr) minmax(200px, .8fr) auto;
    align-items: start;
    gap: 20px clamp(24px, 3.5vw, 56px);
}

.pkp_structure_page .jcrtp-footer__heading {
    margin: 0 0 10px;
    color: #ffffff;
    font: 700 1.05rem/1.3 var(--jc-serif, Georgia, serif);
    letter-spacing: .01em;
}
.pkp_structure_page .jcrtp-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.pkp_structure_page .jcrtp-footer li { margin: 0; }

.pkp_structure_page .pkp_structure_footer a {
    color: var(--footer-ink);
    text-decoration: none;
}
.pkp_structure_page .pkp_structure_footer a:hover,
.pkp_structure_page .pkp_structure_footer a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.pkp_structure_page .pkp_structure_footer a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

/* Brand: the official logo is kept unaltered on a white plate. */
.pkp_structure_page .jcrtp-footer-brand {
    display: inline-block;
    padding: 6px 10px;
    line-height: 0;
    background: #fdfdfd;
    border-radius: 6px;
}
.pkp_structure_page .jcrtp-footer-brand:hover,
.pkp_structure_page .jcrtp-footer-brand:focus-visible { text-decoration: none; }
.pkp_structure_page .jcrtp-footer-brand img {
    display: block;
    width: 150px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1896 / 830;
}
.pkp_structure_page .jcrtp-footer__summary {
    max-width: 460px;
    margin: 12px 0 0;
    color: var(--footer-ink);
    font-size: .92rem;
    line-height: 1.55;
}

/* Quick links in two columns. */
.pkp_structure_page .jcrtp-footer__links ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    gap: 2px clamp(24px, 3vw, 48px);
}
.pkp_structure_page .jcrtp-footer__links a {
    display: inline-block;
    padding: 2px 0;
    font-size: .94rem;
    line-height: 1.4;
}

/* Connect: profile icons, contact email, ISSN, copyright. */
.pkp_structure_page .jcrtp-footer ul.jcrtp-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.pkp_structure_page .jcrtp-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--jc-navy);
    background: #ffffff;
    border-radius: 50%;
    transition: background-color .18s ease, color .18s ease;
}
.pkp_structure_page .jcrtp-footer__social a:hover,
.pkp_structure_page .jcrtp-footer__social a:focus-visible {
    color: #ffffff;
    background: var(--jc-magenta);
    text-decoration: none;
}
.pkp_structure_page .jcrtp-footer__social svg { width: 20px; height: 20px; }
.pkp_structure_page .jcrtp-footer__meta li {
    color: var(--footer-muted);
    font-size: .88rem;
    line-height: 1.6;
}
.pkp_structure_page .jcrtp-footer__meta strong { color: #ffffff; font-weight: 600; }
.pkp_structure_page .jcrtp-footer__meta a { color: var(--footer-ink); overflow-wrap: anywhere; }

/* Open Access mark. */
.pkp_structure_page .jcrtp-footer__oa {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #ffffff;
    font: 700 .82rem/1.15 var(--jc-sans, system-ui, sans-serif);
    letter-spacing: .04em;
    text-transform: uppercase;
}
.pkp_structure_page .jcrtp-footer__oa svg {
    flex: none;
    width: 34px;
    height: 34px;
    color: var(--footer-accent);
}
.pkp_structure_page .jcrtp-footer__oa span { max-width: 6.5em; }

/* Bottom bar: institution, the journal's own footer text (Website
   settings, minus duplicates) and the OJS/PKP credit. */
.pkp_structure_page .jcrtp-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 32px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--footer-line);
}
.pkp_structure_page .jcrtp-footer__institution {
    flex: 1 1 360px;
    margin: 0;
    color: var(--footer-ink);
    font-size: .88rem;
    line-height: 1.55;
}
.pkp_structure_page .jcrtp-footer__institution > * { display: block; }
.pkp_structure_page .jcrtp-footer__institution-label {
    color: var(--footer-muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.pkp_structure_page .jcrtp-footer__institution strong {
    margin-top: 2px;
    color: #ffffff;
    font: 700 1.12rem/1.3 var(--jc-serif, Georgia, serif);
}
.pkp_structure_page .jcrtp-footer__institution-address { color: var(--footer-muted); }
.pkp_structure_page .pkp_footer_content {
    margin: 0;
    padding: 0;
    color: var(--footer-muted);
    font-size: .82rem;
    line-height: 1.6;
}
.pkp_structure_page .pkp_footer_content > :first-child { margin-top: 0; }
.pkp_structure_page .pkp_footer_content > :last-child { margin-bottom: 0; }
.pkp_structure_page .pkp_footer_content strong { color: #ffffff; }
.pkp_structure_page .pkp_brand_footer {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    opacity: .7;
}
.pkp_structure_page .pkp_brand_footer img {
    display: block;
    max-width: 64px;
    height: auto;
    filter: brightness(0) invert(1);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .pkp_structure_page .jcrtp-footer {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    .pkp_structure_page .jcrtp-footer__about { grid-column: 1 / -1; }
    .pkp_structure_page .jcrtp-footer__oa { grid-column: 1 / -1; }
}

@media (max-width: 599px) {
    .pkp_structure_page .jcrtp-footer {
        grid-template-columns: minmax(0, 1fr);
    }
    .pkp_structure_page .jcrtp-footer-brand img { width: 140px; }
    .pkp_structure_page .jcrtp-footer__links a { padding: 8px 0; }
    .pkp_structure_page .jcrtp-footer__bottom { flex-direction: column; align-items: flex-start; }
    .pkp_structure_page .jcrtp-footer__institution { flex: none; }
}
