/* Missing Linkz — static UI shell (no backend) */
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap");

:root,
html,
html[data-theme="dark"] {
  color-scheme: dark;
  --background: 0 0% 7%;
  --foreground: hsl(0 0% 100%);
  --card: 0 0% 11%;
  --card-foreground: hsl(0 0% 100%);
  --primary: 0 100% 45%;
  --primary-foreground: hsl(0 0% 100%);
  --secondary: 0 0% 16%;
  --muted: 0 0% 16%;
  --muted-foreground: hsl(0 0% 63%);
  --accent: 0 0% 20%;
  --accent-foreground: hsl(0 0% 100%);
  --destructive: 0 72% 51%;
  --border: 0 0% 20%;
  --input: 0 0% 20%;
  --ring: 0 100% 45%;
  --brand-red: #e60000;
  --bg: hsl(var(--background));
  --card-bg: hsl(var(--card));
  --border-color: hsl(var(--border));
  --radius: 0.5rem;
}

/*
 * Light theme is OPT-IN only via data-theme="light".
 * Do NOT follow prefers-color-scheme — that made the site flash white
 * on Safari/Chrome/Edge when the OS was in light mode.
 */
[data-theme="light"] {
  color-scheme: light;
  --background: 0 0% 100%;
  --foreground: hsl(0 0% 10%);
  --card: 0 0% 94%;
  --card-foreground: hsl(0 0% 10%);
  --primary: 0 100% 45%;
  --primary-foreground: hsl(0 0% 100%);
  --secondary: 0 0% 90%;
  --muted: 0 0% 90%;
  --muted-foreground: hsl(0 0% 30%);
  --accent: 0 0% 85%;
  --accent-foreground: hsl(0 0% 10%);
  --destructive: 0 72% 51%;
  --border: 0 0% 82%;
  --input: 0 0% 82%;
  --ring: 0 100% 45%;
  --bg: hsl(var(--background));
  --card-bg: hsl(var(--card));
  --border-color: hsl(var(--border));
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background: #121212; /* match dark --bg before body paints */
}

html[data-theme="light"] {
  background: #ffffff;
}

body {
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--foreground);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

/* ── Layout ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
}

.min-h-screen {
  min-height: 100vh;
}

/* ── Logo ───────────────────────────────────────────── */
.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-icon {
  color: var(--brand-red);
  margin-bottom: 0.375rem;
  display: flex;
}

.logo-word {
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #fff;
  line-height: 1;
}

.logo-word-row {
  display: flex;
  align-items: center;
  margin-top: 0.25rem;
}

.logo-link-inline {
  color: var(--brand-red);
  margin-inline: 0.125rem;
  display: inline-flex;
  align-items: center;
}

.logo-tagline {
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  margin-top: 0.75rem;
  font-weight: 600;
}

.logo--sm .logo-word { font-size: 1rem; }
.logo--sm .logo-tagline { font-size: 6px; }
.logo--md .logo-word { font-size: 1.5rem; }
.logo--md .logo-tagline { font-size: 8px; }
.logo--lg .logo-word { font-size: 2.25rem; }
.logo--lg .logo-tagline { font-size: 10px; }
.logo--xl .logo-word { font-size: 3.75rem; }
.logo--xl .logo-tagline { font-size: 0.75rem; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border-color);
  /* Header is always dark so nav links stay legible in both themes */
  background: hsl(0 0% 7% / 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  height: 4rem;
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
  align-items: center;
  justify-content: space-between;
}

.header-logo-link {
  display: flex;
  align-items: center;
}

.nav-desktop {
  display: none;
  margin-left: auto; /* push the whole nav (and user area) to the right */
  align-items: center;
  gap: 0.5rem;
}

/* Logged-in/logged-out area rendered by includes/user_nav.php */
.nav-user-area {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: #fff;
}

/* Logged-in user colours — !important + scoping protects them from
   page-level white-forcing rules (e.g. register pages' body * { color:#fff }) */
.site-header .nav-user-email {
  color: #8fd48a !important;
  font-weight: 600;
}
.site-header .nav-user-logout {
  color: #ff8f8f !important;
}

/* The mobile dropdown has its own user links — hide the desktop copy */
@media (max-width: 767px) {
  .nav-user-area {
    display: none;
  }
}

.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: #fff;
  background: hsl(var(--accent));
}

.nav-link.is-active {
  color: #fff;
  background: var(--brand-red);
}

/* Seek Linkz CTA — high-contrast standout nav link */
.nav-link.nav-link-cta {
  background: var(--brand-red);
  color: #fff !important;
  padding-inline: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(230, 0, 0, 0.4), 0 4px 18px rgba(230, 0, 0, 0.55);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.nav-link.nav-link-cta:hover {
  background: #ff2222;
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(230, 0, 0, 0.7), 0 6px 26px rgba(230, 0, 0, 0.75);
}


.btn-admin {
  margin-left: 0.5rem;
  display: inline-flex;
  align-items: center;
  height: 2rem;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-admin:hover {
  background: hsl(var(--accent));
}

.menu-toggle {
  display: flex;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 0.25rem;
}

.nav-mobile {
  display: none;
  border-top: 1px solid var(--border-color);
  background: #000;
  padding: 0.75rem 1rem;
}

.nav-mobile.is-open {
  display: block;
}

.nav-mobile .nav-link {
  display: block;
  margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  border-radius: 0.75rem;
  text-align: center;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-red);
  color: #fff;
  padding: 1rem 2rem;
  box-shadow: 0 10px 25px rgba(230, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(230, 0, 0, 0.5);
}

.btn-outline {
  background: var(--card-bg);
  color: #fff;
  padding: 1rem 2rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: var(--brand-red);
  background: hsl(var(--card) / 0.8);
}

.btn-white {
  background: #fff;
  color: var(--brand-red);
  padding: 1rem 2rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-white:hover {
  transform: scale(1.05);
}

.btn-white-outline {
  background: transparent;
  color: #fff;
  padding: 1rem 2rem;
  border: 2px solid #fff;
}

.btn-white-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.75rem;
  border-radius: 0.375rem;
  gap: 0.25rem;
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 1.5rem 2rem;
  font-size: 1.125rem;
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(230, 0, 0, 0.1), transparent, transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 80rem;
  margin-inline: auto;
  padding: 5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .hero-inner { padding: 7rem 1rem; }
}

.hero h1 {
  margin-top: 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  max-width: 42rem;
}

@media (min-width: 768px) {
  .hero h1 { font-size: 2.25rem; }
}

.hero .lead {
  margin-top: 1rem;
  color: var(--muted-foreground);
  max-width: 36rem;
}

.hero-actions {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 640px) {
  .hero-actions { flex-direction: row; }
}

/* ── Sections ───────────────────────────────────────── */
.section {
  border-top: 1px solid var(--border-color);
  padding: 5rem 0;
}

.section--muted {
  background: hsl(var(--card) / 0.3);
}

.section--cta {
  background: var(--brand-red);
  border-top: none;
  padding: 4rem 0;
  text-align: center;
}

.section-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 3rem;
}

[data-theme="light"] .section-title {
  color: #111;
}

@media (min-width: 768px) {
  .section-title { font-size: 1.875rem; }
}

/* How it works */
.how-grid {
  display: grid;
  gap: 2rem;
  max-width: 42rem;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .how-grid { grid-template-columns: 1fr; }
}

.card {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 2rem;
}

.card-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.icon-box {
  display: flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(230, 0, 0, 0.15);
  color: var(--brand-red);
  flex-shrink: 0;
}

.icon-circle {
  display: flex;
  height: 3.5rem;
  width: 3.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgba(230, 0, 0, 0.1);
  color: var(--brand-red);
  margin-inline: auto;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}

.step-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: var(--muted-foreground);
}

.step-list li {
  display: flex;
  gap: 0.75rem;
}

.step-num {
  color: var(--brand-red);
  font-weight: 700;
  flex-shrink: 0;
}

/* Features */
.features-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature {
  text-align: center;
}

.feature h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.feature p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* CTA */
.cta-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .cta-title { font-size: 1.875rem; }
}

.cta-text {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
  max-width: 32rem;
  margin-inline: auto;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}

@media (min-width: 640px) {
  .cta-actions { flex-direction: row; }
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  background: #000;
  border-top: 1px solid #222;
  padding: 2rem 0;
}

.footer-inner {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Force black footer in light theme too */
[data-theme="light"] .site-footer {
  background: #000;
  border-top-color: #222;
}
[data-theme="light"] .site-footer .logo-word {
  color: #fff;
}
[data-theme="light"] .site-footer .logo-icon path {
  stroke: #fff;
}
[data-theme="light"] .footer-copy {
  color: rgba(255, 255, 255, 0.45);
}

/* ── Cookie notification ────────────────────────────── */
.cookie-notification {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsl(var(--card));
  border-top: 1px solid var(--border-color);
  padding: 1rem 0;
  z-index: 100;
  display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}

.cookie-notification.is-visible {
  display: block;
}

[data-theme="light"] .cookie-notification {
  background: hsl(var(--card));
  border-top-color: hsl(var(--border));
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}

/* Light theme: keep navbar black */
[data-theme="light"] .site-header {
  background: #000 !important;
  border-bottom-color: #222;
}
[data-theme="light"] .site-header .nav-link,
[data-theme="light"] .site-header .logo-word {
  color: #fff !important;
}
[data-theme="light"] .site-header .logo-icon path {
  stroke: #fff !important;
}
[data-theme="light"] .nav-mobile {
  background: #000;
  border-top-color: #222;
}

.footer-copy {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.75rem;
  text-align: center;
}

/* Force white homepage section text on dark (default) theme */
html:not([data-theme="light"]) .homepage-white-text .hero h1,
html:not([data-theme="light"]) .homepage-white-text .section-title,
html:not([data-theme="light"]) .homepage-white-text .cta-title,
html:not([data-theme="light"]) .homepage-white-text .card h3,
html:not([data-theme="light"]) .homepage-white-text .feature h3,
html:not([data-theme="light"]) .homepage-white-text .page-header h1,
html:not([data-theme="light"]) .homepage-white-text .page-header-left h1 {
  color: #fff !important;
}
html:not([data-theme="light"]) .homepage-white-text .hero .lead,
html:not([data-theme="light"]) .homepage-white-text .section--muted,
html:not([data-theme="light"]) .homepage-white-text .step-list,
html:not([data-theme="light"]) .homepage-white-text .step-list li,
html:not([data-theme="light"]) .homepage-white-text .feature p,
html:not([data-theme="light"]) .homepage-white-text .cta-text,
html:not([data-theme="light"]) .homepage-white-text .text-muted,
html:not([data-theme="light"]) .homepage-white-text .page-header p,
html:not([data-theme="light"]) .homepage-white-text .page-header-left p {
  color: rgba(255, 255, 255, 0.85) !important;
}
html:not([data-theme="light"]) .homepage-white-text .footer-copy {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Force white donate page text on dark (default) theme */
html:not([data-theme="light"]) .donate-white-text .page-header h1,
html:not([data-theme="light"]) .donate-white-text .page-header p,
html:not([data-theme="light"]) .donate-white-text .form-card h3,
html:not([data-theme="light"]) .donate-white-text .form-field label,
html:not([data-theme="light"]) .donate-white-text .form-control,
html:not([data-theme="light"]) .donate-white-text .amount-btn,
html:not([data-theme="light"]) .donate-white-text .donate-summary,
html:not([data-theme="light"]) .donate-white-text .donate-summary .label,
html:not([data-theme="light"]) .donate-white-text .donate-summary .value,
html:not([data-theme="light"]) .donate-white-text .input-prefix span,
html:not([data-theme="light"]) .donate-white-text .input-prefix input {
  color: #fff !important;
}
html:not([data-theme="light"]) .donate-white-text .form-card,
html:not([data-theme="light"]) .donate-white-text .form-card .muted {
  color: rgba(255, 255, 255, 0.85) !important;
}
html:not([data-theme="light"]) .donate-white-text .form-control::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}
html:not([data-theme="light"]) .donate-white-text .amount-btn {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: transparent !important;
}
html:not([data-theme="light"]) .donate-white-text .amount-btn.is-selected {
  background: var(--brand-red) !important;
  border-color: var(--brand-red) !important;
  color: #fff !important;
}

/* ── Page headers (forms / map / etc.) ───────────────── */
.page-body {
  max-width: 48rem;
  margin-inline: auto;
  padding: 3rem 1rem;
}

.page-body--wide {
  max-width: 80rem;
}

.page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.page-header .icon-box {
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 1rem;
  margin-inline: auto;
  margin-bottom: 1rem;
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
}

.page-header p {
  margin-top: 0.5rem;
  color: var(--muted-foreground);
}

.page-header-left {
  text-align: left;
  margin-bottom: 1.5rem;
}

.page-header-left h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-header-left p {
  margin-top: 0.25rem;
  color: var(--muted-foreground);
}

/* Notice banners */
.notice {
  margin-bottom: 2rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(230, 0, 0, 0.3);
  background: rgba(230, 0, 0, 0.05);
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--foreground);
  font-size: 0.875rem;
}

.notice svg {
  color: var(--brand-red);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* ── Forms ──────────────────────────────────────────── */
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-card {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-card h3 {
  font-weight: 700;
  color: var(--foreground);
}

.form-card h3 .muted {
  color: var(--muted-foreground);
  font-weight: 400;
  font-size: 0.875rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-field--span-2 {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-control {
  display: flex;
  height: 2.25rem;
  width: 100%;
  border-radius: 0.375rem;
  border: 1px solid var(--border-color);
  background: var(--bg);
  padding: 0.25rem 0.75rem;
  color: var(--foreground);
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control::placeholder {
  color: var(--muted-foreground);
}

/* Light theme text fixes for legibility */
[data-theme="light"] body,
[data-theme="light"] .page-header h1,
[data-theme="light"] .page-header p,
[data-theme="light"] .page-header-left h1,
[data-theme="light"] .page-header-left p,
[data-theme="light"] .section-title,
[data-theme="light"] .hero h1,
[data-theme="light"] .hero .lead,
[data-theme="light"] .form-card h3,
[data-theme="light"] .form-field label,
[data-theme="light"] .card h3,
[data-theme="light"] .feature h3,
[data-theme="light"] .feature p,
[data-theme="light"] .cta-title,
[data-theme="light"] .form-control {
  color: #111;
}

[data-theme="light"] .form-control::placeholder {
  color: #666;
}

[data-theme="light"] .form-card h3 .muted {
  color: #666;
}

/* Strong light theme text overrides for headers + placeholders */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .section-title,
[data-theme="light"] .page-header h1,
[data-theme="light"] .page-header-left h1,
[data-theme="light"] .hero h1,
[data-theme="light"] .cta-title,
[data-theme="light"] .form-card h3,
[data-theme="light"] .card h3,
[data-theme="light"] .feature h3,
[data-theme="light"] .login-card h1,
[data-theme="light"] .thankyou h1,
[data-theme="light"] .admin-org-card h3 {
  color: #111 !important;
}

[data-theme="light"] body,
[data-theme="light"] p,
[data-theme="light"] .page-header p,
[data-theme="light"] .page-header-left p,
[data-theme="light"] .hero .lead,
[data-theme="light"] .feature p,
[data-theme="light"] label,
[data-theme="light"] .form-field label,
[data-theme="light"] .step-list,
[data-theme="light"] .step-list li,
[data-theme="light"] .org-card p,
[data-theme="light"] .admin-org-card .meta,
[data-theme="light"] .login-card .sub,
[data-theme="light"] .placeholder-note {
  color: #222 !important;
}

[data-theme="light"] ::placeholder,
[data-theme="light"] .form-control::placeholder,
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder,
[data-theme="light"] select::placeholder {
  color: #666 !important;
  opacity: 1;
}

[data-theme="light"] .form-control,
[data-theme="light"] input:not([type="submit"]),
[data-theme="light"] select,
[data-theme="light"] textarea {
  color: #111;
  background: #fff;
  border-color: #ccc;
}

/* Fix buttons that had hardcoded white text */
[data-theme="light"] .btn-outline {
  color: #111;
  border-color: #ccc;
}
[data-theme="light"] .btn-outline:hover {
  color: #111;
  background: #f0f0f0;
}
[data-theme="light"] .btn-white-outline {
  color: #111;
  border-color: #333;
}

/* Admin / login / misc light theme fixes */
[data-theme="light"] .admin-org-card .meta,
[data-theme="light"] .login-card .sub,
[data-theme="light"] .text-muted,
[data-theme="light"] .placeholder-note {
  color: #555 !important;
}

[data-theme="light"] .btn-outline-sm {
  color: #111;
  border-color: #ccc;
}
[data-theme="light"] .btn-outline-sm:hover {
  background: #f0f0f0;
  color: #111;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 1px var(--brand-red);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

[data-theme="light"] select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

textarea.form-control {
  height: auto;
  min-height: 6rem;
  padding: 0.5rem 0.75rem;
  resize: vertical;
}

.radio-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--foreground);
  font-size: 0.875rem;
  cursor: pointer;
}

.radio-option input {
  accent-color: var(--brand-red);
  width: 1rem;
  height: 1rem;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.upload-box {
  border: 1px dashed var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted-foreground);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s;
}

.upload-box:hover {
  border-color: var(--brand-red);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .form-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}

/* ── Map page ───────────────────────────────────────── */
.map-layout {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .map-layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.search-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.search-wrap svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  pointer-events: none;
}

.search-wrap .form-control {
  padding-left: 2.5rem;
  height: 2.75rem;
}

.map-canvas {
  height: 420px;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
  background:
    linear-gradient(rgba(230, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 0, 0, 0.03) 1px, transparent 1px),
    #121212;
  background-size: 40px 40px, 40px 40px, auto;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-canvas-label {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  z-index: 1;
}

.map-canvas-label strong {
  display: block;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.25rem;
}

.org-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 85vh;
  overflow-y: auto;
}

.org-card {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 1.25rem;
  color: var(--foreground);
}

.org-card h3 {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.org-type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-red);
  background: rgba(230, 0, 0, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.5rem;
}

.org-card p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.org-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.org-meta a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s;
}

.org-meta a:hover {
  color: var(--brand-red);
}

.org-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  color: var(--muted-foreground);
  padding: 3rem 1rem;
}

/* ── Donate ─────────────────────────────────────────── */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.amount-btn {
  padding: 1rem 0;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.amount-btn:hover {
  background: hsl(var(--accent));
}

.amount-btn.is-selected {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

.input-prefix {
  position: relative;
}

.input-prefix > span {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  font-weight: 700;
}

.input-prefix .form-control {
  padding-left: 2rem;
}

.donate-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.donate-summary .label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.donate-summary .value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--foreground);
}

/* ── Thank you ──────────────────────────────────────── */
.thankyou {
  text-align: center;
  max-width: 32rem;
  margin-inline: auto;
  padding: 4rem 1rem;
}

.thankyou .icon-circle {
  height: 4rem;
  width: 4rem;
  margin-bottom: 1.25rem;
}

.thankyou h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.thankyou > p {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

/* ── Admin ──────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
}

.stat-card .stat-icon {
  color: var(--brand-red);
  margin-bottom: 0.25rem;
}

.stat-card .stat-num {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.tabs {
  display: flex;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 0.5rem;
  padding: 0.25rem;
  gap: 0.25rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}

.tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--foreground);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.tab.is-active {
  background: var(--brand-red);
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.admin-org-card {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.admin-org-card h3 {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.admin-org-card .meta {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 0.75rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn-approve {
  background: var(--brand-red);
  color: #fff;
  border: none;
}

.btn-approve:hover {
  background: rgba(230, 0, 0, 0.9);
}

.btn-outline-sm {
  background: transparent;
  color: #fff;
  border: 1px solid var(--border-color);
}

.btn-outline-sm:hover {
  background: hsl(var(--accent));
}

/* ── Login ──────────────────────────────────────────── */
.login-card {
  max-width: 24rem;
  margin: 4rem auto;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 1rem;
  padding: 2rem;
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-card .sub {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* ── Utilities ──────────────────────────────────────── */
.text-brand { color: var(--brand-red); }
.text-muted { color: var(--muted-foreground); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.placeholder-note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px dashed var(--border-color);
  color: var(--muted-foreground);
  font-size: 0.8rem;
  text-align: center;
}

/* ===========================================
   LIGHT THEME - FINAL HEADER / PLACEHOLDER / TEXT FIXES
   Force dark legible text everywhere in light mode
   =========================================== */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .section-title {
  color: #111 !important;
}

[data-theme="light"] body,
[data-theme="light"] p,
[data-theme="light"] label,
[data-theme="light"] .form-field label,
[data-theme="light"] .page-header p,
[data-theme="light"] .page-header-left p,
[data-theme="light"] .hero .lead,
[data-theme="light"] .feature p,
[data-theme="light"] .org-card p,
[data-theme="light"] .admin-org-card .meta,
[data-theme="light"] .login-card .sub,
[data-theme="light"] .text-muted,
[data-theme="light"] .placeholder-note,
[data-theme="light"] .step-list,
[data-theme="light"] .step-list li {
  color: #222 !important;
}

[data-theme="light"] ::placeholder,
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder,
[data-theme="light"] select::placeholder,
[data-theme="light"] .form-control::placeholder {
  color: #666 !important;
  opacity: 1;
}

[data-theme="light"] .form-control,
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  color: #111;
  background: #fff;
  border-color: #ccc;
}

/* Admin / misc cards in light theme */
[data-theme="light"] .admin-org-card,
[data-theme="light"] .org-card {
  color: #222;
}

[data-theme="light"] .admin-org-card .meta {
  color: #555 !important;
}

/* Login subtext and notes */
[data-theme="light"] .login-card .sub,
[data-theme="light"] .placeholder-note {
  color: #555 !important;
}

/* ===========================================
   AGGRESSIVE LIGHT THEME FIXES
   Ensure headers + placeholders are dark and legible
   =========================================== */
[data-theme="light"] .section-title,
[data-theme="light"] h1.section-title,
[data-theme="light"] h2.section-title,
[data-theme="light"] .main-content .section-title,
[data-theme="light"] .profile-layout .section-title {
  color: #111 !important;
}

[data-theme="light"] .main-content h1,
[data-theme="light"] .main-content h2,
[data-theme="light"] .main-content h3,
[data-theme="light"] .main-content h4 {
  color: #111 !important;
}

/* Search and form inputs in light theme */
[data-theme="light"] .org-search input,
[data-theme="light"] .form-control,
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="email"],
[data-theme="light"] input[type="number"],
[data-theme="light"] textarea,
[data-theme="light"] select {
  color: #111 !important;
  background: #fff !important;
  border-color: #ccc !important;
}

[data-theme="light"] .org-search input::placeholder,
[data-theme="light"] .form-control::placeholder,
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #666 !important;
}

/* My Orgs card and other cards */
[data-theme="light"] .my-orgs-card h3,
[data-theme="light"] .my-orgs-card,
[data-theme="light"] .my-org-link {
  color: #111;
}

/* General fallback for any white text in light theme inside main areas */
[data-theme="light"] .page-body,
[data-theme="light"] .main-content,
[data-theme="light"] .form-card,
[data-theme="light"] .card {
  color: #222;
}

[data-theme="light"] .page-body h1,
[data-theme="light"] .page-body h2,
[data-theme="light"] .page-body h3,
[data-theme="light"] .form-card h3 {
  color: #111 !important;
}

/* === ULTIMATE LIGHT THEME TEXT FIX ===
   This block is last so it wins against earlier rules.
   Forces dark legible text for all headers and placeholders in light mode.
*/
[data-theme="light"] {
  --foreground: hsl(0 0% 8%);
  --muted-foreground: hsl(0 0% 30%);
}

[data-theme="light"] body,
[data-theme="light"] .page-body,
[data-theme="light"] .main-content,
[data-theme="light"] .container {
  color: #111;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] .section-title,
[data-theme="light"] .hero h1,
[data-theme="light"] .page-header h1,
[data-theme="light"] .page-header-left h1,
[data-theme="light"] .cta-title,
[data-theme="light"] .form-card h3,
[data-theme="light"] .card h3,
[data-theme="light"] .feature h3,
[data-theme="light"] .login-card h1,
[data-theme="light"] .thankyou h1,
[data-theme="light"] .admin-org-card h3,
[data-theme="light"] .my-orgs-card h3 {
  color: #111 !important;
}

[data-theme="light"] p,
[data-theme="light"] label,
[data-theme="light"] .form-field label,
[data-theme="light"] .page-header p,
[data-theme="light"] .hero .lead,
[data-theme="light"] .feature p,
[data-theme="light"] .org-card p,
[data-theme="light"] .admin-org-card .meta,
[data-theme="light"] .login-card .sub,
[data-theme="light"] .text-muted,
[data-theme="light"] .placeholder-note {
  color: #222 !important;
}

[data-theme="light"] ::placeholder,
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder,
[data-theme="light"] select::placeholder,
[data-theme="light"] .form-control::placeholder,
[data-theme="light"] .org-search input::placeholder {
  color: #666 !important;
  opacity: 1;
}

[data-theme="light"] .form-control,
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] .org-search input {
  color: #111 !important;
  background: #fff !important;
  border-color: #ccc !important;
}

/* Ensure the profile main content headers are dark */
[data-theme="light"] .main-content .section-title,
[data-theme="light"] .profile-layout .section-title {
  color: #111 !important;
}

/* ── Hero video lightbox ───────────────────────────── */
.hero-video-btn svg {
  margin-right: 0.5rem;
}

.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.video-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.video-lightbox-content {
  position: relative;
  width: min(960px, 100%);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.video-lightbox.is-open .video-lightbox-content {
  transform: scale(1);
}

.video-lightbox-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.video-lightbox-close:hover {
  background: rgba(230, 0, 0, 0.85);
}

@media (prefers-reduced-motion: reduce) {
  .video-lightbox,
  .video-lightbox-content {
    transition: none;
  }
}

/* Phone number link in the navbar */
.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  color: #fff !important;
}

.nav-phone svg {
  color: var(--brand-red);
  flex-shrink: 0;
}

.nav-mobile .nav-phone {
  display: inline-flex;
}

/* Helpful links row in the footer */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 1.5rem;
  font-size: 0.875rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: #fff;
}

[data-theme="light"] .footer-links a {
  color: rgba(255, 255, 255, 0.75);
}

[data-theme="light"] .footer-links a:hover {
  color: #fff;
}
