:root {
  --primary: #261172;
  --primary-dark: #1a0b4d;
  --earth: #ff8800;
  --earth-hover: #e87500;
  --botanical: #ff8800;
  --crack: #261172;
  --background: #fff5e2;
  --surface-glass: rgba(255, 245, 226, 0.78);
  --surface-glass-dark: rgba(38, 17, 114, 0.90);
  --text-primary: #261172;
  --text-muted: #5f547a;
  --white: #fff5e2;
  --border: rgba(38, 17, 114, 0.16);
  --shadow: 0 8px 30px rgba(38, 17, 114, 0.14);
  --radius-md: 12px;
  --radius-lg: 16px;
  --header-height: 76px;
  --content-width: 1200px;
  --transition: 0.3s ease;
  --logo-img: url("logo.png");
}

/* =========================
       DARK THEME
    ========================== */

[data-theme="dark"] {
  --primary: #261172;
  --primary-dark: #14082f;
  --earth: #ff8800;
  --earth-hover: #ff9d33;
  --botanical: #ff8800;
  --crack: #ff8800;
  --background: #1b0c45;
  --surface-glass: rgba(38, 17, 114, 0.72);
  --surface-glass-dark: rgba(20, 8, 47, 0.90);
  --text-primary: #fff5e2;
  --text-muted: #eadfcf;
  --white: #fff5e2;
  --border: rgba(255, 245, 226, 0.16);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

body,
.site-header,
.glass-card,
.timeline-card,
.org-card,
.gallery-item,
.illustration-box,
.webgis-container,
.background-section,
.timeline-section,
.organogram-section,
.site-footer,
.theme-toggle,
.misi-card,
.tema-card,
.geodesi-panel {
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease, box-shadow 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  min-width: 320px;
  background: var(--background);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.container {
  width: min(92%, var(--content-width));
  margin-inline: auto;
}

.section {
  padding: 100px 0;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 52px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--earth);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.15;
}

.section-heading p,
.body-copy {
  color: var(--text-muted);
}

/* =========================
       HEADER
    ========================== */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--surface-glass-dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-logo {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background-image: var(--logo-img);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.4));
}

.brand-text {
  white-space: nowrap;
}

.brand-accent {
  color: var(--earth);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
}

.nav-item-dropdown {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 10px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  transition: color var(--transition);
}

.nav-link::after {
  position: absolute;
  right: 10px;
  bottom: 2px;
  left: 10px;
  height: 2px;
  content: "";
  background: var(--earth);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  color: var(--white);
}

.nav-link.active {
  color: var(--earth);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-chevron {
  width: 13px;
  height: 13px;
  transition: transform var(--transition);
}

.nav-item-dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  z-index: 1100;
  min-width: 232px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: var(--surface-glass-dark);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateX(-50%) translateY(-8px);
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
}

.nav-item-dropdown.open .nav-dropdown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.nav-dropdown-eyebrow {
  display: block;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-dropdown-link {
  display: block;
  padding: 10px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 700;
  transition: background var(--transition), color var(--transition);
}

.nav-dropdown-link:hover,
.nav-dropdown-link:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-toggle {
  position: relative;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.14);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.hamburger {
  position: relative;
  width: 22px;
  height: 16px;
}

.hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 7px;
}

.hamburger span:nth-child(3) {
  top: 14px;
}

.menu-toggle.active .hamburger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================
       HERO
    ========================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 130px 0 90px;
  background: linear-gradient(135deg, #261172 0%, #4a3423 100%);
  color: var(--white);
}

.hero::before,
.hero::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero::before {
  width: 520px;
  height: 520px;
  top: -220px;
  right: -120px;
}

.hero::after {
  width: 420px;
  height: 420px;
  bottom: -260px;
  left: -140px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 920px;
}

.hero-logo-watermark {
  position: absolute;
  top: 50%;
  right: clamp(-40px, 4vw, 60px);
  z-index: 0;
  width: clamp(260px, 34vw, 480px);
  aspect-ratio: 480 / 442;
  opacity: 0.16;
  background-image: var(--logo-img);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform: translateY(-50%) rotate(-6deg);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(138, 122, 99, 0.18);
  color: #dce7da;
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.hero-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--earth);
  content: "";
}

.hero h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(2.5rem, 7vw, 5.8rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-description {
  max-width: 680px;
  margin-bottom: 32px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.98rem, 2vw, 1.12rem);
}

.btn {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border: 0;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition),
    box-shadow var(--transition);
}

.btn-primary {
  background: var(--earth);
  color: var(--white);
  box-shadow: 0 8px 22px rgba(193, 98, 44, 0.25);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--earth-hover);
  transform: scale(1.05);
}

/* =========================
       BACKGROUND
    ========================== */

.background-section {
  background: var(--background);
}

.background-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.background-copy h2 {
  margin-bottom: 22px;
  color: var(--primary);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.12;
}

.background-copy p+p {
  margin-top: 18px;
}

.illustration-box {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(36, 26, 19, 0.06), rgba(138, 122, 99, 0.16));
  box-shadow: var(--shadow);
}

.terrain-illustration {
  position: relative;
  width: 72%;
  height: 70%;
}

.terrain-layer {
  position: absolute;
  right: 0;
  left: 0;
  height: 30%;
  border-radius: 50%;
  transform: rotate(-5deg);
}

.terrain-layer:nth-child(1) {
  top: 10%;
  background: rgba(138, 122, 99, 0.3);
}

.terrain-layer:nth-child(2) {
  top: 29%;
  background: rgba(193, 98, 44, 0.38);
}

.terrain-layer:nth-child(3) {
  top: 48%;
  background: rgba(36, 26, 19, 0.72);
}

.terrain-arrow {
  position: absolute;
  right: 25%;
  bottom: 4%;
  width: 3px;
  height: 115px;
  background: var(--earth);
}

.terrain-arrow::after {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 14px;
  height: 14px;
  border-right: 3px solid var(--earth);
  border-bottom: 3px solid var(--earth);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.vision-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 64px;
}

.glass-card {
  padding: 28px;
  border: 1px solid rgba(36, 26, 19, 0.08);
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform var(--transition), box-shadow var(--transition);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1);
}

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 12px;
  background: rgba(193, 98, 44, 0.12);
  color: var(--earth);
  font-weight: 900;
}

.glass-card h3 {
  margin-bottom: 8px;
  color: var(--primary);
}

/* =========================
       ARAH GERAK — VISI & MISI
    ========================== */

.arah-gerak-section {
  background: var(--primary);
  color: var(--white);
}

.arah-gerak-section .section-heading h2 {
  color: var(--white);
}

.arah-gerak-section .section-heading p {
  color: rgba(255, 255, 255, 0.68);
}

.visi-misi-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(24px, 5vw, 48px);
  align-items: start;
}

.visi-card {
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.visi-card .eyebrow {
  color: var(--earth);
}

.visi-card h3 {
  margin-bottom: 14px;
  font-size: 1.5rem;
}

.visi-card p {
  color: rgba(255, 255, 255, 0.75);
}

.misi-list {
  display: grid;
  gap: 16px;
}

.misi-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.misi-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(193, 98, 44, 0.2);
  color: var(--earth);
  font-weight: 900;
  font-size: 0.9rem;
}

.misi-card h4 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.misi-card p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.92rem;
}

/* =========================
       REUSABLE SECTION DECORATION
       (Topo-contour pattern + soft color
       blobs, tuned for both themes so no
       section reads as flat/empty)
    ========================== */

.tema-section,
.timeline-section,
.webgis-section,
.arah-gerak-section,
.organogram-section {
  position: relative;
  overflow: hidden;
}

.tema-section>.container,
.timeline-section>.container,
.webgis-section>.container,
.webgis-section>.webgis-container,
.arah-gerak-section>.container,
.organogram-section>.container {
  position: relative;
  z-index: 1;
}

.section-decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.section-decor::before,
.section-decor::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.3;
}

.section-decor::before {
  top: -90px;
  right: -70px;
  width: 260px;
  height: 260px;
  background: var(--earth);
}

.section-decor::after {
  bottom: -110px;
  left: -70px;
  width: 240px;
  height: 240px;
  background: var(--botanical);
}

.section-decor svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.16;
}

.section-decor svg path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 1.4;
}

[data-theme="dark"] .section-decor svg path {
  stroke: var(--earth);
}

[data-theme="dark"] .section-decor svg {
  opacity: 0.24;
}

[data-theme="dark"] .section-decor::before,
[data-theme="dark"] .section-decor::after {
  opacity: 0.4;
}

/* =========================
       TEMA & NILAI KEGIATAN
    ========================== */

.tema-section {
  background: #fff5e2;
}

[data-theme="dark"] .tema-section {
  background: #1a0b4d;
}

.tema-intro {
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
}

.tema-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tema-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: center;
}

.tema-card .card-icon {
  margin: 0 auto 16px;
}

.tema-card h3 {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 1.05rem;
}

.tema-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* =========================
       PERSPEKTIF GEODESI
    ========================== */

.geodesi-section {
  position: relative;
  overflow: hidden;
  background: var(--primary-dark);
  color: var(--white);
}

.geodesi-section .section-heading h2 {
  color: var(--white);
}

.geodesi-section .section-heading p {
  color: rgba(255, 255, 255, 0.68);
}

.crack-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
  mix-blend-mode: screen;
}

.crack-overlay svg {
  width: 100%;
  height: 100%;
}

.crack-overlay path {
  fill: none;
  stroke: var(--earth);
  stroke-width: 0.6;
  stroke-linecap: round;
  opacity: 0.35;
}

.geodesi-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.geodesi-panel {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.geodesi-panel h3 {
  margin-bottom: 14px;
  color: var(--earth);
  font-size: 1.2rem;
}

.geodesi-panel p {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.95rem;
}

.geodesi-panel p+p {
  margin-top: 14px;
}

.geodesi-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.geodesi-stat {
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.18);
  text-align: center;
}

.geodesi-stat strong {
  display: block;
  color: var(--earth);
  font-size: 1.2rem;
}

.geodesi-stat span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =========================
       TIMELINE
    ========================== */

.timeline-section {
  background: #fff5e2;
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 0;
}

.timeline::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  border-radius: 3px;
  background: var(--earth);
  content: "";
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 46px 48px;
}

.timeline-item:nth-child(odd) {
  margin-right: auto;
  text-align: right;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  text-align: left;
}

.timeline-node {
  position: absolute;
  top: 20px;
  width: 17px;
  height: 17px;
  border: 4px solid #fff5e2;
  border-radius: 50%;
  background: var(--earth);
  box-shadow: 0 0 0 2px var(--earth);
}

.timeline-item:nth-child(odd) .timeline-node {
  right: -8px;
}

.timeline-item:nth-child(even) .timeline-node {
  left: -8px;
}

.timeline-card {
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
}

.timeline-card h3 {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 1.08rem;
  line-height: 1.4;
}

.timeline-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* =========================
       WEBGIS
    ========================== */

.webgis-section {
  background: var(--primary);
}

.webgis-section .section-heading h2 {
  color: var(--white);
}

.webgis-section .section-heading p {
  color: rgba(255, 255, 255, 0.68);
}

.webgis-container {
  width: 92%;
  max-width: 1200px;
  height: 550px;
  position: relative;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #2e2115;
  background-size: 40px 40px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
}

.map-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
}

.map-banner {
  max-width: 560px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(36, 26, 19, 0.84);
  color: var(--white);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.map-banner-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(193, 98, 44, 0.18);
  color: var(--earth);
  font-size: 1.4rem;
}

.map-banner h3 {
  margin-bottom: 10px;
  font-size: clamp(1.1rem, 3vw, 1.45rem);
}

.map-banner p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

/* =========================
       ORGANOGRAM
    ========================== */

.organogram-section {
  background: var(--background);
}

.organogram {
  display: grid;
  gap: 22px;
  max-width: 1050px;
  margin: 0 auto 80px;
}

.org-row {
  display: grid;
  gap: 18px;
}

.org-row.top {
  grid-template-columns: minmax(220px, 360px);
  justify-content: center;
}

.org-row.mid {
  grid-template-columns: repeat(3, 1fr);
}

.org-row.bottom {
  grid-template-columns: repeat(4, 1fr);
}

.org-card {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border: 1px solid rgba(36, 26, 19, 0.1);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--primary);
  font-weight: 800;
  text-align: center;
  transition: transform var(--transition);
}

.org-card:hover {
  transform: translateY(-4px);
}

.org-card.primary {
  border-color: var(--earth);
  background: var(--primary);
  color: var(--white);
}

/* =========================
       ORGANOGRAM — TREE CHART
    ========================== */

.orgchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto 20px;
}

.orgchart-ketua {
  min-width: 220px;
  padding: 18px 30px;
  border: 1px solid var(--earth);
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: var(--white);
  font-weight: 800;
  text-align: center;
  box-shadow: var(--shadow);
}

.orgchart-trunk {
  width: 0;
  height: 30px;
  border-left: 2px dashed var(--primary);
}

.orgchart-branches {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px 18px;
  width: 100%;
  padding-top: 30px;
  border-top: 2px dashed var(--primary);
}

.orgchart-branches.compact {
  max-width: 520px;
  margin: 0 auto;
  border-top-style: dashed;
}

.orgchart-branches.compact+.orgchart-trunk {
  margin-top: 6px;
}

.org-branch {
  position: relative;
  display: flex;
  flex: 1 1 200px;
  max-width: 230px;
  flex-direction: column;
  align-items: stretch;
}

.org-branch::before {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 0;
  height: 30px;
  border-left: 2px dashed var(--primary);
  content: "";
  transform: translateX(-50%);
}

.org-bidang-btn {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow);
  color: var(--primary);
  font: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition),
    color var(--transition), border-color var(--transition);
}

.org-bidang-btn:hover,
.org-bidang-btn:focus-visible {
  transform: translateY(-3px);
}

.org-bidang-btn[aria-expanded="true"] {
  border-color: var(--earth);
  background: var(--primary);
  color: var(--white);
}

.org-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.org-bidang-btn[aria-expanded="true"] .org-chevron {
  transform: rotate(180deg);
}

.org-sub-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.org-sub-connector {
  width: 0;
  height: 16px;
  margin: 0 auto;
  border-left: 2px dashed var(--earth);
}

.org-sub-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
  padding-bottom: 4px;
}

.org-sub-card {
  padding: 9px 12px;
  border: 1px dashed var(--earth);
  border-radius: 9px;
  background: rgba(255, 136, 0, 0.08);
  text-align: center;
}

.org-sub-role {
  display: block;
  color: var(--earth);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.org-sub-name {
  display: block;
  margin-top: 2px;
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
}

@media (max-width: 560px) {
  .org-branch {
    flex: 1 1 100%;
    max-width: 320px;
  }
}

.gallery-heading {
  margin-bottom: 28px;
  color: var(--primary);
  font-size: 1.6rem;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  position: relative;
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(36, 26, 19, 0.12), rgba(138, 122, 99, 0.22));
  box-shadow: var(--shadow);
}

.gallery-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(36, 26, 19, 0.34);
}

.gallery-placeholder svg {
  width: 60px;
  height: 60px;
}

.gallery-caption {
  position: relative;
  z-index: 1;
  margin: 14px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* =========================
       FOOTER
    ========================== */

.site-footer {
  padding: 60px 0 28px;
  background: var(--primary-dark);
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 45px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.3rem;
  font-weight: 900;
}

.footer-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background-image: var(--logo-img);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.footer-copy {
  max-width: 430px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.9rem;
}

.footer-title {
  margin-bottom: 14px;
  font-size: 0.92rem;
  font-weight: 800;
}

.footer-links {
  display: grid;
  gap: 8px;
  list-style: none;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.88rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--white);
}

.social-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-chip {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.8rem;
}

/* =========================
       REVEAL
    ========================== */

.hidden {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.hidden.show {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
       RESPONSIVE
    ========================== */

@media (max-width: 900px) {
  :root {
    --header-height: 70px;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 30px 6%;
    overflow-y: auto;
    background: rgba(23, 17, 12, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity var(--transition), transform var(--transition);
  }

  .nav-menu.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav-link {
    display: flex;
    width: 100%;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 1.05rem;
    text-align: left;
  }

  .nav-link::after {
    display: none;
  }

  .nav-item-dropdown .nav-link {
    border-bottom: 0;
  }

  .nav-item-dropdown {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-dropdown {
    position: static;
    min-width: auto;
    max-height: 0;
    margin: 0;
    padding: 0 4px;
    overflow: hidden;
    border: 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: max-height 0.3s ease, padding var(--transition);
  }

  .nav-item-dropdown.open .nav-dropdown {
    max-height: 400px;
    padding: 10px 4px 16px;
  }

  .menu-toggle {
    display: flex;
  }

  .background-grid {
    grid-template-columns: 1fr;
  }

  .illustration-box {
    min-height: 360px;
  }

  .vision-grid {
    grid-template-columns: 1fr;
  }

  .visi-misi-grid {
    grid-template-columns: 1fr;
  }

  .tema-grid {
    grid-template-columns: 1fr;
  }

  .geodesi-content {
    grid-template-columns: 1fr;
  }

  .geodesi-stats {
    grid-template-columns: 1fr;
  }

  .org-row.mid {
    grid-template-columns: 1fr;
  }

  .org-row.bottom {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
       FALLBACK: JS-DRIVEN COMPACT NAV
       Jaring pengaman jika @media (max-width: 900px) di atas
       tidak diterapkan dengan benar oleh browser/WebView tertentu
       (mis. beberapa in-app previewer). Atribut data-viewport
       diset oleh script di <head> berdasarkan lebar layar nyata.
       ========================================================= */

html[data-viewport="compact"] .nav-menu {
  position: fixed !important;
  top: var(--header-height) !important;
  right: 0 !important;
  left: 0 !important;
  height: calc(100vh - var(--header-height)) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 30px 6% !important;
  overflow-y: auto !important;
  background: rgba(23, 17, 12, 0.97) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-12px) !important;
}

html[data-viewport="compact"] .nav-menu.active {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

html[data-viewport="compact"] .nav-link {
  display: flex !important;
  width: 100% !important;
  justify-content: space-between !important;
  padding: 16px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-size: 1.05rem !important;
}

html[data-viewport="compact"] .nav-dropdown {
  position: static !important;
  min-width: auto !important;
  max-height: 0 !important;
  padding: 0 4px !important;
  overflow: hidden !important;
  border: 0 !important;
  opacity: 1 !important;
  transform: none !important;
  pointer-events: auto !important;
}

html[data-viewport="compact"] .nav-item-dropdown.open .nav-dropdown {
  max-height: 400px !important;
  padding: 10px 4px 16px !important;
}

html[data-viewport="compact"] .menu-toggle {
  display: flex !important;
}

html[data-viewport="wide"] .nav-menu {
  position: static !important;
  height: auto !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}

html[data-viewport="wide"] .menu-toggle {
  display: none !important;
}

@media (max-width: 680px) {
  .section {
    padding: 76px 0;
  }

  .hero {
    min-height: 100svh;
    padding-top: 110px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .hero-logo-watermark {
    opacity: 0.1;
    width: clamp(220px, 60vw, 340px);
  }

  .illustration-box {
    min-height: 300px;
  }

  .timeline {
    padding-left: 30px;
  }

  .timeline::before {
    left: 9px;
    transform: none;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    margin: 0;
    padding: 0 0 35px 30px;
    text-align: left;
  }

  .timeline-item:nth-child(odd) .timeline-node,
  .timeline-item:nth-child(even) .timeline-node {
    left: 0;
    right: auto;
  }

  .timeline-card {
    padding: 20px;
  }

  .webgis-container {
    height: 430px;
  }

  .org-row.bottom {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-item {
    min-height: 220px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 420px) {
  .navbar {
    gap: 12px;
  }

  .brand {
    font-size: 1rem;
  }

  .brand-logo {
    width: 26px;
    height: 26px;
  }

  .hero-badge {
    align-items: flex-start;
  }

  .btn {
    width: 100%;
  }

  .org-row.bottom {
    grid-template-columns: 1fr;
  }

  .webgis-container {
    width: 94%;
    height: 390px;
  }

  .map-banner {
    padding: 22px 18px;
  }
}

[data-theme="dark"] .timeline-section {
  background: #261172;
}

[data-theme="dark"] .timeline-node {
  border-color: #261172;
}

[data-theme="dark"] .webgis-container {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #14082f;
  background-size: 40px 40px;
}

[data-theme="dark"] .org-card {
  background: #21105f;
  color: var(--text-primary);
}

[data-theme="dark"] .org-card.primary {
  background: var(--earth);
  color: #14082f;
}

[data-theme="dark"] .gallery-item {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(224, 133, 68, 0.14));
}

[data-theme="dark"] .gallery-placeholder {
  color: rgba(241, 233, 223, 0.35);
}

[data-theme="dark"] .gallery-caption {
  background: rgba(23, 17, 12, 0.85);
  color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* =========================================================
       RAKSHABENA 26 — PALETTE + ACCESSIBILITY OVERRIDES
       ========================================================= */
.hero h1,
.section-heading h2,
.background-copy h2,
.glass-card h3,
.visi-card h3,
.misi-card h4,
.tema-card h3,
.geodesi-panel h3,
.timeline-card h3,
.organogram-section h2,
.gallery-heading,
.webgis-section h2,
.footer-title {
  color: var(--earth);
}

.arah-gerak-section,
.geodesi-section,
.webgis-section,
.site-footer,
.timeline-section {
  background: var(--primary);
}

.background-section,
.tema-section,
.organogram-section {
  background: var(--background);
}

.arah-gerak-section .section-heading h2,
.geodesi-section .section-heading h2,
.webgis-section .section-heading h2,
.timeline-section .section-heading h2,
.site-footer .footer-title,
.site-footer .footer-brand,
.site-footer .footer-copy,
.site-footer .footer-bottom {
  color: var(--white);
}

.background-section .section-heading h2,
.tema-section .section-heading h2,
.organogram-section .section-heading h2,
.background-copy h2 {
  color: var(--primary);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-secondary {
  background: rgba(255, 245, 226, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 245, 226, 0.34);
  box-shadow: 0 8px 22px rgba(20, 8, 47, 0.20);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 136, 0, 0.22);
  border-color: var(--earth);
  color: var(--white);
  transform: scale(1.05);
}

.btn-primary {
  background: var(--earth);
  color: var(--primary-dark);
  box-shadow: 0 8px 22px rgba(255, 136, 0, 0.25);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--earth-hover);
  color: var(--primary-dark);
}

@media (max-width: 640px) {
  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }
}


/* =========================================================
       RAKSHABENA 26 — LIGHT/DARK CONTRAST FIX
       ========================================================= */
:root {
  --primary: #261172;
  --primary-dark: #1b0c4d;
  --earth: #ff8800;
  --earth-hover: #e87500;
  --background: #fff5e2;
  --text-primary: #261172;
  --text-muted: #5f547a;
  --white: #fff5e2;
}

[data-theme="dark"] {
  --primary: #261172;
  --primary-dark: #12072f;
  --earth: #ff8800;
  --earth-hover: #ff9d2f;
  --background: #160b3f;
  --text-primary: #fff5e2;
  --text-muted: #eadfc9;
  --white: #fff5e2;
}

.hero,
.arah-gerak-section,
.geodesi-section,
.webgis-section,
.timeline-section,
.site-footer {
  background: var(--primary);
  color: var(--white);
}

.background-section,
.tema-section,
.organogram-section {
  background: var(--background);
}

.hero h1,
.section-heading h2,
.background-copy h2,
.glass-card h3,
.visi-card h3,
.misi-card h4,
.tema-card h3,
.geodesi-panel h3,
.timeline-card h3,
.organogram-section h2,
.gallery-heading,
.webgis-section h2,
.footer-title {
  color: var(--earth);
}

.section-heading p,
.body-copy,
.background-copy p,
.visi-card p,
.misi-card p,
.tema-card p,
.geodesi-panel p,
.timeline-card p,
.webgis-section .map-banner p {
  color: var(--text-muted);
}

.hero h1,
.hero-description,
.hero .hero-badge,
.arah-gerak-section .section-heading p,
.geodesi-section .section-heading p,
.webgis-section .section-heading p,
.timeline-section .section-heading p,
.site-footer .footer-copy,
.site-footer .footer-bottom {
  color: var(--white);
}

[data-theme="dark"] .background-section,
[data-theme="dark"] .tema-section,
[data-theme="dark"] .organogram-section {
  background: var(--background);
  color: var(--text-primary);
}

[data-theme="dark"] .section-heading p,
[data-theme="dark"] .body-copy,
[data-theme="dark"] .background-copy p,
[data-theme="dark"] .visi-card p,
[data-theme="dark"] .misi-card p,
[data-theme="dark"] .tema-card p,
[data-theme="dark"] .geodesi-panel p,
[data-theme="dark"] .timeline-card p,
[data-theme="dark"] .webgis-section .map-banner p {
  color: var(--text-muted);
}

[data-theme="dark"] .section-heading h2,
[data-theme="dark"] .background-copy h2,
[data-theme="dark"] .glass-card h3,
[data-theme="dark"] .visi-card h3,
[data-theme="dark"] .misi-card h4,
[data-theme="dark"] .tema-card h3,
[data-theme="dark"] .geodesi-panel h3,
[data-theme="dark"] .timeline-card h3,
[data-theme="dark"] .organogram-section h2,
[data-theme="dark"] .gallery-heading,
[data-theme="dark"] .webgis-section h2 {
  color: var(--earth);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn-secondary {
  background: rgba(255, 245, 226, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 245, 226, 0.34);
  box-shadow: 0 8px 22px rgba(18, 7, 47, 0.20);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(255, 136, 0, 0.22);
  border-color: var(--earth);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--earth);
  color: var(--primary-dark);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--earth-hover);
  color: var(--primary-dark);
}

@media (max-width: 640px) {
  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
  }
}


/* =========================================================
       SINGLE-FILE VIEW ROUTING & CONTRAST SAFEGUARDS
       ========================================================= */

.page-view {
  display: none;
  min-height: 1px;
}

.page-view.is-active {
  display: block;
}

.page-view>.section:first-child {
  padding-top: calc(100px + var(--header-height));
}

.view-backbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-glass);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.view-backbar .back-copy {
  min-width: 0;
}

.view-backbar strong {
  display: block;
  color: var(--text-primary);
  font-size: 1rem;
}

.view-backbar span {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 0 auto 34px;
}

.stat-card {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 24px 18px;
  border: 1px solid rgba(255, 245, 226, 0.16);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(38, 17, 114, 0.96), rgba(54, 27, 150, 0.88));
  color: var(--white);
  text-align: center;
  box-shadow: 0 14px 34px rgba(38, 17, 114, 0.22);
  overflow: hidden;
  position: relative;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -15% -55% auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 136, 0, 0.18);
  filter: blur(3px);
}

.stat-number {
  position: relative;
  z-index: 1;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.stat-label {
  position: relative;
  z-index: 1;
  max-width: 220px;
  color: rgba(255, 245, 226, 0.92);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.gallery-intro {
  max-width: 760px;
  margin: 0 auto 38px;
  text-align: center;
}

.gallery-intro p {
  color: var(--text-muted);
}

.gallery-card {
  min-height: 220px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(38, 17, 114, 0.08), rgba(255, 136, 0, 0.16));
  box-shadow: var(--shadow);
}

.gallery-card .gallery-placeholder {
  position: absolute;
  inset: 0;
}

.gallery-card .gallery-caption {
  align-self: flex-start;
  position: relative;
  z-index: 2;
  margin: 14px;
  background: rgba(255, 245, 226, 0.94);
  color: var(--primary);
}

.gallery-meta {
  position: relative;
  z-index: 2;
  margin: 0 14px 14px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.nav-link[data-view-active="true"] {
  color: var(--earth);
}

.section-heading h2,
.gallery-heading {
  color: var(--primary);
}

[data-theme="dark"] .section-heading h2,
[data-theme="dark"] .gallery-heading,
[data-theme="dark"] .glass-card h3,
[data-theme="dark"] .tema-card h3,
[data-theme="dark"] .timeline-card h3 {
  color: var(--white);
}

[data-theme="dark"] .view-backbar strong {
  color: var(--white);
}

[data-theme="dark"] .view-backbar span,
[data-theme="dark"] .gallery-intro p,
[data-theme="dark"] .gallery-meta {
  color: var(--text-muted);
}

[data-theme="dark"] .org-card:not(.primary) {
  background: rgba(255, 245, 226, 0.06);
  border-color: rgba(255, 245, 226, 0.14);
  color: var(--white);
}

[data-theme="dark"] .gallery-card {
  background:
    linear-gradient(145deg, rgba(255, 245, 226, 0.05), rgba(255, 136, 0, 0.13));
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-backbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 130px;
  }
}

/* =========================================================
   LIGHT CONTRAST FIX
   ========================================================= */
/* RAKSHABENA 26 — Light mode contrast hardening */
:root:not([data-theme="dark"]) {
  --light-text: #261172;
  --light-muted: #4f426b;
  --light-subtle: #66597f;
}

:root:not([data-theme="dark"]) body {
  color: var(--light-text);
}

:root:not([data-theme="dark"]) .background-section,
:root:not([data-theme="dark"]) .tema-section,
:root:not([data-theme="dark"]) .organogram-section {
  color: var(--light-text);
}

:root:not([data-theme="dark"]) .background-section .section-heading h2,
:root:not([data-theme="dark"]) .tema-section .section-heading h2,
:root:not([data-theme="dark"]) .organogram-section .section-heading h2,
:root:not([data-theme="dark"]) .background-copy h2,
:root:not([data-theme="dark"]) .gallery-heading {
  color: var(--earth) !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}

:root:not([data-theme="dark"]) .background-section .section-heading p,
:root:not([data-theme="dark"]) .tema-section .section-heading p,
:root:not([data-theme="dark"]) .organogram-section .section-heading p,
:root:not([data-theme="dark"]) .background-copy p,
:root:not([data-theme="dark"]) .tema-intro p,
:root:not([data-theme="dark"]) .body-copy {
  color: var(--light-muted) !important;
}

:root:not([data-theme="dark"]) .glass-card,
:root:not([data-theme="dark"]) .visi-card,
:root:not([data-theme="dark"]) .misi-card,
:root:not([data-theme="dark"]) .tema-card,
:root:not([data-theme="dark"]) .geodesi-panel,
:root:not([data-theme="dark"]) .timeline-card,
:root:not([data-theme="dark"]) .org-card,
:root:not([data-theme="dark"]) .gallery-item {
  color: var(--light-text);
}

:root:not([data-theme="dark"]) .org-card.primary {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-color: var(--earth) !important;
  box-shadow: 0 10px 28px rgba(38, 17, 114, 0.20);
}

:root:not([data-theme="dark"]) .glass-card p,
:root:not([data-theme="dark"]) .visi-card p,
:root:not([data-theme="dark"]) .misi-card p,
:root:not([data-theme="dark"]) .tema-card p,
:root:not([data-theme="dark"]) .geodesi-panel p,
:root:not([data-theme="dark"]) .timeline-card p,
:root:not([data-theme="dark"]) .gallery-caption {
  color: var(--light-muted) !important;
}

:root:not([data-theme="dark"]) .glass-card h3,
:root:not([data-theme="dark"]) .visi-card h3,
:root:not([data-theme="dark"]) .misi-card h4,
:root:not([data-theme="dark"]) .tema-card h3,
:root:not([data-theme="dark"]) .geodesi-panel h3,
:root:not([data-theme="dark"]) .timeline-card h3 {
  color: var(--earth) !important;
}

:root:not([data-theme="dark"]) .hero,
:root:not([data-theme="dark"]) .arah-gerak-section,
:root:not([data-theme="dark"]) .geodesi-section,
:root:not([data-theme="dark"]) .webgis-section,
:root:not([data-theme="dark"]) .timeline-section,
:root:not([data-theme="dark"]) .site-footer {
  color: var(--white);
}

:root:not([data-theme="dark"]) .hero h1,
:root:not([data-theme="dark"]) .hero-description,
:root:not([data-theme="dark"]) .hero .hero-badge,
:root:not([data-theme="dark"]) .arah-gerak-section .section-heading p,
:root:not([data-theme="dark"]) .geodesi-section .section-heading p,
:root:not([data-theme="dark"]) .webgis-section .section-heading p,
:root:not([data-theme="dark"]) .timeline-section .section-heading p,
:root:not([data-theme="dark"]) .site-footer .footer-copy,
:root:not([data-theme="dark"]) .site-footer .footer-bottom {
  color: var(--white) !important;
}

:root:not([data-theme="dark"]) .arah-gerak-section .section-heading h2,
:root:not([data-theme="dark"]) .geodesi-section .section-heading h2,
:root:not([data-theme="dark"]) .webgis-section .section-heading h2,
:root:not([data-theme="dark"]) .timeline-section .section-heading h2,
:root:not([data-theme="dark"]) .site-footer .footer-title {
  color: var(--earth) !important;
}

:root:not([data-theme="dark"]) .site-header .brand,
:root:not([data-theme="dark"]) .site-header .nav-link,
:root:not([data-theme="dark"]) .site-header .nav-dropdown,
:root:not([data-theme="dark"]) .site-header .nav-dropdown-link,
:root:not([data-theme="dark"]) .site-header .nav-dropdown-eyebrow,
:root:not([data-theme="dark"]) .site-header .theme-toggle {
  color: var(--white) !important;
}

:root:not([data-theme="dark"]) .map-banner,
:root:not([data-theme="dark"]) .map-banner h3,
:root:not([data-theme="dark"]) .map-banner p {
  color: var(--white) !important;
}

/* =========================================================
   FINAL CONTRAST POLISH
   ========================================================= */
/* =========================================================
     RAKSHABENA 26 — FINAL COLOR & CONTRAST POLISH
     Tujuan:
     1. Menggelapkan ungu utama sedikit agar tidak terlalu menyilaukan.
     2. Memisahkan warna teks, latar, kartu, dan aksen agar tidak "tabrakan".
     3. Memastikan dark mode memiliki pasangan foreground/background
        yang tetap terbaca di seluruh komponen.
     ========================================================= */

:root {
  --primary: #21105f;
  --primary-dark: #160b3b;

  --earth: #ff9f2f;
  --earth-hover: #ffad45;

  --background: #fff7e8;
  --surface-glass: rgba(255, 247, 232, 0.88);
  --surface-glass-dark: rgba(22, 11, 59, 0.94);

  --text-primary: #21105f;
  --text-muted: #4b4260;
  --text-subtle: #625875;

  --white: #fff7e8;
  --border: rgba(33, 16, 95, 0.16);
  --border-strong: rgba(33, 16, 95, 0.28);

  --shadow: 0 8px 30px rgba(33, 16, 95, 0.14);
}

/* Dark mode: gunakan latar yang lebih gelap daripada ungu brand,
     sehingga teks terang dan aksen oranye tidak tenggelam. */
[data-theme="dark"] {
  --primary: #21105f;
  --primary-dark: #10082a;

  --earth: #ffad45;
  --earth-hover: #ffc06a;

  --background: #10082a;
  --surface-glass: rgba(33, 16, 95, 0.92);
  --surface-glass-dark: rgba(16, 8, 42, 0.97);

  --text-primary: #f6eddf;
  --text-muted: #ded4c6;
  --text-subtle: #c9beaf;

  --white: #f8f0e4;
  --border: rgba(248, 240, 228, 0.18);
  --border-strong: rgba(248, 240, 228, 0.30);

  --shadow: 0 10px 32px rgba(0, 0, 0, 0.46);
}

/* ---------- GLOBAL ---------- */
body {
  background: var(--background);
  color: var(--text-primary);
}

a {
  color: inherit;
}

/* ---------- LIGHT MODE: CONTENT SECTIONS ---------- */
:root:not([data-theme="dark"]) .background-section,
:root:not([data-theme="dark"]) .tema-section,
:root:not([data-theme="dark"]) .organogram-section,
:root:not([data-theme="dark"]) .timeline-section {
  background: #fff7e8 !important;
  color: #21105f;
}

:root:not([data-theme="dark"]) .section-heading p,
:root:not([data-theme="dark"]) .body-copy,
:root:not([data-theme="dark"]) .background-copy p,
:root:not([data-theme="dark"]) .tema-intro p,
:root:not([data-theme="dark"]) .tema-card p,
:root:not([data-theme="dark"]) .timeline-card p,
:root:not([data-theme="dark"]) .gallery-intro p,
:root:not([data-theme="dark"]) .gallery-meta,
:root:not([data-theme="dark"]) .view-backbar span {
  color: #4b4260 !important;
}

:root:not([data-theme="dark"]) .section-heading h2,
:root:not([data-theme="dark"]) .background-copy h2,
:root:not([data-theme="dark"]) .gallery-heading,
:root:not([data-theme="dark"]) .tema-card h3,
:root:not([data-theme="dark"]) .timeline-card h3,
:root:not([data-theme="dark"]) .glass-card h3 {
  color: #21105f !important;
}

/* Orange is reserved for labels/accent headings where it has enough
     contrast against the cream background. */
:root:not([data-theme="dark"]) .eyebrow,
:root:not([data-theme="dark"]) .card-icon,
:root:not([data-theme="dark"]) .visi-card .eyebrow,
:root:not([data-theme="dark"]) .nav-link[data-view-active="true"] {
  color: #b85d00 !important;
}

/* ---------- LIGHT MODE: CARDS ---------- */
:root:not([data-theme="dark"]) .glass-card,
:root:not([data-theme="dark"]) .tema-card,
:root:not([data-theme="dark"]) .timeline-card,
:root:not([data-theme="dark"]) .org-card:not(.primary),
:root:not([data-theme="dark"]) .view-backbar {
  background: #fffdf8 !important;
  color: #21105f;
  border-color: rgba(33, 16, 95, 0.16) !important;
}

:root:not([data-theme="dark"]) .glass-card p,
:root:not([data-theme="dark"]) .misi-card p,
:root:not([data-theme="dark"]) .visi-card p,
:root:not([data-theme="dark"]) .tema-card p,
:root:not([data-theme="dark"]) .timeline-card p {
  color: #4b4260 !important;
}

/* ---------- DARK MODE: CONTENT SECTIONS ---------- */
[data-theme="dark"] .background-section,
[data-theme="dark"] .tema-section,
[data-theme="dark"] .organogram-section,
[data-theme="dark"] .timeline-section {
  background: #10082a !important;
  color: #f6eddf !important;
}

[data-theme="dark"] .section-heading h2,
[data-theme="dark"] .background-copy h2,
[data-theme="dark"] .organogram-section h2,
[data-theme="dark"] .gallery-heading,
[data-theme="dark"] .glass-card h3,
[data-theme="dark"] .tema-card h3,
[data-theme="dark"] .timeline-card h3,
[data-theme="dark"] .view-backbar strong {
  color: #f8f0e4 !important;
}

[data-theme="dark"] .section-heading p,
[data-theme="dark"] .body-copy,
[data-theme="dark"] .background-copy p,
[data-theme="dark"] .tema-intro p,
[data-theme="dark"] .glass-card p,
[data-theme="dark"] .tema-card p,
[data-theme="dark"] .timeline-card p,
[data-theme="dark"] .gallery-intro p,
[data-theme="dark"] .gallery-meta,
[data-theme="dark"] .view-backbar span {
  color: #ded4c6 !important;
}

/* ---------- DARK MODE: CARDS ---------- */
[data-theme="dark"] .glass-card,
[data-theme="dark"] .tema-card,
[data-theme="dark"] .timeline-card,
[data-theme="dark"] .view-backbar {
  background: #18103d !important;
  color: #f6eddf !important;
  border-color: rgba(248, 240, 228, 0.18) !important;
}

[data-theme="dark"] .org-card:not(.primary) {
  background: #18103d !important;
  color: #f6eddf !important;
  border-color: rgba(248, 240, 228, 0.18) !important;
}

[data-theme="dark"] .org-card:not(.primary) *,
[data-theme="dark"] .glass-card *,
[data-theme="dark"] .tema-card *,
[data-theme="dark"] .timeline-card * {
  color: inherit;
}

/* Keep accent headings/icons orange, but use a brighter orange in dark mode. */
[data-theme="dark"] .eyebrow,
[data-theme="dark"] .card-icon,
[data-theme="dark"] .visi-card .eyebrow,
[data-theme="dark"] .geodesi-panel h3,
[data-theme="dark"] .geodesi-stat strong,
[data-theme="dark"] .map-banner-icon,
[data-theme="dark"] .nav-link[data-view-active="true"] {
  color: #ffad45 !important;
}

/* ---------- DARK SECTIONS ---------- */
.hero,
.arah-gerak-section,
.geodesi-section,
.webgis-section,
.site-footer {
  color: #f8f0e4;
}

[data-theme="dark"] .hero,
[data-theme="dark"] .arah-gerak-section,
[data-theme="dark"] .geodesi-section,
[data-theme="dark"] .webgis-section,
[data-theme="dark"] .site-footer {
  background: var(--primary-dark) !important;
  color: #f8f0e4 !important;
}

[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero-description,
[data-theme="dark"] .hero .hero-badge,
[data-theme="dark"] .arah-gerak-section .section-heading h2,
[data-theme="dark"] .geodesi-section .section-heading h2,
[data-theme="dark"] .webgis-section .section-heading h2,
[data-theme="dark"] .timeline-section .section-heading h2,
[data-theme="dark"] .site-footer .footer-title {
  color: #f8f0e4 !important;
}

[data-theme="dark"] .hero-description,
[data-theme="dark"] .arah-gerak-section .section-heading p,
[data-theme="dark"] .geodesi-section .section-heading p,
[data-theme="dark"] .webgis-section .section-heading p,
[data-theme="dark"] .timeline-section .section-heading p,
[data-theme="dark"] .site-footer .footer-copy,
[data-theme="dark"] .site-footer .footer-bottom {
  color: #ded4c6 !important;
}

[data-theme="dark"] .visi-card,
[data-theme="dark"] .misi-card,
[data-theme="dark"] .geodesi-panel {
  background: rgba(248, 240, 228, 0.065) !important;
  border-color: rgba(248, 240, 228, 0.20) !important;
  color: #f6eddf !important;
}

[data-theme="dark"] .visi-card p,
[data-theme="dark"] .misi-card p,
[data-theme="dark"] .geodesi-panel p,
[data-theme="dark"] .geodesi-stat span,
[data-theme="dark"] .map-banner p,
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .social-chip {
  color: #ded4c6 !important;
}

[data-theme="dark"] .geodesi-stat {
  background: rgba(0, 0, 0, 0.28) !important;
  border-color: rgba(248, 240, 228, 0.16) !important;
}

[data-theme="dark"] .map-banner {
  background: rgba(10, 5, 25, 0.94) !important;
  color: #f8f0e4 !important;
  border-color: rgba(248, 240, 228, 0.20) !important;
}

[data-theme="dark"] .webgis-container {
  background-color: #0b061d !important;
  border-color: rgba(248, 240, 228, 0.18) !important;
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  background: #ff9f2f !important;
  color: #160b3b !important;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #ffad45 !important;
  color: #10082a !important;
}

.btn-secondary {
  color: #fff7e8 !important;
  border-color: rgba(255, 247, 232, 0.38) !important;
}

[data-theme="dark"] .btn-secondary {
  background: rgba(248, 240, 228, 0.10) !important;
  color: #f8f0e4 !important;
  border-color: rgba(248, 240, 228, 0.34) !important;
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-secondary:focus-visible {
  background: rgba(255, 173, 69, 0.22) !important;
  color: #ffffff !important;
}

/* ---------- NAVIGATION / HEADER ---------- */
[data-theme="dark"] .site-header {
  background: rgba(10, 5, 25, 0.96) !important;
  border-bottom-color: rgba(248, 240, 228, 0.18) !important;
}

[data-theme="dark"] .site-header .brand,
[data-theme="dark"] .site-header .nav-link,
[data-theme="dark"] .menu-toggle,
[data-theme="dark"] .theme-toggle {
  color: #f8f0e4 !important;
}

[data-theme="dark"] .nav-dropdown {
  background: #18103d !important;
  border-color: rgba(248, 240, 228, 0.18) !important;
}

[data-theme="dark"] .nav-dropdown a {
  color: #f6eddf !important;
}

[data-theme="dark"] .nav-dropdown a:hover,
[data-theme="dark"] .nav-dropdown a:focus-visible {
  color: #ffad45 !important;
  background: rgba(255, 173, 69, 0.10) !important;
}

/* ---------- GALLERY ---------- */
[data-theme="dark"] .gallery-item,
[data-theme="dark"] .gallery-card {
  border-color: rgba(248, 240, 228, 0.18) !important;
}

[data-theme="dark"] .gallery-caption {
  background: rgba(10, 5, 25, 0.92) !important;
  color: #f8f0e4 !important;
  border: 1px solid rgba(248, 240, 228, 0.18);
}

[data-theme="dark"] .gallery-placeholder {
  color: rgba(248, 240, 228, 0.48) !important;
}

/* ---------- FORM / INTERACTIVE SAFETY ---------- */
input,
textarea,
select {
  color: var(--text-primary);
  background: var(--surface-glass);
  border-color: var(--border);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
  color: #f8f0e4 !important;
  background: #18103d !important;
  border-color: rgba(248, 240, 228, 0.22) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: #b9ae9f !important;
  opacity: 1;
}

/* ---------- FOCUS VISIBILITY ---------- */
:focus-visible {
  outline: 3px solid #ffad45 !important;
  outline-offset: 3px;
}

/* =========================================================
   LIGHT MODE FINAL FIX
   ========================================================= */
/* =========================================================
   RAKSHABENA 26 — FINAL LIGHT MODE CONTRAST FIX
   Light mode only. Dark mode is intentionally untouched.
   ========================================================= */
:root:not([data-theme="dark"]) {
  --primary: #21105f;
  --primary-dark: #170b43;
  --earth: #c96500;
  --earth-hover: #ad5600;
  --background: #fff8ed;
  --surface: #ffffff;
  --surface-soft: #fffaf2;
  --surface-glass: rgba(255, 255, 255, 0.92);
  --text-primary: #21105f;
  --text-muted: #4b4358;
  --text-subtle: #655c70;
  --white: #fff8ed;
  --border: rgba(33, 16, 95, 0.16);
  --shadow: 0 8px 30px rgba(33, 16, 95, 0.12);
}

:root:not([data-theme="dark"]) body {
  color: var(--text-primary) !important;
  background: var(--background) !important;
}

/* Light surfaces: force a readable dark text baseline. */
:root:not([data-theme="dark"]) .background-section,
:root:not([data-theme="dark"]) .tema-section,
:root:not([data-theme="dark"]) .organogram-section,
:root:not([data-theme="dark"]) .page-view,
:root:not([data-theme="dark"]) .section {
  color: var(--text-primary);
}

:root:not([data-theme="dark"]) .glass-card,
:root:not([data-theme="dark"]) .visi-card,
:root:not([data-theme="dark"]) .misi-card,
:root:not([data-theme="dark"]) .tema-card,
:root:not([data-theme="dark"]) .geodesi-panel,
:root:not([data-theme="dark"]) .timeline-card,
:root:not([data-theme="dark"]) .org-card:not(.primary),
:root:not([data-theme="dark"]) .gallery-item,
:root:not([data-theme="dark"]) .view-backbar {
  background: var(--surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border) !important;
}

/* Headings on light surfaces. */
:root:not([data-theme="dark"]) .section-heading h2,
:root:not([data-theme="dark"]) .background-copy h2,
:root:not([data-theme="dark"]) .glass-card h3,
:root:not([data-theme="dark"]) .visi-card h3,
:root:not([data-theme="dark"]) .misi-card h4,
:root:not([data-theme="dark"]) .tema-card h3,
:root:not([data-theme="dark"]) .geodesi-panel h3,
:root:not([data-theme="dark"]) .timeline-card h3,
:root:not([data-theme="dark"]) .organogram-section h2,
:root:not([data-theme="dark"]) .gallery-heading,
:root:not([data-theme="dark"]) .view-backbar strong {
  color: var(--primary) !important;
}

/* Body paragraphs and secondary text. */
:root:not([data-theme="dark"]) .section-heading p,
:root:not([data-theme="dark"]) .body-copy,
:root:not([data-theme="dark"]) .background-copy p,
:root:not([data-theme="dark"]) .visi-card p,
:root:not([data-theme="dark"]) .misi-card p,
:root:not([data-theme="dark"]) .tema-card p,
:root:not([data-theme="dark"]) .geodesi-panel p,
:root:not([data-theme="dark"]) .timeline-card p,
:root:not([data-theme="dark"]) .gallery-intro p,
:root:not([data-theme="dark"]) .gallery-meta,
:root:not([data-theme="dark"]) .view-backbar span,
:root:not([data-theme="dark"]) .tema-intro p {
  color: var(--text-muted) !important;
}

/* Catch ordinary text nodes inside common light cards that do not have
   their own paragraph selector. */
:root:not([data-theme="dark"]) .glass-card,
:root:not([data-theme="dark"]) .visi-card,
:root:not([data-theme="dark"]) .misi-card,
:root:not([data-theme="dark"]) .tema-card,
:root:not([data-theme="dark"]) .geodesi-panel,
:root:not([data-theme="dark"]) .timeline-card,
:root:not([data-theme="dark"]) .org-card:not(.primary),
:root:not([data-theme="dark"]) .gallery-item {
  text-shadow: none;
}

:root:not([data-theme="dark"]) .glass-card p,
:root:not([data-theme="dark"]) .visi-card p,
:root:not([data-theme="dark"]) .misi-card p,
:root:not([data-theme="dark"]) .tema-card p,
:root:not([data-theme="dark"]) .geodesi-panel p,
:root:not([data-theme="dark"]) .timeline-card p,
:root:not([data-theme="dark"]) .org-card:not(.primary) p,
:root:not([data-theme="dark"]) .gallery-item p {
  color: var(--text-muted) !important;
}

/* Lists, labels and inline text inside light cards. */
:root:not([data-theme="dark"]) .glass-card li,
:root:not([data-theme="dark"]) .visi-card li,
:root:not([data-theme="dark"]) .misi-card li,
:root:not([data-theme="dark"]) .tema-card li,
:root:not([data-theme="dark"]) .geodesi-panel li,
:root:not([data-theme="dark"]) .timeline-card li,
:root:not([data-theme="dark"]) .org-card:not(.primary) li {
  color: var(--text-muted) !important;
}

/* Links on light surfaces. */
:root:not([data-theme="dark"]) .glass-card a,
:root:not([data-theme="dark"]) .visi-card a,
:root:not([data-theme="dark"]) .misi-card a,
:root:not([data-theme="dark"]) .tema-card a,
:root:not([data-theme="dark"]) .geodesi-panel a,
:root:not([data-theme="dark"]) .timeline-card a,
:root:not([data-theme="dark"]) .org-card:not(.primary) a,
:root:not([data-theme="dark"]) .gallery-item a {
  color: var(--primary) !important;
}

/* Dark sections remain dark in light mode, so their white text is correct. */
:root:not([data-theme="dark"]) .hero,
:root:not([data-theme="dark"]) .arah-gerak-section,
:root:not([data-theme="dark"]) .geodesi-section,
:root:not([data-theme="dark"]) .webgis-section,
:root:not([data-theme="dark"]) .timeline-section,
:root:not([data-theme="dark"]) .site-footer {
  color: var(--white);
}

:root:not([data-theme="dark"]) .hero h1,
:root:not([data-theme="dark"]) .hero-description,
:root:not([data-theme="dark"]) .hero .hero-badge,
:root:not([data-theme="dark"]) .arah-gerak-section .section-heading p,
:root:not([data-theme="dark"]) .geodesi-section .section-heading p,
:root:not([data-theme="dark"]) .webgis-section .section-heading p,
:root:not([data-theme="dark"]) .timeline-section .section-heading p,
:root:not([data-theme="dark"]) .site-footer .footer-copy,
:root:not([data-theme="dark"]) .site-footer .footer-bottom {
  color: var(--white) !important;
}

:root:not([data-theme="dark"]) .arah-gerak-section .section-heading h2,
:root:not([data-theme="dark"]) .geodesi-section .section-heading h2,
:root:not([data-theme="dark"]) .webgis-section .section-heading h2,
:root:not([data-theme="dark"]) .timeline-section .section-heading h2,
:root:not([data-theme="dark"]) .site-footer .footer-title {
  color: var(--earth) !important;
}

/* Map banner is a dark overlay/banner, therefore white text is intentional. */
:root:not([data-theme="dark"]) .map-banner,
:root:not([data-theme="dark"]) .map-banner h3,
:root:not([data-theme="dark"]) .map-banner p {
  color: var(--white) !important;
}

/* Gallery caption uses a light cream panel, so it needs dark text. */
:root:not([data-theme="dark"]) .gallery-card .gallery-caption {
  background: rgba(255, 255, 255, 0.96) !important;
  color: var(--primary) !important;
}

/* Primary organogram card deliberately stays dark. */
:root:not([data-theme="dark"]) .org-card.primary {
  background: var(--primary) !important;
  color: var(--white) !important;
  border-color: var(--earth) !important;
}

:root:not([data-theme="dark"]) .org-card.primary p,
:root:not([data-theme="dark"]) .org-card.primary li,
:root:not([data-theme="dark"]) .org-card.primary strong {
  color: var(--white) !important;
}

/* Stats are dark cards in light mode, so their light labels remain readable. */
:root:not([data-theme="dark"]) .stat-card,
:root:not([data-theme="dark"]) .stat-card .stat-number,
:root:not([data-theme="dark"]) .stat-card .stat-label {
  color: var(--white) !important;
}

/* Form/control-like elements on light surfaces. */
:root:not([data-theme="dark"]) .theme-toggle,
:root:not([data-theme="dark"]) .nav-menu .nav-link {
  color: var(--white);
}