:root {
  --gold: #C9A84C;
  --gold-light: #E8C96A;
  --gold-pale: #F5E9C8;
  --ink: #1A1208;
  --ink-mid: #3D2E10;
  --cream: #FAF6ED;
  --white: #FFFFFF;
  --red: #B83232;
  --success: #2A7A4B;
  --border: rgba(201,168,76,0.3);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 16px;
}

img, video, iframe { max-width: 100%; height: auto; }

.page-wrap { position: relative; z-index: 1; }

/* ── Language Switch ── */
.lang-switch {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px 0;
  font-size: 12px;
  letter-spacing: 1px;
}
.lang-switch a {
  color: var(--ink-mid);
  opacity: .5;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 6px;
}
.lang-switch a.active { opacity: 1; color: var(--gold); }
.lang-switch span { opacity: .3; }

.hero-img {
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(26,18,8,0.15);
  width: 100%;
  max-width: 520px;
}

/* ── Header ── */
header {
  text-align: center;
  padding: 40px 20px 40px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(201,168,76,0.06) 0%, transparent 100%);
}

.ribbon {
  display: inline-block;
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  padding: 6px 20px;
  margin-bottom: 24px;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 16px;
}

header h1 span { color: var(--gold); }

header p {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--ink-mid);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.hero-content { margin-top: 4px; }
.hero-content p {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--ink-mid);
  max-width: 560px;
  margin: 16px auto;
  line-height: 1.6;
}
.hero-content .hero-img { margin: 20px auto; }
.hero-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin: 20px auto 8px;
  max-width: 560px;
}
.hero-content ul { max-width: 560px; margin: 12px auto; text-align: left; color: var(--ink-mid); }

/* ── Total Raised Banner ── */
.price-banner {
  text-align: center;
  padding: 28px 20px;
  background: var(--ink);
  color: var(--gold-light);
}

.price-banner .price-label {
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 4px;
}

.price-banner .price-amount {
  font-family: 'Playfair Display', serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold);
}

.price-banner .price-sub {
  font-size: 13px;
  opacity: 0.6;
  margin-top: 2px;
}

/* ── Main Layout ── */
.main {
  max-width: 680px;
  margin: 50px auto;
  padding: 0 20px 80px;
}

/* ── Alerts ── */
.alert-error {
  background: #FDEEEE;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* ── Form ── */
.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(26,18,8,0.05);
  margin-bottom: 40px;
}

.form-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group.full { margin-bottom: 16px; }

label {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-mid);
}

input[type=text], input[type=email], input[type=tel], input[type=number], textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 2px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; /* keeps iOS Safari from auto-zooming on focus */
  color: var(--ink);
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  resize: vertical;
}

input:focus, textarea:focus {
  border-color: var(--gold);
  background: var(--white);
}

.field-hint {
  font-size: 11px;
  color: var(--ink-mid);
  opacity: 0.55;
}

/* ── Amount Selector ── */
.amount-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.amount-btn {
  padding: 14px 8px;
  border: 2px solid var(--border);
  background: var(--cream);
  color: var(--ink);
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 3px;
  transition: all 0.15s;
}

.amount-btn:hover { border-color: var(--gold); }

.amount-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold);
}

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

/* ── Checkbox ── */
.checkbox-row { margin-top: 4px; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink-mid);
  cursor: pointer;
}

.checkbox-label input[type=checkbox] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

/* ── Order Summary ── */
.order-summary {
  background: var(--ink);
  color: var(--cream);
  border-radius: 2px;
  padding: 20px 24px;
  margin: 24px 0;
}

.order-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 10px;
  opacity: 0.75;
}

.order-row.total {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  opacity: 1;
  color: var(--gold);
  border-top: 1px solid rgba(201,168,76,0.3);
  padding-top: 12px;
  margin-top: 6px;
  margin-bottom: 0;
}

/* ── Payment Buttons ── */
.paypal-btn {
  display: block;
  width: 100%;
  padding: 18px;
  background: #FFC439;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #003087;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 8px;
}

.paypal-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.paypal-btn svg { vertical-align: middle; margin-right: 8px; }

.stripe-btn {
  display: block;
  width: 100%;
  padding: 18px;
  background: #635BFF;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.stripe-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,91,255,0.35); }

.secure-note {
  text-align: center;
  font-size: 11px;
  color: var(--ink-mid);
  opacity: 0.5;
  margin-top: 12px;
  letter-spacing: 0.5px;
}

.error-msg {
  color: var(--red);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.error-msg.show { display: block; }

/* ── Donor Wall ── */
.donor-wall {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 36px 40px;
  margin-bottom: 40px;
  box-shadow: 0 4px 20px rgba(26,18,8,0.05);
}

.empty-note {
  color: var(--ink-mid);
  opacity: 0.6;
  font-size: 0.9rem;
}

.donor-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.donor-row:last-child { border-bottom: none; }

.donor-row-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.donor-name {
  font-weight: 500;
  color: var(--ink);
}

.donor-amount {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--gold);
}

.donor-message {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--ink-mid);
  font-style: italic;
  line-height: 1.5;
}

/* ── Story Feed ── */
.story-feed {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 36px 40px;
  box-shadow: 0 4px 20px rgba(26,18,8,0.05);
}

.story-item {
  margin-bottom: 32px;
}
.story-item:last-child { margin-bottom: 0; }

.story-media {
  width: 100%;
  border-radius: 6px;
  display: block;
  box-shadow: 0 4px 16px rgba(26,18,8,0.08);
}

.story-media-video {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 6px;
  overflow: hidden;
}
.story-media-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.story-caption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--ink-mid);
  line-height: 1.5;
}

.story-date {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-mid);
  opacity: 0.5;
}

/* ── Share Bar ── */
.share-section {
  max-width: 680px;
  margin: 0 auto 40px;
  padding: 0 20px;
  text-align: center;
}

.share-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-mid);
  opacity: 0.6;
  margin-bottom: 16px;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: 3px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
  color: #fff;
}

.share-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.share-btn.facebook  { background: #1877F2; }
.share-btn.x         { background: #000000; }
.share-btn.whatsapp  { background: #25D366; }
.share-btn.email     { background: #6B7280; }
.share-btn.copy      { background: var(--ink); color: var(--gold); }

/* ── Responsive breakpoints ──────────────────────────────────────────────── */

/* Tablet and small laptop */
@media (max-width: 900px) {
  .main { max-width: 92%; }
  .share-section { max-width: 92%; }
}

/* Large phones / small tablets */
@media (max-width: 640px) {
  header { padding: 32px 16px 32px; }
  header h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); }
  header p { font-size: 1rem; padding: 0 4px; }

  .price-banner { padding: 22px 16px; }
  .price-banner .price-amount { font-size: 2.1rem; }

  .main { margin: 32px auto; padding: 0 14px 60px; }
  .share-section { padding: 0 14px; margin-bottom: 28px; }

  .form-row { grid-template-columns: 1fr; gap: 12px; margin-bottom: 0; }
  .form-section, .donor-wall, .story-feed { padding: 22px 18px; }
  .form-title { font-size: 1.2rem; }

  .amount-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .amount-btn { padding: 12px 6px; font-size: 0.95rem; }

  .order-summary { padding: 16px 18px; }

  .donor-row-top { flex-wrap: wrap; gap: 4px; }

  .story-grid, .story-feed .story-item { gap: 10px; }
}

/* Small phones */
@media (max-width: 400px) {
  header h1 { font-size: 1.7rem; }
  .ribbon { font-size: 10px; padding: 5px 14px; letter-spacing: 2px; }
  .price-banner .price-amount { font-size: 1.8rem; }
  .amount-grid { grid-template-columns: repeat(2, 1fr); }
  .share-buttons { gap: 6px; }
  .share-btn { padding: 8px 12px; font-size: 12px; }
  .form-section, .donor-wall, .story-feed { padding: 18px 14px; }
}

/* Landscape phones: tighten vertical padding since height is scarce */
@media (max-height: 480px) and (orientation: landscape) {
  header { padding: 24px 16px; }
  .price-banner { padding: 16px; }
}
