/* ==========================================================================
   YAYASAN CITRA MANDIRI MENTAWAI (YCMM) — NATIVE DESIGN SYSTEM
   Harmonized with YCMM Logo: Deep Sago Forest Green (#0B4F32) & Mentawai Ocean Blue (#2E4F85)
   Optimized for Core Web Vitals (PageSpeed 100), WCAG AA/AAA, Dark/Light Theme
   ========================================================================== */

:root,
[data-theme="light"] {
  --bg-body: #f7faf8;
  --bg-surface: #ffffff;
  --bg-subtle: #edf3ef;
  --bg-elevated: #ffffff;
  --bg-accent-soft: #e1efe7;
  --bg-blue-soft: #e6eef8;
  --bg-earth-soft: #faefe2;
  --bg-header: rgba(255, 255, 255, 0.94);
  --bg-topbar: #073823;

  --text-primary: #0f221a;
  --text-secondary: #334b40;
  --text-muted: #4d665a;
  --text-inverse: #ffffff;

  --brand-green: #0b4f32;
  --brand-green-hover: #073823;
  --brand-blue: #294c82;
  --brand-blue-hover: #1d3863;
  --brand-earth: #8c5618;

  --btn-primary-bg: #0b4f32;
  --btn-primary-fg: #ffffff;
  --btn-primary-hover: #073823;

  --border-color: #d3e0d8;
  --border-strong: #b3c8bc;
  --shadow-sm: 0 1px 3px rgba(11, 45, 30, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 45, 30, 0.08);
  --shadow-lg: 0 18px 42px rgba(11, 45, 30, 0.12);
  --focus-ring: 0 0 0 3px rgba(41, 76, 130, 0.35);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --container-max: 1220px;
  --header-h: 76px;
}

[data-theme="dark"] {
  --bg-body: #08130f;
  --bg-surface: #0f201a;
  --bg-subtle: #152b23;
  --bg-elevated: #173026;
  --bg-accent-soft: #18392c;
  --bg-blue-soft: #162942;
  --bg-earth-soft: #332514;
  --bg-header: rgba(8, 19, 15, 0.94);
  --bg-topbar: #050d0a;

  --text-primary: #ecf5ef;
  --text-secondary: #bfd3c7;
  --text-muted: #92ada0;
  --text-inverse: #062115;

  --brand-green: #38d69a;
  --brand-green-hover: #5ee6b3;
  --brand-blue: #85b4ff;
  --brand-blue-hover: #a6c8ff;
  --brand-earth: #f2b96b;

  --btn-primary-bg: #34d399;
  --btn-primary-fg: #052216;
  --btn-primary-hover: #57e2af;

  --border-color: #213d32;
  --border-strong: #2f5647;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.55);
  --focus-ring: 0 0 0 3px rgba(56, 214, 154, 0.45);
}

/* Reset & Core */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-body);
  transition: background-color 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
}

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

a {
  color: var(--brand-green);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-green-hover);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* Skip Link for Accessibility 100 */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 9999;
  padding: 10px 18px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  font-weight: 700;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Theme Logo Swapping (Zero JS flash) */
.logo-dark-only { display: none; }
[data-theme="dark"] .logo-light-only { display: none; }
[data-theme="dark"] .logo-dark-only { display: block; }

/* Top Institutional Utility Bar (E-E-A-T Signals) */
.topbar {
  background: var(--bg-topbar);
  color: #dcebe3;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  padding-top: 4px;
  padding-bottom: 4px;
  flex-wrap: wrap;
}
.topbar-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar-info span,
.topbar-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dcebe3;
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-links a:hover {
  color: #6ee7b7;
  text-decoration: underline;
}

/* Sticky Main Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: var(--text-primary);
}
.brand-logo-wrap {
  width: 66px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-logo-wrap img {
  width: 66px;
  height: 54px;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}
.brand-acronym {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-green);
}
.brand-fullname {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-blue);
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-item {
  position: relative;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 13px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.nav-link:hover,
.nav-link[aria-current="page"],
.nav-link.active {
  color: var(--brand-green);
  background: var(--bg-accent-soft);
}

/* Dropdown Submenu */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 245px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 950;
}
.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu,
.nav-item.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  font-size: 0.885rem;
  font-weight: 600;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}
.dropdown-menu a:hover,
.dropdown-menu a[aria-current="page"] {
  background: var(--bg-accent-soft);
  color: var(--brand-green);
}
.dropdown-menu .menu-desc {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1px;
}

/* Header Actions (Search, Theme Toggle, Donate CTA, Mobile Hamburger) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.icon-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--brand-green);
  color: var(--brand-green);
}

/* Theme Icon States */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.btn-primary:hover {
  background: var(--btn-primary-hover);
  color: var(--btn-primary-fg);
}
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-outline:hover {
  border-color: var(--brand-green);
  background: var(--bg-accent-soft);
  color: var(--brand-green);
}
.btn-blue {
  background: var(--brand-blue);
  color: #ffffff;
}
[data-theme="dark"] .btn-blue {
  color: #06182c;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.mobile-menu-btn {
  display: none;
}

/* Typography & Editorial Headings */
h1, h2, h3, h4 {
  color: var(--text-primary);
  margin-top: 0;
  line-height: 1.22;
  letter-spacing: -0.02em;
}
.serif-heading {
  font-family: var(--font-serif);
  letter-spacing: -0.015em;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--radius-pill);
  background: var(--bg-accent-soft);
  color: var(--brand-green);
  margin-bottom: 14px;
}
.eyebrow-blue {
  background: var(--bg-blue-soft);
  color: var(--brand-blue);
}
.eyebrow-earth {
  background: var(--bg-earth-soft);
  color: var(--brand-earth);
}

/* Hero Section (Home) */
.hero-home {
  padding: 36px 0 48px;
  background:
    radial-gradient(circle at 8% 12%, var(--bg-accent-soft) 0%, transparent 48%),
    radial-gradient(circle at 92% 85%, var(--bg-blue-soft) 0%, transparent 45%);
  border-bottom: 1px solid var(--border-color);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.15;
  margin-bottom: 18px;
}
.hero-title .accent-green {
  color: var(--brand-green);
}
.hero-lead {
  font-size: 1.08rem;
  color: var(--text-secondary);
  margin-bottom: 26px;
  max-width: 60ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

/* Breaking / Featured Headline Ticker Card in Hero */
.hero-breaking {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-green);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.breaking-badge {
  flex-shrink: 0;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: 6px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  margin-top: 2px;
}
.hero-breaking a {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-primary);
  line-height: 1.4;
}
.hero-breaking a:hover {
  color: var(--brand-green);
  text-decoration: underline;
}

.hero-media {
  position: relative;
}
.hero-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  aspect-ratio: 16 / 10;
  background: var(--bg-subtle);
}
.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-caption-card {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Impact Metrics Bar */
.stats-section {
  padding: 32px 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
}
.stat-num {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  font-weight: 700;
  color: var(--brand-green);
  line-height: 1.1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Generic Sections */
.section {
  padding: 68px 0;
}
.section-subtle {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.section-header-center {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 42px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  margin-bottom: 10px;
}
.section-subtitle {
  color: var(--text-secondary);
  margin: 0;
  max-width: 65ch;
}

/* Google News & Discover Editorial Layout */
.news-showcase-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
}
.lead-story-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.lead-story-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-subtle);
}
.lead-story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.lead-story-card:hover .lead-story-thumb img {
  transform: scale(1.025);
}
.lead-story-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.story-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.cat-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-accent-soft);
  color: var(--brand-green);
}
.lead-story-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  margin-bottom: 12px;
}
.lead-story-title a,
.news-card-title a,
.side-story-title a {
  color: var(--text-primary);
}
.lead-story-title a:hover,
.news-card-title a:hover,
.side-story-title a:hover {
  color: var(--brand-green);
}
.lead-story-excerpt {
  color: var(--text-secondary);
  margin: 0 0 18px;
}

.side-stories-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-story-card {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  padding: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  align-items: center;
}
.side-story-thumb {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}
.side-story-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.side-story-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
}

/* 3-Column News Cards Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.news-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.news-card-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-subtle);
}
.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 10px;
}
.news-card-excerpt {
  font-size: 0.915rem;
  color: var(--text-secondary);
  margin: 0 0 16px;
  flex: 1;
}
.author-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}
.author-byline strong {
  color: var(--text-secondary);
}

/* Programs / Karya Kami Cards */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.program-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.program-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.program-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-subtle);
}
.program-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.program-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.program-body h3 {
  font-size: 1.16rem;
  margin-bottom: 10px;
}
.program-body p {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin: 0 0 16px;
  flex: 1;
}

/* Values & Theory of Change Cards */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.value-card {
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.value-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-accent-soft);
  color: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.value-card h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}
.value-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
}

.toc-flow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.toc-stage {
  padding: 26px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--brand-green);
  border-radius: var(--radius-md);
}
.toc-stage.stage-mid {
  border-top-color: var(--brand-blue);
}
.toc-stage.stage-final {
  border-top-color: var(--brand-earth);
}
.toc-stage ul {
  padding-left: 18px;
  margin: 12px 0 0;
  color: var(--text-secondary);
}
.toc-stage li {
  margin-bottom: 8px;
}

/* Team / Pengurus Grid (E-E-A-T Expertise) */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.team-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.team-photo {
  aspect-ratio: 400 / 460;
  overflow: hidden;
  background: var(--bg-subtle);
}
.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.team-info {
  padding: 18px;
}
.team-name {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.team-role {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--brand-green);
  margin-bottom: 8px;
}
.team-bio {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Timeline / Capaian 1995-2026 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.filter-btn {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border-color: var(--btn-primary-bg);
}

.timeline {
  position: relative;
  padding-left: 28px;
  border-left: 3px solid var(--brand-green);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.timeline-item {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -38px;
  top: 26px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-green);
  border: 3px solid var(--bg-body);
}
.timeline-year {
  display: inline-block;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--bg-accent-soft);
  color: var(--brand-green);
  margin-bottom: 10px;
}
.timeline-item h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.timeline-item p {
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.timeline-item p:last-child {
  margin-bottom: 0;
}

/* Interactive Mentawai Archipelago Map */
.map-explorer {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 32px;
  align-items: start;
}
.svg-map-box {
  background: var(--bg-blue-soft);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.island-shape {
  fill: var(--brand-green);
  fill-rule: evenodd;
  stroke: var(--bg-surface);
  stroke-width: 0.55;
  cursor: pointer;
  transition: opacity 0.2s ease, fill 0.2s ease, filter 0.2s ease;
  opacity: 0.85;
}
.island-shape:hover,
.island-shape.active {
  opacity: 1;
  fill: var(--brand-earth);
  filter: drop-shadow(0 3px 8px rgba(140, 86, 24, 0.35));
}
.island-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.island-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* Partners Grid (Always high contrast even in Dark Mode) */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}
.partner-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 92px;
  padding: 14px 18px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
[data-theme="dark"] .partner-tile {
  background: #f4f8f5;
  border-color: #2c4c3f;
}
.partner-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-green);
}
.partner-tile img {
  max-height: 58px;
  max-width: 170px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Page Hero Banner (Inner Pages) */
.page-header {
  padding: 44px 0 40px;
  background:
    linear-gradient(135deg, var(--bg-accent-soft) 0%, transparent 65%),
    var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.825rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  list-style: none;
  padding: 0;
}
.breadcrumb a {
  color: var(--text-secondary);
  font-weight: 600;
}
.breadcrumb a:hover {
  color: var(--brand-green);
  text-decoration: underline;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  margin-bottom: 12px;
}
.page-lead {
  font-size: 1.06rem;
  color: var(--text-secondary);
  max-width: 68ch;
  margin: 0;
}

/* Search & Filter Toolbar (berita.html) */
.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 380px;
}
.search-box input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.925rem;
  font-family: inherit;
}
.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

/* Longform Article Reader (Google News / E-E-A-T Standard) */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 44px;
  align-items: start;
}
.article-main {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 44px);
}
.article-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3.3vw, 2.55rem);
  line-height: 1.2;
  margin-bottom: 18px;
}
.eeat-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 24px;
  font-size: 0.86rem;
}
.eeat-author-chip {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-avatar-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-accent-soft);
  color: var(--brand-green);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.article-figure {
  margin: 0 0 26px;
}
.article-figure img {
  width: 100%;
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg-subtle);
}
.article-figure figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.45;
}
.article-content {
  font-size: 1.075rem;
  line-height: 1.82;
  color: var(--text-primary);
  max-width: 70ch;
}
.article-content p {
  margin: 0 0 1.35em;
}
.article-content blockquote {
  margin: 1.6em 0;
  padding: 18px 22px;
  border-left: 4px solid var(--brand-green);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
}

.eeat-trust-box {
  margin-top: 32px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
}
.share-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 96px;
}
.sidebar-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
}

/* Donation Layout */
.donate-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: start;
}
.qris-card {
  background: var(--bg-surface);
  border: 2px solid var(--brand-green);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.qris-card img {
  margin: 0 auto 16px;
  border-radius: var(--radius-sm);
  max-width: 380px;
  width: 100%;
}

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, #073823 0%, #153c69 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4.5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-banner h2 {
  color: #ffffff;
  font-family: var(--font-serif);
  margin-bottom: 10px;
}
.cta-banner p {
  color: #dcebe3;
  max-width: 58ch;
  margin: 0;
}

/* Footer */
.site-footer {
  background: #071912;
  color: #cfe0d6;
  padding: 64px 0 28px;
  border-top: 1px solid #1b382c;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.15fr;
  gap: 32px;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-title {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: #cfe0d6;
  font-size: 0.91rem;
}
.footer-links a:hover {
  color: #5ee6b3;
  text-decoration: underline;
}
.office-block {
  margin-bottom: 16px;
  font-size: 0.88rem;
  line-height: 1.55;
}
.office-block strong {
  color: #ffffff;
  display: block;
  margin-bottom: 2px;
}
.footer-bottom {
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.84rem;
  color: #9cb5a7;
}
.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.social-links a:hover {
  background: #34d399;
  color: #052216;
  border-color: #34d399;
}

/* Responsive Breakpoints */
@media (max-width: 1040px) {
  .hero-grid,
  .news-showcase-grid,
  .article-layout,
  .map-explorer,
  .donate-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid,
  .values-grid,
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .programs-grid,
  .news-grid,
  .toc-flow-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .topbar-info .hide-sm {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px 24px;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    display: none;
  }
  .main-nav.open {
    display: flex;
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--brand-green);
    border-radius: 0;
    margin: 4px 0 8px 14px;
    padding: 4px 0 4px 10px;
    background: transparent;
  }
}

@media (max-width: 600px) {
  .stats-grid,
  .values-grid,
  .team-grid,
  .programs-grid,
  .news-grid,
  .toc-flow-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .side-story-card {
    grid-template-columns: 104px 1fr;
    gap: 12px;
  }
  .brand-fullname {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .topbar, .site-header, .site-footer, .share-bar, .article-sidebar, .cta-banner {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}
