/***********************************************************
 * 1. GLOBAL SETTINGS, FONTS & VARIABLES
 ***********************************************************/
@import url('https://fonts.googleapis.com/css?family=Titillium+Web&display=swap');
@import url('https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Afacad:ital,wght@0,400..700;1,400..700&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

:root {
    /* --- NEW BRANDING: MODERN MINIMALIST GREEN --- */
    
    /* Warna Utama (Pengganti Biru) */
    --primary-blue: #1B5E20;       /* Hijau Tua */
    
    /* Warna Aksen/Border (Pengganti Merah) -> Abu Gelap agar minimalis */
    --primary-red: #37474F;        /* Abu Gelap (Text & Button Borders) */
    
    /* Aksen Dekoratif (Pengganti Merah Aksen) */
    --accent-red: #2E7D32;         /* Hijau Medium (Top Border Block) */
    
    /* Background Halaman */
    --accent-orange: #FAFAF7;      /* Krem / Off White */
    
    /* Aksen Highlight/Hover (Pengganti Oranye) */
    --brand-orange: #A5D6A7;       /* Hijau Muda */
    
    /* Underline / Links */
    --accent-blue-bright: #43A047; /* Hijau Cerah */
    
    /* Credits Button */
    --accent-green: #1B5E20;       /* Hijau Tua Konsisten */
    
    /* Neutrals */
    --white: #ffffff;
    --grey-text: #37474F;          /* Abu Gelap */
    --grey-dark: #263238;          /* Abu Lebih Gelap */
    --border-light: #CFD8DC;       /* Abu Kebiruan Muda (Halus) */
    
    /* Effects */
    --shadow-soft: 0 4px 20px rgba(27, 94, 32, 0.08); /* Shadow halus nuansa hijau */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

/***********************************************************
 * 2. BASE STYLES
 ***********************************************************/
html {
    background-image: url(/**/);
    background-color: var(--accent-orange);
    background-size: cover;
    background-attachment: fixed;
}

body {
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    color: var(--grey-text);
}

article .main_entry,
.page,
.obj_article_summary {
    text-align: justify;
}

/***********************************************************
 * 3. COMPONENT: BUTTONS & ACTIONS
 ***********************************************************/
/* Ubah tombol jadi minimalis (Border Abu Gelap/Hijau, Teks Abu) */
.cmp_manuscript_button,
.block_make_submission a,
.obj_galley_link {
    background: var(--white);
    color: var(--primary-blue); /* Text Hijau Tua */
    border: solid 1px var(--primary-blue); /* Border Hijau Tua */
    border-radius: 4px; /* Sedikit rounded biar modern */
    transition: all 0.3s ease;
}

.cmp_manuscript_button:hover,
.block_make_submission a:hover,
.obj_galley_link:hover {
    background: var(--primary-blue);
    color: var(--white);
}

/***********************************************************
 * 4. HEADER & NAV STRUCTURE
 ***********************************************************/
.has_site_logo .pkp_head_wrapper {
    padding-right: 0px;
}

.pkp_site_nav_toggle {
    width: 3.857rem;
    height: 3.4rem;
}

.pkp_site_name_wrapper {
    padding-left: 0;
    padding-right: 0;
}

/* HEADER FIX FOR OJS 3.3 */
.pkp_structure_head,
.pkp_structure_head[style] {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: top center !important;
    min-height: 250px !important;
    height: auto !important;
    padding-top: 20px !important;
    padding-bottom: 10px !important;
    margin-bottom: 10px !important;
    background-color: var(--white) !important; /* Pastikan header bersih */
}

/* LOGO FIX */
.pkp_site_name .is_img img {
    max-height: 85px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block;
}

.pkp_site_name_wrapper,
.pkp_site_name_wrapper .pkp_site_name {
    height: auto !important;
    padding: 10px 0 !important;
    display: none;
    margin: 0 !important;
}

.pkp_head_wrapper .pkp_site_name_wrapper .pkp_site_name .is_img {
    margin-bottom: 0 !important;
}

/* NAVIGATION (PRIMARY MENU) */
.pkp_navigation_primary_wrapper,
.pkp_site_nav_menu {
    background: var(--primary-blue) !important; /* Hijau Tua */
    margin-top: 120px !important;
}

#navigationPrimary ul li ul {
    background-color: var(--white) !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Shadow lebih tipis */
    padding: 10px 0;
    border-radius: 0 0 5px 5px;
    border-top: 3px solid var(--brand-orange); /* Border atas dropdown Hijau Muda */
}

/* 2. Style Dropdown Items */
#navigationPrimary ul li ul li a {
    display: block !important;
    background-color: #FFFFFF !important;
    color: var(--primary-blue) !important; /* Teks Hijau Tua */
    padding: 12px 20px !important;
    transition: none !important;
}

/* 2. Tampilan Dropdown HOVER */
#navigationPrimary ul li ul li a:hover {
    background-color: var(--brand-orange) !important; /* Background Hijau Muda */
    color: var(--primary-blue) !important;            /* Teks Hijau Tua (Biar Kontras) */
}

/***********************************************************
 * 5. SIDEBAR BLOCKS (MODERN CARD STYLE - REVISED)
 ***********************************************************/
/* Wrapper Block Card */
.pkp_block {
    background-color: var(--white);
    box-shadow: var(--shadow-soft);
    margin: 0 0 25px 0;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--border-light); /* Border abu halus */
    overflow: hidden;
}

/* Header Judul Block */
.pkp_structure_sidebar .pkp_block .title {
    display: block;
    background-color: var(--primary-blue); /* Latar Hijau Tua */
    color: var(--white) !important;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 4px solid var(--brand-orange); /* Aksen Hijau Muda */
    width: 100%;
    margin: 0;
}

/* Konten dalam Block */
.pkp_block .content {
    background: var(--white);
    border-top: none;
    padding: 15px 18px;
}

/* Khusus Keyword Cloud */
.block_Keywordcloud {
    background: var(--white);
    border-top: none;
    padding: 0;
}

.pkp_structure_sidebar .block_Keywordcloud .title {
    border-bottom: 4px solid var(--brand-orange);
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px 18px;
    font-size: 15px;
}

/***********************************************************
 * 6. CUSTOM SIDEBAR MENU (LEFT NAV)
 ***********************************************************/
.container-block {
    width: 100%;
    padding: 0;
    margin: 0;
}

.container-block .sidebar-block {
    position: relative;
    width: 100%;
}

.container-block .sidebar-block ul {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.container-block .sidebar-block ul .menus {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    background-color: #F1F8E9; /* Ubah ke Hijau Sangat Pucat (Nuansa Minimalis) */
    padding: 10px;
    margin: 2px;
    border-radius: 2px;
    list-style: none;
    font-size: 20px;
    align-items: center;
    position: relative;
    color: var(--primary-blue);
}

.container-block .sidebar-block ul .menus:before {
    transition: 0.2s;
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 2px 0 0 2px;
    width: 5px; /* Lebih tipis biar elegan */
    height: 100%;
    background: var(--primary-blue); /* Aksen Hijau Tua */
    z-index: 0;
}

.container-block .sidebar-block ul .menus p {
    transition: 0.2s;
    font-size: 14px;
    z-index: 2;
    padding-left: 6px;
    font-weight: 500;
}

.container-block .sidebar-block ul .menus:hover:before {
    width: 100%; /* Full width saat hover */
    background: var(--primary-blue);
}

.container-block .sidebar-block ul .menus:hover p {
    color: var(--white);
    transform: translateX(5px);
}

/* SIDEBAR CREDITS */
.container-block .sidebar-block .credits {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 10vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container-block .sidebar-block .credits p {
    cursor: pointer;
    font-family: 'Afacad', sans-serif;
    font-size: 18px;
    opacity: 0.7;
    transition: .2s;
}

.container-block .sidebar-block .credits p a {
    text-decoration: none;
    background-color: var(--accent-green);
    padding: 5px 10px;
    color: #FEFEFE;
    border-radius: 4px;
}

.container-block .sidebar-block .credits p:hover {
    opacity: 1;
}

/***********************************************************
 * 7. SIDEBAR RIGHT (MENU ITEMS - MODERN LIST)
 ***********************************************************/
/* Reset list style */
.sidebar-menu, 
.pkp_block .content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Style per item list */
.pkp_block .content li,
.pkp_block .content .sidebar-menu li {
    margin-bottom: 0;
    padding: 8px 0;
    border: none;
    border-bottom: 1px dashed var(--border-light); /* Garis putus-putus halus */
}

/* Hapus garis di item terakhir */
.pkp_block .content li:last-child {
    border-bottom: none;
}

/* Style Link Sidebar */
.pkp_block .content a,
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--grey-text); /* Abu Gelap */
    transition: all 0.2s ease;
    background: transparent;
}

/* Hover Effect: Text jadi Hijau & geser dikit */
.pkp_block .content a:hover,
.sidebar-menu a:hover {
    color: var(--primary-blue); /* Jadi Hijau Tua */
    transform: translateX(5px); 
    background: transparent;
}

.sidebar-menu a::before {
    display: none; 
}

/* Icon (kalau ada) */
.sidebar-menu a i {
    color: var(--brand-orange); /* Icon Hijau Muda */
    font-size: 14px;
    opacity: 1;
}

.sidebar-menu a:hover i {
    transform: none;
    color: var(--primary-blue);
}

/***********************************************************
 * 8. CONTENT AREA
 ***********************************************************/
body .pkp_structure_page {
    background: var(--white);
    box-shadow: none;
}

.pkp_structure_content .pkp_structure_main {
    box-shadow: var(--shadow-soft);
    background: var(--white);
    margin-top: 10px;
    padding-top: 0px !important;
    border-top: none;
    border-radius: 8px; /* Konsisten Rounded */
}

.homeJournal {
    border: solid 1px var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-soft); /* Shadow halus */
}

.journal-sidebar {
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    padding: 20px;
    color: var(--grey-text);
}

/***********************************************************
 * 9. FOOTER
 ***********************************************************/
.pkp_brand_footer {
    display: none;
}

.pkp_structure_page .pkp_structure_footer_wrapper {
    background: #fff;
    margin-top: 15px;
    border-radius: 5px;
    border-bottom: none;
    box-shadow: var(--shadow-soft);
    border-top: 4px solid var(--brand-orange); /* Top border hijau muda */
}

/***********************************************************
 * 10. RESPONSIVE QUERIES
 ***********************************************************/

/* TABLET (≥768px) */
@media (min-width: 768px) {
    .pkp_page_index .cmp_announcements > .obj_announcement_summary:before,
    .pkp_page_index .cmp_announcements .more:before {
        border-left: none;
    }
}

/* DESKTOP (≥992px) */
@media (min-width: 992px) {
    .pkp_navigation_user_wrapper {
        top: 10px;
        width: initial;
        transform: translateX(0%);
    }

    .pkp_site_name_wrapper .pkp_site_name {
        left: 0;
    }

    .pkp_head_wrapper .pkp_site_name_wrapper .pkp_site_name .is_img img {
        max-height: 100%;
    }

    .pkp_head_wrapper .pkp_site_name_wrapper .pkp_site_name {
        padding-top: 0.071rem;
        padding-bottom: 0.071rem;
    }

    .pkp_page_index .homepage_about {
        padding-top: 0;
        padding-bottom: 0;
    }

    .pkp_structure_sidebar:before {
        border-left: none;
    }

    .pkp_site_name {
        padding-top: 0;
        padding-bottom: 0;
    }

    .pkp_block {
        margin: 15px 0 0 15px;
        padding: 0;
    }
}

/* MOBILE (≤991.98px) - FIXED OVERLAP */
@media (max-width: 991.98px) {
    .pkp_site_name_wrapper {
        height: 3.4rem;
    }

    .pkp_site_name_wrapper .pkp_site_name {
        left: 3.2rem;
        height: 54px;
        padding-top: 0;
        padding-bottom: 0;
    }

    .pkp_page_index .homepage_about {
        padding-top: 2.143rem;
        padding-bottom: 2.143rem;
    }

    .pkp_site_nav_menu {
        background: var(--white);
        box-shadow: 0px 6px 25px 0px rgba(0,0,0,0.1);
    }
}

/***********************************************************
 * 11. FIX FINAL: USER NAV (ANTI MELAR & PRESISI)
 ***********************************************************/

/* 1. WRAPPER UTAMA */
.pkp_structure_head .pkp_navigation_user_wrapper {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    left: auto !important;
    width: fit-content !important;
    display: inline-flex !important;
    white-space: nowrap !important;
    
    background-color: var(--white);
    padding: 8px 25px;
    border-radius: 50px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--brand-orange); /* Border tipis Hijau Muda */
    z-index: 9999;
}

/* 2. MENU ITEM (Login & Register) */
.pkp_navigation_user {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    gap: 15px;
}

/* 3. TEKS LINK */
.pkp_navigation_user li a {
    color: var(--primary-blue) !important; /* Text Hijau Tua */
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
}

.pkp_navigation_user li a:hover {
    color: var(--brand-orange) !important; /* Hover Hijau Muda */
}

/* 4. DROPDOWN (Dashboard, Logout) */
.pkp_navigation_user li ul {
    position: absolute;
    top: 130%;
    right: 0;
    left: auto !important;
    width: 160px;
    background-color: #ffffff !important;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 10px 0;
    display: none;
    text-align: left;
    border-top: 3px solid var(--primary-blue);
}

.pkp_navigation_user li:hover ul {
    display: block;
}

.pkp_navigation_user li ul li {
    display: block;
    margin: 0;
}

.pkp_navigation_user li ul li a {
    display: block;
    padding: 10px 20px;
    color: var(--grey-text) !important;
    text-transform: capitalize;
    font-weight: 500;
    border-bottom: 1px dashed var(--border-light);
}

.pkp_navigation_user li ul li a:hover {
    background-color: var(--accent-orange);
    color: var(--primary-blue) !important;
}

/* 5. FIX MOBILE (HP) */
@media (max-width: 991px) {
    .pkp_structure_head .pkp_navigation_user_wrapper {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        width: 100% !important;
        display: block !important;
        background: #f5f5f5;
        border-radius: 0;
        box-shadow: none;
        text-align: center;
        margin-bottom: 10px;
        border: none;
    }
    
    .pkp_navigation_user {
        justify-content: center;
    }
}

/***********************************************************
 * 12. FIX NAVIGASI UTAMA (HOME, CURRENT, ARCHIVES)
 ***********************************************************/

/* 1. Background Menu Full Hijau Tua */
.pkp_navigation_primary_wrapper {
    background: var(--primary-blue) !important; /* #1B5E20 */
    border-bottom: 4px solid var(--brand-orange); /* #A5D6A7 */
}

/* 2. Styling Teks Link Utama */
.pkp_navigation_primary > li > a {
    color: var(--white) !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 15px !important;
    padding: 18px 25px !important;
    letter-spacing: 0.5px;
    transition: all 0.3s ease-in-out;
    opacity: 1 !important;
}

/* 3. Efek Hover & Menu Aktif */
.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li:hover > a,
.pkp_navigation_primary > li.focus > a,
.pkp_navigation_primary > li[aria-expanded="true"] > a {
    background-color: var(--brand-orange) !important; /* Jadi Hijau Muda */
    color: var(--primary-blue) !important; /* Teks jadi Hijau Tua biar terbaca */
    text-decoration: none;
}

/* =======================================================
   FIX FINAL: POSISI TOMBOL MOBILE
   ======================================================= */

@media (max-width: 991px) {

    /* 1. HEADER CONTAINER */
    .pkp_structure_head {
        position: relative !important;
        background-color: #ffffff !important;
        border-bottom: 3px solid var(--brand-orange);
        min-height: 100px !important;
        padding-top: 15px !important;
        z-index: 500 !important;
    }

    /* 2. POSISI TOMBOL MENU (Mobile Toggle) */
    .pkp_site_nav_toggle {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: absolute !important;
        left: -60px !important;
        top: 40px !important;
        width: 45px !important;
        height: 40px !important;
        
        /* Style Kotak Hijau Tua */
        background-color: var(--primary-blue) !important; 
        border: 2px solid #ffffff !important;
        border-radius: 5px !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
        z-index: 999999 !important;
        cursor: pointer !important;
    }

    /* 3. GAMBAR IKON GARIS TIGA */
    .pkp_site_nav_toggle:before {
        content: "" !important;
        position: absolute;
        left: 10px;
        top: 10px;
        width: 21px;
        height: 3px;
        background-color: white;
        box-shadow: 
            0 7px 0 0 white,
            0 14px 0 0 white;
    }

    /* 4. POSISI LOGO */
    .pkp_head_wrapper,
    .pkp_site_name_wrapper {
        display: block !important;
        width: 100% !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
        padding-left: 70px !important; 
        padding-right: 15px !important;
    }

    .pkp_site_name_wrapper .pkp_site_name .is_img img {
        display: inline-block !important;
        max-height: 55px !important;
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        margin-top: 5px !important;
    }

    /* Sembunyikan elemen pengganggu */
    .pkp_site_nav_toggle span, .pkp_site_nav_toggle i, 
    .pkp_structure_head .pkp_navigation_user_wrapper {
        display: none !important;
    }
}