/* ============================================
   L.E.V.E HAITI / S.A.V.E HAITI — SHARED STYLES
   Dual-brand design system
   ============================================ */

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

:root {
  /* L.E.V.E HAITI — Institutional (Deep Blue) */
  --deep-blue: #1B3A5C;
  --deep-blue-dark: #0F2640;
  --deep-blue-darker: #0A1A2E;
  --deep-blue-light: #2A5080;

  /* S.A.V.E HAITI — Campaign (Red) */
  --save-red: #E63946;
  --save-red-light: #FF4D5A;
  --save-red-dark: #C5303C;

  /* Shared Accents */
  --gold: #FFD700;
  --gold-light: #FFE44D;
  --gold-dim: rgba(255, 215, 0, 0.5);
  --white: #FFFFFF;
  --off-white: #F0F4F8;
  --gray: #8E99A4;
  --text: #CBD5E0;
  --light-text: #E2E8F0;

  /* Cards & surfaces */
  --card-bg: linear-gradient(135deg, rgba(27,58,92,0.5), rgba(15,38,64,0.7));
  --card-border: rgba(255,255,255,0.08);
  --surface: rgba(27,58,92,0.3);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--deep-blue-darker);
  color: var(--text);
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--white);
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

/* ============================================
   NAV — L.E.V.E HAITI branding (always blue)
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15,38,64,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand .brand-logo {
  flex-shrink: 0;
}

.nav-brand .brand-leve {
  color: var(--white);
  letter-spacing: 2px;
}

.nav-brand .brand-haiti {
  color: var(--gold);
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray);
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links .btn-nav {
  background: var(--save-red);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.2s;
}

.nav-links .btn-nav:hover {
  background: var(--save-red-light);
  color: var(--white);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15,38,64,0.98);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.open { display: flex; }
}

/* ============================================
   PAGE LAYOUT
   ============================================ */
.page {
  padding-top: 80px;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-header {
  padding: 48px 0 32px;
}

.page-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: 12px;
}

.page-header h1 .accent { color: var(--gold); }

.page-header p {
  font-size: 17px;
  color: var(--gray);
  max-width: 600px;
  line-height: 1.6;
}

/* ============================================
   S.A.V.E HAITI BANNER (donation/project pages)
   ============================================ */
.save-banner {
  background: linear-gradient(135deg, var(--save-red), var(--save-red-dark));
  padding: 14px 24px;
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 99;
}

.save-banner .brand-prefix {
  opacity: 0.85;
  font-weight: 400;
}

.save-banner .brand-save {
  letter-spacing: 2px;
  font-weight: 700;
}

.save-banner .brand-action {
  color: var(--gold);
  font-weight: 700;
}

.page.with-banner {
  padding-top: 120px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 32px;
  transition: border-color 0.3s, transform 0.2s;
}

.card:hover {
  border-color: rgba(255,215,0,0.2);
  transform: translateY(-2px);
}

/* ============================================
   GRID
   ============================================ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

/* ============================================
   PROGRESS BAR
   ============================================ */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.progress-fill.gold { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.progress-fill.blue { background: linear-gradient(90deg, var(--deep-blue-light), #4A8EC8); }
.progress-fill.red { background: linear-gradient(90deg, var(--save-red), var(--save-red-light)); }

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 4px;
}

.badge-school { background: rgba(255,215,0,0.15); color: var(--gold); }
.badge-clinic { background: rgba(230,57,70,0.15); color: var(--save-red); }
.badge-water { background: rgba(27,58,92,0.3); color: #6BA3D6; }
.badge-business { background: rgba(142,153,164,0.15); color: var(--gray); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--save-red);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--save-red-light);
  color: var(--white);
}

.btn-institutional {
  background: var(--deep-blue);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.15);
}

.btn-institutional:hover {
  background: var(--deep-blue-light);
}

.btn-gold {
  background: var(--gold);
  color: var(--deep-blue-darker);
}

.btn-gold:hover {
  background: var(--gold-light);
  color: var(--deep-blue-darker);
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.12);
}

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

.btn-lg {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: 12px;
}

/* ============================================
   STATS ROW
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

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

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
}

.stat-value.gold { color: var(--gold); }
.stat-value.blue { color: #6BA3D6; }
.stat-value.red { color: var(--save-red); }

.stat-label {
  font-size: 13px;
  color: var(--gray);
  margin-top: 4px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--save-red);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(142,153,164,0.5);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* CHECKBOX */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--save-red);
}

.checkbox-group span {
  font-size: 14px;
  color: var(--gray);
}

/* AMOUNT SELECTOR */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.amount-btn {
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.amount-btn:hover,
.amount-btn.selected {
  border-color: var(--save-red);
  background: rgba(230,57,70,0.12);
  color: var(--save-red);
}

@media (max-width: 500px) {
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   TABLE
   ============================================ */
.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gray);
  text-align: left;
  padding: 14px 16px;
  background: rgba(27,58,92,0.4);
  border-bottom: 1px solid var(--card-border);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.08);
}

.timeline-item {
  position: relative;
  margin-bottom: 28px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--deep-blue-darker);
}

.timeline-date {
  font-size: 12px;
  color: var(--gray);
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.timeline-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 6px;
}

.timeline-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray);
}

/* ============================================
   PIE CHART
   ============================================ */
.pie-chart {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  position: relative;
  margin: 0 auto;
}

.pie-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray);
}

.pie-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

/* ============================================
   DONATION WALL
   ============================================ */
.donation-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.donation-item:last-child { border-bottom: none; }

.donation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}

.donation-avatar.gold { background: rgba(255,215,0,0.15); color: var(--gold); }
.donation-avatar.blue { background: rgba(27,58,92,0.3); color: #6BA3D6; }
.donation-avatar.anon { background: rgba(142,153,164,0.1); color: var(--gray); }
.donation-avatar.red { background: rgba(230,57,70,0.15); color: var(--save-red); }

.donation-info { flex: 1; }

.donation-name {
  font-weight: 600;
  color: var(--white);
  font-size: 14px;
}

.donation-amount {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--gold);
  font-size: 14px;
  margin-left: 8px;
}

.donation-message {
  font-size: 13px;
  color: var(--gray);
  margin-top: 4px;
  font-style: italic;
}

.donation-date {
  font-size: 12px;
  color: rgba(142,153,164,0.6);
  margin-top: 4px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--deep-blue-dark);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 36px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--gray);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.modal-close:hover { color: var(--white); }

.modal h2 {
  font-size: 24px;
  margin-bottom: 8px;
}

.modal .subtitle {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 28px;
}

/* ============================================
   SUCCESS STATE
   ============================================ */
.success-message {
  text-align: center;
  padding: 32px 0;
}

.success-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.success-message h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.success-message p {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.6;
}

/* ============================================
   SECTION DIVIDER
   ============================================ */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.15), transparent);
  margin: 40px 0;
}

/* SECTION TITLE */
.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title .icon {
  font-size: 20px;
}

/* ============================================
   FLAG STRIPE (Haiti: blue & red)
   ============================================ */
.flag-stripe {
  height: 4px;
  background: linear-gradient(90deg, var(--deep-blue) 50%, var(--save-red) 50%);
}

/* ============================================
   FOOTER — Dual brand
   ============================================ */
.footer {
  padding: 48px 24px 32px;
  text-align: center;
  background: rgba(10,26,46,0.5);
}

.footer-brands {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-leve {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
}

.footer-save {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--save-red);
  letter-spacing: 2px;
}

.footer-divider-dot {
  width: 4px;
  height: 4px;
  background: var(--gold);
  border-radius: 50%;
}

.footer-tagline {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 8px;
}

.footer-combined {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-dim);
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.footer-creole {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255,215,0,0.3);
}

/* Legacy footer support */
.footer-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
}

/* ============================================
   LOADING
   ============================================ */
.loading {
  text-align: center;
  padding: 60px 0;
  color: var(--gray);
}

.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UTILITY
   ============================================ */
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-gold { color: var(--gold); }
.text-red { color: var(--save-red); }
.text-gray { color: var(--gray); }
.text-sm { font-size: 13px; }
.text-center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
