/* FundHub Public Styles */
:root {
  --fh-ink:    #1a1a2e;
  --fh-moss:   #2d6a4f;
  --fh-sage:   #52b788;
  --fh-cream:  #faf7f2;
  --fh-warm:   #f4a261;
  --fh-muted:  #6b7280;
  --fh-border: #e8e0d5;
}

/* ── Campaign Grid ───────────────────────────────────────── */
.fh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.fh-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  transition: transform .25s, box-shadow .25s;
  text-decoration: none;
  color: var(--fh-ink);
  display: flex;
  flex-direction: column;
}
.fh-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.14); }
.fh-card-img { width: 100%; height: 190px; object-fit: cover; background: linear-gradient(135deg, var(--fh-moss), var(--fh-sage)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 3rem; }
.fh-card-body { padding: 1.25rem; flex: 1; }
.fh-card-category { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--fh-sage); margin-bottom: .3rem; }
.fh-card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: .4rem; line-height: 1.3; }
.fh-card-desc { color: var(--fh-muted); font-size: .875rem; line-height: 1.5; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fh-progress-bar { background: var(--fh-border); border-radius: 99px; height: 8px; overflow: hidden; margin-bottom: .4rem; }
.fh-progress-fill { background: linear-gradient(90deg, var(--fh-sage), var(--fh-moss)); height: 100%; border-radius: 99px; transition: width .6s ease; }
.fh-progress-meta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--fh-muted); }
.fh-card-footer { display: flex; align-items: center; justify-content: space-between; padding: .75rem 1.25rem 1.25rem; border-top: 1px solid var(--fh-border); }
.fh-days-left { font-size: .8rem; font-weight: 700; color: var(--fh-warm); }

/* ── Single Campaign ─────────────────────────────────────── */
.fh-single { display: grid; grid-template-columns: 1fr 360px; gap: 2.5rem; align-items: start; margin: 2rem 0; }
.fh-campaign-img { width: 100%; border-radius: 12px; max-height: 400px; object-fit: cover; margin-bottom: 1.5rem; }
.fh-campaign-title { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.fh-meta { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.fh-badge { display: inline-block; padding: .25rem .75rem; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.fh-badge-cat  { background: var(--fh-sage); color: #fff; }
.fh-badge-days { background: var(--fh-warm); color: #fff; }
.fh-story { line-height: 1.8; color: #374151; white-space: pre-line; }
.fh-organizer { margin-top: 1.5rem; padding: 1rem; background: #fff; border-radius: 10px; border: 1px solid var(--fh-border); display: flex; align-items: center; gap: .75rem; }
.fh-organizer-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--fh-moss), var(--fh-sage)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.fh-recent-donors { margin-top: 2rem; }
.fh-donor-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--fh-border); }
.fh-donor-avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--fh-moss), var(--fh-sage)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.fh-donor-amount { font-weight: 700; color: var(--fh-moss); margin-left: auto; }

/* ── Sidebar / Donate Widget ─────────────────────────────── */
.fh-sidebar-card { background: #fff; border-radius: 14px; padding: 1.75rem; box-shadow: 0 2px 20px rgba(0,0,0,.1); position: sticky; top: 2rem; }
.fh-raised-amount { font-size: 2rem; font-weight: 700; color: var(--fh-moss); }
.fh-goal-text { color: var(--fh-muted); font-size: .875rem; }
.fh-stats-row { display: flex; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--fh-border); border-bottom: 1px solid var(--fh-border); margin: .75rem 0; }
.fh-mini-stat { text-align: center; flex: 1; }
.fh-mini-stat strong { display: block; font-size: 1.2rem; font-weight: 700; }
.fh-mini-stat span { font-size: .72rem; color: var(--fh-muted); }

/* Donate form */
.fh-donate-widget h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .75rem; }
.fh-amount-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-bottom: .6rem; }
.fh-amount-btn { padding: .55rem .4rem; border: 2px solid var(--fh-border); border-radius: 8px; background: #fff; cursor: pointer; font-size: .9rem; font-weight: 700; transition: all .15s; font-family: inherit; }
.fh-amount-btn:hover, .fh-amount-btn.active { border-color: var(--fh-sage); background: var(--fh-sage); color: #fff; }
.fh-custom-input, .fh-donor-input {
  width: 100%; padding: .65rem .9rem; border: 2px solid var(--fh-border);
  border-radius: 8px; font-family: inherit; font-size: .9rem;
  margin-bottom: .6rem; box-sizing: border-box;
}
.fh-custom-input:focus, .fh-donor-input:focus { outline: none; border-color: var(--fh-sage); }
.fh-recur-toggle { display: flex; gap: .4rem; margin-bottom: .75rem; }
.fh-recur-btn { flex: 1; padding: .5rem; border: 2px solid var(--fh-border); border-radius: 8px; background: #fff; cursor: pointer; font-family: inherit; font-size: .82rem; font-weight: 700; transition: all .15s; }
.fh-recur-btn.active { border-color: var(--fh-sage); background: var(--fh-sage); color: #fff; }
#fh-card-element { padding: .7rem .9rem; border: 2px solid var(--fh-border); border-radius: 8px; margin-bottom: .6rem; }
#fh-card-element.focused { border-color: var(--fh-sage); }
.fh-donate-btn { width: 100%; padding: .8rem; background: var(--fh-sage); color: #fff; border: none; border-radius: 8px; font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all .2s; }
.fh-donate-btn:hover:not(:disabled) { background: var(--fh-moss); }
.fh-donate-btn:disabled { opacity: .6; cursor: not-allowed; }
#fh-pay-error { color: #ef4444; font-size: .82rem; margin-top: .4rem; min-height: 1.2em; }
#fh-pay-success { background: #d1fae5; color: var(--fh-moss); border-radius: 8px; padding: 1rem; text-align: center; font-weight: 700; display: none; margin-top: .5rem; }
.fh-secure-note { font-size: .72rem; color: var(--fh-muted); text-align: center; margin-top: .4rem; }

/* ── Stats bar ───────────────────────────────────────────── */
.fundhub-stats-bar { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; background: var(--fh-moss); border-radius: 12px; padding: 1.25rem; margin: 1rem 0; }
.fundhub-stat { text-align: center; color: #fff; }
.fundhub-stat strong { display: block; font-size: 1.8rem; font-weight: 700; }
.fundhub-stat span { font-size: .75rem; opacity: .8; text-transform: uppercase; letter-spacing: 1px; }

/* ── Submit Form ─────────────────────────────────────────── */
.fh-form-wrap { max-width: 680px; margin: 0 auto; }
.fh-form-group { margin-bottom: 1.25rem; }
.fh-form-group label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: .35rem; }
.fh-form-group input, .fh-form-group textarea, .fh-form-group select {
  width: 100%; padding: .7rem 1rem; border: 2px solid var(--fh-border);
  border-radius: 8px; font-family: inherit; font-size: .9rem; box-sizing: border-box;
}
.fh-form-group input:focus, .fh-form-group textarea:focus, .fh-form-group select:focus { outline: none; border-color: var(--fh-sage); }
.fh-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.fh-submit-btn { padding: .75rem 2rem; background: var(--fh-sage); color: #fff; border: none; border-radius: 8px; font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; transition: all .2s; width: 100%; }
.fh-submit-btn:hover:not(:disabled) { background: var(--fh-moss); }
#fh-submit-error { color: #ef4444; font-size: .85rem; margin-bottom: .5rem; }
#fh-submit-success { background: #d1fae5; color: var(--fh-moss); border-radius: 10px; padding: 2rem; text-align: center; display: none; }
.fh-hint { font-size: .75rem; color: var(--fh-muted); margin-top: .25rem; }
.fh-error { color: var(--fh-muted); padding: 1rem; font-style: italic; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .fh-single { grid-template-columns: 1fr; }
  .fh-sidebar-card { position: static; }
  .fh-form-row { grid-template-columns: 1fr; }
}
