/* =============================================
   PERATURAN.CSS — Halaman Daftar Peraturan Publik
   /portalperaturan/assets/css/peraturan.css
   ============================================= */

:root {
    --green-950: #052e16;
    --green-900: #14532d;
    --green-800: #166534;
    --green-700: #15803d;
    --green-600: #16a34a;
    --green-500: #22c55e;
    --green-400: #4ade80;
    --green-100: #dcfce7;
    --green-50:  #f0fdf4;
    --ink:       #111827;
    --ink-2:     #374151;
    --ink-3:     #6b7280;
    --ink-4:     #9ca3af;
    --border:    #e5e7eb;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #fafafa;
    color: var(--ink);
    margin: 0;
}

/* ══════════════════════════════════════════════
   PAGE HERO
   ══════════════════════════════════════════════ */
.page-hero {
    background:
        linear-gradient(135deg, rgba(5,46,22,0.88) 0%, rgba(10,61,31,0.82) 50%, rgba(5,46,22,0.88) 100%),
        url('/portalperaturan/assets/img/hero-bg.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 100px 0 56px;
    position: relative; overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(74,222,128,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74,222,128,0.04) 1px, transparent 1px);
    background-size: 52px 52px;
}
.page-hero::after {
    content: '';
    position: absolute; top: -120px; right: -80px;
    width: 500px; height: 500px; border-radius: 50%;
    background: radial-gradient(circle, rgba(22,163,74,0.1), transparent 70%);
    pointer-events: none;
}
.page-hero-inner {
    position: relative; z-index: 1;
    max-width: 1100px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 32px; flex-wrap: wrap;
}
.page-hero-left { flex: 1; min-width: 0; }

.page-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    background: rgba(74,222,128,0.12);
    border: 1px solid rgba(74,222,128,0.2);
    border-radius: 20px; padding: 5px 14px;
    font-size: 11px; font-weight: 700;
    color: var(--green-400); letter-spacing: 1.2px;
    text-transform: uppercase; margin-bottom: 16px;
}
.page-title {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(26px, 3.5vw, 38px);
    color: #fff; font-weight: 400;
    line-height: 1.2; margin-bottom: 10px;
}
.page-sub {
    font-size: 14px; color: rgba(255,255,255,0.55);
    line-height: 1.65; max-width: 500px;
}

/* Hero stat pills */
.hero-pills {
    display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap;
}
.hero-pill {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px; padding: 8px 16px;
    font-size: 13px;
}
.hero-pill-num {
    font-size: 18px; font-weight: 800; color: #fff;
}
.hero-pill-label { color: rgba(255,255,255,0.55); font-size: 12px; }
.hero-pill-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

/* Hero right — search box */
.page-hero-search {
    width: 340px; flex-shrink: 0;
}
.hero-search-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px; padding: 20px;
    backdrop-filter: blur(10px);
}
.hero-search-label {
    font-size: 11px; font-weight: 700;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1.2px; text-transform: uppercase;
    margin-bottom: 10px;
}
.hero-search-wrap {
    position: relative;
}
.hero-search-icon {
    position: absolute; left: 13px; top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.35); font-size: 13px;
    pointer-events: none;
}
.hero-search-input {
    width: 100%; height: 44px;
    padding: 0 100px 0 40px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px; color: #fff;
    font-size: 13.5px; font-family: inherit;
    outline: none; transition: all 0.2s;
}
.hero-search-input::placeholder { color: rgba(255,255,255,0.3); }
.hero-search-input:focus {
    background: rgba(255,255,255,0.12);
    border-color: rgba(74,222,128,0.35);
    box-shadow: 0 0 0 3px rgba(74,222,128,0.1);
}
.hero-search-btn {
    position: absolute; right: 6px; top: 50%;
    transform: translateY(-50%);
    background: var(--green-600); color: #fff;
    border: none; border-radius: 7px;
    padding: 7px 14px; font-size: 12.5px;
    font-weight: 700; font-family: inherit;
    cursor: pointer; transition: background 0.2s;
}
.hero-search-btn:hover { background: var(--green-700); }

@media (max-width: 860px) {
    .page-hero-search { width: 100%; }
}

/* ══════════════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════════════ */
.filter-section {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.filter-inner {
    max-width: 1100px; margin: 0 auto;
    padding: 14px 24px;
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
}
.filter-label {
    font-size: 12px; font-weight: 700;
    color: var(--ink-3); letter-spacing: 0.3px;
    white-space: nowrap;
}
.filter-select {
    height: 38px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 13px; font-family: inherit;
    color: var(--ink-2); background: #fff;
    cursor: pointer; outline: none;
    transition: border-color 0.2s;
}
.filter-select:focus { border-color: var(--green-400); }
.filter-btn {
    height: 38px; padding: 0 16px;
    background: var(--green-600); color: #fff;
    border: none; border-radius: 8px;
    font-size: 13px; font-weight: 700;
    font-family: inherit; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.2s;
}
.filter-btn:hover { background: var(--green-700); }
.filter-reset {
    height: 38px; padding: 0 14px;
    background: #fef2f2; color: #dc2626;
    border: 1px solid #fee2e2; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    font-family: inherit; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    text-decoration: none; transition: all 0.2s;
}
.filter-reset:hover { background: #fee2e2; }
.filter-count {
    margin-left: auto; font-size: 12.5px;
    color: var(--ink-3); white-space: nowrap;
}
.filter-count b { color: var(--green-700); }

/* Active filter tags */
.active-tags {
    max-width: 1100px; margin: 0 auto;
    padding: 0 24px 12px;
    display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.active-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--green-100); color: var(--green-800);
    border-radius: 20px; padding: 4px 12px;
    font-size: 12px; font-weight: 700;
}
.active-tag i { font-size: 10px; }

/* ══════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════ */
.main-section {
    max-width: 1100px; margin: 0 auto;
    padding: 32px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 28px; align-items: start;
}
@media (max-width: 900px) {
    .main-section { grid-template-columns: 1fr; }
}

/* ── Daftar Peraturan ─────────────────────────── */
.peraturan-list { display: flex; flex-direction: column; gap: 14px; }

.peraturan-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden;
    transition: all 0.22s;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    animation: fadeUp 0.4s cubic-bezier(0.22,1,0.36,1) both;
}
.peraturan-card:hover {
    border-color: var(--green-300);
    box-shadow: 0 6px 24px rgba(22,163,74,0.1);
    transform: translateY(-2px);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
.peraturan-card:nth-child(1) { animation-delay: 0.04s; }
.peraturan-card:nth-child(2) { animation-delay: 0.08s; }
.peraturan-card:nth-child(3) { animation-delay: 0.12s; }
.peraturan-card:nth-child(4) { animation-delay: 0.16s; }
.peraturan-card:nth-child(5) { animation-delay: 0.20s; }

.card-body-wrap {
    padding: 20px 22px;
    display: flex; gap: 16px; align-items: flex-start;
}

/* Nomor badge besar di kiri */
.card-num-badge {
    width: 48px; height: 48px; flex-shrink: 0;
    border-radius: 12px;
    background: var(--green-50);
    border: 1px solid var(--green-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; color: var(--green-600);
}

.card-main { flex: 1; min-width: 0; }

/* Jenis + Status badges */
.card-badges {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px;
}
.badge-jenis {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--green-50); color: var(--green-700);
    border: 1px solid var(--green-100);
    font-size: 10.5px; font-weight: 700;
    padding: 3px 9px; border-radius: 6px;
    letter-spacing: 0.3px;
}
.badge-berlaku {
    display: inline-flex; align-items: center; gap: 5px;
    background: #dcfce7; color: #15803d;
    font-size: 10.5px; font-weight: 700;
    padding: 3px 9px; border-radius: 6px;
}
.badge-berlaku::before {
    content: ''; width: 5px; height: 5px;
    border-radius: 50%; background: #16a34a;
}
.badge-tidak {
    display: inline-flex; align-items: center; gap: 5px;
    background: #fee2e2; color: #991b1b;
    font-size: 10.5px; font-weight: 700;
    padding: 3px 9px; border-radius: 6px;
}
.badge-tidak::before {
    content: ''; width: 5px; height: 5px;
    border-radius: 50%; background: #dc2626;
}

.card-title {
    font-size: 15px; font-weight: 700;
    color: var(--ink); line-height: 1.4;
    margin-bottom: 6px; text-decoration: none;
    display: block; transition: color 0.2s;
}
.card-title:hover { color: var(--green-700); }

.card-meta {
    display: flex; gap: 14px; flex-wrap: wrap;
    font-size: 12px; color: var(--ink-4);
}
.card-meta span {
    display: inline-flex; align-items: center; gap: 5px;
}
.card-meta i { font-size: 11px; color: var(--green-500); }

/* Card footer */
.card-footer-wrap {
    padding: 12px 22px;
    background: #fafafa;
    border-top: 1px solid #f3f4f6;
    display: flex; align-items: center;
    justify-content: space-between; gap: 10px;
    flex-wrap: wrap;
}
.card-kategori {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--ink-4);
}
.card-kategori i { color: var(--green-400); font-size: 11px; }

.card-actions { display: flex; gap: 7px; }

.btn-card-detail {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--green-50); color: var(--green-700);
    border: 1px solid var(--green-100); border-radius: 8px;
    padding: 7px 14px; font-size: 12.5px; font-weight: 700;
    text-decoration: none; transition: all 0.18s;
    font-family: inherit; cursor: pointer;
}
.btn-card-detail:hover {
    background: var(--green-100); color: var(--green-900);
}
.btn-card-pdf {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--green-600); color: #fff;
    border: none; border-radius: 8px;
    padding: 7px 14px; font-size: 12.5px; font-weight: 700;
    text-decoration: none; transition: all 0.18s;
    font-family: inherit; cursor: pointer;
}
.btn-card-pdf:hover {
    background: var(--green-700); transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22,163,74,0.25);
}
.btn-card-lock {
    display: inline-flex; align-items: center; gap: 6px;
    background: #f3f4f6; color: var(--ink-3);
    border: 1px solid var(--border); border-radius: 8px;
    padding: 7px 14px; font-size: 12.5px; font-weight: 600;
    font-family: inherit; cursor: pointer;
    transition: all 0.18s;
}
.btn-card-lock:hover {
    background: #fef3c7; color: #92400e;
    border-color: #fde68a;
}

/* Empty state */
.empty-wrap {
    text-align: center; padding: 72px 24px;
    background: #fff; border: 1px solid var(--border);
    border-radius: 16px;
}
.empty-icon {
    font-size: 52px; color: #e5e7eb;
    margin-bottom: 16px; display: block;
}
.empty-title { font-size: 17px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.empty-sub   { font-size: 13.5px; color: var(--ink-4); margin-bottom: 24px; }
.btn-reset {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--green-600); color: #fff;
    border-radius: 10px; padding: 10px 22px;
    font-size: 13.5px; font-weight: 700;
    text-decoration: none; transition: all 0.2s;
}
.btn-reset:hover { background: var(--green-700); color: #fff; }

/* ── Pagination ───────────────────────────────── */
.pagination-wrap {
    display: flex; justify-content: center;
    gap: 6px; margin-top: 28px; flex-wrap: wrap;
}
.page-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 9px;
    font-size: 13.5px; font-weight: 600;
    border: 1px solid var(--border); background: #fff;
    color: var(--ink-2); text-decoration: none;
    transition: all 0.18s; cursor: pointer;
}
.page-btn:hover { border-color: var(--green-300); color: var(--green-700); background: var(--green-50); }
.page-btn.active {
    background: var(--green-600); color: #fff;
    border-color: var(--green-600);
    box-shadow: 0 4px 12px rgba(22,163,74,0.3);
}
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ══════════════════════════════════════════════
   SIDEBAR KANAN
   ══════════════════════════════════════════════ */
.side-widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 1px 8px rgba(0,0,0,0.04);
    margin-bottom: 20px;
}
.widget-head {
    display: flex; align-items: center; gap: 9px;
    padding: 14px 18px;
    background: var(--green-50);
    border-bottom: 1px solid var(--green-100);
}
.widget-head-icon {
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--green-100);
    display: flex; align-items: center; justify-content: center;
    color: var(--green-700); font-size: 13px;
}
.widget-title {
    font-size: 13px; font-weight: 800;
    color: var(--green-900);
}

/* Jenis filter list */
.jenis-filter-list { padding: 8px 0; }
.jenis-filter-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 18px; font-size: 13px;
    color: var(--ink-2); text-decoration: none;
    transition: background 0.15s; gap: 8px;
}
.jenis-filter-item:hover { background: var(--green-50); color: var(--green-800); }
.jenis-filter-item.active {
    background: var(--green-50); color: var(--green-800);
    font-weight: 700;
}
.jenis-filter-item.active .jenis-dot { background: var(--green-600); }
.jenis-left { display: flex; align-items: center; gap: 9px; }
.jenis-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #d1d5db; flex-shrink: 0; transition: background 0.2s;
}
.jenis-count {
    background: var(--green-100); color: var(--green-700);
    font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px;
}

/* Login CTA widget */
.login-cta-widget {
    background: linear-gradient(135deg, var(--green-900), var(--green-950));
    border-radius: 16px; padding: 24px 20px;
    text-align: center; margin-bottom: 20px;
    position: relative; overflow: hidden;
}
.login-cta-widget::before {
    content: '';
    position: absolute; top: -40px; right: -40px;
    width: 150px; height: 150px; border-radius: 50%;
    background: rgba(74,222,128,0.08);
    pointer-events: none;
}
.cta-icon {
    width: 52px; height: 52px; border-radius: 14px;
    background: rgba(74,222,128,0.12);
    border: 1px solid rgba(74,222,128,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; color: var(--green-400);
    margin: 0 auto 14px;
}
.cta-title {
    font-size: 15px; font-weight: 800; color: #fff;
    margin-bottom: 8px; line-height: 1.3;
}
.cta-sub {
    font-size: 12px; color: rgba(255,255,255,0.5);
    margin-bottom: 18px; line-height: 1.6;
}
.btn-cta-login {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    color: #fff; border-radius: 10px; padding: 11px;
    font-size: 13.5px; font-weight: 700; text-decoration: none;
    box-shadow: 0 4px 14px rgba(22,163,74,0.3);
    transition: all 0.2s;
}
.btn-cta-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(22,163,74,0.4); color: #fff;
}

/* Statistik widget */
.stat-widget-row {
    display: flex; flex-direction: column;
}
.stat-widget-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid #f3f4f6;
}
.stat-widget-item:last-child { border-bottom: none; }
.stat-widget-icon {
    width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.stat-widget-num {
    font-size: 20px; font-weight: 800; line-height: 1; color: var(--ink);
}
.stat-widget-label { font-size: 11.5px; color: var(--ink-4); margin-top: 1px; }

/* ══════════════════════════════════════════════
   PDF MODAL + LOGIN MODAL
   ══════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }

.pdf-modal-box {
    background: #fff; border-radius: 16px;
    width: 100%; max-width: 920px;
    height: 90vh;
    display: flex; flex-direction: column;
    overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.4);
    animation: slideUp 0.3s cubic-bezier(0.22,1,0.36,1);
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.pdf-modal-head {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    background: var(--green-50); border-bottom: 1px solid var(--green-100);
    flex-shrink: 0;
}
.pdf-modal-head-icon {
    width: 36px; height: 36px; border-radius: 9px;
    background: var(--green-100); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--green-700); font-size: 15px;
}
.pdf-modal-title { font-size: 13px; font-weight: 700; color: var(--green-900); }
.pdf-modal-sub   { font-size: 11px; color: var(--ink-4); margin-top: 1px; }
.pdf-modal-close {
    margin-left: auto; width: 32px; height: 32px;
    background: none; border: none; cursor: pointer;
    border-radius: 8px; color: var(--ink-3); font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.pdf-modal-close:hover { background: #fee2e2; color: #dc2626; }
.pdf-modal-iframe {
    flex: 1;
    width: 100%;
    border: none;
    display: block;
    min-height: 0;
    height: 100%;
}
.pdf-modal-foot {
    padding: 10px 18px; display: flex; gap: 8px;
    background: var(--green-50); border-top: 1px solid var(--green-100);
    flex-shrink: 0;
}
.btn-dl {
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(135deg, var(--green-600), var(--green-800));
    color: #fff; border-radius: 8px; padding: 8px 16px;
    font-size: 13px; font-weight: 700; text-decoration: none;
    transition: all 0.2s;
}
.btn-dl:hover { color: #fff; transform: translateY(-1px); }
.btn-close-m {
    background: #f3f4f6; border: none; border-radius: 8px;
    padding: 8px 16px; font-size: 13px; font-weight: 600;
    color: var(--ink-3); cursor: pointer; font-family: inherit;
}
.btn-close-m:hover { background: #e5e7eb; }

/* Login required modal */
.login-modal-box {
    background: #fff; border-radius: 20px;
    width: 100%; max-width: 380px;
    overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    animation: slideUp 0.3s cubic-bezier(0.22,1,0.36,1);
}
.login-modal-top {
    height: 4px;
    background: linear-gradient(90deg, var(--green-600), var(--green-400));
}
.login-modal-body { padding: 36px 32px 32px; text-align: center; }
.login-modal-icon {
    width: 68px; height: 68px; border-radius: 50%;
    background: linear-gradient(135deg, var(--green-100), #a7f3d0);
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; color: var(--green-600);
    margin: 0 auto 18px;
}
.login-modal-title {
    font-size: 18px; font-weight: 800; color: var(--ink);
    margin-bottom: 8px;
}
.login-modal-sub {
    font-size: 13.5px; color: var(--ink-3); line-height: 1.65;
    margin-bottom: 24px;
}
.btn-modal-login {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px;
    background: linear-gradient(135deg, var(--green-600), var(--green-800));
    color: #fff; border-radius: 10px; font-size: 14px;
    font-weight: 700; text-decoration: none;
    transition: all 0.2s; margin-bottom: 10px;
}
.btn-modal-login:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 6px 18px rgba(22,163,74,0.35); }
.btn-modal-cancel {
    background: none; border: none; font-size: 13px;
    color: var(--ink-4); cursor: pointer; width: 100%;
    padding: 6px; font-family: inherit;
}
.btn-modal-cancel:hover { color: var(--ink-3); }

/* Responsive */
@media (max-width: 600px) {
    .filter-inner { gap: 8px; }
    .main-section { padding: 20px 16px 60px; }
    .card-body-wrap { padding: 16px; gap: 12px; }
    .card-footer-wrap { padding: 10px 16px; }
}