/* ==========================================================================
   JOURNAL OF GOVERNMENT AND CIVIL SOCIETY (JGCS) - CUSTOM CSS (V6)
   Identity Colors: Maroon (#5e1010), White (#ffffff), Dark Neutral (#1a1a1a)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. CORE VARIABLES & GLOBAL TYPOGRAPHY
   -------------------------------------------------------------------------- */
:root {
    --jgcs-maroon: #5e1010;
    --jgcs-maroon-hover: #420b0b;
    --jgcs-dark: #1a1a1a;
    --jgcs-body-text: #2c3e50;
    --jgcs-border-color: #e2e8f0;
    --jgcs-font-main: 'Helvetica', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --jgcs-radius: 6px;
    --jgcs-transition: all 0.2s ease-in-out;
}

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

html, body {
    font-family: var(--jgcs-font-main) !important;
    color: var(--jgcs-body-text);
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Format Teks Justify untuk Area Utama */
.pkp_structure_main p,
.pkp_structure_main .additional_content,
.pkp_structure_main .obj_article_summary .abstract {
    text-align: justify !important;
}

/* --------------------------------------------------------------------------
   1. NAVIGATION HEADER & SEARCH
   -------------------------------------------------------------------------- */

.pkp_structure_head {
    background-color: #ffffff !important;
    border-bottom: 3px solid var(--jgcs-maroon) !important;
    box-shadow: none !important;
}

/* Pembersihan Elemen Pseudo Header Bawaan */
.pkp_structure_head::before, .pkp_structure_head::after,
.pkp_head_wrapper::before, .pkp_head_wrapper::after,
.pkp_site_nav_menu::before, .pkp_site_nav_menu::after,
.pkp_navigation_primary_row::before, .pkp_navigation_primary_row::after,
.pkp_navigation_primary_wrapper::before, .pkp_navigation_primary_wrapper::after {
    display: none !important;
    content: none !important;
}

/* Baris Navigasi Utama */
.pkp_navigation_primary_row {
    background: var(--jgcs-maroon) !important;
    padding: 0 15px !important;
}

/* Item Menu Navigasi Utama */
.pkp_navigation_primary_row .pkp_navigation_primary > li > a {
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    padding: 14px 18px !important;
    text-decoration: none !important;
}

.pkp_navigation_primary_row .pkp_navigation_primary > li > a:hover {
    background-color: var(--jgcs-maroon-hover) !important;
    color: #ffffff !important;
}

/* Submenu Dropdown */
.pkp_navigation_primary_row .pkp_navigation_primary_wrapper ul li ul,
.pkp_navigation_primary_row .dropdown-menu {
    background: var(--jgcs-maroon) !important;
    border: none !important;
    border-radius: 0 0 var(--jgcs-radius) var(--jgcs-radius) !important;
}

.pkp_navigation_primary_row .pkp_navigation_primary_wrapper ul li ul a,
.pkp_navigation_primary_row .dropdown-menu a,
.pkp_navigation_primary_row .dropdown-menu .dropdown-item {
    color: #ffffff !important;
    font-size: 13.5px !important;
    padding: 9px 20px !important;
    text-decoration: none !important;
}

/* FITUR SEARCH HEADER: Tanpa Block Box, Tidak Transparan, Teks Warna #5e1010 */
.pkp_navigation_primary_row .pkp_search,
.pkp_navigation_primary_row a.pkp_search,
.pkp_navigation_primary_row .pkp_search_wrapper,
.pkp_navigation_primary_row .pkp_search_wrapper a,
.pkp_navigation_primary_row .pkp_search input[type="text"] {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #5e1010 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.pkp_navigation_primary_row a.pkp_search:hover,
.pkp_navigation_primary_row .pkp_search input[type="text"]:focus {
    color: #5e1010 !important;
    background: transparent !important;
    opacity: 0.85 !important;
}

/* --------------------------------------------------------------------------
   2. PEMBAGIAN KOLOM (NATIVE OJS THEME LAYOUT)
   -------------------------------------------------------------------------- */

.pkp_structure_content,
.pkp_structure_main,
.pkp_structure_sidebar {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    box-shadow: none !important;
}

.pkp_structure_main::before, .pkp_structure_main::after,
.pkp_structure_sidebar::before, .pkp_structure_sidebar::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

.pkp_structure_main .page-header,
.pkp_structure_content .page-header,
.pkp_page_index .page-header,
.pkp_page_issue .page-header {
    border-bottom: 2px solid var(--jgcs-maroon) !important;
    padding-bottom: 10px !important;
    margin-bottom: 25px !important;
}

.pkp_structure_page hr,
.pkp_structure_main hr,
.page_index_journal hr {
    display: none !important;
}

/* --------------------------------------------------------------------------
   3. HOMEPAGE REORDERING (ADDITIONAL CONTENT DI ATAS)
   -------------------------------------------------------------------------- */

.page_index_journal {
    display: flex !important;
    flex-direction: column !important;
}

.page_index_journal .additional_content {
    order: 1 !important;
    margin-bottom: 30px !important;
    border-top: none !important;
}

.page_index_journal .cmp_announcements,
.page_index_journal .homepage_announcements {
    order: 2 !important;
    margin-bottom: 30px !important;
}

.page_index_journal .current_issue {
    order: 3 !important;
}

/* --------------------------------------------------------------------------
   4. SIDEBAR & WIDGET MOST VIEWED
   -------------------------------------------------------------------------- */

.pkp_structure_sidebar .pkp_block {
    background: #ffffff !important;
    border: 1px solid var(--jgcs-border-color) !important;
    border-radius: var(--jgcs-radius) !important;
    padding: 16px 18px !important;
    margin-bottom: 20px !important;
}

.pkp_structure_sidebar .pkp_block .title,
.block_most_viewed .title {
    color: var(--jgcs-maroon) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-bottom: 2px solid var(--jgcs-maroon) !important;
    padding-bottom: 8px !important;
    margin-top: 0 !important;
    margin-bottom: 12px !important;
}

.block_most_viewed .content ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.block_most_viewed .content ul li {
    border-bottom: 1px solid var(--jgcs-border-color) !important;
    padding: 10px 0 !important;
}

.block_most_viewed .content ul li:last-child {
    border-bottom: none !important;
}

.block_most_viewed .content ul li a {
    color: var(--jgcs-dark) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.block_most_viewed .content ul li a:hover {
    color: var(--jgcs-maroon) !important;
}

/* --------------------------------------------------------------------------
   5. FOOTER STYLING (1 FULL COLUMN & TRANSPARENT BACKGROUND)
   -------------------------------------------------------------------------- */

.pkp_structure_footer_wrapper {
    background: transparent !important;
    background-color: transparent !important;
    border-top: 3px solid #5e1010 !important;
    border-bottom: none !important;
    padding: 30px 0 20px 0 !important;
    margin-top: 40px !important;
    width: 100% !important;
}

.pkp_structure_footer {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

.pkp_footer_content,
.pkp_footer_content > div,
.pkp_structure_footer .pkp_footer_content {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    float: none !important;
    clear: both !important;
    text-align: center !important;
}

.pkp_brand_footer {
    display: none !important;
}

/* --------------------------------------------------------------------------
   6. HYPERLINK & TEXT COLOR OVERRIDES
   -------------------------------------------------------------------------- */

/* Target Utama Seluruh Hyperlink di Konten Utama (Inherit dari Paragraf) */
.pkp_structure_main a,
.pkp_structure_main a:link,
.pkp_structure_main a:visited,
.pkp_structure_main a:hover,
.pkp_structure_main a:active,
.pkp_structure_main a:focus,
.pkp_structure_main a span,
.pkp_structure_main p a,
.pkp_structure_main p a span {
    color: inherit !important;
    text-decoration: underline !important;
}

.pkp_structure_main a:hover {
    opacity: 0.8 !important;
}

/* Pengecualian Navigasi Utama Header (Teks Tetap Putih) */
.pkp_navigation_primary_row a,
.pkp_navigation_primary_row a:link,
.pkp_navigation_primary_row a:visited,
.pkp_navigation_primary_row a:hover,
.pkp_navigation_primary_row a:active,
.pkp_navigation_primary_row a:focus {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* Pengecualian Tombol Badge (ORCID, Scopus, Scholar, Submit Form) */
a.badge-orcid,
a.badge-scopus,
a.badge-scholar,
.ed-badges a,
a[style*="background-color"] {
    color: #ffffff !important;
    text-decoration: none !important;
}

/* ==========================================================================
   7. ATURAN KHUSUS BOX/ELEMENT BERWARNA #5e1010 (ALWAYS WHITE TEXT)
   ========================================================================== */

/* 1. Kunci konteks dasar container maroon */
div[style*="background-color: #5e1010"],
div[style*="background-color:#5e1010"],
div[style*="background: #5e1010"],
div[style*="background:#5e1010"],
.bg-maroon,
.box-maroon {
    color: #ffffff !important;
}

/* 2. Semua teks & hyperlink biasa di dalam box maroon menjadi putih */
div[style*="background-color: #5e1010"] p,
div[style*="background-color: #5e1010"] h1,
div[style*="background-color: #5e1010"] h2,
div[style*="background-color: #5e1010"] h3,
div[style*="background-color: #5e1010"] h4,
div[style*="background-color: #5e1010"] h5,
div[style*="background-color: #5e1010"] li,
div[style*="background-color: #5e1010"] span,
div[style*="background-color: #5e1010"] strong,
div[style*="background-color: #5e1010"] a:not([style*="background"]),
div[style*="background-color: #5e1010"] a:not([style*="background"]) * {
    color: #ffffff !important;
}

/* 3. PENGECUALIAN MUTLAK: Tombol/Hyperlink berlatar belakang putih (misal: 'Start Online Submission') */
div[style*="background-color: #5e1010"] a[style*="background-color: #ffffff"],
div[style*="background-color:#5e1010"] a[style*="background-color: #ffffff"],
div[style*="background-color: #5e1010"] a[style*="background-color:#ffffff"],
div[style*="background-color:#5e1010"] a[style*="background-color:#ffffff"],
div[style*="background-color: #5e1010"] a[style*="background: #ffffff"],
div[style*="background-color:#5e1010"] a[style*="background: #ffffff"],
div[style*="background-color: #5e1010"] a[style*="background:#ffffff"],
div[style*="background-color:#5e1010"] a[style*="background:#ffffff"] {
    background-color: #ffffff !important;
    color: #5e1010 !important;
    text-decoration: none !important;
}

/* 4. Memaksa seluruh tag turunan di dalam tombol putih (span/strong/b) agar TETAP berwarna MAROON */
div[style*="background-color: #5e1010"] a[style*="background-color: #ffffff"] *,
div[style*="background-color:#5e1010"] a[style*="background-color: #ffffff"] *,
div[style*="background-color: #5e1010"] a[style*="background-color:#ffffff"] *,
div[style*="background-color:#5e1010"] a[style*="background-color:#ffffff"] *,
div[style*="background-color: #5e1010"] a[style*="background: #ffffff"] *,
div[style*="background-color:#5e1010"] a[style*="background: #ffffff"] *,
div[style*="background-color: #5e1010"] a[style*="background:#ffffff"] *,
div[style*="background-color:#5e1010"] a[style*="background:#ffffff"] * {
    color: #5e1010 !important;
}

/* 5. Hover state tombol putih */
div[style*="background-color: #5e1010"] a[style*="background-color: #ffffff"]:hover,
div[style*="background-color:#5e1010"] a[style*="background-color: #ffffff"]:hover,
div[style*="background-color: #5e1010"] a[style*="background-color: #ffffff"]:hover * {
    color: #5e1010 !important;
    opacity: 0.9 !important;
}