/* ====== Font (self-host) ====== */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/Inter-Variable.woff2") format("woff2");
}

/* ====== Reset & tokens ====== */
:root {
    --bg: #0b1020;
    /* biru tua untuk nav */
    --fg: #e9eef5;
    /* teks di nav */
    --ink: #0b1220;
    /* teks konten */
    --muted: #5b677a;
    --accent: #3d8bfd;
    /* garis aktif nav */
    --banner: #f6f8fc;
    /* latar banner */
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    line-height: 1.6;
    font-size: 16px;
}

a {
    color: #0b57d0;
    text-decoration-thickness: 1px;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ====== Banner ====== */
/* Banner */
.banner {
    background: var(--banner);
    border-bottom: 1px solid #e6e9ef;
}

/* >>> Ubah dari 2 kolom ke 3 kolom */
.banner-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    /* logo kiri | judul | logo kanan */
    align-items: center;
    column-gap: 20px;
    padding: 14px 0;
}

/* Logo container */
.logos {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logos img {
    height: 48px;
    width: auto;
    display: block;
}

/* Judul besar di tengah */
.site-title {
    margin: 0;
    font-weight: 800;
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.2;
    text-align: center;
    color: #0b57d0;
    /* pastikan berada di tengah */
}

/* Responsif: stack jadi 1 kolom pada layar kecil */
@media (max-width: 800px) {
    .banner-inner {
        grid-template-columns: 1fr;
        /* semua menumpuk vertikal */
        row-gap: 8px;
    }

    .logos {
        justify-content: center;
    }

    /* logo tetap rapi di tengah */
}


/* ====== Nav utama (horisontal, tanpa submenu) ====== */
.primary-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--bg);
    color: var(--fg);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.nav-inner {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    /* kalau layar kecil bisa di-scroll horisontal */
}

.nav-link {
    display: inline-block;
    color: var(--fg);
    text-decoration: none;
    opacity: .95;
    padding: 12px 14px;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    opacity: 1;
}

.nav-link.active {
    border-color: var(--accent);
    font-weight: 600;
}

/* ====== Konten & footer ====== */
.content {
    padding: 28px 0 48px;
}

.content h2 {
    margin-top: 24px;
}

.footer {
    border-top: 1px solid #e6e9ef;
    color: var(--muted);
    padding: 18px 0 28px;
}

.footer a {
    color: inherit;
    text-decoration: underline;
}

/* Tabel silabus */
.table-wrap {
    overflow-x: auto;
    margin: 12px 0 28px;
}

table.syllabus {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.syllabus th,
.syllabus td {
    padding: 10px 12px;
    border: 1px solid #e6e9ef;
    vertical-align: top;
}

.syllabus thead th {
    background: #f3f6fb;
    text-align: left;
    font-weight: 700;
}

.syllabus tbody th[scope="rowgroup"] {
    background: #f8fafc;
    font-weight: 700;
    white-space: nowrap;
    /* biar rapi */
}

.syllabus tbody td {
    line-height: 1.5;
}

/* Caption hanya untuk screen reader */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile: kecilkan padding agar muat */
@media (max-width: 640px) {

    .syllabus th,
    .syllabus td {
        padding: 8px 10px;
    }
}

/* ===== FAQ ===== */
.faq {
    counter-reset: faq;
}

.faq-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.faq-item {
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    background: #fff;
    padding: 16px 16px 14px 52px;
    /* ruang untuk nomor di kiri */
    position: relative;
}

.faq-item::before {
    counter-increment: faq;
    content: counter(faq) ".";
    position: absolute;
    left: 16px;
    top: 16px;
    font-weight: 800;
    color: #0b3d91;
}

.faq-q {
    margin: 0 0 8px 0;
    font-weight: 700;
    font-size: 1.05rem;
}

.faq-a {
    margin: 0;
    color: #2b3445;
    line-height: 1.6;
}

/* nomor untuk details/summary */
details.faq-item {
    padding-left: 52px;
}

details.faq-item>summary {
    cursor: pointer;
    list-style: none;
}

details.faq-item>summary::marker {
    content: "";
}

/* sembunyikan marker default */
details.faq-item::before {
    counter-increment: faq;
    content: counter(faq) ".";
    position: absolute;
    left: 16px;
    margin-top: 16px;
    font-weight: 800;
    color: #0b3d91;
}

.syllabus-tree {
    margin: 0;
    padding-left: 1.2rem;
}

.syllabus-tree>.topic {
    margin: 10px 0 14px;
}

.syllabus-tree>.topic>strong {
    display: inline-block;
    margin-bottom: 6px;
}

.syllabus-tree ul {
    margin: 6px 0 2px;
}

/* Spacer untuk dorong tombol ke kanan */
.nav-inner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-spacer {
    flex: 1 1 auto;
}

/* Tombol CTA */
.btn-cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 12px;
    background: var(--accent, #3d8bfd);
    /* fallback biru jika var belum ada */
    color: #081324;
    font-weight: 700;
    text-decoration: none;
    border: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
    transition: transform .06s ease, filter .15s ease;
    white-space: nowrap;
}

.btn-cta:hover {
    filter: brightness(0.95);
}

.btn-cta:active {
    transform: translateY(1px);
}

.btn-cta:focus-visible {
    outline: 2px solid #cfe2ff;
    outline-offset: 2px;
}

/* Responsif: biar bisa di-scroll horizontal saat layar sempit */
@media (max-width: 900px) {
    .nav-inner {
        overflow-x: auto;
    }

    .btn-cta {
        margin-left: 8px;
    }
}