/* =============================================
   HOME.CSS — Tema Putih Kehijauan
   /portalperaturan/assets/css/home.css
   ============================================= */

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: #f8fdf8;
    margin: 0;
    color: #1a2e1a;
}

/* ── Shared Section ─────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 44px;
}
.section-label {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.section-title {
    font-size: clamp(22px, 3.5vw, 28px);
    font-weight: 800;
    color: #14532d;
    margin-bottom: 8px;
    line-height: 1.2;
}
.section-sub {
    font-size: 14px;
    color: #4b7a52;
    margin: 0;
}

/* ══════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════ */
.hero-section {
    /* Ganti URL di bawah dengan path foto Anda */
    background-image: 
        linear-gradient(135deg, rgba(5,46,22,0.85) 0%, rgba(10,61,31,0.80) 100%),
        url('/portalperaturan/assets/img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* efek parallax */
}
.hero-bg {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(ellipse at 10% 60%, rgba(255,255,255,0.05) 0%, transparent 55%),
        radial-gradient(ellipse at 90% 10%, rgba(74,222,128,0.08) 0%, transparent 50%);
}
.hero-watermark {
    position: absolute; top: -20px; right: -20px;
    width: 380px; opacity: 0.04;
    filter: brightness(0) invert(1);
    pointer-events: none; z-index: 0;
}
.hero-content {
    position: relative; z-index: 1;
    padding: 80px 0 70px;
    text-align: center;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.9);
    font-size: 12px; font-weight: 600;
    padding: 6px 18px; border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.18);
    margin-bottom: 22px; letter-spacing: 0.4px;
}
.hero-title {
    font-size: clamp(30px, 5vw, 50px);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 16px;
}
.hero-title span { color: #86efac; }
.hero-sub {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    max-width: 520px;
    margin: 0 auto 34px;
    line-height: 1.65;
}

/* Search */
.hero-search-form { max-width: 600px; margin: 0 auto 28px; }
.hero-search-wrap {
    display: flex; align-items: center;
    background: #fff; border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    padding: 6px 6px 6px 18px;
}
.hero-search-icon { color: #9ca3af; font-size: 14px; flex-shrink: 0; }
.hero-search-input {
    flex: 1; border: none; outline: none;
    padding: 10px 14px;
    font-size: 14px; font-family: inherit;
    color: #1a2e1a; background: transparent;
}
.hero-search-input::placeholder { color: #c5cdd8; }
.hero-search-btn {
    background: linear-gradient(135deg, #16a34a, #14532d);
    color: #fff; border: none;
    padding: 10px 24px; border-radius: 10px;
    font-size: 13.5px; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.hero-search-btn:hover {
    background: linear-gradient(135deg, #15803d, #14532d);
    transform: translateY(-1px);
}

/* Stat strip */
.hero-stats {
    display: inline-flex; align-items: center;
    gap: 32px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px; padding: 16px 36px;
    backdrop-filter: blur(8px);
    margin-bottom: 0;
}
.hero-stat { text-align: center; }
.hero-stat-num { display: block; font-size: 28px; font-weight: 800; color: #fff; line-height: 1; }
.hero-stat-label { display: block; font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 4px; }
.hero-stat-divider { width: 1px; height: 38px; background: rgba(255,255,255,0.18); }

/* Notice bar hero — disembunyikan, sudah pindah ke navbar */
.hero-notice { display: none; }
.hero-notice-ok { display: none; }

/* ══════════════════════════════════════════════
   NAVBAR LOGIN NOTICE — ditambahkan di navbar.css
   Kelas ini untuk dipakai di partials/navbar.php
   ══════════════════════════════════════════════ */
.navbar-login-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.navbar-login-notice:hover {
    background: rgba(234, 179, 8, 0.2);
    color: #78350f;
}
.navbar-login-notice i { font-size: 11px; }

.navbar-loggedin-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.2);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #15803d;
    white-space: nowrap;
}
.navbar-loggedin-notice i { font-size: 11px; }

/* ══════════════════════════════════════════════
   JENIS GRID — flex center, max 5 per baris
   ══════════════════════════════════════════════ */
.section-jenis {
    padding: 80px 0;
    background: #fff;
}
.jenis-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}
.jenis-card {
    flex: 0 0 calc(20% - 13px);
    max-width: calc(20% - 13px);
    display: flex; flex-direction: column;
    align-items: center; text-align: center;
    padding: 26px 16px 20px;
    background: #fff;
    border: 1.5px solid #e8f5e9;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.25s;
    position: relative; overflow: hidden;
    min-width: 150px;
}
.jenis-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; background: currentColor;
    opacity: 0; transition: opacity 0.25s;
}
.jenis-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 14px 32px rgba(22,163,74,0.13);
    border-color: #bbf7d0;
}
.jenis-card:hover::after { opacity: 0.6; }

.jenis-card-icon {
    width: 54px; height: 54px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; margin-bottom: 12px;
    transition: transform 0.2s;
}
.jenis-card:hover .jenis-card-icon { transform: scale(1.12) rotate(-3deg); }

.jenis-card-num {
    font-size: 28px; font-weight: 800; line-height: 1; margin-bottom: 6px;
}
.jenis-card-name {
    font-size: 12px; font-weight: 600; color: #3f6b45; line-height: 1.35;
    margin-bottom: 10px;
}
.jenis-card-link {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700;
    opacity: 0; transform: translateY(4px);
    transition: all 0.2s;
}
.jenis-card:hover .jenis-card-link { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════════════
   TABEL PERATURAN
   ══════════════════════════════════════════════ */
.section-tabel { padding: 80px 0; background: #f0fdf4; }

.filter-bar {
    display: flex; gap: 10px; align-items: center;
    flex-wrap: wrap; margin-bottom: 14px;
}
.filter-search-wrap { position: relative; flex: 1; min-width: 200px; }
.filter-search-wrap i {
    position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
    color: #9ca3af; font-size: 13px;
}
.filter-input {
    width: 100%; height: 42px;
    padding: 0 14px 0 38px;
    border: 1.5px solid #bbf7d0; border-radius: 10px;
    background: #fff; font-size: 13px; font-family: inherit;
    color: #1a2e1a; transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-input:focus {
    outline: none; border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
.filter-select {
    height: 42px; padding: 0 14px;
    border: 1.5px solid #bbf7d0; border-radius: 10px;
    background: #fff; font-size: 13px; font-family: inherit;
    color: #1a2e1a; cursor: pointer;
}
.filter-select:focus { outline: none; border-color: #16a34a; }
.filter-btn {
    height: 42px; padding: 0 22px;
    background: linear-gradient(135deg, #16a34a, #14532d);
    color: #fff; border: none; border-radius: 10px;
    font-size: 13px; font-weight: 700; font-family: inherit;
    cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.filter-btn:hover { background: linear-gradient(135deg, #15803d, #14532d); transform: translateY(-1px); }
.filter-reset {
    height: 42px; padding: 0 16px;
    background: #dcfce7; color: #15803d;
    border-radius: 10px; font-size: 13px; font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 5px;
    transition: background 0.2s; white-space: nowrap;
}
.filter-reset:hover { background: #bbf7d0; color: #14532d; }

.active-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: #dcfce7; color: #15803d;
    font-size: 12px; font-weight: 600;
    padding: 4px 12px; border-radius: 20px;
}
.filter-count { font-size: 12px; color: #4b7a52; margin-left: auto; }

.tabel-card {
    background: #fff; border-radius: 16px;
    box-shadow: 0 2px 16px rgba(22,163,74,0.08);
    overflow: hidden; border: 1px solid #dcfce7;
}

.pub-table th {
    font-size: 10.5px; font-weight: 700;
    color: #4b7a52; text-transform: uppercase; letter-spacing: 0.5px;
    background: #f0fdf4; padding: 13px 16px;
    border-bottom: 1px solid #dcfce7;
}
.pub-table td {
    font-size: 13px; vertical-align: middle;
    color: #1a2e1a; padding: 12px 16px;
    border-bottom: 1px solid #f0fdf4;
}
.pub-table tbody tr:hover { background: #f0fdf4; }
.row-num { color: #9ca3af; font-size: 12px; }
.pub-judul {
    font-weight: 600; color: #14532d;
    max-width: 280px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.pub-kategori { font-size: 11px; color: #4b7a52; margin-top: 2px; }
.pub-nomor {
    background: #dcfce7; color: #15803d;
    font-size: 11px; font-weight: 600;
    padding: 3px 8px; border-radius: 6px; display: inline-block;
}
.pub-jenis {
    background: #f0fdf4; color: #166534;
    font-size: 11px; font-weight: 600;
    padding: 3px 8px; border-radius: 6px; display: inline-block;
}
.badge-berlaku {
    background: #dcfce7; color: #15803d;
    font-size: 11px; font-weight: 600;
    padding: 4px 10px; border-radius: 20px; display: inline-block;
}
.badge-tidak {
    background: #fee2e2; color: #991b1b;
    font-size: 11px; font-weight: 600;
    padding: 4px 10px; border-radius: 20px; display: inline-block;
}

.pub-actions { display: flex; gap: 5px; align-items: center; }
.pub-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    padding: 7px 10px; border-radius: 8px;
    font-size: 12px; font-weight: 600; font-family: inherit;
    cursor: pointer; border: none; text-decoration: none;
    transition: all 0.15s; white-space: nowrap;
    position: relative;
}
.pub-btn:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,0.1); }

.btn-detail    { background: #dcfce7; color: #15803d; }
.btn-detail:hover { background: #15803d; color: #fff; }
.btn-pdf       { background: #fee2e2; color: #b91c1c; }
.btn-pdf:hover { background: #b91c1c; color: #fff; }
.btn-download  { background: #dcfce7; color: #15803d; }
.btn-download:hover { background: #15803d; color: #fff; }

.btn-lock { background: #f3f4f6; color: #9ca3af; border: 1.5px dashed #d1d5db; }
.btn-lock:hover { background: #fef9c3; color: #b45309; border-color: #b45309; }
.btn-lock-badge {
    position: absolute; bottom: -3px; right: -3px;
    font-size: 8px; background: #fff;
    color: #9ca3af; border-radius: 50%;
    padding: 1px; line-height: 1;
}

.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 44px; color: #86efac; margin-bottom: 14px; }
.empty-state h6 { font-size: 15px; font-weight: 700; color: #14532d; margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: #4b7a52; margin-bottom: 16px; }

/* ══════════════════════════════════════════════
   UPDATE TERBARU
   ══════════════════════════════════════════════ */
.section-terbaru { padding: 80px 0; background: #fff; }

.terbaru-list {
    display: flex; flex-direction: column; gap: 10px;
    max-width: 860px; margin: 0 auto;
}
.terbaru-item {
    display: flex; align-items: center; gap: 16px;
    padding: 16px 22px;
    background: #f8fdf8; border: 1.5px solid #dcfce7;
    border-radius: 14px; transition: all 0.2s;
}
.terbaru-item:hover {
    background: #fff; border-color: #86efac;
    box-shadow: 0 4px 18px rgba(22,163,74,0.1);
    transform: translateX(5px);
}
.terbaru-icon {
    width: 42px; height: 42px; border-radius: 12px;
    background: #dcfce7; color: #16a34a;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.terbaru-info { flex: 1; min-width: 0; }
.terbaru-judul {
    font-size: 14px; font-weight: 600; color: #14532d;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-bottom: 5px;
}
.terbaru-meta {
    display: flex; align-items: center; gap: 12px;
    font-size: 12px; color: #4b7a52; flex-wrap: wrap;
}
.terbaru-meta i { margin-right: 3px; }
.terbaru-jenis {
    background: #dcfce7; color: #15803d;
    font-size: 11px; font-weight: 600;
    padding: 2px 8px; border-radius: 6px;
}
.terbaru-status { flex-shrink: 0; }
.terbaru-actions { display: flex; gap: 5px; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .jenis-card { flex: 0 0 calc(25% - 12px); max-width: calc(25% - 12px); }
}
@media (max-width: 768px) {
    .jenis-card { flex: 0 0 calc(33.33% - 11px); max-width: calc(33.33% - 11px); min-width: 130px; }
    .hero-stats { gap: 20px; padding: 14px 20px; }
    .hero-stat-num { font-size: 22px; }
    .terbaru-item { flex-wrap: wrap; }
    .terbaru-actions { width: 100%; }
    .filter-bar { flex-direction: column; }
    .filter-search-wrap { min-width: 100%; }
    .navbar-login-notice span { display: none; }
}
@media (max-width: 500px) {
    .jenis-card { flex: 0 0 calc(50% - 8px); max-width: calc(50% - 8px); }
}