/* =========================================
    COMBINED CSS: VARIABLES & THEME
    ========================================= */
:root {
    --primary-color: #2D489C;
    --primary-hover: #1e3a8a;
    --accent-color: #0081A7; 
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
}

body { background-color: #FFFFFF !important; }

/* =========================================
    HERO SECTION
    ========================================= */
.ipb-hero-full {
    padding: 3rem 0 4rem;
    background-image: linear-gradient(90deg, rgba(38, 60, 146, 0.65) 0%, rgba(38, 60, 146, 0.65) 100%), url("/hero-gedung-ahn.png");
    background-size: cover;
    background-position: center;
    color: white;
}
.hero-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.btn-add-dataset {
    background-color: rgba(255, 255, 255, 0.2); color: white; padding: 8px 16px; border-radius: 6px;
    text-decoration: none; font-weight: 700; font-size: 14px; border: 1px solid rgba(255, 255, 255, 0.4);
    display: inline-flex; align-items: center; gap: 8px; transition: all 0.2s;
}
.btn-add-dataset:hover {
    background-color: white; color: var(--primary-color); text-decoration: none; transform: translateY(-2px);
}

/* =========================================
    SEARCH COMPONENTS (SIMPLE & ADVANCED)
    ========================================= */
.simple-search-wrapper {
    display: flex; background: white; border-radius: 8px; padding: 6px;
    width: 100%; box-shadow: 0 4px 15px rgba(0,0,0,0.15); align-items: center; margin-top: 20px;
}
.simple-input { flex: 1; border: none; padding: 12px 20px; font-size: 16px; outline: none; color: var(--text-dark); }

.btn-search-blue {
    background: var(--primary-color); color: white; border: none; padding: 10px 35px;
    border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 15px; transition: background 0.2s;
}
.btn-search-blue:hover { background: var(--primary-hover); }

/* ADVANCED SEARCH STYLES */
.search-panel-container { display: none; background: transparent; margin-top: 20px; animation: slideDown 0.3s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.adv-row { display: flex; align-items: center; background: white; border-radius: 4px; padding: 5px 10px; margin-bottom: 10px; gap: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.drag-handle { color: #ccc; cursor: move; font-size: 14px; padding: 0 5px; }
.adv-input { flex: 1; border: none; font-size: 14px; padding: 10px; color: #333; outline: none; }

/* Logic Toggle */
.logic-toggle { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #888; background: #f8f9fa; padding: 5px 10px; border-radius: 20px; border: 1px solid #eee; }
.switch { position: relative; display: inline-block; width: 36px; height: 18px; margin: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #2D489C; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 2px; bottom: 2px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #E0E0E0; } 
input:checked + .slider:before { transform: translateX(18px); }

.adv-select { padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #555; background: white; cursor: pointer; min-width: 140px; }
.adv-operator { padding: 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; color: #555; background: white; cursor: pointer; width: 80px; }
.btn-remove { background: none; border: none; color: #999; font-size: 16px; cursor: pointer; padding: 0 10px; }

.btn-add-big { width: 100%; background-color: #dbeafe; border: 1px dashed #2D489C; color: #2D489C; padding: 12px; border-radius: 6px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 8px; transition: all 0.2s; margin-bottom: 15px; }
.btn-add-big:hover { background-color: #bfdbfe; }

.adv-footer { display: flex; justify-content: space-between; align-items: center; color: white; font-size: 14px; }
.adv-footer label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500;}
.adv-footer input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary-color); }
.btn-adv-search { background: white; color: var(--primary-color); border: none; width: 40px; height: 40px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; transition: 0.2s; }

/* =========================================
    COMMON LAYOUT WRAPPERS & SIDEBARS
    ========================================= */
/* Read/Resource/Activity Layout */
.read-layout-wrapper {
    display: flex; gap: 30px; margin-top: 20px; align-items: flex-start;
    max-width: 1200px; margin: 20px auto 60px auto; padding: 0 20px;
}

/* Search Layout */
.search-layout-wrapper {
    display: flex; gap: 30px; margin-top: 20px; align-items: flex-start;
    max-width: 1200px; margin: 20px auto 60px auto; padding: 0 20px;
}

/* Read Sidebar (Metadata) */
.read-sidebar { 
    width: 280px; flex-shrink: 0; background: #fff; border: 1px solid #E0E0E0; border-radius: 8px; padding: 20px; 
}
.sidebar-widget { margin-bottom: 25px; }
.sidebar-heading { font-weight: 700; color: #333; font-size: 15px; border-bottom: 1px solid #eee; padding-bottom: 8px; margin-bottom: 10px; display: block; }
.org-image { max-width: 100%; border-radius: 6px; border: 1px solid #eee; padding: 5px; }

/* Search Filter Sidebar */
.filter-sidebar { 
    width: 280px; flex-shrink: 0; background: #fff; border: 1px solid #E0E0E0; border-radius: 8px; padding: 20px; 
}

/* Main Content Area */
.read-content { flex-grow: 1; width: 100%; }
.results-content { flex-grow: 1; width: 100%; }

/* Common Dataset Card */
.dataset-content-card {
    background: white; border: 1px solid #E0E0E0; border-radius: 10px; padding: 30px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

/* Common Titles & Toolbars */
.dataset-main-title { font-size: 28px; font-weight: 700; color: #333; margin-bottom: 10px; line-height: 1.3; }
.dataset-toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }

/* Common Action Buttons */
.btn-action {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
    background: #fff; border: 1px solid #ccc; color: #333; border-radius: 4px; 
    font-size: 13px; font-weight: 600; text-decoration: none; transition: 0.2s; cursor: pointer;
}
.btn-action:hover { background: #f8f9fa; border-color: #999; color: var(--primary-color); }
.btn-action-primary { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.btn-action-primary:hover { background: var(--primary-hover); color: white; border-color: var(--primary-hover); }

@media (max-width: 768px) {
    .read-layout-wrapper, .search-layout-wrapper { flex-direction: column-reverse; } 
    .read-sidebar, .filter-sidebar { width: 100%; }
    .dataset-toolbar { flex-wrap: wrap; }
    .search-layout-wrapper { flex-direction: column; }
}

/* =========================================
    SPECIFIC: READ_CUSTOM.CSS (Dataset Read)
    ========================================= */
/* Resources Styling */
.resource-list { list-style: none; padding: 0; margin: 0; margin-top: 20px; }
.resource-item { 
    display: flex; align-items: center; justify-content: space-between;
    background: #f8f9fa; border: 1px solid #eee; border-radius: 6px;
    padding: 15px; margin-bottom: 10px; transition: 0.2s;
}
.resource-item:hover { border-color: var(--primary-color); background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.resource-main { display: flex; align-items: center; gap: 15px; flex-grow: 1; }
.format-label { 
    background: #e2e8f0; color: #475569; font-weight: 700; font-size: 12px; 
    padding: 4px 8px; border-radius: 4px; text-transform: uppercase; min-width: 45px; text-align: center;
}
.resource-title { font-weight: 600; color: var(--primary-color); text-decoration: none; font-size: 15px; }
.btn-download { background: white; color: var(--primary-color); border: 1px solid #ddd; padding: 5px 10px; border-radius: 4px; font-size: 12px; text-decoration: none; }
.btn-download:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* Section Titles inside content */
.section-heading { font-size: 18px; font-weight: 700; color: #333; margin-top: 30px; margin-bottom: 15px; border-bottom: 2px solid #f1f1f1; padding-bottom: 8px; }

/* =========================================
    SPECIFIC: RESOURCE_READ_CUSTOM.CSS
    ========================================= */
.resource-view-wrapper {
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
    margin-bottom: 30px;
    min-height: 400px;
}
.table-metadata { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 14px; }
.table-metadata th { width: 30%; text-align: left; padding: 8px; background: #f9fafb; border-bottom: 1px solid #eee; color: #555; }
.table-metadata td { padding: 8px; border-bottom: 1px solid #eee; color: #333; }

/* =========================================
    SPECIFIC: SEARCH_CUSTOM.CSS
    ========================================= */
/* Style untuk Module CKAN Bawaan */
.filter-sidebar .module { margin-bottom: 25px; border: none; background: transparent; }

/* Judul Filter (ex: Organizations) */
.filter-sidebar .module-heading { 
    font-weight: 700; color: #333; font-size: 15px;
    border-bottom: 1px solid #eee; padding-bottom: 8px; margin-bottom: 10px; 
    display: flex; align-items: center;
}
.filter-sidebar .module-heading i { margin-right: 8px; color: #888; }

/* List Item */
.filter-sidebar .nav-item { margin-bottom: 4px; }

.filter-sidebar .nav-item a { 
    color: #555; display: flex; justify-content: space-between; align-items: center;
    text-decoration: none; font-size: 14px; padding: 2px 0;
}
.filter-sidebar .nav-item a:hover { color: var(--primary-color); }
.filter-sidebar .nav-item.active a { color: var(--primary-color); font-weight: bold; }

/* Counts */
.filter-sidebar .nav-item a .count { 
    display: inline-block;
    background: #6c757d; 
    color: white;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    min-width: 24px;
    text-align: center;
    margin-left: 10px;
}
.filter-sidebar .badge {
    background: #6c757d; color: white; padding: 1px 8px; border-radius: 12px; font-size: 11px;
}

/* Results List */
.ipb-list-view { display: flex; flex-direction: column; gap: 24px; }

.result-card { background: white; border: 1px solid #E0E0E0; border-radius: 10px; padding: 25px; display: flex; flex-direction: column; transition: all 0.2s ease-in-out; box-shadow: 0 4px 6px rgba(0,0,0,0.02); position: relative; text-decoration: none !important; color: inherit !important; cursor: pointer; }
.result-card:hover { transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0,0,0,0.1); border-color: var(--primary-color); }
.dataset-title { font-size: 18px; font-weight: 700; color: #333; margin-bottom: 6px; }
.result-card:hover .dataset-title { color: var(--primary-color); }
.dataset-org { font-size: 13px; color: var(--accent-color); font-weight: 700; margin-bottom: 12px; }
.dataset-desc { font-size: 14px; color: var(--text-dark); line-height: 1.6; margin-bottom: 20px; }
.dataset-footer { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; padding-top: 15px; border-top: 1px dashed #eee; }
.update-date { font-size: 12px; color: var(--text-muted); background: #f3f4f6; padding: 4px 8px; border-radius: 4px; }
.format-badge { display: inline-block; border: 1px solid var(--accent-color); color: var(--accent-color); background: white; padding: 3px 10px; font-size: 11px; font-weight: 700; border-radius: 4px; text-transform: uppercase; }

/* =========================================
    SPECIFIC: ACTIVITY_STREAM_CUSTOM.CSS
    ========================================= */
.activity-list {
    list-style: none; padding-left: 20px; margin-top: 20px; border-left: 2px solid #eee;
}
.activity-item-custom {
    position: relative; margin-bottom: 25px; padding-left: 25px;
}
/* Icon lingkaran di kiri */
.activity-icon-wrapper {
    position: absolute; left: -14px; top: 0;
    width: 26px; height: 26px; border-radius: 50%;
    background: white; border: 2px solid var(--primary-color);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-color); font-size: 12px;
}
/* Warna icon berdasarkan tipe */
.type-new .activity-icon-wrapper { border-color: #10B981; color: #10B981; } /* Hijau */
.type-changed .activity-icon-wrapper { border-color: #F59E0B; color: #F59E0B; } /* Kuning */
.type-deleted .activity-icon-wrapper { border-color: #EF4444; color: #EF4444; } /* Merah */

.activity-actor a { font-weight: 700; color: var(--primary-color); text-decoration: none; }
.activity-detail { font-size: 14px; color: #333; margin-left: 5px; }
.activity-date { display: block; font-size: 12px; color: #888; margin-top: 4px; }

/* Filter Box */
.activity-filter-box {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
    background: #f8f9fa; padding: 10px 15px; border-radius: 6px; border: 1px solid #eee;
}
.filter-select {
    padding: 6px 12px; border: 1px solid #ccc; border-radius: 4px; 
    font-size: 14px; color: #333; outline: none; min-width: 200px;
}