/* ============================================================
   OPTION C — "Gentle Storytelling"
   A beautifully designed Medium article.
   Single-column, story-first, sage green accents, immersive.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  --bg: #FAFBFC;
  --bg-warm: #F5F7F4;
  --white: #FFFFFF;
  --sage: #5B8A72;
  --sage-deep: #4A7560;
  --sage-light: #E8F0EB;
  --sage-muted: #8BAF9E;
  --text-primary: #1A1A2E;
  --text-body: #2D2D3F;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border: #E5E7EB;
  --border-light: #F0F1F3;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', 'Segoe UI', sans-serif;
  --radius: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
}

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

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --- Scroll animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==================== Header ==================== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.875rem 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}

.header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.logo {
  height: 38px;
  width: auto;
}

/* ==================== Hero Section ==================== */
.hero-title {
  background: transparent;
  padding: 3rem 0 2rem;
  text-align: center;
  border-bottom: none;
}

.category-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 1.25rem;
}

.hero-title h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-inline-image {
  display: block;
  width: 100%;
  max-width: 600px;
  height: auto;
  margin: 1.5rem auto;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto;
  font-weight: 400;
}

/* ==================== Floating Stats Card ==================== */
.floating-card {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  pointer-events: none;
  width: 100%;
  max-width: 720px;
  padding: 0 1.5rem;
}

.floating-card-inner {
  pointer-events: auto;
}

.floating-card-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.floating-stats {
  flex: 1;
  min-width: 0;
}

.floating-stats-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.floating-stats-raised {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-primary);
}

.floating-stats-goal {
  font-size: 0.78rem;
  color: var(--text-light);
}

.floating-stats .progress-bar {
  height: 6px;
  background: var(--sage-light);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.35rem;
  width: 100%;
}

.floating-stats .progress-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 999px;
  transition: width 1.5s ease-in-out;
}

.floating-stats-supporters {
  font-size: 0.72rem;
  color: var(--text-light);
}

.floating-cta {
  flex-shrink: 0;
}

.floating-cta .btn-donate {
  width: auto;
  padding: 0.75rem 1.5rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ==================== Main Content — Single column ==================== */
.main-content {
  padding: 0;
  background: var(--bg);
}

.content-grid {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-column {
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

/* ==================== Hero Image ==================== */
.hero-image-container {
  width: 100%;
  overflow: hidden;
  margin-bottom: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
}

/* ==================== Hearts Counter ==================== */
.hearts-counter {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hearts-counter-number {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--sage);
}

.hearts-counter-dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-light);
  vertical-align: middle;
  margin: 0 0.35rem;
}

.hearts-counter-label {
  color: var(--text-muted);
}

.hearts-counter-date {
  color: var(--text-light);
  font-size: 0.82rem;
}

/* ==================== Tabs ==================== */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0;
  margin-bottom: 0.5rem;
}

.tab-button {
  padding: 1rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.tab-button:hover { color: var(--text-primary); }

.tab-button.active {
  color: var(--sage);
  border-bottom-color: var(--sage);
}

/* ==================== Tab Content ==================== */
.tab-content {
  display: none;
  padding: 0;
}

.tab-content.active {
  display: block;
}

/* ==================== Campaign Info ==================== */
.campaign-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

.campaign-date {
  font-size: 0.82rem;
  color: var(--text-light);
}

/* ==================== Story Content ==================== */
.story-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 3rem 0 1rem;
  line-height: 1.25;
}

.story-content h2:first-child {
  margin-top: 0;
}

.story-content p {
  margin-bottom: 1.1rem;
  line-height: 1.85;
  color: var(--text-body);
  font-size: 1.05rem;
  font-weight: 400;
}

.story-content .callout {
  background: var(--sage-light);
  padding: 2rem 2rem 2rem 2.25rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--sage);
  margin: 2.5rem 0;
  position: relative;
}

.story-content .callout p {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--sage-deep);
  line-height: 1.5;
  margin-bottom: 0;
}

.story-image {
  margin: 2.5rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.story-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==================== Book Interlude ==================== */
.book-interlude {
  margin: 3rem 0;
  padding: 2.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: flex;
  gap: 2rem;
  align-items: center;
}

.book-interlude-cover {
  flex-shrink: 0;
  width: 150px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
}

.book-interlude-cover img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.book-interlude-text h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.book-interlude-text p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.book-interlude-text .btn-donate {
  width: auto;
  padding: 0.875rem 2rem;
  font-size: 0.9rem;
}

/* ==================== Comments Section ==================== */
.comments-section {
  padding: 0;
  margin-top: 3rem;
}

.comments-count {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.comment {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
}

.comment:last-of-type { border-bottom: none; }

.comment-content { flex: 1; }

.comment-author {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
  font-size: 0.9rem;
}

.comment-text {
  color: var(--text-body);
  margin-bottom: 0.5rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-light);
}

.comment-meta span { cursor: pointer; }
.comment-meta span:hover { text-decoration: underline; }

.comment-reactions {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
  padding: 0.15rem 0.4rem;
  background: var(--bg-warm);
  border-radius: 10px;
  font-size: 0.72rem;
  flex-shrink: 0;
}

.reaction-icon { width: 14px; height: 14px; color: var(--sage-muted); }
.reaction-count { font-size: 0.72rem; color: var(--text-light); margin-left: 0.25rem; }

/* ==================== Final Impact ==================== */
.final-impact {
  margin-top: 3rem;
  padding: 3rem 2rem;
  background: var(--sage-light);
  border-radius: var(--radius);
  text-align: center;
}

.final-impact p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 1.5rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.final-impact .btn-donate {
  max-width: 360px;
  margin: 0 auto;
}

/* ==================== Buttons ==================== */
.btn-donate,
.cta-btn,
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--sage);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.25px;
  box-shadow: 0 2px 8px rgba(91, 138, 114, 0.2);
}

.btn-donate:hover,
.cta-btn:hover,
.cta-button:hover {
  background: var(--sage-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(91, 138, 114, 0.3);
}

.btn-donate:active,
.cta-btn:active,
.cta-button:active {
  transform: translateY(0);
}

.btn-donate-large {
  font-size: 1rem;
  padding: 1.1rem;
}

/* ==================== Sidebar (hidden — content absorbed elsewhere) ==================== */
.sidebar {
  display: none;
}

.sidebar-sticky { position: sticky; top: 1rem; }

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
}

/* We still need these for the card if it were visible */
.campaign-stats { margin-bottom: 1.5rem; }
.stats-label { font-size: 0.78rem; color: var(--text-light); margin-bottom: 0.25rem; }
.stats-value { font-family: var(--font-display); font-size: 1.75rem; color: var(--sage); margin-bottom: 0.25rem; }
.stats-meta { font-size: 0.82rem; color: var(--text-light); margin-bottom: 1rem; }

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--sage-light);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-fill {
  height: 100%;
  background: var(--sage);
  border-radius: 999px;
  transition: width 1.5s ease-in-out;
}

.stats-row { display: flex; gap: 1rem; margin-bottom: 1rem; }
.stat-item { text-align: center; }
.stat-number { font-family: var(--font-display); font-size: 1.25rem; color: var(--text-primary); }
.stat-label-small { font-size: 0.72rem; color: var(--text-light); }

.security-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  background: var(--sage-light);
  border-radius: 12px;
  border: 1px solid rgba(91, 138, 114, 0.15);
  margin-top: 1rem;
}

.security-icon { width: 22px; height: 22px; color: var(--sage); flex-shrink: 0; }
.security-title { font-size: 0.78rem; font-weight: 600; color: var(--text-primary); margin-bottom: 0.125rem; }
.security-desc { font-size: 0.72rem; color: var(--text-muted); }

/* ==================== Footer ==================== */
.footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  color: var(--text-body);
  padding: 2rem 0 5rem;
  text-align: center;
  margin-top: 4rem;
}

.footer-text { font-size: 0.78rem; margin-bottom: 0.5rem; color: var(--text-light); }
.footer-links { font-size: 0.72rem; color: var(--text-light); }

/* ==================== Sticky Footer Mobile ==================== */
.sticky-footer-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  padding: 0.75rem 1rem;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.06);
  z-index: 100;
  display: none;
  border-top: 1px solid var(--border);
}

.mobile-stats { margin-bottom: 0.5rem; }

.mobile-progress {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.375rem;
}

.mobile-value {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--sage);
}

.mobile-meta { font-size: 0.78rem; color: var(--text-light); }

.sticky-footer-mobile .progress-bar {
  height: 5px;
  margin-bottom: 0.5rem;
}

.btn-donate-mobile {
  width: 100%;
  font-size: 0.95rem;
  padding: 0.875rem;
}

/* ==================== Modals ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0);
  transition: background 0.3s ease;
  backdrop-filter: blur(0px);
}

.modal-overlay.show .modal-backdrop {
  background: rgba(26, 26, 46, 0.5);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 32rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.95) translateY(10px);
  opacity: 0;
  transition: all 0.35s ease;
  z-index: 10000;
}

.modal-overlay.show .modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: all 0.2s;
  z-index: 10001;
  padding: 0;
}

.modal-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.modal-header { text-align: center; margin-bottom: 1.5rem; }

.modal-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--sage);
  margin-bottom: 0.5rem;
}

.modal-title.blink {
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.modal-subtitle { font-size: 0.8rem; color: var(--text-light); }

.modal-amount {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

.modal-qrcode {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  min-height: 220px;
}

.modal-qrcode svg,
.modal-qrcode img { max-width: 200px; height: auto; }

.modal-input-group { margin-bottom: 0.875rem; }

.modal-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 0.375rem;
}

.modal-input {
  width: 100%;
  padding: 0.75rem;
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-body);
}

.modal-input:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--white);
}

.modal-btn-copy {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--sage);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.875rem;
}

.modal-btn-copy:hover { background: var(--sage-deep); }

.modal-timer-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem;
  background: var(--bg);
  border-radius: 10px;
  margin-bottom: 1.25rem;
}

.timer-label { font-size: 0.78rem; color: var(--text-light); }

.timer-value {
  font-family: 'Courier New', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-success {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem;
  background: var(--sage-light);
  border: 1px solid rgba(91, 138, 114, 0.2);
  border-radius: 10px;
}

.success-title { font-size: 0.85rem; font-weight: 700; color: var(--text-primary); }
.success-text { font-size: 0.78rem; color: var(--text-muted); }

.hidden { display: none !important; }

/* ==================== Donation Modal ==================== */
.modal-donation-content { max-width: 520px; }

.donation-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-top: 0.5rem;
}

.donation-modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.donation-modal-book {
  display: block;
  width: 120px;
  height: auto;
  margin: 1rem auto;
  border-radius: 4px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.12));
}

.donation-modal-subtitle { font-size: 0.85rem; color: var(--text-light); }

.donation-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}

.donation-amount-grid .donation-btn {
  padding: 1rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-body);
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s;
}

.donation-amount-grid .donation-btn:hover {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(91, 138, 114, 0.25);
}

.donation-amount-grid .donation-btn.popular {
  border-color: var(--sage);
  background: var(--sage-light);
  color: var(--sage-deep);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  html { font-size: 17px; }

  .hero-title {
    padding: 1.5rem 0 1.5rem;
  }

  .hero-title h1 { font-size: 1.75rem; }

  .floating-card { top: 60px; }

  .floating-card-content {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .floating-cta { width: 100%; }
  .floating-cta .btn-donate { width: 100%; }

  .story-image {
    margin: 2rem 0;
  }

  .book-interlude {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .book-interlude-cover { width: 130px; }

  .content-grid {
    padding: 0 1rem;
  }

  .sticky-footer-mobile { display: block; }
  body { padding-bottom: 120px; }

  .floating-card { display: none; }

  .modal-content {
    padding: 1.25rem;
    border-radius: 14px;
  }

  .modal-amount { font-size: 1.75rem; }

  .sidebar { display: none; }
}

@media (max-width: 480px) {
  html { font-size: 16px; }

  .container, .container-wide { padding: 0 1rem; }
  .header-content { padding: 0 1rem; }

  .hero-title h1 { font-size: 1.5rem; }
  .subtitle { font-size: 0.95rem; }

  .story-content h2 { font-size: 1.35rem; }

  .donation-amount-grid { grid-template-columns: repeat(2, 1fr); }
  .donation-modal-title { font-size: 1.25rem; }

  .book-interlude-cover { width: 120px; }
}
