/* =====================================================================
   GoodWorks — Community Support Board (public)
   Scoped under .gw-needs. Uses the shared .container margins (blended with
   the homepage) and the blue hero / card language of the directories.
   ===================================================================== */

.gw-needs {
  --n-ink:     #0f172a;
  --n-muted:   #64748b;
  --n-line:    #e7eaf3;
  --n-brand:   #1d4ed8;
  --n-brand-dk:#1739a8;
  --n-surface: #ffffff;
  --n-bg:      #f5f7fb;
  --n-green:   #16a34a;
  --n-green-bg:#e3f7ec;
  --n-amber:   #b4690e;
  --n-amber-bg:#fdeccb;
  --n-red:     #c0344a;
  --n-red-bg:  #fde2e6;
  background: var(--n-bg);
  padding: 30px 0 60px;
  font-family: var(--font-sans, 'Inter', system-ui, sans-serif);
  color: var(--n-ink);
}

/* ------------------------------------------------------------- Hero */
.gw-needs__hero {
  position: relative; overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(120deg, #1d4ed8 0%, #2f53e0 50%, #4f74f0 100%);
  color: #fff;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; align-items: center;
  padding: 48px 52px;
  box-shadow: 0 20px 44px rgba(29,78,216,.26);
  margin-bottom: 30px;
}
.gw-needs__hero-title { font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; margin: 0 0 14px; }
.gw-needs__hero-sub { font-size: 1rem; line-height: 1.6; color: rgba(255,255,255,.92); max-width: 32rem; margin: 0 0 24px; }
.gw-needs__hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.gw-needs__btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 24px; border-radius: 12px; font-weight: 700; font-size: .92rem;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .15s ease, color .15s ease, transform .15s ease, border-color .15s ease;
}
.gw-needs__btn--white { background: #fff; color: var(--n-brand); }
.gw-needs__btn--white:hover { transform: translateY(-1px); color: var(--n-brand-dk); }
.gw-needs__btn--ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.4); }
.gw-needs__btn--ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.gw-needs__btn--solid { background: var(--n-brand); color: #fff; }
.gw-needs__btn--solid:hover { background: var(--n-brand-dk); color: #fff; }

.gw-needs__hero-media { display: flex; justify-content: flex-end; }
.gw-needs__hero-media img {
  width: 100%; max-width: 380px; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 16px; box-shadow: 0 18px 40px rgba(0,0,0,.25);
}

/* ------------------------------------------------------------- Filter bar */
.gw-needs__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; margin-bottom: 24px;
}
.gw-needs__chips { display: flex; flex-wrap: wrap; gap: 10px; }
.gw-needs__chip {
  padding: 9px 18px; border-radius: 99px; font-size: .86rem; font-weight: 700;
  text-decoration: none; background: var(--n-surface); color: var(--n-ink);
  border: 1px solid var(--n-line); transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.gw-needs__chip:hover { border-color: var(--n-brand); color: var(--n-brand); }
.gw-needs__chip.is-active { background: var(--n-brand); color: #fff; border-color: var(--n-brand); }

.gw-needs__counts { display: flex; gap: 18px; background: var(--n-surface); border: 1px solid var(--n-line); border-radius: 99px; padding: 9px 18px; }
.gw-needs__counts span { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600; color: var(--n-muted); }
.gw-needs__dot { width: 9px; height: 9px; border-radius: 50%; }
.gw-needs__dot.is-green { background: var(--n-green); }
.gw-needs__dot.is-amber { background: #f59e0b; }

/* ------------------------------------------------------------- Grid */
.gw-needs__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  grid-auto-flow: row dense;
}

.gw-needs__card {
  background: var(--n-surface);
  border: 1px solid var(--n-line);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.gw-needs__card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(15,23,42,.1); border-color: #d6def6; }
.gw-needs__card-inner { padding: 20px; display: flex; flex-direction: column; gap: 12px; height: 100%; }

/* Urgent cards span two columns with a side image. */
.gw-needs__card.is-urgent { grid-column: span 2; display: grid; grid-template-columns: 1fr 220px; }
.gw-needs__card.is-urgent .gw-needs__card-img { height: 100%; }
.gw-needs__card-img { overflow: hidden; }
.gw-needs__card-img img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 180px; }

.gw-needs__card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gw-needs__status { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; padding: 5px 11px; border-radius: 99px; }
.gw-needs__status .dashicons { font-size: 14px; width: 14px; height: 14px; }
.gw-needs__status.s-verified { background: var(--n-green-bg); color: var(--n-green); }
.gw-needs__status.s-pending  { background: var(--n-amber-bg); color: var(--n-amber); }
.gw-needs__time { font-size: .8rem; color: var(--n-muted); }
.gw-needs__urgent { font-size: .76rem; font-weight: 800; color: var(--n-red); }

.gw-needs__card-title { font-size: 1.12rem; font-weight: 700; margin: 0; line-height: 1.3; }
.gw-needs__card-title a { color: var(--n-brand); text-decoration: none; }
.gw-needs__card-title a:hover { text-decoration: underline; }
.gw-needs__card-excerpt { font-size: .88rem; color: #475569; line-height: 1.55; margin: 0; }

.gw-needs__card-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.gw-needs__card-meta span { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--n-muted); }
.gw-needs__card-meta .dashicons { font-size: 15px; width: 15px; height: 15px; }

.gw-needs__card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--n-line);
}
.gw-needs__submitter { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: var(--n-muted); min-width: 0; }
.gw-needs__submitter-ic { font-size: 17px !important; width: 24px; height: 24px; border-radius: 50%; background: #eef2fb; color: var(--n-brand); display: grid; place-items: center; }
.gw-needs__action { font-size: .85rem; font-weight: 700; color: var(--n-brand); text-decoration: none; white-space: nowrap; }
.gw-needs__action:hover { color: var(--n-brand-dk); text-decoration: underline; }

/* ------------------------------------------------------------- Load more */
.gw-needs__more { text-align: center; margin-top: 32px; }
.gw-needs__more-btn {
  display: inline-block; padding: 12px 28px; border-radius: 12px;
  background: var(--n-surface); border: 1px solid var(--n-line); color: var(--n-ink);
  font-weight: 700; font-size: .9rem; text-decoration: none;
  transition: border-color .15s ease, color .15s ease;
}
.gw-needs__more-btn:hover { border-color: var(--n-brand); color: var(--n-brand); }
.gw-needs__more-count { font-size: .84rem; color: var(--n-muted); margin: 14px 0 0; }

/* ------------------------------------------------------------- Empty */
.gw-needs__empty { background: var(--n-surface); border: 1px dashed var(--n-line); border-radius: 16px; padding: 56px 24px; text-align: center; }
.gw-needs__empty .dashicons { font-size: 42px; width: 42px; height: 42px; color: var(--n-brand); opacity: .55; }
.gw-needs__empty h3 { font-size: 1.25rem; font-weight: 700; margin: 14px 0 6px; }
.gw-needs__empty p { color: var(--n-muted); margin: 0 auto 20px; max-width: 28rem; }

/* ------------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
  .gw-needs__grid { grid-template-columns: repeat(2, 1fr); }
  .gw-needs__card.is-urgent { grid-column: span 2; }
}
@media (max-width: 860px) {
  .gw-needs__hero { grid-template-columns: 1fr; padding: 36px 30px; }
  .gw-needs__hero-media { display: none; }
  .gw-needs__hero-title { font-size: 1.9rem; }
}
@media (max-width: 680px) {
  .gw-needs__grid { grid-template-columns: 1fr; }
  .gw-needs__card.is-urgent { grid-column: span 1; grid-template-columns: 1fr; }
  .gw-needs__card.is-urgent .gw-needs__card-img { order: -1; }
  .gw-needs__card-img img { min-height: 160px; }
  .gw-needs__bar { flex-direction: column; align-items: flex-start; }
}

/* ── Gold-forward overrides: yellow replaces blue ─────────────────── */
.gw-needs { --n-brand: var(--gw-gold, #f6c500); --n-brand-dk: var(--gw-gold-deep, #d9ab00); }
.gw-needs__hero {
  background: linear-gradient(120deg, var(--gw-gold, #f6c500) 0%, #ffcf1f 50%, var(--gw-gold-deep, #d9ab00) 100%);
  color: var(--gw-navy, #0d1633);
  box-shadow: 0 20px 44px rgba(217, 171, 0, .28);
}
.gw-needs__hero-sub { color: rgba(13, 22, 51, .82); }
.gw-needs__btn--white { background: #fff; color: var(--gw-navy, #0d1633); }
.gw-needs__btn--white:hover { color: var(--gw-navy, #0d1633); box-shadow: 0 6px 16px rgba(13, 22, 51, .18); }
.gw-needs__btn--ghost { background: rgba(13, 22, 51, .08); color: var(--gw-navy, #0d1633); border-color: rgba(13, 22, 51, .28); }
.gw-needs__btn--ghost:hover { background: rgba(13, 22, 51, .16); color: var(--gw-navy, #0d1633); }
.gw-needs__btn--solid,
.gw-needs__btn--solid:hover { color: var(--gw-navy, #0d1633); }
.gw-needs__chip.is-active { color: var(--gw-navy, #0d1633); }

/* ------------------------------------------------------------- Search bar */
.gw-needs__search-bar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 22px 0 18px; padding: 16px 18px;
  background: var(--n-surface); border: 1px solid var(--n-line); border-radius: 14px;
}
.gw-needs__search-wrap {
  flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px;
  padding: 0 12px; border: 1px solid var(--n-line); border-radius: 10px; background: #fff;
}
.gw-needs__search-wrap .dashicons { color: var(--n-muted); }
.gw-needs__search-wrap input {
  flex: 1; border: none; outline: none; padding: 11px 0; font-size: .95rem; background: transparent;
}
