/* World Hunger Fund - Articles pages. Works alongside the main site stylesheets. */
:root {
  --whf-dark: #2e2e2e;          /* same charcoal as the site footer */
  --whf-gold: #e0c072;          /* same gold as the Donate button */
  --whf-link: #8a6417;          /* darker gold, readable on white */
  --whf-text: #444;
  --whf-muted: #6b6b6b;
  --whf-line: #e6e3dc;
  --whf-paper: #f7f5f0;
}

/* ---------- Header areas with a background photo (dark fallback if the photo can't load) ---------- */
.whf-articles-hero, .whf-article-hero, .whf-cta { position: relative; background-color: #2b2b2b; }
.whf-articles-hero > .mbr-overlay, .whf-article-hero > .mbr-overlay, .whf-cta > .mbr-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.whf-articles-hero > .container, .whf-article-hero > .container, .whf-cta > .container { position: relative; z-index: 1; }
.whf-articles-hero h1, .whf-article-hero h1, .whf-cta h3, .whf-cta .lead { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35); }

/* ---------- Articles page: full-width header area ---------- */
.whf-articles-hero {
  background-size: cover;
  background-position: center;
  padding-top: 150px;
  padding-bottom: 90px;
  color: #fff;
}
.whf-articles-hero .container { position: relative; }
.whf-articles-hero__intro, .whf-article-hero .col-md-10 { text-align: center; }
.whf-articles-hero__intro .lead { color: #f1f1f1; margin: 0 auto 50px; max-width: 640px; }

.whf-topics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}
.whf-topic {
  display: block;
  text-align: center;
  color: #fff;
  text-decoration: none;
  padding: 26px 22px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s, transform 0.2s;
}
.whf-topic:hover, .whf-topic:focus { background: rgba(255, 255, 255, 0.16); transform: translateY(-3px); color: #fff; text-decoration: none; }
.whf-topic__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 88px; height: 88px; border-radius: 50%; background: #fff; margin-bottom: 16px;
}
.whf-topic__icon img { width: 60px; height: 60px; }
.whf-topic__title { font-family: 'Raleway', sans-serif; font-weight: 300; font-size: 1.6rem; letter-spacing: 1px; text-transform: uppercase; margin: 0 0 10px; color: #fff; }
.whf-topic__text { font-size: 0.95rem; line-height: 1.6; margin: 0; color: #e8e8e8; }

/* ---------- Latest articles ---------- */
.whf-articles { background: var(--whf-paper); padding-top: 70px; padding-bottom: 60px; }
.whf-articles__title, .whf-more__title { text-align: center; margin-bottom: 26px; }
.whf-articles__note { color: var(--whf-muted); margin-top: 40px; font-size: 0.95rem; }

.whf-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.whf-tab {
  display: inline-block; padding: 8px 20px; border-radius: 30px;
  background: #fff; border: 1px solid var(--whf-line); color: var(--whf-dark);
  font-size: 0.9rem; font-weight: 600; letter-spacing: 0.3px; text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.whf-tab:hover, .whf-tab:focus { border-color: var(--whf-gold); color: var(--whf-dark); text-decoration: none; }
.whf-tab.is-active { background: var(--whf-dark); border-color: var(--whf-dark); color: #fff; }

.whf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 28px; }

.whf-card {
  display: flex; flex-direction: column; background: #fff; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--whf-line); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}
.whf-card:hover { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.10); transform: translateY(-2px); }
.whf-card__img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--whf-line); }
.whf-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.whf-card:hover .whf-card__img img { transform: scale(1.04); }
.whf-card__img--empty { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3a3a3a, #232323); text-decoration: none; }
.whf-card__img--empty span { color: var(--whf-gold); font-family: 'Raleway', sans-serif; font-size: 0.85rem; letter-spacing: 3px; text-transform: uppercase; opacity: 0.8; }
.whf-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.whf-card__cat {
  align-self: flex-start; font-size: 0.72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--whf-link); text-decoration: none; margin-bottom: 6px;
}
.whf-card__cat:hover { text-decoration: underline; color: var(--whf-link); }
.whf-card__title { font-size: 1.15rem; line-height: 1.35; margin: 0 0 10px; font-weight: 700; }
.whf-card__title a { color: var(--whf-dark); text-decoration: none; }
.whf-card__title a:hover { color: var(--whf-link); text-decoration: none; }
.whf-card__text { font-size: 0.93rem; line-height: 1.6; color: var(--whf-text); margin: 0 0 14px; flex: 1; }
.whf-card__more { font-weight: 700; font-size: 0.9rem; color: var(--whf-link); text-decoration: none; align-self: flex-start; border-bottom: 2px solid transparent; }
.whf-card__more:hover { color: var(--whf-link); border-bottom-color: var(--whf-gold); text-decoration: none; }

.whf-cta { padding-top: 90px; padding-bottom: 90px; background-size: cover; background-position: center; }

/* ---------- Single article ---------- */
.whf-article-hero { background-size: cover; background-position: center; padding-top: 170px; padding-bottom: 110px; }
.whf-article-hero .mbr-section-title { line-height: 1.2; }
.whf-article-hero__cat {
  display: inline-block; margin-bottom: 14px; padding: 5px 14px; border-radius: 20px;
  background: var(--whf-gold); color: var(--whf-dark); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; text-decoration: none;
}
.whf-article-hero__cat:hover { color: var(--whf-dark); text-decoration: none; background: #fff; }

.whf-article-body { background: #fff; padding-top: 40px; padding-bottom: 50px; }
.whf-article-body .lead { font-size: 1.1rem; line-height: 1.8; color: var(--whf-text); }
.whf-article-body h2 { margin-top: 2.2rem; margin-bottom: 1rem; color: var(--whf-dark); }
.whf-article-body a { color: var(--whf-link); text-decoration: underline; }
.whf-article-body img { max-width: 100%; height: auto; }
.whf-back { font-size: 0.95rem; margin-bottom: 0; }
.whf-back a { text-decoration: none !important; font-weight: 600; }
.whf-article-figure { margin: 2.2rem 0; text-align: center; }
.whf-article-figure img { border-radius: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12); }
.whf-article-closing { margin: 2.5rem 0 0; padding: 20px 26px; background: var(--whf-paper); border-left: 4px solid var(--whf-gold); font-style: italic; }
.whf-article-closing p:last-child { margin-bottom: 0; }
.whf-article-refs { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--whf-line); font-size: 0.85rem; line-height: 1.7; color: var(--whf-muted); word-break: break-word; }
.whf-article-refs h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 1px; color: var(--whf-dark); }

.whf-more { background: var(--whf-paper); padding-top: 60px; padding-bottom: 60px; }
.whf-more__all { margin-top: 34px; }
.whf-more .whf-grid { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); max-width: 1040px; margin: 0 auto; }

/* ---------- Phones and tablets ---------- */
@media (max-width: 860px) {
  .whf-topics { grid-template-columns: 1fr; max-width: 460px; gap: 18px; }
  .whf-articles-hero { padding-top: 120px; padding-bottom: 60px; }
  .whf-article-hero { padding-top: 130px; padding-bottom: 70px; }
}
@media (max-width: 480px) {
  .whf-grid { grid-template-columns: 1fr; }
  .whf-article-body .lead { font-size: 1rem; }
}
