/* ========================================
JURNAL PENGABDIAN MASYARAKAT (JPM)
COMPLETE STYLESHEET v5.1 (Final + All Fixes)
======================================== */

/* ========================================
1. HIDE DEFAULT OJS HEADER & FOOTER (AGGRESSIVE & FIXED SYNTAX)
======================================== */
.pkp_site_name,
.pkp_navigation_primary,
.pkp_navigation_user,
.pkp_search,
.pkp_site_name_wrapper,
.pkp_navigation_primary_wrapper,
.pkp_navigation_user_wrapper,
.pkp_breadcrumbs,
.pkp_breadcrumb,
.breadcrumb,
.pkp_header,
.header_wrapper,
#header,
header.pkp_header,
.pkp_structure_head,
.navbar,

/* Hide Default Footer & PKP Branding (Fixed syntax: no spaces in selectors) */
.pkp_footer_content,
.pkp_footer_content *,
.pkp_footer,
.pkp_footer *,
.pkp_site_info,
.pkp_site_info *,
.pkp_site_info_wrapper,
.pkp_site_info_wrapper *,
.page_footer,
.page_footer *,
.pkp_branding,
.pkp_branding *,
div[id*="pkp_branding"],
div[class*="pkp_branding"],
div[id*="pkp-branding"],
div[class*="pkp-branding"],

/* Hide PKP Links (Fixed syntax) */
a[href*="pkp.sfu.ca"],
a[href*="ojs"],
a[href*="publicknowledge"],
a[href*="pkp"],

/* Hide footer text containers */
.pkp_footer_content > p,
.pkp_footer_content > div,
.page_footer p {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    max-width: 0 !important;
    border: none !important;
    background: transparent !important;
}

/* ========================================
2. FIX: HILANGKAN WARNA BIRU MUDA DI BAWAH HEADER
======================================== */
.pkp_structure_content,
#main,
main,
.pkp_page_index,
.page_index,
body > div:not(.jpm-header-wrapper):not(.jpm-footer-wrapper) {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.jpm-header-wrapper {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2) !important;
}

/* ========================================
3. INFORMATIVE HEADER (OPSI 3: DOMINANT BLUE WITH OVERLAY)
======================================== */
.jpm-header-wrapper {
    background: #1e3a8a !important;
    background-image: linear-gradient(135deg, rgba(30, 58, 138, 0.95) 0%, rgba(30, 64, 175, 0.9) 50%, rgba(37, 99, 235, 0.85) 100%) !important;
    color: #ffffff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.jpm-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Baris 1: Identitas & CTA */
.jpm-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 20px;
    flex-wrap: wrap;
}

.jpm-header-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
}

.jpm-header-logo {
    width: 70px;
    height: 70px;
    background: #ffffff;
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.jpm-header-logo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: contain;
}

.jpm-header-logo-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 20px;
}

.jpm-header-text h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #ffffff;
    line-height: 1.2;
}

.jpm-header-affiliation {
    font-size: 13px;
    color: #dbeafe;
    margin-bottom: 8px;
    font-weight: 500;
}

.jpm-header-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.jpm-badge-issn, .jpm-badge-sinta {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.jpm-badge-issn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.jpm-badge-issn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    text-decoration: none;
}

.jpm-badge-sinta {
    background: #fbbf24;
    color: #78350f;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.jpm-badge-sinta:hover {
    background: #f59e0b;
    color: #78350f;
    text-decoration: none;
    transform: translateY(-1px);
}

.jpm-header-cta .jpm-action-btn {
    padding: 10px 20px;
    font-size: 14px;
}

/* Baris 2: Menu Navigasi */
.jpm-header-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 12px 0;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.jpm-nav-link {
    color: #e0e7ff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.jpm-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    text-decoration: none;
}

/* Baris 3: Info Strip */
.jpm-header-info-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    font-size: 12px;
    color: #bfdbfe;
    flex-wrap: wrap;
    background: rgba(0, 0, 0, 0.1);
}

.jpm-info-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Tombol Umum */
.jpm-action-btn {
    background: #ffffff;
    color: #1e3a8a;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.jpm-action-btn:hover {
    background: #fbbf24;
    color: #78350f;
    transform: translateY(-2px);
    text-decoration: none;
}

.jpm-action-btn.primary {
    background: #fbbf24;
    color: #78350f;
}

.jpm-action-btn.primary:hover {
    background: #f59e0b;
}

/* ========================================
4. SIDEBAR & POLICY STYLES
======================================== */
.jpm-sidebar-widget {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 13px;
    color: #1e293b;
    width: 100%;
    line-height: 1.5;
}

.jpm-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.jpm-card-header {
    background: #1e3a8a;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    padding: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jpm-menu-item {
    display: block;
    padding: 9px 12px;
    color: #1e293b;
    text-decoration: none;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.25s ease-in-out;
}

.jpm-menu-item:hover {
    background-color: #eff6ff;
    color: #1e3a8a;
    border-left: 3px solid #2563eb;
    padding-left: 14px;
    text-decoration: none;
}

.jpm-logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 12px;
}

.jpm-logo-grid a {
    display: inline-block;
    transition: transform 0.2s ease;
    border-radius: 4px;
}

.jpm-logo-grid a:hover {
    transform: scale(1.1);
    text-decoration: none;
}

.jpm-logo-grid img {
    height: 32px;
    width: auto;
    display: block;
}

/* ========================================
5. FOOTER STYLES (CUSTOM JPM)
======================================== */
.jpm-footer-wrapper {
    background-color: #1e293b;
    color: #e2e8f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-top: 4rem;
    padding: 3rem 0 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 4px solid #fbbf24;
}

.jpm-footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.jpm-footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.jpm-footer-col h3 {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2563eb;
    display: inline-block;
}

.jpm-footer-desc {
    color: #94a3b8;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.jpm-footer-links,
.jpm-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jpm-footer-links li,
.jpm-footer-contact li {
    margin-bottom: 0.6rem;
}

.jpm-footer-links a,
.jpm-footer-contact a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.jpm-footer-links a:hover {
    color: #fbbf24;
    padding-left: 4px;
    text-decoration: none;
}

.jpm-footer-contact a {
    color: #60a5fa;
}

.jpm-footer-contact a:hover {
    color: #fbbf24;
    text-decoration: underline;
}

.jpm-footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 1rem;
}

.jpm-footer-indexing {
    margin-top: 1.5rem;
}

.jpm-footer-indexing h4 {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.jpm-indexing-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.jpm-index-badge {
    background-color: #334155;
    color: #e2e8f0;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #475569;
    transition: all 0.2s;
}

.jpm-index-badge:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* Baris Bawah Footer */
.jpm-footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.jpm-footer-bottom a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.jpm-footer-bottom a:hover {
    color: #fbbf24;
    text-decoration: underline;
}

.jpm-footer-license {
    display: flex;
    align-items: center;
}

.jpm-footer-license img {
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 2px;
}

/* ========================================
6. FIX: HALAMAN ARTIKEL & PDF VIEWER
======================================== */
.pkp_page_article .obj_article_details,
.pkp_page_article .galley_view,
.pkp_page_article .galley_view iframe,
.pkp_page_article .galley_view object,
.pkp_page_article .galley_view embed {
    position: relative !important;
    z-index: 5 !important;
    margin-top: 20px !important;
}

.pkp_page_article .page_title,
.pkp_page_article .authors,
.pkp_page_article .abstract,
.pkp_page_article .pub_id,
.pkp_page_article .citations,
.pkp_page_article .article_details {
    position: relative !important;
    z-index: 5 !important;
}

.pkp_page_article .galley_view {
    min-height: 600px !important;
    background: #ffffff !important;
}

.pkp_page_index .pkp_structure_content {
    margin-top: 0 !important;
}

.pkp_page_article .galley_view iframe {
    width: 100% !important;
    height: 800px !important;
    border: none !important;
}

/* ========================================
7. RESPONSIVE ADJUSTMENTS
======================================== */
@media (max-width: 768px) {
    .jpm-header-top {
        flex-direction: column;
        text-align: center;
    }
    .jpm-header-identity {
        flex-direction: column;
        text-align: center;
    }
    .jpm-header-text h1 {
        font-size: 20px;
    }
    .jpm-header-badges {
        justify-content: center;
    }
    .jpm-header-nav {
        gap: 2px;
    }
    .jpm-nav-link {
        font-size: 13px;
        padding: 6px 10px;
    }
    .jpm-header-info-strip {
        gap: 8px;
        font-size: 11px;
    }
    .jpm-footer-main {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .jpm-footer-col h3 {
        display: block;
        border-bottom: none;
        border-bottom: 2px solid #2563eb;
        max-width: 150px;
        margin: 0 auto 1rem auto;
    }
    .jpm-footer-badges, 
    .jpm-indexing-logos {
        justify-content: center;
    }
    .jpm-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1.2rem;
    }
    .jpm-footer-license {
        justify-content: center;
    }
}