/*
 * base.css — shared reset, theme tokens, and widget component styles for all
 * FaithfullyGiving church-site templates. Each template sets the --fg-* tokens
 * (usually pulled from the church's ThemeSettings) and layers its own styles.css.
 */

:root {
  --fg-primary: #2f855a;
  --fg-secondary: #22543d;
  --fg-accent: #38a169;
  --fg-ink: #1f2421;
  --fg-muted: #6b7280;
  --fg-bg: #ffffff;
  --fg-surface: #f7f8f7;
  --fg-border: rgba(0, 0, 0, 0.08);
  --fg-radius: 12px;
  --fg-maxw: 1120px;
  --fg-font: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fg-font-head: var(--fg-font);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fg-font);
  color: var(--fg-ink);
  background: var(--fg-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--fg-primary); }
h1, h2, h3 { font-family: var(--fg-font-head); line-height: 1.2; }

.fg-container { max-width: var(--fg-maxw); margin: 0 auto; padding: 0 20px; }
.fg-section { padding: 64px 0; }
.fg-section--tint { background: var(--fg-surface); }
.fg-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--fg-accent); margin: 0 0 8px; }
.fg-h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 24px; }
.fg-lead { font-size: 1.125rem; color: var(--fg-muted); max-width: 60ch; }

.fg-btn {
  display: inline-block; padding: 12px 24px; border-radius: 999px;
  background: var(--fg-primary); color: #fff; text-decoration: none; font-weight: 600;
  border: 0; cursor: pointer; transition: transform .12s ease, filter .12s ease;
}
.fg-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.fg-btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.75); }
.fg-btn--give { background: var(--fg-accent); }

.fg-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* Cards (events / sermons / news) */
.fg-card { background: var(--fg-bg); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); overflow: hidden; display: flex; flex-direction: column; }
.fg-card__img { width: 100%; height: 170px; object-fit: cover; }
.fg-card__body { padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.fg-card__title { font-size: 1.12rem; margin: 2px 0; }
.fg-card__text { color: var(--fg-muted); margin: 0; font-size: .95rem; }
.fg-event__date, .fg-sermon__meta, .fg-news__date { color: var(--fg-accent); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.fg-event__loc { color: var(--fg-muted); font-size: .9rem; }
.fg-media { width: 100%; margin-top: 8px; }

/* Staff */
.fg-staff { margin: 0; text-align: center; }
.fg-staff__img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; }
.fg-staff__placeholder { display: grid; place-items: center; background: var(--fg-surface); color: var(--fg-primary); font-size: 2rem; font-weight: 700; }
.fg-staff__name { font-weight: 700; }
.fg-staff__title { color: var(--fg-muted); font-size: .9rem; }

/* Service times */
.fg-service { padding: 14px 0; border-bottom: 1px solid var(--fg-border); }
.fg-service:last-child { border-bottom: 0; }
.fg-service__name { font-weight: 700; }
.fg-service__when { color: var(--fg-accent); font-weight: 600; }
.fg-service__desc { color: var(--fg-muted); font-size: .92rem; }

[data-fg][hidden] { display: none !important; }

@media (max-width: 640px) {
  .fg-section { padding: 44px 0; }
}
