/* ==========================================================
   Projects Overview page — grid + cards
   Loaded only on the Projects Overview template.
   Inherits fonts, colors, and spacing units from the theme's
   main style.css (loaded before this file) via CSS variables
   and the global type scale (h2/h3/p aren't overridden here).
   ========================================================== */

.project-grid-section { margin-bottom: 3rem; }

.project-grid-title { margin: 0 0 2.5rem; font-size: 1.75rem; }

.project-grid-title a {
  text-decoration: none;
  display: inline-block;
  color: inherit;
  padding-bottom: 0.75rem;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .project-grid { grid-template-columns: 1fr; } }

.project-card {
  position: relative;
  display: block;
  min-height: 280px;
  border-radius: 4px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .project-card:hover { transform: translateY(-8px); box-shadow: 0 12px 24px rgba(0,0,0,0.15); }
}

.project-card--no-image { background-color: #e2e2e2; }

.project-card__overlay {
  position: absolute;
  inset: 0;
  background-color: var(--cat-color, var(--color-primary));
  opacity: 0.88;
}

.project-card__content {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 2.5rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.project-card__title {
  color: #ffffff;
  margin: 0 0 1rem;
  font-size: 1.95rem;
}

.project-card__desc {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 1.5rem;
  flex-grow: 1;
  font-size: 1.40rem;
}

.project-card__readmore {
  display: block;
  font-weight: 300;
  color: #ffffff;
  font-size: 1.40rem;
}

/* Brand palette */
.cat-grow        { --cat-color: #85C661; }
.cat-environment { --cat-color: #85C661; }
.cat-livelihoods { --cat-color: #4F65AF; }
.cat-knowledge   { --cat-color: #1982C6; }
.cat-health      { --cat-color: #EF456A; }

.project-hero {
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  position: relative;
}

.project-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--cat-color, var(--color-primary));
  opacity: 0.55;
}

.project-hero--no-image { background-color: #e2e2e2; }

.project-hero .hero-section-content {
  position: relative;
  z-index: 1;
  padding: 3rem 0;
}

.project-hero .hero-section-content h1 { color: #ffffff; }

.project-hero-category {
  display: inline-block;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 3px solid #ffffff;
  padding-bottom: 0.25rem;
  margin-bottom: 1rem;
}

.project-article { padding-top: 2.5rem; }