/* =========================================
   CARD STYLE UNTUK SUB KATEGORI (BERITA BAWAH)
========================================= */

/* 1. Mode Terang (Light Mode) */
.kd-sc-item {
    display: flex;
    flex-direction: column;
    background: #ffffff; /* Latar belakang kartu putih bersih */
    border: 1px solid #eaeaea; /* Garis tepi halus */
    border-radius: 12px; /* Sudut membulat */
    padding: 12px; /* Jarak antara garis tepi dan konten */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Bayangan lembut */
    text-decoration: none;
    height: 100%; /* Menjaga tinggi kartu sama rata dalam grid */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Efek saat kartu disentuh/di-hover (Mode Terang) */
.kd-sc-item:hover {
    transform: translateY(-4px); /* Efek kartu terangkat sedikit */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Penyesuaian gambar di dalam kartu agar rapi */
.kd-sci-img {
    margin-bottom: 12px !important; 
    border-radius: 8px !important;
}


/* 2. Mode Malam / Dark Mode (Efek Kaca Gradient) */
body.custom-dark .kd-sc-item,
.dark-mode .kd-sc-item,
[data-theme="dark"] .kd-sc-item {
    /* Gradient sangat transparan untuk efek kaca gelap */
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.6) 0%, rgba(20, 20, 20, 0.8) 100%) !important;
    
    /* Efek blur kaca */
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    
    /* Pantulan cahaya tepi */
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    
    /* Bayangan untuk mode gelap */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Efek saat kartu disentuh/di-hover (Mode Malam) */
body.custom-dark .kd-sc-item:hover,
.dark-mode .kd-sc-item:hover,
[data-theme="dark"] .kd-sc-item:hover {
    border-color: rgba(250, 204, 21, 0.5) 
}





/* =========================================
   PORTAL DPRD SULTENG (LIGHT MODE BASE & DARK MODE)
========================================= */

/* 1. WRAPPER (Menyesuaikan Tema, Tidak dikunci lebarnya) */
.kd-wrapper {
    width: 100%; display: flex; flex-direction: column; gap: 20px; padding: 0; margin-bottom: 30px;
}
.kd-wrapper * { box-sizing: border-box; }

/* Header Logo */
.dprd-micro-header {
    display: flex; justify-content: flex-start; align-items: center; border-bottom: 2px solid #ca8a04; padding-bottom: 2px;
}

.dprd-branding, [data-theme="dark"] .dprd-branding {
    color: #000 !important;
}

.dprd-branding img {
    height: 50px; width: auto; margin-right: 12px; object-fit: contain;
}

/* 2. SLIDER */
.kd-slider-container { width: 100%; border-radius: 8px; overflow: hidden; }

/* 3. HERO SECTION (Headline & Berita Terbaru) */
.kd-hero-section { display: flex; flex-direction: column; gap: 20px; }

/* Kiri: Headline */
.kd-headline-card { display: block; text-decoration: none; position: relative; }

/* PERBAIKAN: Memaksa bentuk Landscape (16:9) agar tidak berbentuk persegi/sama dengan iklan di Mobile */
.kd-hl-img {
    width: 100%; 
    aspect-ratio: 16 / 9; /* Kunci rahasianya disini */
    height: auto; 
    max-height: 400px;
    border-radius: 8px; 
    overflow: hidden; 
    background: #eee;
}
.kd-hl-img img { width: 100%; height: 100%; object-fit: cover; }
.kd-hl-content { padding: 15px 0; }
.kd-hl-content h2 { font-size: 20px; color: #111; margin: 0 0 10px 0; line-height: 1.3; }
.kd-hl-content p { font-size: 14px; color: #999; margin: 0; line-height: 1.5; }

/* =========================================
   STYLE MICROSITE DPRD SULTENG (ADAPTIF)
========================================= */
.dprd-microsite-box {
    background: #fefce8; border: 1px solid #fef08a; border-radius: 12px; padding: 20px;
    display: flex; flex-direction: column; gap: 18px;
}
.dprd-komisi-list { display: flex; flex-direction: column; gap: 12px; }
.dprd-list-item {
    display: flex; gap: 15px; align-items: center; justify-content: space-between; text-decoration: none;
    background: #ffffff; padding: 10px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease; border-left: 3px solid transparent;
}
.dprd-list-item:hover {
    transform: translateX(4px); box-shadow: 0 4px 10px rgba(0,0,0,0.08); border-left: 3px solid #eab308;
}

/* =========================================
   PERBAIKAN SCROLL TAB KOMISI (KUNCI KE SAMPING)
========================================= */
.kd-komisi-section { 
    margin-top: 20px; 
    transition: opacity 0.3s ease; 
}

.kd-komisi-tabs {
    display: flex; 
    overflow-x: auto; 
    overflow-y: hidden; /* Mencegah geser vertikal dari area tab */
    border-bottom: 2px solid #ddd; 
    margin-bottom: 20px; 
    scrollbar-width: none; /* Firefox */
    
    /* PROPERTI UTAMA UNTUK MENGUNCI SCROLL HANYA KE SAMPING DI MOBILE */
    -webkit-overflow-scrolling: touch; 
    touch-action: pan-x; 
    white-space: nowrap;
}

.kd-komisi-tabs::-webkit-scrollbar { 
    display: none; /* Chrome, Safari, Opera */
}

.kd-komisi-tabs a {
    text-decoration: none; 
    font-size: 15px; 
    color: #666; 
    padding: 12px 20px;
    white-space: nowrap; 
    border-bottom: 3px solid transparent; 
    margin-bottom: -2px; 
    transition: 0.2s;
    flex-shrink: 0; /* Mencegah teks tab ikut tertekan/mengecil */
}

.kd-komisi-tabs a.active, 
.kd-komisi-tabs a:hover { 
    color: #facc15; 
    border-bottom: 3px solid #111; 
}

.kd-pagination { 
    display: flex; 
    gap: 8px; 
    justify-content: center; 
    margin-top: 25px; 
    flex-wrap: wrap; 
}

.kd-pagination .page-numbers { 
    padding: 6px 12px; 
    background: #f0f0f0; 
    color: #333; 
    font-size: 13px; 
    font-weight: 600; 
    text-decoration: none; 
    border-radius: 4px; 
}

.kd-pagination .current { 
    background: #111; 
    color: #fff; 
}

/* 5. SUB KATEGORI */
.kd-sc-block { margin-top: 20px; }
.kd-sc-header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 15px; }
.kd-sc-header h2 { font-size: 18px; color: #111; margin: 0; }
.kd-sc-header a { font-size: 12px; font-weight: 600; color: ; text-decoration: none; }
.kd-sc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.kd-sc-item { text-decoration: none; display: block; }
.kd-sci-img { width: 100%; aspect-ratio: 16/9; border-radius: 6px; overflow: hidden; margin-bottom: 10px; }
.kd-sci-img img { width: 100%; height: 100%; object-fit: cover; }
.kd-sc-item h3 { font-size: 13px; font-weight: 700; color: #222; margin: 0 0 6px 0; line-height: 1.4; }
.kd-sc-item span { font-size: 11px; color: #888; }

/* =========================================
   DESKTOP RESPONSIVE
========================================= */
@media (min-width: 768px) {
    .kd-hero-section { flex-direction: row; }
    .kd-hero-left { width: 65%; }
    .kd-hero-right { width: 35%; }
    .kd-hl-content h2 { font-size: 26px; }
    .kd-sc-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

/* =========================================
   MODE MALAM / DARK MODE OVERRIDES
========================================= */
body.custom-dark .dprd-microsite-box, .dark-mode .dprd-microsite-box, [data-theme="dark"] .dprd-microsite-box {
    background: #1e1e1e !important; border: 1px solid #333333 !important;
}
body.custom-dark .dprd-micro-header, .dark-mode .dprd-micro-header, [data-theme="dark"] .dprd-micro-header {
    border-bottom: 2px solid #0000 !important;
}
body.custom-dark .dprd-branding, .dark-mode .dprd-branding, [data-theme="dark"] .dprd-branding {
    color: #ffff !important;
}
body.custom-dark .dprd-list-item, .dark-mode .dprd-list-item, [data-theme="dark"] .dprd-list-item {
    background: #2a2a2a !important;
}
body.custom-dark .dprd-list-content h4, .dark-mode .dprd-list-content h4, [data-theme="dark"] .dprd-list-content h4 {
    color: #f3f4f6 !important;
}
body.custom-dark .kd-hl-content h2, .dark-mode .kd-hl-content h2 { color: #fff; }
body.custom-dark .kd-hl-content p, .dark-mode .kd-hl-content p { color: #aaa; }
body.custom-dark .kd-news-list-title, .dark-mode .kd-news-list-title { color: #fff; }
body.custom-dark .kd-komisi-tabs, .dark-mode .kd-komisi-tabs { border-bottom-color: #333; }
body.custom-dark .kd-komisi-tabs a, .dark-mode .kd-komisi-tabs a { color: #888; }
body.custom-dark .kd-komisi-tabs a.active, .dark-mode .kd-komisi-tabs a.active { color: #fff; border-bottom-color: #facc15; }
body.custom-dark .kd-sc-header, .dark-mode .kd-sc-header { border-bottom-color: #555; }
body.custom-dark .kd-sc-header h2, .dark-mode .kd-sc-header h2 { color: #fff; }
body.custom-dark .kd-sc-item h3, .dark-mode .kd-sc-item h3 { color: #f3f4f6; }
body.custom-dark .kd-pagination .page-numbers, .dark-mode .kd-pagination .page-numbers { background: #333; color: #fff; }
body.custom-dark .kd-pagination .current, .dark-mode .kd-pagination .current { background: #facc15; color: #000; }