/*
=========================================================
NUSA - OJS 3.5 SAFE HEADER + ADMIN MENU FIX
Target:
https://journal.globalresearchmedia.com/index.php/nusa

IMPORTANT:
- Replace the previous NUSA custom CSS with this file.
- Do not stack this on top of the previous "Hard Fix".
=========================================================
*/

/* ===== KEEP HEADER FULL WIDTH ===== */
.pkp_structure_head {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

.pkp_head_wrapper {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
}

/* ===== KEEP NUSA BANNER FULL WIDTH / NO CROPPING ===== */
.pkp_site_name_wrapper,
.pkp_site_name,
.pkp_site_name a {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    overflow: visible !important;
}

.pkp_site_name img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain !important;
}

/* ===== NAVIGATION: ONE COMPACT ROW ===== */
.pkp_navigation_primary_row {
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 0 4% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
}

.pkp_navigation_primary_wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

.pkp_navigation_primary {
    margin: 0 !important;
    padding: 0 !important;
}

.pkp_navigation_primary > li > a {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

.pkp_search {
    margin-left: auto !important;
}

/* ===== ADMINISTRATOR MENU: PUT IT ON THE NAV BAR ===== */
/* Does NOT create an extra green row */
@media (min-width: 992px) {
    .pkp_navigation_user_wrapper {
        position: absolute !important;
        top: auto !important;
        bottom: 10px !important;
        right: 175px !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        z-index: 9999 !important;
        overflow: visible !important;
    }

    .pkp_navigation_user {
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .pkp_navigation_user > li {
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .pkp_navigation_user > li > a {
        display: block !important;
        padding: 7px 10px !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        cursor: pointer !important;
    }

    /* Account dropdown */
    .pkp_navigation_user > li > ul {
        position: absolute !important;
        top: 100% !important;
        right: 0 !important;
        left: auto !important;
        min-width: 190px !important;
        z-index: 10000 !important;
    }

    /* Fallback: show submenu on hover/focus even if click toggle fails */
    .pkp_navigation_user > li:hover > ul,
    .pkp_navigation_user > li:focus-within > ul {
        display: block !important;
    }
}

/* ===== TABLET ===== */
@media (min-width: 768px) and (max-width: 991px) {
    .pkp_navigation_user_wrapper {
        position: static !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 20px !important;
        background: transparent !important;
    }

    .pkp_navigation_primary_row {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 767px) {
    .pkp_navigation_user_wrapper {
        position: static !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 15px !important;
        background: transparent !important;
    }

    .pkp_navigation_primary_row {
        min-height: 50px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}
