/* =========================================================
   Design System — Setda Kota Pangkal Pinang
   ========================================================= */
:root {
  --primary-900: #0B2447;
  --primary-800: #12305C;
  --primary-700: #19376D;
  --primary-500: #2563EB;
  --primary-400: #3B82F6;
  --primary-100: #DBEAFE;
  --accent-gold: #D4A017;
  --accent-gold-light: #F59E0B;
  --surface: #FFFFFF;
  --background: #F1F5F9;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --border-soft: #E2E8F0;
  --shadow-card: 0 4px 20px rgba(2, 32, 71, .07);
  --shadow-card-hover: 0 12px 32px rgba(2, 32, 71, .14);
  --radius-card: 1rem;
}

[data-bs-theme="dark"] {
  --surface: #0F172A;
  --background: #020617;
  --text-main: #E2E8F0;
  --text-muted: #94A3B8;
  --border-soft: #1E293B;
  --primary-100: #172554;
  --shadow-card: 0 4px 20px rgba(0, 0, 0, .35);
  --shadow-card-hover: 0 12px 32px rgba(0, 0, 0, .5);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--background);
  color: var(--text-main);
}

h1, h2, h3, h4, h5, h6, .navbar-brand, .btn { font-family: 'Poppins', 'Inter', sans-serif; }

a { text-decoration: none; }

/* ---------- Topbar ---------- */
.topbar {
  background: var(--primary-900);
  color: #CBD5E1;
  font-size: .8rem;
}
.topbar a, .topbar button { color: #CBD5E1; }
.topbar a:hover, .topbar button:hover { color: #fff; }
.topbar .btn-icon {
  background: none; border: 0; padding: .1rem .35rem; line-height: 1;
}

/* ---------- Navbar ---------- */
.navbar-main {
  background: var(--surface);
  box-shadow: 0 2px 12px rgba(2, 32, 71, .08);
  padding-top: .6rem; padding-bottom: .6rem;
}
.navbar-main .navbar-brand img { height: 48px; }
.brand-title { font-weight: 700; font-size: .95rem; color: var(--primary-900); line-height: 1.15; letter-spacing: .02em; }
[data-bs-theme="dark"] .brand-title { color: #E2E8F0; }
.brand-sub { font-weight: 600; font-size: .8rem; color: var(--primary-500); }
.navbar-main .nav-link {
  font-weight: 500; font-size: .92rem; color: var(--text-main);
  padding: .5rem .85rem; border-radius: .5rem;
}
.navbar-main .nav-link:hover, .navbar-main .nav-link.active { color: var(--primary-500); background: var(--primary-100); }
.navbar-search .form-control { border-radius: 2rem 0 0 2rem; border-color: var(--border-soft); min-width: 170px; }
.navbar-search .btn { border-radius: 0 2rem 2rem 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(120deg, var(--primary-900), var(--primary-700));
}
.hero-slide {
  min-height: 480px; display: flex; align-items: center;
  background-size: cover; background-position: center right; position: relative;
}
.hero-slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(11, 36, 71, .93) 25%, rgba(25, 55, 109, .55) 70%, rgba(11, 36, 71, .25));
}
.hero-slide > .container { position: relative; z-index: 2; }
.hero-tagline {
  display: inline-block; background: rgba(212, 160, 23, .18); border: 1px solid rgba(212, 160, 23, .5);
  color: #FCD34D; font-size: .75rem; font-weight: 600; letter-spacing: .14em;
  padding: .35rem .9rem; border-radius: 2rem; margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.9rem); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
.hero p.lead { color: #CBD5E1; max-width: 560px; }
.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
  color: #1E293B; font-weight: 600; border: 0; border-radius: .6rem; padding: .65rem 1.4rem;
}
.btn-gold:hover { filter: brightness(1.07); color: #0B2447; }
.btn-outline-light-2 {
  border: 1.5px solid rgba(255, 255, 255, .6); color: #fff; border-radius: .6rem; padding: .65rem 1.4rem; font-weight: 500;
}
.btn-outline-light-2:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Info strip ---------- */
.info-strip {
  background: var(--primary-800); color: #E2E8F0; font-size: .85rem;
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.info-strip .divider { border-left: 1px solid rgba(255, 255, 255, .15); }
.ticker { overflow: hidden; white-space: nowrap; }
.ticker-inner { display: inline-block; padding-left: 100%; animation: ticker 30s linear infinite; }
.ticker:hover .ticker-inner { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-inner { animation: none; padding-left: 0; }
  html { scroll-behavior: auto; }
}

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; }
.section-title { text-align: center; margin-bottom: 2.25rem; }
.section-title h2 {
  font-weight: 700; font-size: 1.5rem; color: var(--primary-900); text-transform: uppercase; letter-spacing: .04em;
}
[data-bs-theme="dark"] .section-title h2 { color: #E2E8F0; }
.section-title .line {
  width: 64px; height: 4px; border-radius: 2px; margin: .6rem auto 0;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-gold));
}
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.section-head h2 { font-size: 1.15rem; font-weight: 700; color: var(--primary-900); text-transform: uppercase; margin: 0; }
[data-bs-theme="dark"] .section-head h2 { color: #E2E8F0; }
.section-head h2::after { content: ""; display: block; width: 44px; height: 3px; margin-top: .35rem;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-gold)); border-radius: 2px; }
.link-more { font-size: .85rem; font-weight: 600; color: var(--primary-500); }
.link-more:hover { color: var(--primary-700); }

/* ---------- Cards ---------- */
.card-soft {
  background: var(--surface); border: 1px solid var(--border-soft);
  border-radius: var(--radius-card); box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card-soft:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }

.quick-card { text-align: center; padding: 1.5rem 1rem; height: 100%; display: block; color: var(--text-main); }
.quick-card .icon-wrap {
  width: 58px; height: 58px; border-radius: 1rem; display: flex; align-items: center; justify-content: center;
  margin: 0 auto .8rem; font-size: 1.6rem;
}
.quick-card h6 { font-weight: 700; margin-bottom: .15rem; }
.quick-card p { font-size: .72rem; color: var(--text-muted); margin: 0; }

/* ---------- Stats band ---------- */
.stats-band {
  background: linear-gradient(120deg, var(--primary-700), var(--primary-900));
  border-radius: 1.25rem; color: #fff; padding: 1.8rem 1rem;
}
.stat-item { display: flex; align-items: center; gap: .9rem; justify-content: center; }
.stat-item .icon {
  width: 52px; height: 52px; border-radius: .9rem; background: rgba(255, 255, 255, .12);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.stat-item .num { font-size: 1.5rem; font-weight: 700; font-family: 'Poppins', sans-serif; line-height: 1.1; }
.stat-item .lbl { font-size: .8rem; color: #CBD5E1; }

/* ---------- Sambutan ---------- */
.greeting-photo { border-radius: 1rem; width: 100%; max-width: 220px; box-shadow: var(--shadow-card); }
.signature { font-family: 'Poppins', cursive; font-style: italic; color: var(--primary-500); }

/* ---------- Struktur ---------- */
.org-node {
  display: inline-block; background: var(--primary-700); color: #fff; font-size: .72rem; font-weight: 600;
  padding: .45rem .8rem; border-radius: .5rem; text-align: center;
}
.org-node.root { background: var(--primary-900); border: 1px solid var(--accent-gold); }
.org-node.level-asisten { background: var(--primary-500); }
.org-node.level-bagian { background: var(--surface); color: var(--text-main); border: 1px solid var(--border-soft); font-weight: 500; }
.org-tree { text-align: center; }
.org-tree .branch { border-left: 2px dashed var(--border-soft); margin-left: 1rem; padding-left: 1rem; }

/* ---------- Berita ---------- */
.news-card { overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.news-card .thumb { position: relative; }
.news-card .thumb img { width: 100%; height: 190px; object-fit: cover; }
.news-card .date-badge {
  position: absolute; top: .8rem; left: .8rem; background: var(--primary-900); color: #fff;
  text-align: center; border-radius: .6rem; padding: .3rem .55rem; line-height: 1.05; font-family: 'Poppins', sans-serif;
}
.news-card .date-badge .d { font-size: 1.05rem; font-weight: 700; display: block; }
.news-card .date-badge .m { font-size: .6rem; text-transform: uppercase; }
.news-card .body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.news-card h5 { font-size: .98rem; font-weight: 600; line-height: 1.4; }
.news-card h5 a { color: var(--text-main); }
.news-card h5 a:hover { color: var(--primary-500); }
.badge-cat { font-size: .68rem; font-weight: 600; border-radius: 2rem; padding: .28em .8em; }
.meta-muted { font-size: .76rem; color: var(--text-muted); }

/* ---------- Pengumuman ---------- */
.announce-item {
  display: flex; gap: .9rem; padding: .9rem 1rem; border-radius: .8rem; align-items: flex-start;
  border: 1px solid var(--border-soft); background: var(--surface); transition: border-color .15s;
}
.announce-item:hover { border-color: var(--primary-400); }
.announce-item .ic {
  flex: 0 0 38px; height: 38px; border-radius: .6rem; background: var(--primary-100); color: var(--primary-500);
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.announce-item h6 { font-size: .86rem; font-weight: 600; margin: 0 0 .15rem; }
.announce-item h6 a { color: var(--text-main); }
.announce-item h6 a:hover { color: var(--primary-500); }

/* ---------- Produk hukum ---------- */
.legal-tabs .nav-link {
  font-size: .8rem; font-weight: 600; color: var(--text-muted); border-radius: .5rem .5rem 0 0;
}
.legal-tabs .nav-link.active { color: var(--primary-500); border-bottom: 2px solid var(--primary-500); background: none; }
.legal-table td, .legal-table th { font-size: .82rem; vertical-align: middle; }

/* ---------- Dashboard indikator ---------- */
.indicator-card { padding: 1.1rem 1.2rem; border-radius: .9rem; height: 100%; }
.indicator-card .name { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.indicator-card .val { font-size: 1.7rem; font-weight: 700; font-family: 'Poppins', sans-serif; }
.indicator-card .lbl { font-size: .74rem; color: var(--text-muted); }

/* ---------- Aplikasi ---------- */
.app-tile { text-align: center; padding: 1.1rem .6rem; display: block; color: var(--text-main); height: 100%; }
.app-tile .ic {
  width: 54px; height: 54px; border-radius: 1rem; margin: 0 auto .6rem; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.45rem;
}
.app-tile span { font-size: .78rem; font-weight: 600; }

/* ---------- Agenda ---------- */
.agenda-item { display: flex; gap: 1rem; position: relative; padding-bottom: 1.4rem; }
.agenda-item:not(:last-child)::before {
  content: ""; position: absolute; left: 26px; top: 56px; bottom: 0; width: 2px; background: var(--border-soft);
}
.agenda-date {
  flex: 0 0 54px; height: 54px; background: var(--primary-500); color: #fff; border-radius: .8rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05;
  font-family: 'Poppins', sans-serif; z-index: 1;
}
.agenda-date .d { font-weight: 700; font-size: 1.1rem; }
.agenda-date .m { font-size: .62rem; text-transform: uppercase; }
.agenda-item h6 { font-size: .88rem; font-weight: 600; margin-bottom: .2rem; }

/* ---------- Galeri ---------- */
.gallery-grid img {
  width: 100%; height: 150px; object-fit: cover; border-radius: .8rem;
  transition: transform .25s ease, filter .25s;
}
.gallery-grid a:hover img { transform: scale(1.04); filter: brightness(1.08); }

/* ---------- Footer ---------- */
.footer { background: var(--primary-900); color: #94A3B8; font-size: .85rem; }
.footer h6 { color: #fff; font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 1rem; }
.footer a { color: #94A3B8; }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer .social a {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .08);
  display: inline-flex; align-items: center; justify-content: center; margin-right: .4rem;
}
.footer .social a:hover { background: var(--primary-500); color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .78rem; }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  background: linear-gradient(110deg, var(--primary-900), var(--primary-700)); color: #fff; padding: 2.6rem 0;
}
.page-header h1 { font-size: 1.6rem; font-weight: 700; margin: 0; }
.page-header .breadcrumb { margin: .4rem 0 0; --bs-breadcrumb-divider-color: #94A3B8; }
.page-header .breadcrumb a { color: #CBD5E1; }
.page-header .breadcrumb .active { color: #E2E8F0; }

/* ---------- Misc ---------- */
.prose { line-height: 1.85; }
.prose img { max-width: 100%; border-radius: .8rem; }
.back-top {
  position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 1050; width: 42px; height: 42px;
  border-radius: 50%; background: var(--primary-500); color: #fff; border: 0; display: none;
  align-items: center; justify-content: center; box-shadow: var(--shadow-card-hover);
}
.back-top.show { display: flex; }
.wa-float {
  position: fixed; left: 1.2rem; bottom: 1.2rem; z-index: 1050; width: 48px; height: 48px; border-radius: 50%;
  background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  box-shadow: var(--shadow-card-hover);
}
.wa-float:hover { color: #fff; filter: brightness(1.08); }

@media (max-width: 767.98px) {
  .hero-slide { min-height: 400px; }
  .section { padding: 2.4rem 0; }
}
