/* ============================================================
   Kabar Hukum Indonesia — main.css
   Mobile-first, responsive. Branding biru-oranye sesuai poster.
   ============================================================ */

:root {
    --navy:      #16306b;   /* biru tua */
    --blue:      #1e5bd6;   /* biru terang */
    --orange:    #f6791f;   /* oranye */
    --orange-dk: #e0660f;
    --ink:       #1a2238;   /* teks utama */
    --muted:     #6b7280;   /* teks abu */
    --line:      #e5e8f0;   /* garis */
    --bg:        #f4f6fb;   /* latar */
    --white:     #ffffff;
    --radius:    10px;
    --shadow:    0 2px 10px rgba(22,48,107,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden; /* pengaman: cegah geser horizontal */
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy); color: #cdd7ee; font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar-tagline { display: none; }

/* ---------- Header ---------- */
.site-header { background: var(--white); border-bottom: 3px solid var(--orange); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: auto; height: 42px; object-fit: contain; }
.brand-text { font-size: 19px; font-weight: 800; color: var(--navy); letter-spacing: -.3px; line-height: 1; }
.brand-text strong { color: var(--orange); }
.brand-text.light { color: var(--white); }
.brand-text.light strong { color: var(--orange); }

.searchbox { margin-left: auto; display: flex; flex: 1; max-width: 360px; }
.searchbox input { flex: 1; border: 1px solid var(--line); border-right: 0; border-radius: 8px 0 0 8px; padding: 9px 12px; font-size: 14px; outline: none; min-width: 0; }
.searchbox input:focus { border-color: var(--blue); }
.searchbox button { background: var(--blue); color: #fff; border: 0; padding: 0 16px; border-radius: 0 8px 8px 0; cursor: pointer; }

.nav-toggle { display: none; background: none; border: 0; font-size: 22px; color: var(--navy); cursor: pointer; padding: 4px 6px; }
.search-toggle { display: none; background: none; border: 0; font-size: 19px; color: var(--navy); cursor: pointer; padding: 4px 8px; }

/* ---------- Nav rubrik ---------- */
.mainnav { background: var(--navy); }
.mainnav-inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.mainnav-inner::-webkit-scrollbar { display: none; }
.mainnav a { color: #e6ecfb; font-size: 14px; font-weight: 600; padding: 13px 14px; white-space: nowrap; border-bottom: 3px solid transparent; transition: .15s; }
.mainnav a:hover { background: rgba(255,255,255,.08); border-bottom-color: var(--orange); }
.mainnav .nav-home { color: var(--orange); }

/* ---------- Layout utama ---------- */
.site-main { padding: 22px 16px 40px; }
.layout { display: grid; grid-template-columns: 1fr; gap: 26px; }

/* ---------- Berita utama (featured) ---------- */
.featured { display: block; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 24px; }
.featured-thumb { height: 210px; background-size: cover; background-position: center; background-color: #dde3f0; }
.featured-body { padding: 16px; }
.featured-title { font-size: 22px; line-height: 1.3; margin: 10px 0 8px; color: var(--navy); }
.featured-desc { color: var(--muted); font-size: 15px; margin-bottom: 10px; }

/* ---------- Badge ---------- */
.badge { display: inline-block; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 4px 10px; border-radius: 20px; }
.badge.sm { font-size: 10px; padding: 3px 8px; }

/* ---------- Section title ---------- */
.section-title { font-size: 18px; color: var(--navy); margin: 6px 0 14px; padding-left: 12px; border-left: 4px solid var(--orange); }

/* ---------- Daftar kartu ---------- */
.article-list { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card { display: flex; gap: 12px; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card-thumb { width: 120px; min-height: 100px; flex-shrink: 0; background-size: cover; background-position: center; background-color: #dde3f0; }
.card-body { padding: 12px 14px 12px 0; flex: 1; }
.card-title { font-size: 16px; line-height: 1.35; color: var(--navy); margin: 6px 0; }
.card-desc { font-size: 13px; color: var(--muted); display: none; }

.meta { font-size: 12px; color: var(--muted); }
.meta i { color: var(--orange); }

/* ---------- Sidebar ---------- */
.widget { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 20px; }
.widget-title { font-size: 16px; color: var(--navy); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--orange); }
.popular-list { list-style: none; }
.popular-list li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.popular-list li:last-child { border-bottom: 0; }
.popular-list .rank { background: var(--navy); color: #fff; width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.popular-list a:hover { color: var(--blue); }
.popular-list .muted { color: var(--muted); }

/* ---------- Halaman judul (rubrik / cari) ---------- */
.page-head { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 20px; border-left: 5px solid var(--orange); }
.page-head h1 { color: var(--navy); font-size: 23px; }
.page-head p { color: var(--muted); font-size: 14px; }

/* ---------- Artikel tunggal ---------- */
.single { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb i { margin: 0 5px; font-size: 11px; }
.single-title { font-size: 26px; line-height: 1.3; color: var(--navy); margin: 10px 0 12px; }
.single-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.single-meta i { color: var(--orange); }
.single-thumb { width: 100%; border-radius: var(--radius); margin-bottom: 18px; }
.single-content { font-size: 16.5px; line-height: 1.85; color: #2b3242; }
.single-content p { margin-bottom: 16px; }
.single-content h2, .single-content h3 { color: var(--navy); margin: 22px 0 10px; }
.single-content img { border-radius: 8px; margin: 14px 0; }
.single-content a { color: var(--blue); text-decoration: underline; }
.single-content ul, .single-content ol { margin: 0 0 16px 22px; }
.single-content blockquote { border-left: 4px solid var(--orange); background: var(--bg); padding: 10px 16px; margin: 16px 0; color: var(--muted); font-style: italic; }
.single-content table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.single-content th, .single-content td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.single-content th { background: var(--navy); color: #fff; font-weight: 700; }
.single-content tr:nth-child(even) td { background: var(--bg); }
.single-content .table-scroll, .single-content figure.table { overflow-x: auto; }

/* ---------- Share ---------- */
.share { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.share-label { font-size: 14px; font-weight: 600; color: var(--navy); margin-right: 4px; }
.share .sh { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; transition: opacity .15s; }
.share .sh:hover { opacity: .85; }
.share .fb { background: #1877f2; } .share .wa { background: #25d366; }
.share .tw { background: #000; }    .share .tg { background: #229ed9; }

/* ---------- Empty / 404 ---------- */
.empty-state { text-align: center; padding: 50px 20px; color: var(--muted); background: var(--white); border-radius: var(--radius); }
.empty-state i { font-size: 42px; color: var(--line); margin-bottom: 12px; }
.notfound { text-align: center; padding: 70px 20px; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); }
.notfound h1 { font-size: 80px; color: var(--orange); line-height: 1; }
.notfound p { color: var(--muted); margin: 8px 0 20px; }
.btn-primary { display: inline-block; background: var(--blue); color: #fff; padding: 11px 22px; border-radius: 8px; font-weight: 600; }
.btn-primary:hover { background: var(--navy); }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 26px 0 6px; }
.pagination .pg { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; color: var(--navy); font-size: 14px; font-weight: 600; }
.pagination .pg:hover { border-color: var(--blue); color: var(--blue); }
.pagination .pg.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination .pg.dots { border: 0; background: transparent; cursor: default; }

/* ---------- Kontak ---------- */
.contact-list { list-style: none; margin: 16px 0 !important; }
.contact-list li { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 15.5px; }
.contact-list i { color: var(--orange); width: 22px; }
.muted-note { font-size: 13px; color: var(--muted); margin-top: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c2cbe6; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 34px 16px 24px; }
.footer-brand .brand-text { font-size: 22px; }
.footer-brand p { font-size: 14px; margin-top: 10px; }
.footer-brand .motto { font-size: 13px; color: #8fa0cc; border-left: 3px solid var(--orange); padding-left: 12px; margin-top: 14px; }
.footer-cats h4 { color: #fff; margin-bottom: 10px; font-size: 16px; }
.footer-cats ul { list-style: none; }
.footer-cats li { padding: 5px 0; font-size: 14px; }
.footer-cats a:hover { color: var(--orange); }
.footer-bottom { background: rgba(0,0,0,.2); padding: 14px 0; font-size: 13px; text-align: center; }

/* ============================================================
   RESPONSIVE — tablet ke atas
   ============================================================ */
@media (min-width: 600px) {
    .topbar-tagline { display: inline; }
    .card-desc { display: block; }
    .featured { display: flex; }
    .featured-thumb { width: 45%; height: auto; min-height: 240px; }
    .featured-body { width: 55%; display: flex; flex-direction: column; justify-content: center; }
    .featured-title { font-size: 25px; }
    .article-list.wide { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
    .layout { grid-template-columns: 1fr 320px; }
    .featured-title { font-size: 27px; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ============================================================
   RESPONSIVE — mobile (menu rubrik bisa di-toggle)
   ============================================================ */
@media (max-width: 768px) {
    /* Mobile: ikon search & hamburger di sebelah logo. Search muncul full saat ikon diklik. */
    .header-inner { flex-wrap: wrap; height: auto; padding: 12px 16px; gap: 10px 4px; }
    .brand-logo { height: 30px; }
    .search-toggle { display: flex; align-items: center; order: 2; margin-left: auto; }
    .nav-toggle { display: block; order: 3; }
    .searchbox { order: 5; flex: 1 1 100%; max-width: none; margin-left: 0; display: none; }
    .site-header.search-open .searchbox { display: flex; }

    /* Menu rubrik jadi dropdown vertikal, dibuka lewat hamburger */
    .mainnav-inner { flex-direction: column; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
    .mainnav.open .mainnav-inner { max-height: 70vh; overflow-y: auto; }
    .mainnav a { border-bottom: 1px solid rgba(255,255,255,.08); padding: 12px 16px; }
}
