@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700&family=DM+Serif+Display:ital@0;1&display=swap");

/* ── 02. DESIGN TOKENS ────────────────────────────────────── */
:root {
  /* shadcn sky palette */
  --primary: #0ea5e9;           /* sky-500 */
  --primary-light: #e0f2fe;     /* sky-100 */
  --primary-dark: #0284c7;      /* sky-600 */
  --green: #16a34a;
  --green-light: #dcfce7;

  /* surfaces */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafc;         /* slate-50  */
  --surface-hover: #f1f5f9;     /* slate-100 */
  --border: #e2e8f0;            /* slate-200 */

  /* text */
  --text: #0f172a;              /* slate-900 */
  --text-muted: #64748b;        /* slate-500 */
  --text-subtle: #94a3b8;       /* slate-400 */

  /* radii */
  --radius: 12px;
  --radius-sm: 8px;

  /* shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.14);

  --easing: cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Layout heights — single source of truth ── */
  /* JS should update --topbar-height to 0px when topbar is dismissed:
     document.documentElement.style.setProperty('--topbar-height', '0px');
     then add class to hide it. */
  --topbar-height: 40px;
  --nav-height: 88px;
  --nav-height-mobile: 56px;
  --bottom-nav-height: 64px;
}

/* dark mode — pure neutral zinc, zero color tints */
[data-theme="dark"] {
  --primary: #0ea5e9;
  --primary-light: rgba(14,165,233,0.15);
  --primary-dark: #38bdf8;      /* sky-400 — brighter on dark bg */
  --green-light: rgba(22,163,74,0.15);

  /* surfaces — zinc scale */
  --bg: #09090b;                /* zinc-950 */
  --surface: #111113;           /* FIX: slightly lifted from bg so cards are visible */
  --surface-2: #18181b;         /* zinc-900 */
  --surface-hover: #27272a;     /* zinc-800 */
  --border: #27272a;

  /* text */
  --text: #fafafa;              /* zinc-50  */
  --text-muted: #a1a1aa;        /* zinc-400 */
  --text-subtle: #71717a;       /* zinc-500 */

  /* shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.55);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.65);
}

/* ── 03. RESET ────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── 04. BASE ─────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* FIX: offset anchor links so they clear the fixed topbar + nav */
  scroll-padding-top: calc(var(--topbar-height) + var(--nav-height));
}

body {
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s var(--easing), color 0.3s var(--easing);

  /* FIX: push page content below fixed topbar + fixed nav */
  padding-top: calc(var(--topbar-height) + var(--nav-height));
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

address {
  font-style: normal;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ── 05. PRELOADER ────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;                /* FIX: was 9998, must be above everything */
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

.preloader.is-fading-out {
  opacity: 0;
  pointer-events: none;
}

.preloader.hidden {
  display: none;
}

.preloader-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── 06. TOPBAR ───────────────────────────────────────────── */
/*
  FIX: Changed from position:relative to position:fixed.
  Previously, nav was fixed at top:0 and topbar was relative, so nav
  always sat on top of the topbar content on every scroll position.
  Now topbar is fixed at top:0 (z-index 600) and nav uses
  top:var(--topbar-height) so it sits flush below it.

  To dismiss the topbar, add class "topbar-dismissed" to it AND run:
    document.documentElement.style.setProperty('--topbar-height','0px');
  The nav and body padding-top will animate automatically.
*/
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 600;
  height: var(--topbar-height);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  padding: 0 48px;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition:
    height  0.3s var(--easing),
    opacity 0.3s var(--easing);
}

/* Add this class via JS when close is clicked */
.topbar-dismissed {
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.topbar a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 4px;
}

.topbar-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.topbar-close:hover {
  background: rgba(255,255,255,0.35);
}

.topbar-close svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

/* ── 07. NAV — DESKTOP ────────────────────────────────────── */
/*
  FIX 1: top changed from 0 to var(--topbar-height) so nav sits below
  topbar instead of overlapping it. When --topbar-height becomes 0px,
  nav smoothly animates to top:0 via the transition on `top`.

  FIX 2: Auto-adjust when icons are added:
  .nav-part now has flex:1 + justify-content:center so the link list
  grows/shrinks to fill the middle space. Each li has flex-shrink:1
  so items compress before anything overflows. Logo (.nav-left) and
  action buttons (.nav-right) are flex-shrink:0 — they never compress.
*/
nav {
  position: fixed;
  top: var(--topbar-height);    /* FIX: sit directly below topbar */
  left: 0;
  right: 0;
  z-index: 500;
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 56px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;                    /* FIX: reduced from 24px to allow more room */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition:
    top          0.3s var(--easing), /* smooth slide when topbar closes */
    background   0.3s var(--easing),
    border-color 0.3s var(--easing);
  box-shadow: var(--shadow-sm);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;               /* FIX: logo cluster never shrinks */
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "DM Serif Display", serif;
  font-size: 23px;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-logo-mark {
  width: 54px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* FIX: Auto-adjusts when new nav items are added.
   flex:1 fills remaining space; justify-content:center keeps links centred.
   flex-shrink:1 on each li lets items compress rather than overflow. */
.nav-part {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}

.nav-part li {
  flex-shrink: 1;
  min-width: 0;
}

.nav-part li a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.nav-part li a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

/* nav icons — outline stroke by default */
.nav-part li a svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: fill 0.15s, stroke 0.15s;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;               /* FIX: action buttons never get squeezed off */
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 50px;
  border: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}

.nav-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface-hover);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── 08. NAV — ACTIVE STATE + FILL ICONS ─────────────────── */
.nav-part li a.active {
  color: var(--primary);
  background: var(--primary-light);
  font-weight: 600;
}

.nav-part li a.active svg {
  fill: var(--primary);
  stroke: var(--primary);
}

.nav-part li a:hover svg {
  fill: var(--text);
  stroke: var(--text);
}

/* ── 09. NAV — USER MENU DROPDOWN ────────────────────────── */
.user-menu-wrapper {
  position: relative;
}

.user-menu-btn {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  color: var(--text);
}

.user-menu-btn:hover {
  background: var(--surface-hover);
}

.user-menu-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.user-handle {
  font-size: 11px;
  color: var(--text-muted);
}

.user-menu-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  color: var(--text-muted);
  transition: transform 0.2s var(--easing);
}

/* FIX: rotate chevron when dropdown is open */
.user-menu-btn[aria-expanded="true"] svg:last-child {
  transform: rotate(180deg);
}

.user-menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  z-index: 200;                 /* FIX: was 999 (same as nav) — now below nav */
  overflow: hidden;
}

.user-menu-dropdown.active {
  display: block;
  animation: fadeInDown 0.18s var(--easing);
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.dropdown-header .dh-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.dropdown-header .dh-badge {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 20px;
}

.dropdown-section-label {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.member-switch-btn {
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
  font-family: inherit;
}

.member-switch-btn:hover {
  background: var(--surface-hover);
}

.member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  min-width: 0;                 /* FIX: allows text to truncate properly */
}

.member-info .mi-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.member-info .mi-role {
  font-size: 11px;
  color: var(--text-muted);
}

.member-check svg {
  width: 15px;
  height: 15px;
  fill: var(--primary);
  stroke: none;
  color: var(--primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.dropdown-option {
  width: 100%;
  padding: 11px 16px;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
  color: var(--text);
  font-family: inherit;
}

.dropdown-option:hover {
  background: var(--surface-hover);
}

.dropdown-option svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  color: var(--text-muted);
  flex-shrink: 0;
}

.dropdown-option--danger {
  color: #ef4444;
}

.dropdown-option--danger:hover {
  background: rgba(239,68,68,0.08);
}

.dropdown-option--danger svg {
  color: #ef4444;
}

/* ── 10. BOTTOM NAV (MOBILE) ──────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 400;                 /* FIX: was 200, needs to be above page content */
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}

.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  height: var(--bottom-nav-height);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: 10px 4px;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
  position: relative;
}

/* icon-only — no labels */
.bottom-nav-item span {
  display: none !important;
}

.bottom-nav-item:hover {
  color: var(--primary);
  background: var(--surface-hover);
}

.bottom-nav-item.active {
  color: var(--primary);
}

/* outline icon by default */
.bottom-nav-item svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  transition: fill 0.15s, stroke 0.15s;
}

/* filled icon when active or hovered */
.bottom-nav-item.active svg,
.bottom-nav-item:hover svg {
  fill: var(--primary);
  stroke: var(--primary);
}

.bottom-nav-item .nav-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
  flex-shrink: 0;
}

/* top active indicator bar */
.bottom-nav-item.active::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--primary);
}

/* ── 11. SECTION UTILITIES ────────────────────────────────── */
section {
  padding: 80px 48px;
}

.sec-header {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}

.sec-header h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.22;
  margin-bottom: 12px;
  color: var(--text);
}

.sec-header h2 span {
  color: var(--primary);
}

.sec-header p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ── 12. REVIEWS ──────────────────────────────────────────── */
.reviews-section {
  background: var(--surface-2);
}

.google-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f59e0b;
  margin-bottom: 12px;
}

.google-row svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: none;
}

.rating-score {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.rating-count {
  font-size: 14px;
  color: var(--text-muted);
}

.google-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 8px 18px;
  border-radius: 50px;
  transition: background 0.2s, color 0.2s;
}

.google-badge-btn:hover {
  background: var(--primary);
  color: #fff;
}

.google-badge-btn svg {
  width: 15px;
  height: 15px;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.review-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.review-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.review-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-2);
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-meta h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.review-meta .date {
  font-size: 12px;
  color: var(--text-muted);
}

.rev-stars {
  color: #f59e0b;
  margin-bottom: 10px;
  display: flex;
  gap: 2px;
}

.rev-stars svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
}

.review-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── 13. CAUSES / CAMPAIGNS ───────────────────────────────── */
.causes-section {
  background: var(--bg);
}

.search-wrap {
  display: flex;
  max-width: 600px;
  margin: 0 auto 28px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: inherit;         /* FIX: was missing, caused font mismatch */
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.search-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  padding: 0 20px;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.search-btn:hover {
  background: var(--primary-dark);
}

.search-btn svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;         /* FIX: missing on button-style tabs */
}

.tab svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(14,165,233,0.3);
}

.campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.campaign-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.campaign-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.cam-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.cam-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.campaign-card:hover .cam-img {
  transform: scale(1.04);
}

.cam-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.campaign-body {
  padding: 18px 18px 12px;
}

.campaign-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
}

.campaign-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.progress-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 10px;
  background: var(--primary);
  transition: width 0.7s ease-out;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.raised-amt {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.goal-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.goal-amt {
  font-size: 12px;
  color: var(--text-muted);
}

.campaign-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

.supporters-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.supporters-row svg {
  width: 15px;
  height: 15px;
}

.share-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.share-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.share-btn svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.center-btn {
  text-align: center;
  margin-top: 36px;
}

.see-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  padding: 10px 24px;
  border: 1.5px solid var(--primary);
  border-radius: 50px;
  transition: background 0.2s, color 0.2s;
}

.see-more-link:hover {
  background: var(--primary);
  color: #fff;
}

.see-more-link svg {
  width: 16px;
  height: 16px;
}

/* ── 14. TRUST ────────────────────────────────────────────── */
.trust-section {
  background: var(--surface-2);
  text-align: center;
}

.trust-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.trust-toggle {
  display: flex;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 50px;
  padding: 4px;
  gap: 4px;
}

.trust-toggle-btn {
  padding: 8px 24px;
  border-radius: 50px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.trust-toggle-btn.active {
  background: var(--primary);
  color: #fff;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto 36px;
}

.trust-grid.is-hidden {
  display: none;
}

.trust-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.trust-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.trust-icon-circle {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--primary);
}

.trust-icon-circle svg {
  width: 24px;
  height: 24px;
}

.trust-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.trust-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-outline-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  font-family: inherit;
}

.btn-outline-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.btn-outline-pill svg {
  width: 16px;
  height: 16px;
}

/* ── 15. SUCCESS STORIES ──────────────────────────────────── */
.stories-section {
  background: var(--bg);
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.story-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.story-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.story-img-wrap {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.story-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.story-card:hover .story-img {
  transform: scale(1.04);
}

.story-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

.story-body {
  padding: 22px;
}

.story-quote {
  font-size: 48px;
  line-height: 1;
  color: var(--primary);
  font-family: "DM Serif Display", serif;
  opacity: 0.4;
  margin-bottom: -8px;
  user-select: none;
}

.story-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 10px;
}

.story-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.story-footer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.story-avatar {
  color: var(--text-muted);
  flex-shrink: 0;
}

.story-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.story-author {
  flex: 1;
  min-width: 0;                 /* FIX: allows long names to truncate */
}

.story-author h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.story-author span {
  font-size: 12px;
  color: var(--text-muted);
}

.story-amount {
  text-align: right;
  flex-shrink: 0;
}

.story-raised {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.story-days {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── 16. CELEBRATE ────────────────────────────────────────── */
.celebrate-section {
  background: var(--surface-2);
}

.cel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto 36px;
}

.cel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.cel-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.cel-img-wrap {
  position: relative;
  height: 170px;
  overflow: hidden;
}

.cel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.cel-card:hover .cel-img {
  transform: scale(1.04);
}

.cel-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}

.cel-body {
  padding: 16px 18px;
}

.cel-body h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.35;
}

.cel-body p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}

.cel-raised {
  font-size: 13px;
  color: var(--text-muted);
}

.cel-raised strong {
  color: var(--text);
  font-weight: 700;
}

.cel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}

.btn-celebrate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(14,165,233,0.28);
  font-family: inherit;
}

.btn-celebrate:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14,165,233,0.38);
}

.btn-celebrate svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* ── 17. APP SECTION ──────────────────────────────────────── */
.app-section {
  background: var(--bg);
  padding: 80px 48px;
}

.app-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 16px;
}

.app-badge svg {
  width: 14px;
  height: 14px;
}

.app-left h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.2;
  margin-bottom: 14px;
  color: var(--text);
}

.app-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 24px;
}

.app-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.app-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.feat-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feat-check svg {
  width: 13px;
  height: 13px;
}

.store-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.store-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.store-btn svg {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
}

.s-text {
  display: flex;
  flex-direction: column;
}

.s-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 400;
}

.s-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* phone mock: always dark shell regardless of theme */
.phone-wrap {
  background: linear-gradient(135deg, #18181b 0%, #09090b 100%);
  border-radius: 24px;
  padding: 28px 24px;
  border: 8px solid #27272a;
  max-width: 300px;
  margin: 0 auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.4);
}

.phone-logo {
  font-family: "DM Serif Display", serif;
  font-size: 16px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.phone-logo svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.phone-wrap > p {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
  line-height: 1.5;
}

.phone-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.p-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
  font-family: inherit;
}

.p-btn {
  background: var(--primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  margin-top: 4px;
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  font-family: inherit;
  width: 100%;
}

.p-btn:hover {
  background: #0284c7;
}

.phone-signup {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  margin-top: 14px;
}

/* ── 18. MOMENTS ──────────────────────────────────────────── */
.moments-section {
  background: var(--surface-2);
}

.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.moment-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 200px;            /* FIX: fallback for Safari < 15 */
}

.moment-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.moment-card:hover .moment-img {
  transform: scale(1.06);
}

.moment-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.7) 0%,
    rgba(0,0,0,0.1) 60%
  );
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s;
}

.moment-card:hover .moment-overlay {
  opacity: 1;
}

.moment-overlay p {
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
}

/* ── 19. CTA BANNER ───────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: #fff;
  text-align: center;
  padding: 56px 48px;
}

.cta-banner h2 {
  font-family: "DM Serif Display", serif;
  font-size: clamp(22px, 3vw, 34px);
  margin-bottom: 20px;
}

.cta-banner .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: #0284c7;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 50px;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.cta-banner .cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

/* ── 20. FOOTER ───────────────────────────────────────────── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 60px 48px 0;
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 2fr 2fr 2fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-logo-mark {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-logo-text {
  font-family: "DM Serif Display", serif;
  font-size: 18px;
  color: var(--text);
}

.footer-brand p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.footer-socials {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.social-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.social-btn svg {
  width: 16px;
  height: 16px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul li a {
  font-size: 13.5px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--primary);
}

.footer-address {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

.footer-address a {
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-address a:hover {
  color: var(--primary);
}

.footer-app-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.footer-store-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.2s;
}

.footer-store-btn:hover {
  border-color: var(--primary);
}

.footer-store-btn svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

/* FIX: display:flex must come before justify-content */
.footer-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.footer-secure img {
  height: 36px;
  width: auto;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.footer-copy {
  font-size: 12.5px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12.5px;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--primary);
}

/* ── 21. GOOGLE TRANSLATE ─────────────────────────────────── */
.translate-widget .goog-te-combo {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  padding: 6px 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

/* ── 22. HERO ─────────────────────────────────────────────── */
/* FIX: was padding:0 48px which left no top breathing room.
   Body padding-top already handles the nav offset, so sections
   just need their own internal padding. */
.hero-section {
  background: var(--bg);
  padding: 80px 48px;
}

/* ── 23. SHARED BUTTONS ───────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(14,165,233,0.32);
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(14,165,233,0.4);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* ── 24. RESPONSIVE — 900px ───────────────────────────────── */
@media (max-width: 900px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .app-inner {
    grid-template-columns: 1fr;
  }
}

/* ── 25. RESPONSIVE — 768px ───────────────────────────────── */
@media (max-width: 768px) {
  /* FIX: update body padding for mobile nav height */
  body {
    padding-top: calc(var(--topbar-height) + var(--nav-height-mobile));
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
  }

  /* FIX: update scroll-padding-top for mobile */
  html {
    scroll-padding-top: calc(var(--topbar-height) + var(--nav-height-mobile));
  }

  section,
  .app-section {
    padding: 56px 20px;
  }

  .hero-section {
    padding: 40px 20px !important;
  }

  /* bottom nav */
  .bottom-nav {
    display: block;
  }

  /* mobile nav
  NOTE: do NOT add overflow:hidden to nav — it breaks position:sticky
  in WebKit (Safari/Chrome iOS) by creating a new scroll container */
  nav {
    padding: 0 12px;
    height: var(--nav-height-mobile);
    gap: 0;
    justify-content: space-between;
  }

  nav .nav-part {
    display: none !important;
  }

  nav .nav-btn {
    display: none !important;
  }

  .desktop-only {
    display: none !important;
  }

  .translate-widget {
    display: none;
  }

  .nav-left {
    gap: 6px;
  }

  .nav-logo {
    font-size: 15px;
    gap: 6px;
  }

  .nav-logo-mark {
    width: 36px;
    height: 32px;
  }

  .nav-right {
    gap: 4px;
    margin-left: auto;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .icon-btn svg {
    width: 19px;
    height: 19px;
  }

  .nav-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
  }

  .user-menu-info {
    display: none;
  }

  .user-menu-btn {
    padding: 4px 6px;
    gap: 4px;
  }

  .user-menu-btn > svg:last-child {
    display: none;
  }

  /* FIX: tighten topbar on small screens so text doesn't overflow close button */
  .topbar {
    font-size: 12px;
    padding: 0 40px;
  }

  footer {
    padding: 48px 20px 0;
  }
}

/* ── 26. RESPONSIVE — 600px ───────────────────────────────── */
@media (max-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

  .campaigns-grid {
    grid-template-columns: 1fr;
  }

  .stories-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    padding: 48px 20px;
  }
}