/* ============================================================
   Forum APIK — gaya frontend (tanpa framework)
   ============================================================ */
:root {
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --primary-soft: #eff6ff;
    --accent: #e11d48;
    --ink: #0f172a;
    --body: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #ffffff;
    --bg-soft: #f8fafc;
    --radius: 14px;
    --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
    --container: 1140px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--body);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    /* Sticky footer: dorong footer ke dasar layar pada halaman pendek. */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }

/* ---- Tombol ---- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--primary); color: #fff; padding: .8rem 1.4rem;
    border-radius: 999px; font-weight: 600; border: 0; cursor: pointer;
    transition: transform .15s ease, background .15s ease; text-decoration: none;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: #e0e7ff; color: var(--primary-dark); }
.btn-ghost { background: rgba(255,255,255,.15); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.28); color: #fff; }

/* ---- Header ---- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); text-decoration: none; }
.brand-logo { height: 44px; width: auto; }
.brand-mark {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff; font-weight: 800; border-radius: 12px; font-size: .95rem; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; color: var(--ink); }
.brand-text small { color: var(--muted); font-size: .78rem; }

.site-nav ul { display: flex; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
    display: block; padding: .55rem .85rem; border-radius: 8px;
    color: var(--body); font-weight: 500; font-size: .95rem;
}
.site-nav a:hover { background: var(--primary-soft); color: var(--primary-dark); text-decoration: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---- Hero ---- */
.hero {
    position: relative; color: #fff; overflow: hidden;
    background: radial-gradient(1200px 500px at 80% -10%, #3b82f6 0%, transparent 60%),
                linear-gradient(135deg, var(--primary-dark), #312e81);
}
.hero-inner { padding: clamp(3.5rem, 8vw, 6.5rem) 0; max-width: 720px; }
.hero h1 { color: #fff; }
.hero p { font-size: 1.15rem; color: #dbeafe; margin-bottom: 1.8rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.eyebrow {
    display: inline-block; background: rgba(255,255,255,.14); color: #fff;
    padding: .35rem .9rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.2rem;
}

/* ---- Bagian umum ---- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-head.left { margin-left: 0; text-align: left; }

/* ---- Grid klaster ---- */
.cluster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.cluster-card {
    display: block; background: var(--bg); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 1.4rem; transition: .18s; color: var(--ink);
}
.cluster-card:hover { text-decoration: none; border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.cluster-icon { font-size: 1.8rem; margin-bottom: .6rem; }
.cluster-card h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.cluster-card p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---- Kartu berita ---- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.news-card {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    overflow: hidden; display: flex; flex-direction: column; transition: .18s;
}
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.news-thumb { aspect-ratio: 16/9; background: var(--primary-soft); overflow: hidden; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.news-meta { font-size: .8rem; color: var(--muted); display: flex; gap: .6rem; }
.badge { background: var(--primary-soft); color: var(--primary-dark); padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.news-card h3 { font-size: 1.15rem; margin: 0; }
.news-card h3 a { color: var(--ink); }
.news-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.news-card .read-more { margin-top: auto; font-weight: 600; font-size: .9rem; }

/* ---- Mitra ---- */
.partner-group { margin-bottom: 2.5rem; }
.partner-group h3 { font-size: 1.1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; margin-bottom: 1rem; }
.partner-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.partner-item {
    display: grid; place-items: center; text-align: center; gap: .5rem;
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
    padding: 1.2rem 1rem; min-height: 110px; color: var(--ink); font-weight: 600; font-size: .9rem;
}
.partner-item img { max-height: 60px; width: auto; }

/* ---- Marquee mitra (berjalan otomatis) ---- */
.marquee {
    overflow: hidden; padding: 1.2rem 0;
    --mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: var(--mask); mask-image: var(--mask);
}
.marquee-track {
    display: flex; align-items: center; gap: 3.5rem; width: max-content;
    animation: marquee-scroll 50s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track.reverse { animation-direction: reverse; }
.marquee + .marquee { margin-top: 1.5rem; }
.marquee-item { flex: 0 0 auto; height: 66px; display: grid; place-items: center; }
.marquee-item img { max-height: 66px; max-width: 150px; width: auto; object-fit: contain; }
.marquee-item span { font-weight: 700; color: var(--muted); white-space: nowrap; font-size: 1.05rem; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---- Bagian selamat datang beranda ---- */
.welcome-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.welcome-grid.no-image { grid-template-columns: 1fr; max-width: 820px; margin: 0 auto; }
.welcome-text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1.1rem; }
.welcome-text .prose p { margin-bottom: 1rem; font-size: 1.05rem; }
.welcome-image img { width: 100%; border-radius: 18px; box-shadow: var(--shadow); display: block; }
@media (max-width: 860px) {
    .welcome-grid { grid-template-columns: 1fr; gap: 1.8rem; }
    .welcome-image { max-width: 420px; margin: 0 auto; }
}

/* ---- Kartu CTA / info ---- */
.cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-radius: 20px; padding: clamp(2rem, 5vw, 3.5rem); text-align: center;
}
.cta h2 { color: #fff; }
.cta p { color: #dbeafe; max-width: 560px; margin: 0 auto 1.6rem; }

/* ---- Prose (isi halaman) ---- */
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.8rem; }
.prose h3 { margin-top: 1.4rem; }
.prose img { border-radius: 12px; margin: 1.2rem 0; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose a { text-decoration: underline; }

/* ---- Page header ---- */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.page-hero .breadcrumb { color: var(--muted); font-size: .85rem; margin-bottom: .6rem; }
.page-hero h1 { margin: 0; }

/* ---- People ---- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.person-card { text-align: center; }
.person-photo {
    width: 120px; height: 120px; border-radius: 50%; margin: 0 auto .8rem; object-fit: cover;
    background: linear-gradient(135deg, var(--primary-soft), #e0e7ff); display: grid; place-items: center;
    color: var(--primary-dark); font-weight: 800; font-size: 2rem;
}
.person-card h3 { font-size: 1.05rem; margin-bottom: .1rem; }
.person-card p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ---- Direktori anggota (list ringkas) ---- */
.member-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .8rem; }
.member-chip {
    display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem;
    background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
    color: var(--ink); transition: .15s;
}
.member-chip:hover { text-decoration: none; border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.member-thumb {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
}
.member-thumb-initial {
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-soft), #e0e7ff);
    color: var(--primary-dark); font-weight: 800;
}
.member-info { display: flex; flex-direction: column; min-width: 0; }
.member-info strong { font-size: .95rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-info small { color: var(--muted); font-size: .8rem; }

/* ---- Halaman detail anggota ---- */
.member-detail { display: grid; grid-template-columns: 280px 1fr; gap: 2.5rem; align-items: start; }
.member-detail-photo img, .member-detail-initial {
    width: 100%; aspect-ratio: 1 / 1; border-radius: 18px; object-fit: cover; box-shadow: var(--shadow); display: block;
}
.member-detail-initial {
    display: grid; place-items: center; font-size: 4rem; font-weight: 800; color: var(--primary-dark);
    background: linear-gradient(135deg, var(--primary-soft), #e0e7ff);
}
.member-detail-info h2 { margin: .6rem 0 .2rem; }
.member-role { color: var(--primary-dark); font-weight: 600; font-size: 1.1rem; margin: 0 0 1rem; }
.status-badge { display: inline-block; padding: .3rem .85rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.status-badge.is-pengurus { background: var(--primary-soft); color: var(--primary-dark); }
.status-badge.is-anggota { background: #eef2f7; color: var(--muted); }
.member-meta { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.4rem; margin: 1.2rem 0; }
.member-meta dt { color: var(--muted); font-weight: 600; font-size: .9rem; }
.member-meta dd { margin: 0; color: var(--ink); }
@media (max-width: 700px) {
    .member-detail { grid-template-columns: 1fr; }
    .member-detail-photo { max-width: 240px; }
}

/* ---- Layout dua kolom ---- */
.two-col { display: grid; grid-template-columns: 240px 1fr; gap: 2.5rem; align-items: start; }
.side-nav { position: sticky; top: 90px; }

/* ---- Layout artikel berita (konten lebar + sidebar kanan) ---- */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; align-items: start; }
.post-body { max-width: none; }
.post-body img { border-radius: 12px; margin: 0 0 1.5rem; width: 100%; }
.post-aside { position: sticky; top: 90px; }
.post-aside .side-nav h4 { font-size: 1rem; margin-bottom: 1rem; }
.post-aside .side-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.post-aside .side-nav a { color: var(--body); font-weight: 500; line-height: 1.4; display: block; }
.post-aside .side-nav a:hover { color: var(--primary); text-decoration: none; }
@media (max-width: 860px) {
    .post-layout { grid-template-columns: 1fr; gap: 2rem; }
    .post-aside { position: static; border-top: 1px solid var(--line); padding-top: 1.5rem; }
}
.side-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.side-nav a { display: block; padding: .55rem .8rem; border-radius: 8px; color: var(--body); }
.side-nav a:hover, .side-nav a.active { background: var(--primary-soft); color: var(--primary-dark); text-decoration: none; }

/* ---- Form ---- */
.form-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow); }
.form-row { margin-bottom: 1.1rem; }
.form-row label { display: block; font-weight: 600; margin-bottom: .35rem; color: var(--ink); font-size: .92rem; }
.input, .textarea, select {
    width: 100%; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 10px;
    font-size: 1rem; font-family: inherit; color: var(--ink); background: #fff;
}
.input:focus, .textarea:focus, select:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.textarea { min-height: 150px; resize: vertical; }

/* ---- Alert ---- */
.alert { padding: .9rem 1.1rem; border-radius: 10px; margin-bottom: 1.2rem; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ---- Pagination ---- */
.pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 2.5rem; }
.pagination a, .pagination span {
    padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 8px; color: var(--body); font-weight: 600;
}
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Utilitas ---- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; }
.empty-state { text-align: center; color: var(--muted); padding: 3rem 1rem; }

/* ---- Footer ---- */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 4rem; flex-shrink: 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.3fr;
    gap: 2.5rem;
    padding: 3.5rem 0 2.75rem;
}
.site-footer h4 {
    color: #fff; font-size: .8rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; margin: 0 0 1.1rem;
}
.site-footer p { color: #94a3b8; font-size: .92rem; margin: 0 0 .6rem; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-brand { margin-bottom: 1rem; }
.footer-brand .brand-text strong { color: #fff; }
.footer-about p { max-width: 400px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.footer-contact p { margin-bottom: .5rem; }
.socials { display: flex; gap: 1.2rem; margin-top: .8rem; flex-wrap: wrap; }
.socials a { font-weight: 600; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-bottom p { margin: 0; padding: 1.3rem 0; font-size: .85rem; color: #64748b; text-align: center; }

/* ---- Responsif ---- */
@media (max-width: 860px) {
    .two-col { grid-template-columns: 1fr; }
    .side-nav { position: static; }
    .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .nav-toggle { display: flex; }
    .site-nav {
        position: absolute; top: 72px; left: 0; right: 0; background: #fff;
        border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        max-height: 0; overflow: hidden; transition: max-height .25s ease;
    }
    .site-nav.open { max-height: 70vh; }
    .site-nav ul { flex-direction: column; padding: .5rem; }
    .site-nav a { padding: .8rem 1rem; }
}
