/* ==========================================================================
   YURISPRUDEN CUSTOM STYLESHEET (FULL FIX UNTUK TEMA MANUSCRIPT)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PENGATURAN GLOBAL & FONT
   -------------------------------------------------------------------------- */
:root {
    --primary-red: #8b0101;
    --primary-hover: #a80202;
    --text-dark: #333333;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --bg-light: #f8fafc;
}

*, *::before, *::after {
    font-family: "Bookman Old Style", Times, serif !important;
}

body {
    font-size: 11pt !important;
    line-height: 1.5 !important;
    color: var(--text-dark);
    background-color: #ffffff;
}

/* --------------------------------------------------------------------------
   2. STRUKTUR LAYOUT UTAMA (FIX UNTUK MANUSCRIPT THEME)
   -------------------------------------------------------------------------- */
/* Mencegah layout kaku 860px yang merusak tampilan */
.pkp_structure_main {
    width: 100% !important;
    max-width: 1200px !important; /* Lebar maksimal yang aman */
    margin: 0 auto !important;
    padding: 20px 15px !important;
    float: none !important;
}

.pkp_structure_content {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.pkp_structure_main {
    flex: 1 1 65% !important; /* Konten utama mengambil sisa ruang */
}

.pkp_structure_sidebar {
    flex: 1 1 30% !important; /* Sidebar mengambil ruang lebih kecil */
    max-width: 350px !important;
}

/* Justify Teks HANYA untuk desktop */
@media (min-width: 992px) {
    .pkp_structure_main p,
    .obj_article_details .abstract,
    .article_abstract {
        text-align: justify !important;
        text-justify: inter-word !important;
    }
}

/* --------------------------------------------------------------------------
   3. HEADER & NAVIGASI
   -------------------------------------------------------------------------- */
.pkp_structure_head {
    background: var(--primary-red);
    border-bottom: 0.3rem solid var(--primary-red);
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

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

#navbar {
    background-color: var(--primary-red);
    margin-bottom: 8px;
}

.pkp_navigation_primary_row {
    background: #f23737;
    padding: 0.15rem 1rem 0 0.5rem;
}

.pkp_navigation_primary_row .pkp_navigation_primary_wrapper ul li a {
    margin: 0 !important;
    padding: 0 10px !important;
    line-height: 32px !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
}

.pkp_navigation_primary_row .pkp_navigation_primary_wrapper ul li a:hover {
    background: var(--primary-red) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(139, 1, 1, 0.3) !important;
}

/* Fix Search Icon */
.pkp_navigation_search_wrapper a::before {
    display: none !important;
}
.pkp_navigation_search_wrapper a::after {
    content: "" !important;
    display: inline-block !important;
    width: 14px !important;
    height: 14px !important;
    margin-right: 6px !important;
    background-color: #ffffff !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z'/%3E%3C/svg%3E") no-repeat center / contain !important;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z'/%3E%3C/svg%3E") no-repeat center / contain !important;
}

/* --------------------------------------------------------------------------
   4. ARTIKEL & ISSUE LAYOUT (FIX KARTU & TOMBOL)
   -------------------------------------------------------------------------- */
/* Card Artikel di Halaman Issue */
.obj_article_summary {
    background: #ffffff !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 8px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

.obj_article_summary:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08) !important;
    transform: translateY(-2px) !important;
}

.obj_article_summary .title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    text-align: left !important;
    margin-bottom: 10px !important;
    line-height: 1.4 !important;
}

.obj_article_summary .authors {
    text-align: left !important;
    color: var(--text-muted) !important;
    margin-bottom: 15px !important;
}

/* Tombol Galley (PDF, Similarity, AI) */
.obj_article_summary .galleys {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    margin-top: 15px !important;
    padding: 0 !important;
}

.obj_article_summary .obj_galley_link {
    display: inline-flex !important;
    align-items: center !important;
    background: var(--bg-light) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    color: var(--primary-red) !important;
    text-decoration: none !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
}

.obj_article_summary .obj_galley_link::before {
    content: "📄";
    margin-right: 6px;
    font-size: 1rem;
}

.obj_article_summary .obj_galley_link:hover {
    background: var(--primary-red) !important;
    color: #ffffff !important;
    border-color: var(--primary-red) !important;
    text-decoration: none !important;
}

/* --------------------------------------------------------------------------
   5. SIDEBAR & MENU BLOK MERAH (FIX RESPONSIF)
   -------------------------------------------------------------------------- */
.custom_block_container {
    width: 100% !important;
    margin-bottom: 20px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    overflow: hidden !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.custom_block_container .block_header {
    background: linear-gradient(135deg, var(--primary-red) 0%, #680000 100%) !important;
    color: #ffffff !important;
    font-size: 10pt !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    padding: 12px 15px !important;
    border-left: 5px solid #f59e0b !important;
}

.custom_block_container .block_table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 4px !important;
    padding: 8px !important;
    margin: 0 !important;
    table-layout: fixed !important;
}

.custom_block_container .block_table td {
    display: block !important;
    width: 100% !important;
    background: linear-gradient(135deg, var(--primary-red) 0%, #700000 100%) !important;
    border-radius: 5px !important;
    border-left: 3px solid #f59e0b !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

.custom_block_container .block_table td a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 10pt !important;
    font-weight: 600 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 15px !important;
    min-height: 44px !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    text-align: left !important;
}

.custom_block_container .block_table td a::after {
    content: "\203A" !important;
    font-size: 14pt !important;
    flex-shrink: 0 !important;
    margin-left: 10px !important;
    opacity: 0.6 !important;
    transition: transform 0.3s ease !important;
}

.custom_block_container .block_table td:hover {
    background: linear-gradient(135deg, #a40000 0%, var(--primary-red) 100%) !important;
    border-left-color: #fbbf24 !important;
    transform: translateX(4px) !important;
}

.custom_block_container .block_table td:hover a::after {
    opacity: 1 !important;
    transform: translateX(4px) !important;
}

/* CTA Buttons Sidebar */
.ojs-cta-btn {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px 15px !important;
    background: linear-gradient(135deg, var(--primary-red) 0%, #5a0000 100%) !important;
    color: #ffffff !important;
    font-size: 10.5pt !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    border-left: 3px solid #f59e0b !important;
    margin-bottom: 5px !important;
    transition: all 0.2s ease !important;
}

.ojs-cta-btn:hover {
    background: linear-gradient(135deg, #a80202 0%, #750000 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 10px rgba(139, 1, 1, 0.3) !important;
}

/* --------------------------------------------------------------------------
   6. HALAMAN KUSTOM (ETIKA, AI, APC, PLAGIARISM)
   -------------------------------------------------------------------------- */
.ojs-ethics-wrapper, 
.ai-policy-wrapper, 
.plagiarism-policy-wrapper,
.ojs-policy-wrapper {
    background: var(--bg-light) !important;
    padding: 20px !important;
    border-radius: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ojs-ethics-wrapper p, 
.ai-policy-wrapper p, 
.plagiarism-policy-wrapper p,
.ojs-policy-wrapper p {
    font-size: 10.5pt !important;
    line-height: 1.6 !important;
}

/* --------------------------------------------------------------------------
   7. FOOTER
   -------------------------------------------------------------------------- */
.pkp_structure_footer_wrapper {
    background: linear-gradient(135deg, #541414 0%, #300505 100%) !important;
    border-top: 3px solid var(--primary-red) !important;
    color: #f8fafc !important;
    padding: 20px 15px !important;
}

.pkp_footer_content a {
    color: #ff8585 !important;
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE FIX (TABLET & MOBILE - SANGAT PENTING)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    /* Layout Konten Utama & Sidebar Turun ke Bawah */
    .pkp_structure_content {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .pkp_structure_main {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 15px !important;
    }

    .pkp_structure_sidebar {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 15px !important;
        margin-top: 10px !important;
    }

    /* WAJIB: Teks rata kiri di HP/Tablet agar tidak ada celah aneh */
    body, p, .article_abstract, .obj_article_details {
        text-align: left !important;
        text-justify: none !important;
    }

    /* Ukuran Font Lebih Kecil di HP */
    body { font-size: 10.5pt !important; }
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    
    /* Sembunyikan menu user di HP agar header tidak penuh */
    .pkp_navigation_user {
        display: none !important; 
    }
}

/* Perbaikan Khusus Layar HP Kecil */
@media (max-width: 480px) {
    .pkp_site_name .is_img img {
        min-height: 60px !important;
        object-fit: cover !important;
    }

    .obj_article_summary {
        padding: 15px !important;
    }

    .obj_article_summary .obj_galley_link {
        width: 100% !important;
        justify-content: center !important;
        margin-bottom: 5px !important;
    }
}

/* Pastikan gambar tidak meluber */
img, iframe, video {
    max-width: 100% !important;
    height: auto !important;
}