/* ================================================================
   HEADER (sh-*) dan FOOTER (sf-*) — navigasi baru, mobile-first.
   Berdiri sendiri; tidak bergantung pada CSS .kw-header / .kw-footer lama.
================================================================ */
:root { --sh-h: 72px; --sh-navy: #081726; --sh-gold: #e6bd94; --sh-ink: #fbf7f1; }
@media (min-width: 1025px) { :root { --sh-h: 84px; } }
html.sh-lock { overflow: hidden; }

/* ---------- Header ---------- */
.sh {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    height: var(--sh-h);
    background: linear-gradient(180deg, rgba(8, 23, 38, .78), rgba(8, 23, 38, 0));
    color: var(--sh-ink);
    transition: background .3s ease, box-shadow .3s ease;
}
.sh.is-scrolled,
.sh.is-open,
body:has(main.has-fixed-header-offset) .sh {
    background: rgba(8, 23, 38, .97);
    box-shadow: 0 1px 0 rgba(230, 189, 148, .16), 0 6px 24px rgba(0, 0, 0, .35);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.sh-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--sh-h);
    padding: 0 clamp(16px, 4vw, 56px);
    box-sizing: border-box;
}

.sh-logo { display: grid; gap: 4px; text-decoration: none; color: var(--sh-ink); min-width: 0; }
.sh-logo-name { font-size: clamp(13px, 3.4vw, 15px); line-height: 1.15; letter-spacing: .01em; white-space: normal; }
@media (min-width: 1025px) { .sh-logo-name { font-size: 17px; } }
.sh-logo-role { color: var(--sh-gold); font-size: 9.5px; line-height: 1.2; letter-spacing: .24em; text-transform: uppercase; white-space: nowrap; }

.sh-nav { display: none; }
.sh-nav ul { display: flex; gap: clamp(14px, 1.8vw, 30px); margin: 0; padding: 0; list-style: none; }
.sh-nav a {
    position: relative;
    padding: 8px 0;
    color: rgba(251, 247, 241, .9);
    font-size: 14px;
    text-decoration: none;
    transition: color .2s ease;
}
.sh-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--sh-gold); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.sh-nav a:hover, .sh-nav a.is-active { color: var(--sh-gold); }
.sh-nav a:hover::after, .sh-nav a.is-active::after { transform: scaleX(1); }

.sh-actions { display: flex; align-items: center; gap: 10px; }
.sh-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(251, 247, 241, .22);
    border-radius: 50%;
    color: var(--sh-ink);
    background: rgba(255, 255, 255, .05);
    text-decoration: none;
}
.sh-cta {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f3d1b0, #dba684);
    color: #3a2018;
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
}

.sh-burger {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(251, 247, 241, .28);
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
}
.sh-burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--sh-ink); transition: transform .25s ease, opacity .2s ease; }
.sh.is-open .sh-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sh.is-open .sh-burger span:nth-child(2) { opacity: 0; }
.sh.is-open .sh-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer seluler */
.sh-drawer {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--sh-h));
    height: calc(100dvh - var(--sh-h));
    z-index: 1;
    padding: 12px clamp(16px, 5vw, 40px) 32px;
    overflow-y: auto;
    background: rgba(8, 23, 38, .985);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.sh.is-open .sh-drawer { opacity: 1; visibility: visible; transform: none; }
.sh-drawer ul { margin: 0; padding: 0; list-style: none; }
.sh-drawer li + li { border-top: 1px solid rgba(251, 247, 241, .12); }
.sh-drawer li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 4px;
    color: var(--sh-ink);
    font-size: 20px;
    text-decoration: none;
}
.sh-drawer li a svg { color: var(--sh-gold); }
.sh-drawer li a.is-active { color: var(--sh-gold); }
.sh-drawer-cta {
    display: block;
    margin-top: 24px;
    padding: 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f3d1b0, #dba684);
    color: #3a2018;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
}
.sh-drawer-search { display: block; margin-top: 16px; color: rgba(251, 247, 241, .7); font-size: 14px; text-align: center; text-decoration: none; }

@media (min-width: 1025px) {
    .sh-nav { display: block; }
    .sh-cta { display: inline-flex; }
    .sh-burger, .sh-drawer { display: none; }
    .sh-logo-role { font-size: 9.5px; }
}

/* Jangkar section tidak tertutup header */
section[id], article[id] { scroll-margin-top: calc(var(--sh-h) + 12px); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .sh, .sh-drawer, .sh-burger span { transition: none; } }

/* ---------- Footer ---------- */
.sf {
    background: #061320;
    color: rgba(251, 247, 241, .86);
    border-top: 1px solid rgba(230, 189, 148, .18);
}
.sf-inner { width: min(100% - 40px, 1200px); margin-inline: auto; padding: 56px 0 28px; }
.sf-top { display: grid; gap: 40px; }

.sf-logo { display: block; max-width: 20ch; color: var(--sh-ink); font-size: clamp(22px, 4.6vw, 30px); line-height: 1.2; letter-spacing: 0; text-decoration: none; }
.sf-role span { display: block; margin-top: 2px; color: rgba(251, 247, 241, .6); font-size: 13px; }
.sf-role { margin: 14px 0 4px; font-size: 15px; line-height: 1.5; }
.sf-motto { margin: 0 0 18px; color: var(--sh-gold); font-size: 15px; letter-spacing: .04em; }
.sf-aira {
    display: inline-block;
    padding: 12px 22px;
    border: 1px solid rgba(230, 189, 148, .6);
    border-radius: 999px;
    color: var(--sh-ink);
    font-size: 14px;
    text-decoration: none;
}
.sf-aira:hover { background: rgba(230, 189, 148, .14); }

.sf-col h3 { margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid rgba(230, 189, 148, .35); color: var(--sh-gold); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
.sf-col ul { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.sf-col a { color: rgba(251, 247, 241, .86); font-size: 15px; text-decoration: none; }
.sf-col a:hover { color: var(--sh-gold); }

.sf-bottom { display: grid; gap: 8px; margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(251, 247, 241, .12); font-size: 13px; color: rgba(251, 247, 241, .65); }
.sf-bottom p { margin: 0; line-height: 1.55; }

@media (min-width: 640px) {
    .sf-top { grid-template-columns: 1fr 1fr 1fr; }
    .sf-brand { grid-column: 1 / -1; }
}
@media (min-width: 1025px) {
    .sf-top { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 56px; }
    .sf-brand { grid-column: auto; }
    .sf-bottom { grid-template-columns: auto 1fr; gap: 32px; }
    .sf-note { text-align: right; }
}

/* Widget chat tidak menutupi konten di layar kecil */
@media (max-width: 600px) {
    .aray-launcher { width: 56px; height: 56px; right: 14px; bottom: 14px; }
}

/* Layar sangat sempit (<=380px): nama lebih kecil agar tetap dua baris */
@media (max-width: 380px) {
    .sh-inner { gap: 8px; padding-inline: 12px; }
    .sh-logo-name { font-size: 11.5px; letter-spacing: 0; }
    .sh-logo-role { font-size: 8.5px; letter-spacing: .18em; }
    .sh-icon, .sh-burger { width: 38px; height: 38px; }
    .sh-actions { gap: 6px; }
}

/* Baris bawah footer: tidak tertutup tombol chat, rapi dan mudah dibaca */
.sf-inner { padding-bottom: 40px; }
.sf-bottom { margin-top: 48px; padding: 24px 0 8px; gap: 10px; }
.sf-bottom p { font-size: 13.5px; color: rgba(251, 247, 241, .72); }
.sf-bottom .sf-note { max-width: 62ch; color: rgba(251, 247, 241, .55); font-size: 12.5px; }
@media (min-width: 1025px) {
    .sf-bottom { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-right: 150px; }
    .sf-note { text-align: left; }
}
@media (max-width: 1024px) { .sf-bottom { padding-bottom: 72px; } }

/* Kotak penulis artikel: keterangan peran tidak menumpuk dalam pil sempit */
.single-post-author .author-info h3 { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; line-height: 1.25; }
.single-post-author .author-info h3 span { display: inline-block; padding: 5px 12px; font-size: 12px; line-height: 1.3; letter-spacing: .02em; white-space: normal; }
/* Tombol berbagi: Threads */
.post-social-share li.threads a { background: #d9b98f; color: #1b1308; }

/* ================================================================
   HALAMAN KOLEKSI / KATEGORI (Jurnal, Insight, Discoveries)
   Memperbaiki teks yang tak terlihat di latar gelap dan tampilan bawaan template.
================================================================ */
/* Kolom cari di kepala halaman */
.coll-search { display: flex; gap: 8px; max-width: 460px; margin-top: 22px; }
.coll-search input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border: 1px solid rgba(251, 247, 241, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #fbf7f1;
    font-size: 15px;
}
.coll-search input::placeholder { color: rgba(251, 247, 241, .55); }
.coll-search input:focus { outline: 2px solid rgba(230, 189, 148, .7); outline-offset: 1px; }
.coll-search button {
    height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #f3d1b0, #dba684);
    color: #3a2018;
    font-size: 14px;
    cursor: pointer;
}
.coll-note { margin-top: 10px; color: #e6bd94; font-size: 13px; }

/* Thumbnail kosong: kartu gradasi bermerek, bukan gambar abu-abu */
.thumb-empty {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 3 / 2;
    background: radial-gradient(120% 120% at 20% 10%, #1b3557 0%, #0d1f3a 60%, #081726 100%);
    color: rgba(230, 189, 148, .8);
    font-style: normal;
    letter-spacing: .3em;
}
.thumb-empty i { font-style: normal; font-size: 12px; }
.sidebar-post .thumb-empty { width: 84px; aspect-ratio: 1; flex: 0 0 84px; border-radius: 10px; }
.sidebar-post .thumb-empty i { display: none; }

/* "Paling banyak dibaca": isi kartu tidak lagi putih dengan teks terang */
main.has-fixed-header-offset .sidebar-post { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid rgba(251, 247, 241, .12); }
main.has-fixed-header-offset .sidebar-post:last-child { border-bottom: 0; }
main.has-fixed-header-offset .sidebar-post .post-thumb { flex: 0 0 84px; width: 84px; margin: 0; }
main.has-fixed-header-offset .sidebar-post .post-thumb img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
main.has-fixed-header-offset .sidebar-post .post-content { background: transparent !important; padding: 0 !important; box-shadow: none !important; min-width: 0; }
main.has-fixed-header-offset .sidebar-post .post-meta li,
main.has-fixed-header-offset .sidebar-post .post-meta a { color: rgba(251, 247, 241, .65) !important; font-size: 12px; }
main.has-fixed-header-offset .sidebar-post h4,
main.has-fixed-header-offset .sidebar-post h4 a { color: #fbf7f1 !important; font-size: 15px; line-height: 1.35; margin: 6px 0 0; }
main.has-fixed-header-offset .sidebar-post h4 a:hover { color: #e6bd94 !important; }

/* Kartu artikel: judul, ringkasan, dan tautan terbaca jelas */
main.has-fixed-header-offset .post-card .post-content h3 a { color: #fbf7f1; }
main.has-fixed-header-offset .post-card .post-content p { color: rgba(251, 247, 241, .78); }
main.has-fixed-header-offset .post-card .read-more { color: #e6bd94; }
main.has-fixed-header-offset .page-header .page-content h4 { color: #e6bd94; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }
main.has-fixed-header-offset .page-header .page-content > p { max-width: 62ch; color: rgba(251, 247, 241, .85); }
main.has-fixed-header-offset .category-list a { color: #fbf7f1; }
main.has-fixed-header-offset .category-list a span { color: rgba(251, 247, 241, .6); }
main.has-fixed-header-offset .category-list a.active { color: #e6bd94; border-color: rgba(230, 189, 148, .6); }
main.has-fixed-header-offset .pagination-wrap a, main.has-fixed-header-offset .pagination-wrap span { color: #fbf7f1; }
main.has-fixed-header-offset .pagination-wrap a.active { background: #e6bd94; color: #3a2018; }
main.has-fixed-header-offset .sidebar-post .post-content { border: 0 !important; margin: 0 !important; outline: 0; }
main.has-fixed-header-offset .sidebar-post .post-meta { margin: 0 !important; padding: 0; }

/* ================================================================
   DETAIL ARTIKEL: jarak atas-bawah dirapatkan
   Menimpa margin template lama (main.css), lunaray-header.css, dan kelas Tailwind
   yang ditambahkan otomatis pada isi artikel (mb-1, my-4, dst).
================================================================ */
main.has-fixed-header-offset .single-page { padding-top: 8px; padding-bottom: 48px; }
main.has-fixed-header-offset .entry-header .post-meta { margin-top: 12px; margin-bottom: 6px; }
main.has-fixed-header-offset .entry-header .post-title { margin-bottom: 12px; line-height: 1.2; }
main.has-fixed-header-offset .post-author-meta { margin-bottom: 14px; padding-bottom: 12px; }
main.has-fixed-header-offset .single-post-thumb { margin-bottom: 18px; }

main.has-fixed-header-offset .single-post-content { line-height: 1.7; }
main.has-fixed-header-offset .single-post-content > * { margin-top: 0; }
main.has-fixed-header-offset .single-post-content p,
main.has-fixed-header-offset .single-post-content li { margin-top: 0; margin-bottom: .6em; line-height: 1.7; }
main.has-fixed-header-offset .single-post-content li:last-child { margin-bottom: 0; }
main.has-fixed-header-offset .single-post-content ul,
main.has-fixed-header-offset .single-post-content ol { margin-top: 0; margin-bottom: .8em; }
main.has-fixed-header-offset .single-post-content h2,
main.has-fixed-header-offset .single-post-content h3,
main.has-fixed-header-offset .single-post-content h4,
main.has-fixed-header-offset .single-post-content h5,
main.has-fixed-header-offset .single-post-content h6 { margin: 1.1em 0 .4em; line-height: 1.25; }
main.has-fixed-header-offset .single-post-content > h2:first-child,
main.has-fixed-header-offset .single-post-content > h3:first-child { margin-top: 0; }
main.has-fixed-header-offset .single-post-content img { margin: .8em auto; }
main.has-fixed-header-offset .single-post-content figure { margin: .8em 0; }
main.has-fixed-header-offset .single-post-content blockquote { margin: 1em 0; padding: 12px 18px; }
main.has-fixed-header-offset .single-post-content table { margin: 1em 0; }
main.has-fixed-header-offset .single-post-content hr { margin: 1.2em 0; }
/* kelas Tailwind bawaan isi artikel */
main.has-fixed-header-offset .single-post-content .mb-1,
main.has-fixed-header-offset .single-post-content .mb-2,
main.has-fixed-header-offset .single-post-content .mb-4 { margin-bottom: .6em; }
main.has-fixed-header-offset .single-post-content .my-4 { margin-top: 1em; margin-bottom: 1em; }
main.has-fixed-header-offset .single-post-content .mt-1,
main.has-fixed-header-offset .single-post-content .mt-2 { margin-top: .4em; }
/* paragraf kosong (editor menekan Enter berkali-kali) tidak menambah ruang */
main.has-fixed-header-offset .single-post-content p:empty,
main.has-fixed-header-offset .single-post-content p:has(> br:only-child) { display: none; }

/* Kolom cari di halaman /search (di tengah) */
.coll-search--center { margin-inline: auto; }
/* sedikit napas setelah penyesuaian: rapat tapi tidak berhimpitan */
main.has-fixed-header-offset .single-post-content { padding-top: 20px; }
main.has-fixed-header-offset .single-post-content p,
main.has-fixed-header-offset .single-post-content li { margin-bottom: .75em; }
main.has-fixed-header-offset .single-post-content h2,
main.has-fixed-header-offset .single-post-content h3,
main.has-fixed-header-offset .single-post-content h4 { margin: 1.3em 0 .5em; }
main.has-fixed-header-offset .single-post-content > h2:first-child,
main.has-fixed-header-offset .single-post-content > h3:first-child { margin-top: 0; }
main.has-fixed-header-offset .single-post-content ul,
main.has-fixed-header-offset .single-post-content ol { margin-top: .3em; margin-bottom: 1em; }
