/* ============================================================
   Kidung.web.id — Main Stylesheet
   PHP 8.5 · Rebranding 2.0
   Desain: Refined Elegance — Navy + Warm Gold
   ============================================================ */

/* ── Google Fonts ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ────────────────────────────────────────────────────────── */
:root {
  /* Colors */
  --primary:        #1a3a5c;
  --primary-dark:   #0f2438;
  --primary-mid:    #234d78;
  --accent:         #c9923a;
  --accent-light:   #e8b870;
  --accent-dark:    #a57728;
  --accent-soft:    rgba(201,146,58,.12);
  --text:           #1e2d3d;
  --text-muted:     #6c7d8f;
  --text-light:     #a0b0bf;
  --bg:             #f7f9fc;
  --bg-white:       #ffffff;
  --border:         #dde4ed;
  --border-light:   #eef1f6;
  --success:        #2d7a4f;
  --danger:         #c0392b;
  --youtube:        #ff0000;
  --whatsapp:       #25d366;

  /* Typography */
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'Plus Jakarta Sans', system-ui, sans-serif;

  /* Spacing */
  --radius:         12px;
  --radius-sm:      8px;
  --radius-xs:      5px;
  --radius-pill:    50px;

  /* Shadows */
  --shadow-xs:      0 1px 3px rgba(26,58,92,.06);
  --shadow-sm:      0 2px 8px rgba(26,58,92,.08);
  --shadow:         0 4px 20px rgba(26,58,92,.10);
  --shadow-hover:   0 8px 32px rgba(26,58,92,.14);
  --shadow-lg:      0 16px 48px rgba(26,58,92,.16);

  /* Transitions */
  --transition:     all .2s ease;
  --transition-slow: all .35s ease;
}

/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ── Typography ───────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--primary);
  line-height: 1.25;
  font-weight: 700;
}

/* ── Layout wrappers ──────────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--primary-dark);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  box-shadow: 0 2px 16px rgba(0,0,0,.22);
}

.navbar-inner {
  display: flex;
  align-items: center;
  height: 62px;
  gap: 1rem;
}

/* Logo image di navbar */
.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-logo {
  height: 42px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
  /* Filter: logo oranye di atas navbar navy — tampil natural */
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
  transition: opacity .2s;
}

.navbar-brand:hover .navbar-logo { opacity: .88; }

/* Sembunyikan brand-logo-wrap lama jika masih ada */
.brand-logo-wrap { display: none !important; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.3px;
}

.brand-sub {
  font-size: .65rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-top: 1px;
}

/* Nav links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: 1.5rem;
}

.navbar-nav .nav-link {
  color: rgba(255,255,255,.75);
  font-size: .875rem;
  font-weight: 500;
  padding: .45rem .85rem;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  white-space: nowrap;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.1);
}

.navbar-nav .nav-link i { font-size: .9rem; }

/* Search in navbar */
.navbar-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.navbar-search-form {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-pill);
  overflow: hidden;
  transition: var(--transition);
}

.navbar-search-form:focus-within {
  background: rgba(255,255,255,.15);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,146,58,.2);
}

.navbar-search-input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: .85rem;
  padding: .4rem .9rem;
  outline: none;
  width: 200px;
  min-width: 0;
}

.navbar-search-input::placeholder { color: rgba(255,255,255,.4); }

.navbar-search-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: .4rem .85rem;
  cursor: pointer;
  font-size: .85rem;
  transition: var(--transition);
}

.navbar-search-btn:hover { background: var(--accent-dark); }

/* Mobile toggler */
.navbar-toggler {
  display: none;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: .4rem .65rem;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
  margin-left: auto;
}

.navbar-toggler:hover { background: rgba(255,255,255,.2); }

/* Mobile nav */
.navbar-collapse {
  display: none;
  flex-direction: column;
  background: var(--primary-dark);
  padding: .75rem 1rem 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

.navbar-collapse.open { display: flex; }

.navbar-collapse .navbar-nav {
  flex-direction: column;
  align-items: flex-start;
  margin-left: 0;
  width: 100%;
}

.navbar-collapse .navbar-search {
  margin-left: 0;
  margin-top: .75rem;
  width: 100%;
}

.navbar-collapse .navbar-search-form { width: 100%; }
.navbar-collapse .navbar-search-input { width: 100%; }

@media (max-width: 768px) {
  .navbar-nav,
  .navbar-search { display: none; }
  .navbar-toggler { display: block; }
}

/* ── Page header (gradient band) ─────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-mid) 100%);
  padding: 2rem 0 1.75rem;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.page-header h1 {
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: .3rem;
  position: relative;
}

/* ── Breadcrumb Pill — Berlaku Global di Semua .page-header ──────────────────
   Hasil: | 🏠 Beranda | Nyanyian | KK | KK 257 |
   Cara kerja: selector tunggal .page-header ol — cover semua view otomatis
   ─────────────────────────────────────────────────────────────────────────── */

.page-header ol {
  display: inline-flex !important;   /* selalu menyamping */
  flex-direction: row !important;
  flex-wrap: nowrap !important;      /* tidak pernah wrap ke bawah */
  align-items: center;
  list-style: none;
  padding: .3rem .5rem;
  margin: 0 0 .9rem;
  gap: 0;
  overflow-x: auto;                  /* scroll horizontal di layar kecil */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  max-width: 100%;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50px;
}

.page-header ol::-webkit-scrollbar { display: none; }

/* Tiap item */
.page-header ol li {
  display: inline-flex !important;
  align-items: center;
  flex-shrink: 0;
}

/* Link di dalam item */
.page-header ol li a {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  color: rgba(255,255,255,.65);
  font-size: .78rem;
  font-weight: 500;
  padding: .2rem .65rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}

.page-header ol li a:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* Separator › antar item */
.page-header ol li + li::before {
  content: '›';
  color: rgba(255,255,255,.25);
  font-size: .82rem;
  margin: 0 .05rem;
  flex-shrink: 0;
  float: none;   /* override Bootstrap float */
  padding: 0;
}

/* Item aktif (halaman saat ini) — pill emas */
.page-header ol li.active,
.page-header ol li[aria-current] {
  display: inline-flex !important;
  align-items: center;
}

.page-header ol li.active > *,
.page-header ol li[aria-current] > * {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .7rem;
  background: var(--accent);
  border-radius: 50px;
  white-space: nowrap;
  line-height: 1.4;
}

/* Teks plain (bukan elemen) pada item aktif */
.page-header ol li.active,
.page-header ol li[aria-current] {
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .7rem;
  background: var(--accent);
  border-radius: 50px;
  white-space: nowrap;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
  overflow: hidden;
}

.card:hover { box-shadow: var(--shadow); }

.card-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: .85rem 1.25rem;
  font-size: .9rem;
  color: var(--text);
}

.card-body { padding: 1.25rem; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1.4;
  text-decoration: none;
}

.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: none; }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-mid); border-color: var(--primary-mid); }

.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover { background: var(--primary); color: #fff; }

.btn-outline-secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-outline-secondary:hover { background: var(--bg); color: var(--primary); border-color: var(--primary); }

.btn-sm {
  padding: .3rem .8rem;
  font-size: .8rem;
}

.btn-lg {
  padding: .7rem 1.5rem;
  font-size: 1rem;
}

/* YouTube button */
.btn-youtube {
  background: var(--youtube);
  color: #fff;
  border-color: var(--youtube);
}
.btn-youtube:hover { background: #cc0000; border-color: #cc0000; color: #fff; }

/* WA button */
.btn-wa {
  background: var(--whatsapp);
  color: #fff;
  border-color: var(--whatsapp);
}
.btn-wa:hover { background: #1da851; border-color: #1da851; color: #fff; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2em .55em;
  border-radius: var(--radius-xs);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .3px;
}

.badge-buku {
  background: var(--primary);
  color: #fff;
}

.badge-tema {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: .2em .7em;
  font-size: .76rem;
  color: var(--primary);
  transition: var(--transition);
  text-decoration: none;
}

.badge-tema:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.badge-tema-count {
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: .05em .45em;
  font-size: .65rem;
  font-weight: 700;
}

.badge-tema:hover .badge-tema-count {
  background: rgba(255,255,255,.3);
}

/* ── Song table ───────────────────────────────────────────────────────────── */
.nyanyian-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .9rem;
}

.nyanyian-table thead th {
  background: var(--bg);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  padding: .7rem 1rem;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 62px;
  z-index: 10;
}

.nyanyian-table tbody tr {
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.nyanyian-table tbody tr:hover {
  background: rgba(201,146,58,.05);
}

.nyanyian-table tbody td {
  padding: .75rem 1rem;
  vertical-align: middle;
}

.lagu-nomor {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  font-size: 1.05rem;
}

.lagu-judul {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.lagu-judul:hover { color: var(--accent); }

/* ── Song card (search results) ───────────────────────────────────────────── */
.song-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .8rem 1rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  margin-bottom: .5rem;
}

.song-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
  transform: translateX(2px);
}

.song-number {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--accent);
  min-width: 44px;
  text-align: right;
  flex-shrink: 0;
  line-height: 1;
}

.song-info { flex: 1; min-width: 0; }

.song-title {
  font-weight: 700;
  color: var(--primary);
  font-size: .95rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-card:hover .song-title { color: var(--accent); }

.song-meta {
  font-size: .73rem;
  color: var(--text-muted);
}

/* ── Search hero ──────────────────────────────────────────────────────────── */
.search-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 2.75rem 0 2.25rem;
  position: relative;
  overflow: hidden;
}

.search-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,146,58,.12) 0%, transparent 70%);
  pointer-events: none;
}

.search-hero h1 {
  color: #fff;
  font-size: clamp(1.4rem, 4vw, 2rem);
  margin-bottom: .4rem;
}

.search-box {
  margin-top: 1.25rem;
  max-width: 620px;
}

.search-box form {
  display: flex;
  gap: .4rem;
}

.search-box input {
  flex: 1;
  padding: .7rem 1.25rem;
  border-radius: var(--radius-pill);
  border: 2px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.95);
  font-family: var(--font-body);
  font-size: .975rem;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201,146,58,.25);
}

.search-box button {
  padding: .7rem 1.65rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.search-box button:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* ── Syair / Lirik container ──────────────────────────────────────────────── */
.syair-container {
  max-height: 340px;
  overflow-y: auto;           /* scroll muncul jika konten panjang */
  overflow-x: hidden;
  position: relative;
  transition: max-height .35s ease;
  /* Custom scrollbar agar rapi */
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.syair-container::-webkit-scrollbar        { width: 5px; }
.syair-container::-webkit-scrollbar-track  { background: transparent; }
.syair-container::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 3px; }
.syair-container::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

.syair-container.expanded {
  max-height: none;
  overflow-y: visible;
}

/* Gradient fade — hanya tampil saat belum expanded */
.syair-container:not(.expanded)::after {
  content: '';
  position: sticky;     /* sticky supaya selalu di bawah area scroll */
  bottom: 0;
  left: 0;
  right: 0;
  display: block;
  height: 48px;
  background: linear-gradient(transparent, #fff);
  pointer-events: none;
  margin-top: -48px;    /* overlap konten di bawahnya */
}

.syair-bait-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.syair-bait-row:last-child { border-bottom: none; margin-bottom: 0; }

.syair-bait-num-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  opacity: .3;
  min-width: 28px;
  flex-shrink: 0;
  line-height: 1.4;
}

.syair-bait-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.syair-line {
  display: block;
  font-size: .95rem;
  line-height: 1.9;
  color: var(--text);
}

.fs-sm .syair-line { font-size: .82rem; }
.fs-md .syair-line { font-size: .95rem; }
.fs-lg .syair-line { font-size: 1.1rem; }
.fs-xl .syair-line { font-size: 1.25rem; }

/* ── Partitur image ───────────────────────────────────────────────────────── */
.partitur-img-wrap {
  position: relative;
  cursor: zoom-in;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: .5rem;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.partitur-img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-xs);
  transition: opacity .3s;
}

.partitur-zoom-hint {
  position: absolute;
  bottom: .6rem;
  right: .6rem;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .72rem;
  padding: .25em .6em;
  border-radius: var(--radius-pill);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}

.partitur-img-wrap:hover .partitur-zoom-hint { opacity: 1; }

.partitur-error {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.partitur-btn { font-size: .78rem; }

/* ── Tema card ────────────────────────────────────────────────────────────── */
.tema-card {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .9rem 1rem;
  text-decoration: none;
  transition: var(--transition);
}

.tema-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.tema-card-name {
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.35;
}

.tema-card-count { font-size: .75rem; color: var(--text-muted); }
.tema-card:hover .tema-card-name { color: var(--accent); }

/* ── Buku card (homepage/index) ───────────────────────────────────────────── */
.buku-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: var(--transition);
  height: 100%;
}

.buku-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.buku-card-kode {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: .4rem;
}

.buku-card-name {
  font-weight: 600;
  color: var(--primary);
  font-size: .9rem;
  margin-bottom: .25rem;
  line-height: 1.3;
}

.buku-card-count {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.buku-card-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3.5rem;
  color: var(--border);
  display: block;
  margin-bottom: 1rem;
}

.empty-state p { font-size: 1rem; margin: .25rem 0; }

/* ── Search snippet highlight ─────────────────────────────────────────────── */
mark {
  background: rgba(201,146,58,.2);
  color: var(--primary);
  font-weight: 700;
  border-radius: 2px;
  padding: 0 .12em;
}

/* ── Bootstrap-compatible utilities ──────────────────────────────────────── */
.d-flex       { display: flex !important; }
.d-none       { display: none !important; }
.d-block      { display: block !important; }
.d-inline-flex{ display: inline-flex !important; }
.flex-column  { flex-direction: column; }
.flex-wrap    { flex-wrap: wrap; }
.flex-fill    { flex: 1 1 auto; }
.align-items-center { align-items: center; }
.align-items-start  { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-center  { justify-content: center; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.ms-1 { margin-left: .25rem !important; }
.ms-2 { margin-left: .5rem !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.py-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.p-3  { padding: 1rem !important; }
.p-4  { padding: 1.5rem !important; }
.p-2  { padding: .5rem !important; }
.p-0  { padding: 0 !important; }
.text-center  { text-align: center !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-white   { color: #fff !important; }
.fw-bold  { font-weight: 700 !important; }
.fw-600   { font-weight: 600 !important; }
.fst-italic { font-style: italic !important; }
.small    { font-size: .82rem; }
.w-100    { width: 100% !important; }
.h-100    { height: 100% !important; }
.overflow-auto { overflow: auto; }
.text-decoration-none { text-decoration: none !important; }
.rounded  { border-radius: var(--radius) !important; }
.rounded-pill { border-radius: var(--radius-pill) !important; }

/* Bootstrap grid simplified */
.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.row.g-2 { margin: 0; gap: .5rem; }
.row.g-3 { margin: 0; gap: 1rem; }
.row.g-4 { margin: 0; gap: 1.5rem; }
.col     { flex: 1; padding: 0 10px; }
.col-6   { width: 50%; padding: 0 10px; }
.col-md-4{ width: 33.333%; padding: 0 10px; }
.col-lg-4{ width: 33.333%; padding: 0 10px; }
.col-lg-8{ width: 66.667%; padding: 0 10px; }

@media (max-width: 992px) {
  .col-lg-4, .col-lg-8 { width: 100%; }
}

@media (max-width: 768px) {
  .col-md-4 { width: 100%; }
  .col-6 { width: 50%; }
  .d-none.d-md-table-cell { display: none !important; }
  .d-md-none { display: none !important; }
}

@media (max-width: 576px) {
  .col-6 { width: 50%; }
  .d-none.d-sm-table-cell { display: none !important; }
}

/* Bootstrap nav pills */
.nav { display: flex; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
.nav-pills .nav-link {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: .3rem .85rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.nav-pills .nav-link.active,
.nav-pills .nav-link:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Table responsive */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table-hover tbody tr:hover { background: rgba(201,146,58,.04); }
.align-middle td, .align-middle th { vertical-align: middle; }

/* ── Stats strip ──────────────────────────────────────────────────────────── */
.stats-strip {
  background: var(--primary-dark);
  padding: .75rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
}

.stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255,255,255,.75);
}

.stats-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-light);
  line-height: 1;
}

.stats-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; margin-top: .2rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,.55);
  padding: 2rem 0 1.25rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255,255,255,.08);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: .35rem;
}

.footer-desc { font-size: .85rem; line-height: 1.6; margin-bottom: 0; }

.footer-divider {
  border-color: rgba(255,255,255,.08);
  margin: 1.25rem 0 .9rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: .5rem;
}

.footer-links { display: flex; gap: 1rem; }
.footer-links a { color: rgba(255,255,255,.5); font-size: .8rem; }
.footer-links a:hover { color: var(--accent-light); }

/* ── Stagger animation ────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.stagger > * {
  animation: fadeUp .45s ease both;
}

.stagger > *:nth-child(1)  { animation-delay: .05s; }
.stagger > *:nth-child(2)  { animation-delay: .10s; }
.stagger > *:nth-child(3)  { animation-delay: .15s; }
.stagger > *:nth-child(4)  { animation-delay: .20s; }
.stagger > *:nth-child(5)  { animation-delay: .25s; }
.stagger > *:nth-child(6)  { animation-delay: .30s; }
.stagger > *:nth-child(7)  { animation-delay: .35s; }
.stagger > *:nth-child(8)  { animation-delay: .40s; }
.stagger > *:nth-child(n+9){ animation-delay: .45s; }

/* ── Utility: Print ───────────────────────────────────────────────────────── */
@media print {
  .no-print, .navbar, .site-footer, .stats-strip { display: none !important; }
  .container { max-width: none; padding: 0; }
  body { font-size: 10pt; }
  a { color: inherit; }
}

/* ── Scrollbar styling ────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Focus ring ───────────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}




/* ── Footer Grid (4 kolom) ────────────────────────────────────────────────── */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col-brand { grid-column: auto; }
}

.footer-col-title {
  color: rgba(255,255,255,.8);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .9px;
  margin-bottom: .8rem;
  font-weight: 700;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.footer-links-list a {
  color: rgba(255,255,255,.5);
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  transition: color .15s;
}

.footer-links-list a:hover { color: var(--accent-light); }

.footer-buku-list {
  flex-direction: row;
  flex-wrap: wrap;
  gap: .35rem .75rem;
}

.footer-buku-list a {
  font-size: .82rem;
  font-weight: 600;
}

/* Footer social icon buttons */
.footer-socials {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  border: 1.5px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  background: rgba(255,255,255,.06);
}

.social-btn:hover { transform: translateY(-2px); color: #fff; }
.social-yt:hover   { background: #ff0000; border-color: #ff0000; }
.social-ig:hover   { background: #e1306c; border-color: #e1306c; }
.social-fb:hover   { background: #1877f2; border-color: #1877f2; }
.social-blog:hover { background: #ff6b35; border-color: #ff6b35; }

/* Footer bottom */
.footer-bottom-links {
  display: flex;
  gap: 1rem;
}

.footer-bottom-links a {
  color: rgba(255,255,255,.4);
  font-size: .8rem;
}

.footer-bottom-links a:hover { color: var(--accent-light); }
