/*
 * JIFA - Compact Header & Footer
 * Target: Open Journal Systems (OJS) 3.3
 * Purpose: Reduce header banner, navigation and custom footer height.
 *
 * IMPORTANT:
 * Add class="jifa-footer" to the OUTERMOST div of the custom footer HTML.
 */

/* =========================================================
   1. HEADER BANNER
   ========================================================= */

.pkp_structure_head {
    background: #ffffff !important;
    padding: 0 !important;
}

.pkp_site_name_wrapper {
    background: #ffffff !important;
    min-height: 0 !important;
    padding: 5px 12px !important;
}

.pkp_site_name {
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
}

/* Keep the full banner visible without cropping it. */
.pkp_site_name .is_img img,
.pkp_site_name img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 300px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

/* =========================================================
   2. PRIMARY NAVIGATION
   ========================================================= */

.pkp_navigation_primary_wrapper {
    min-height: 42px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.pkp_navigation_primary > li > a {
    padding: 10px 14px !important;
    font-size: 13px !important;
    line-height: 20px !important;
}

/* =========================================================
   3. CUSTOM JIFA FOOTER
   Add class="jifa-footer" to the outermost footer div.
   ========================================================= */

.jifa-footer {
    box-sizing: border-box !important;
    width: 100% !important;
    font-size: 12px !important;
    line-height: 1.6 !important;
}

.jifa-footer *,
.jifa-footer *::before,
.jifa-footer *::after {
    box-sizing: border-box;
}

.jifa-footer > div {
    padding: 20px 22px 15px !important;
}

/* Logo */
.jifa-footer img {
    max-width: 100%;
    height: auto;
}

/* Section headings */
.jifa-footer h3 {
    font-size: 13px !important;
    line-height: 1.4 !important;
    margin-top: 0 !important;
    margin-bottom: 7px !important;
}

/* Paragraphs and links */
.jifa-footer p {
    font-size: 12px !important;
    line-height: 1.6 !important;
    margin-top: 5px !important;
    margin-bottom: 5px !important;
}

.jifa-footer a {
    font-size: 12px !important;
    text-decoration: none;
}

.jifa-footer a:hover {
    text-decoration: underline !important;
}

/* Embedded map */
.jifa-footer iframe {
    display: block !important;
    width: 100% !important;
    max-width: 320px !important;
    height: 135px !important;
    border: 0 !important;
    border-radius: 5px !important;
}

/* =========================================================
   4. TABLET
   ========================================================= */

@media (max-width: 768px) {
    .pkp_site_name .is_img img,
    .pkp_site_name img {
        max-height: 220px !important;
    }

    .jifa-footer > div {
        padding: 18px 16px 14px !important;
    }
}

/* =========================================================
   5. MOBILE
   ========================================================= */

@media (max-width: 480px) {
    .pkp_site_name_wrapper {
        padding: 4px 8px !important;
    }

    .pkp_site_name .is_img img,
    .pkp_site_name img {
        max-height: 150px !important;
    }

    .pkp_navigation_primary > li > a {
        padding: 8px 9px !important;
        font-size: 11px !important;
    }

    .jifa-footer > div {
        padding: 16px 14px 12px !important;
    }

    .jifa-footer iframe {
        max-width: 100% !important;
        height: 120px !important;
    }
}
