/* ========================================================
   1. RESET & TIPOGRAFI DASAR
   ======================================================== */
body#pkp-common-openJournalSystems {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f4f6f9;
    color: #333;
    line-height: 1.6;
}

#container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* Membuat Banner Header Responsif */
#headerTitle h1 img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================================
   2. MODERNISASI LAYOUT UTAMA (FLEXBOX)
   ======================================================== */
#body {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    gap: 30px;
}

#main {
    flex: 1; /* Mengambil sisa ruang yang ada */
    min-width: 60%; /* Mencegah konten terlalu sempit */
    float: none; 
    width: auto;
}

#sidebar {
    width: 25%; /* Lebar fix untuk sidebar */
    min-width: 280px;
    float: none;
}

/* ========================================================
   3. STYLING DAFTAR ARTIKEL (TABLE OF CONTENTS)
   ======================================================== */
/* Mengubah tabel bawaan OJS menjadi bentuk "Card" modern */
table.tocArticle {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

table.tocArticle:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(81, 12, 118, 0.1); /* Glow ungu halus */
}

table.tocArticle td {
    padding: 20px;
    vertical-align: middle;
}

.tocTitle {
    margin-bottom: 8px;
}

.tocTitle a {
    font-size: 16px;
    font-weight: 700;
    color: #510c76; /* Warna ungu utama */
    text-decoration: none;
    line-height: 1.4;
    display: block;
}

.tocTitle a:hover {
    color: #f39c12; /* Warna kuning saat hover */
}

.tocAuthors {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Styling Tombol PDF Galley */
.tocGalleys {
    text-align: right;
}

.tocGalleys a.file {
    display: inline-block;
    background-color: #f39c12; /* Tombol warna kuning */
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
}

.tocGalleys a.file:hover {
    background-color: #d68910;
}

.tocPages {
    font-size: 13px;
    color: #888;
    text-align: right;
    margin-top: 8px;
}

/* ========================================================
   4. RESPONSIVITAS (MOBILE VIEW)
   ======================================================== */
@media screen and (max-width: 850px) {
    #body {
        flex-direction: column; /* Mengubah susunan menjadi atas-bawah */
        padding: 15px;
    }
    
    #main {
        width: 100%;
        order: 1; /* Konten utama di atas */
    }
    
    #sidebar {
        width: 100%;
        order: 2; /* Sidebar turun ke bawah */
        margin-top: 20px;
    }

    /* Penyesuaian layout Card Artikel di HP */
    table.tocArticle td {
        display: block;
        width: 100%;
        text-align: left;
    }
    
    .tocGalleys, .tocPages {
        text-align: left;
        margin-top: 10px;
    }
}