/* =========================================================
   CUSTOM CSS OJS - MODERN, LUXURY & PROFESSIONAL (REVISED)
   ========================================================= */

/* 1. Import Font Modern (Inter) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* =========================================================
   HEADER BANNER (GAMBAR KUSTOM VIA BACKGROUND-IMAGE)
   ========================================================= */

/* 0. Cegah scroll horizontal -- ini penyebab bagian kiri banner terpotong
   ("JOURNAL" jadi "URNAL"): ada elemen di halaman yang melebar keluar layar,
   membuat browser bisa di-scroll ke samping, sehingga tampilan yang tertangkap
   di screenshot bergeser dari posisi aslinya. */
html, body {
  overflow-x: hidden !important;
  max-width: 100% !important;
}

/* Header dipaksa "display: block" DAN "position: static" (bukan flex/sticky
   bawaan tema). Ini penting: tema OJS menata elemen di dalam header dengan
   flex + align-items:center, DAN kemungkinan besar posisi menu di-set
   position:sticky/fixed agar selalu menempel di atas layar saat di-scroll --
   itulah sebabnya menu terlihat "lompat" ke atas banner. */
body header.pkp_structure_head {
  display: block !important;
  position: static !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: visible !important; /* jangan potong menu bila tingginya berubah */
}

/* .pkp_head_wrapper dijadikan KOTAK BANNER: tinggi tetap 270px, gambar
   sebagai background-image mengisi penuh. Karena display:block, kotak ini
   otomatis 100% lebar dan menu di bawahnya (elemen sibling berikutnya di
   HTML) akan mengalir tepat di bawahnya tanpa tumpang tindih. */
body .pkp_head_wrapper.pkp_head_wrapper {
  display: block !important;
  position: static !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 220px !important;
  max-height: 270px !important;
  background-image: url('https://i.ibb.co.com/fG1hR9wS/header-banner-no-box-2x-smaller.png') !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: cover !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Sembunyikan logo/teks bawaan OJS karena sudah digantikan banner di atas */
body .pkp_site_name {
  display: none !important;
}

/* Menu navigasi (Current, Archives, About) dipaksa kembali ke alur normal
   -- LEPAS TOTAL dari position:sticky/fixed/absolute bawaan tema, karena
   itulah yang membuatnya "menempel" di puncak layar alih-alih di bawah
   banner. Ditambahkan juga pada elemen header di atas untuk jaga-jaga jika
   tema menerapkan sticky di level header, bukan di nav-nya langsung. */
body .pkp_navigation_primary_row.pkp_navigation_primary_row {
  display: block !important;
  position: 300px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
}

body .pkp_navigation_primary_wrapper {
  display: flex !important;
  position: static !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Tampilan Smartphone / HP (Lebar Layar <= 991px): tinggi banner menyesuaikan
   otomatis mengikuti rasio asli gambar (1280:270), supaya tidak terpotong
   maupun bersisa ruang kosong di layar sempit */
@media (max-width: 991px) {
  body .pkp_head_wrapper.pkp_head_wrapper {
    height: auto !important;
    aspect-ratio: 1280 / 270 !important;
    background-size: cover !important;
  }
}


/* =========================================================
   2. STYLING MENU NAVIGASI UTAMA & DROPDOWN (POPUP)
   ========================================================= */

/* Warna Teks & Transisi Tombol Navigasi Utama */
.pkp_site_nav_menu a,
.pkp_navigation_primary_wrapper a,
.pkp_navigation_primary_wrapper button {
  color: #B8860B !important;
  border: none !important;
  transition: all 0.3s ease !important; 
}

/* Efek Hover pada Item Navigasi Utama (misal: menu About) */
.pkp_navigation_primary_wrapper a:hover,
.pkp_navigation_primary_wrapper button:hover {
  background-color: #B8860B !important;
  color: #ffffff !important; /* Teks berubah putih agar kontras & jelas terbaca */
  border-radius: 3px;
}

/* Background Kotak Popup / Sub-Menu Dropdown */
.pkp_navigation_primary .sub-menu,
.pkp_navigation_primary ul ul {
  background-color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

/* Efek Hover saat kursor mengarah ke item di dalam Popup Sub-Menu */
.pkp_navigation_primary .sub-menu a:hover,
.pkp_navigation_primary ul ul a:hover {
  background-color: #B8860B !important;
  color: #ffffff !important;
}


/* =========================================================
   3. RESET LAYAR DAN KONTEN
   ========================================================= */

/* PAKSA URUTAN TAMPILAN dengan flexbox "order" di level body: banner (1),
   lalu menu (2), baru konten halaman (3). Solusi paling pasti untuk
   menggeser menu ke bawah banner, karena position:static saja tidak cukup. */
body {
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

body header.pkp_structure_head {
  order: 1 !important; /* banner selalu tampil PALING ATAS */
}

body .pkp_navigation_primary_row {
  order: 2 !important; /* menu selalu tampil TEPAT DI BAWAH banner */
}

body .pkp_structure_page {
  order: 3 !important; /* konten halaman & footer selalu di bawah menu */
}

.pkp_structure_page {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 6. Kotak Notifikasi */
.cmp_notification, 
.page_submissions .cmp_notification {
    background-color: #fff3cd;
    color: #856404;
    border-left: 5px solid #ffc107;
    padding: 14px 18px;
    border-radius: 4px;
    font-weight: 500;
    margin-bottom: 25px;
}

/* 7. Mempercantik Tombol-Tombol */
.cmp_button, .pkp_button {
    background-color: #1a5276;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.cmp_button:hover, .pkp_button:hover {
    background-color: #11364f;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* 8. Desain Sidebar Wrapper */
.pkp_block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.pkp_block .title {
    color: #1a5276;
    font-weight: 700;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
    margin-bottom: 12px;
    text-transform: uppercase;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
}

/* 9. Desain Side Menu (Rapat, Presisi & Mewah) */
.pkp_block ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.pkp_block ul li {
    margin-bottom: 4px !important; 
}

.pkp_block ul li a {
    display: block;
    padding: 7px 12px;
    color: #4a5568 !important;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 1.58rem;
    background-color: #ffffff;
    
    border: 1px solid #e2e8f0;
    border-left: 4px solid #cbd5e1;
    border-radius: 5px;
    
    transition: all 0.2s ease-in-out;
}

/* Efek Hover Side Menu */
.pkp_block ul li a:hover {
    background-color: #f8fafc !important;
    color: #1a5276 !important;
    border-left: 0px solid #1a5276 !important;
    box-shadow: 2px 3px 8px rgba(26, 82, 118, 0.08);
    transform: translateX(4px);
}

/* 10. Tautan Dalam Teks Konten */
.pkp_page_content a {
    color: #2980b9;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px dotted #2980b9;
    transition: all 0.2s ease;
}

.pkp_page_content a:hover {
    color: #d35400;
    border-bottom: 1px solid #d35400;
}

/* =========================================================
   11. Footer Kustom Profesional
   ========================================================= */
.pkp_structure_footer_wrapper {
    background-color: #eaf2f8 !important;
    margin-top: 30px;
}

.journal-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 10px 20px;
    color: #4a5568;
    font-size: 1.8rem;
}

.journal-footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(26, 82, 118, 0.15);
}

.journal-footer-col h4 {
    color: #1a5276 !important;
    font-size: 1.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.journal-footer-col p {
    margin: 0 0 8px 0;
    line-height: 1.7;
    color: #4a5568;
}

.journal-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.journal-footer-col ul li {
    margin-bottom: 10px;
}

.journal-footer-col ul li a {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.2s ease;
}

.journal-footer-col ul li a:hover {
    color: #1a5276;
    text-decoration: underline;
}

.journal-footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.journal-footer-badges img {
    height: 40px;
    background: #ffffff;
    border-radius: 4px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
}

.journal-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    font-size: 1.42rem;
    color: #64748b;
}

.journal-footer-bottom a {
    color: #4a5568;
    text-decoration: none;
}

.journal-footer-bottom a:hover {
    color: #1a5276;
}

.journal-footer-social {
    display: flex;
    gap: 12px;
}

.journal-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 22px;
    background: rgba(26, 82, 118, 0.08);
    border-radius: 50%;
    color: #1a5276 !important;
    transition: background 0.2s ease;
}

.journal-footer-social a:hover {
    background: #1a5276;
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .journal-footer-grid {
        grid-template-columns: 1fr;
    }
    .journal-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================================
   12. Menyejajarkan Footer Custom dengan "Powered by OJS/PKP"
   ========================================================= */
.pkp_structure_footer_wrapper {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
}

.pkp_structure_footer_wrapper .journal-footer {
    flex: 1 1 auto;
    margin: 0;
}

.pkp_structure_footer_wrapper .pkp_brand_footer {
    flex: 0 0 auto;
    margin-left: 20px;
}

/* Kalau elemen "Powered by" pakai class pkp_structure_footer bukan pkp_brand_footer */
.pkp_structure_footer_wrapper .pkp_structure_footer {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}