/*
Theme Name: SmartMag Child
Theme URI: https://smartmag.theme-sphere.com/
Description: A child theme of SmartMag
Author: ThemeSphere
Author URI: https://theme-sphere.com
Template: smart-mag
Version: 1.1
*/

/* Layout Grid Utama */
#result-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Style Card */
.hukum-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.hukum-card:hover {
    transform: translateY(-5px);
}

/* Styling Umum Badge */
.hukum-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700 !important; /* Mempertebal teks agar lebih terbaca */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    line-height: 1.4;
}

/* Badge Spesifik untuk Jenis Anggaran (Oranye) */
.badge-jenis-anggaran {
    background-color: #e67e22 !important; /* Warna Oranye BPKPD */
    color: #ffffff !important; /* Memaksa warna putih */
    border: 1px solid rgba(0,0,0,0.1); /* Memberi sedikit dimensi */
    text-shadow: 1px 1px 1px rgba(0,0,0,0.2); /* Memberi bayangan halus pada teks agar lebih kontras */
}

/* Badge Spesifik untuk Tipe Produk (Misal Biru untuk PERDA) */
.hukum-tag-primary {
    background-color: #1e73be !important;
    color: #ffffff !important;
}

/* Efek Hover (Opsional) */
.hukum-tag:hover {
    filter: brightness(90%);
    transition: 0.3s;
}

.hukum-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
    min-height: 45px;
}

.hukum-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

/* Tombol Action */
.hukum-action {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.btn-view, .btn-download {
    text-align: center;
    padding: 8px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.btn-view {
    background: #f1f3f4;
    color: #3c4043;
}

.btn-download {
    background: #1a73e8;
    color: #fff;
}

.btn-download:hover { background: #1557b0; }
.btn-view:hover { background: #e8eaed; }

/* 1. Pengaturan Jarak Utama (Agar tidak mepet ke atas dan samping) */
.hukum-layout-wrapper {
    background-color: #f8fafc; /* Warna latar belakang lembut */
    padding: 60px 20px; /* Jarak atas/bawah 60px, samping 20px */
    min-height: 80vh;
}

.hukum-main-container {
    max-width: 1140px; /* Batas lebar konten agar terpusat */
    margin: 0 auto; /* Menengahkan kontainer */
}

/* 2. Header Halaman */
.hukum-page-header {
    margin-bottom: 40px;
    text-align: left;
}

.hukum-page-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
}

.hukum-page-header p {
    color: #64748b;
    font-size: 1.1rem;
}

/* 3. Baris Filter (Pencarian & Dropdown) */
.hukum-filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    background: #ffffff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.filter-group-left { flex: 1; }
.filter-group-right { display: flex; gap: 10px; }

#input-search {
    width: 100%;
    padding: 12px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: 0.3s;
}

#input-search:focus { border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1); }

#filter-cat, #filter-year {
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

/* 4. Responsif Mobile */
@media (max-width: 768px) {
    .hukum-filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group-right {
        flex-direction: column;
    }
    .hukum-page-header h1 {
        font-size: 1.8rem;
    }
}

.load-more-wrapper {
    grid-column: 1 / -1; /* Agar tombol memenuhi lebar grid di bawah */
    text-align: center;
    margin-top: 40px;
}

#load-more-btn {
    background: #ffffff;
    color: #1a73e8;
    border: 2px solid #1a73e8;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

#load-more-btn:hover {
    background: #1a73e8;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}

/* Container Utama */
.profil-layout {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    align-items: flex-start;
}

/* Sidebar Menu */
.profil-sidebar {
    flex: 0 0 250px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    position: sticky;
    top: 20px;
}

.nav-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-tabs li {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #555;
}

.nav-tabs li:last-child { border-bottom: none; }

.nav-tabs li.active {
    background: #0073aa;
    color: white;
    border-radius: 4px;
}

.nav-tabs li:hover:not(.active) {
    background: #e9ecef;
    padding-left: 20px;
}

/* Konten Utama */
.profil-content {
    flex: 1;
    background: #fff;
    min-height: 400px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: block;
}

/* Grid Pegawai */
.pegawai-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pegawai-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    background: #fff;
}

.pegawai-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.pegawai-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid #f0f0f0;
}

.pegawai-card h4 {
    margin: 10px 0 5px;
    font-size: 1.1rem;
}

.pegawai-card .jabatan {
    color: #0073aa;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.pegawai-card .nip {
    color: #777;
    font-size: 0.8rem;
}

/* Tugas & Fungsi */
.tugas-fungsi {
    background: #fdfdfd;
    padding: 20px;
    border-left: 4px solid #0073aa;
    margin-bottom: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .profil-layout { flex-direction: column; }
    .profil-sidebar { width: 100%; position: static; }
}

/* Update CSS untuk Box Tunggal */
.bpkpd-info-box-single {
    margin: 20px 0;
}

.info-item-full {
    background: #fdfdfd;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    border-top: 4px solid #0073aa; /* Memberi aksen garis di atas */
}

.info-item-full h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 700;
}

/* Memperbaiki tampilan list di dalam deskripsi */
.info-text ul, .info-text ol {
    padding-left: 20px;
    margin-bottom: 15px;
}

.info-text li {
    margin-bottom: 8px;
}

/* --- Tambahan untuk Tabel Produk Hukum & Repositori --- */

/* Container Utama */
.hukum-container {
    margin-top: 20px;
    font-family: 'Public Sans', sans-serif;
}

/* Styling Tabel */
.table-hukum {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}

.table-hukum thead th {
    background: #fcfcfc;
    padding: 15px;
    text-align: left;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 2px solid #f0f0f0;
}

.hukum-row td {
    padding: 15px;
    border-bottom: 1px solid #f8f8f8;
    vertical-align: middle;
}

/* Judul & Meta */
.hukum-title-text {
    font-weight: 700;
    color: #2c3e50;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.4;
    display: block;
}

.hukum-meta {
    font-size: 11px;
    color: #999;
}

/* Badge untuk Jenis (Perda/Perbup) */
.badge-jenis {
    background: #f0f4f8;
    color: #54708b;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

/* Badge Sifat (Pokok/Perubahan) */
.badge-sifat {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.badge-sifat.pokok {
    background: #e6f4ea;
    color: #1e7e34;
}

.badge-sifat.perubahan {
    background: #fdecea;
    color: #d93025;
}

/* Tombol Aksi */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    margin-right: 5px;
    transition: all 0.2s;
    text-decoration: none !important;
}

.btn-icon:hover {
    background: #1e73be;
    color: #fff;
    border-color: #1e73be;
}

/* Responsif Mobile */
@media (max-width: 768px) {
    .table-hukum thead { display: none; }
    .hukum-row td { 
        display: block; 
        text-align: left; 
        padding: 10px 15px;
        border-bottom: none;
    }
    .hukum-row { border-bottom: 10px solid #f4f4f4; }
    .col-center { text-align: left; }
}


/* Container Tabel */
.table-hukum { width: 100%; border-collapse: collapse; background: #fff; margin-top: 20px; }
.table-hukum th { background: #f8f9fa; padding: 12px; text-align: left; font-size: 13px; color: #555; border-bottom: 2px solid #eee; }
.hukum-row td { padding: 15px 12px; border-bottom: 1px solid #f0f0f0; }

/* Judul & Meta */
.hukum-title-text { font-weight: 700; color: #333; line-height: 1.4; margin-bottom: 5px; }
.hukum-meta { font-size: 11px; color: #888; }
.meta-item { margin-right: 10px; }

/* Badge Status */
.badge-status { padding: 3px 10px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.status-green { background: #e6f4ea; color: #1e7e34; border: 1px solid #badbcc; }
.status-red { background: #fdecea; color: #d93025; border: 1px solid #f5c6cb; }

/* Tombol Aksi */
.btn-icon { display: inline-block; width: 30px; height: 30px; line-height: 30px; text-align: center; background: #f8f9fa; border: 1px solid #ddd; border-radius: 4px; color: #333; margin-right: 5px; transition: 0.3s; }
.btn-icon:hover { background: #007bff; color: #fff; border-color: #007bff; }

.col-center { text-align: center; }
