/* ============================================================
   SIGAP — style.css  |  White & Simple
   ============================================================ */

/* ── Inter Font ─────────────────────────────────────────────── */
@font-face {
    font-family: 'Inter';
    src: url('../assets/font/Inter-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('../assets/font/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

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

/* Sembunyikan scrollbar browser (tetap bisa scroll) */
html {
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE / Edge lama */
}
html::-webkit-scrollbar {
    display: none;                /* Chrome / Safari / Edge */
}

body {
    background: #fff;
    color: #111;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.65;
}

a { color: #111; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────── */
.page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 32px 48px 64px;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

/* Garis gradien merah–hitam–emas di bawah teks SIGAP */

.header-shield {
    width: 130px;
    height: auto;
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 42px;
    font-weight: 800;
    color: #111;
    letter-spacing: -1px;
    display: inline-block;
    position: relative;
    padding-bottom: 8px;
}

/* Garis gradien merah → hitam → emas, melebar & ujung kanan sharp fade */
.header-text h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150%;
    height: 3px;
    background: linear-gradient(
        to right,
        #cc0000 0%,
        #111111 38%,
        #c9a227 68%,
        rgba(201, 162, 39, 0.15) 88%,
        transparent 100%
    );
}

.header-text .subtitle {
    font-size: 13px;
    font-weight: 500;
    color: #999;
    margin-top: 5px;
    letter-spacing: 0.1px;
}

/* ── Nav ─────────────────────────────────────────────────────── */
nav {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 32px;
}

nav a {
    color: #999;
    font-size: 15px;
    font-weight: 500;
    padding: 13px 18px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, border-color 0.15s;
}

nav a:hover { color: #111; text-decoration: none; }

nav a.active {
    color: #111;
    font-weight: 700;
    border-bottom-color: #111;
}

/* ── Search box wrapper ──────────────────────────────────────── */
.search-box h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin-bottom: 5px;
}

.search-box > p {
    font-size: 15px;
    font-weight: 400;
    color: #888;
    margin-bottom: 20px;
}

/* ── Tabs ────────────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.tab {
    padding: 8px 18px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #555;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    user-select: none;
}

.tab:hover { background: #f5f5f5; color: #111; }

.tab.active {
    background: #111;
    color: #fff;
    border-color: #111;
    font-weight: 700;
}

/* ── Search row ─────────────────────────────────────────────── */
.search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.search-row input[type="text"] {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #111;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
}

.search-row input[type="text"]:focus { border-color: #111; }
.search-row input[type="text"]::placeholder { color: #bbb; }

/* ── Button ─────────────────────────────────────────────────── */
.btn-search {
    padding: 11px 24px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.btn-search:hover { background: #333; }

/* ── Hint ───────────────────────────────────────────────────── */
.search-hint {
    font-size: 12px;
    color: #bbb;
    margin: 6px 0 14px;
}

.search-hint code {
    background: #f5f5f5;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
    color: #666;
}

/* ── Suggestions ────────────────────────────────────────────── */
.suggestions {
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.suggestions .suggestion-item {
    padding: 9px 13px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: background 0.12s;
}

.suggestions .suggestion-item:last-child { border-bottom: none; }
.suggestions .suggestion-item:hover { background: #f7f7f7; }

.suggestion-name { font-weight: 600; color: #111; }
.suggestion-meta { color: #aaa; font-size: 13px; }
.suggestion-icon { display: none; }

/* ── Filters ────────────────────────────────────────────────── */
.filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
}

.filter-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #aaa;
    margin-bottom: 4px;
}

.filter-group select {
    width: 100%;
    padding: 10px 30px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #111;
    background: #fff;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23999' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.15s;
}

.filter-group select:focus { border-color: #111; }

/* ── Result ─────────────────────────────────────────────────── */
.result { margin-top: 22px; }

.result-header {
    font-size: 14px;
    font-weight: 500;
    color: #999;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.result-header strong { color: #111; font-weight: 700; }

/* ── Card ───────────────────────────────────────────────────── */
.card {
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 16px 18px;
    margin-bottom: 10px;
    transition: border-color 0.15s;
}

.card:hover { border-color: #bbb; }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 6px;
}

.card h3 {
    font-size: 17px;
    font-weight: 700;
    color: #111;
}

.badge {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
    background: #f0f0f0;
    color: #555;
}

.card .meta {
    font-size: 14px;
    font-weight: 500;
    color: #999;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.meta-item { display: flex; align-items: center; gap: 4px; }
.meta-item svg { display: none; }

.card p {
    font-size: 15px;
    font-weight: 400;
    color: #555;
    line-height: 1.55;
}

mark {
    background: #ffe066;
    color: #111;
    padding: 0 2px;
    border-radius: 2px;
}

/* ── Empty ──────────────────────────────────────────────────── */
.empty {
    text-align: center;
    padding: 48px 20px;
    border: 1px dashed #e0e0e0;
    border-radius: 4px;
}

.empty svg { display: none; }
.empty p { font-size: 15px; color: #aaa; }
.empty small { font-size: 13px; color: #ccc; margin-top: 5px; display: block; }

/* ── Loading ────────────────────────────────────────────────── */
.loading { text-align: center; padding: 40px; color: #ccc; }

.spinner {
    display: inline-block;
    width: 22px; height: 22px;
    border: 2px solid #eee;
    border-top-color: #111;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    margin-top: 48px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #bbb;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

footer a { color: #999; }
footer a:hover { color: #111; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .page { padding: 24px 20px 48px; }
    .search-row { flex-direction: column; }
    .filters { grid-template-columns: 1fr; }
    .card-header { flex-direction: column; }
    nav { overflow-x: auto; }
}
