/* =============================================================
   barrio_npm_prototype — related-stories grid (shared component)

   The bottom-of-page banner-card presentation of related stories, made
   content-type-neutral. Any content type with field_related_stories renders
   it via templates/content/_story-grid.html.twig (data from
   Story\RelatedStoriesBuilder) inside its own <section> + heading, and emits
   the shared #np-story-modal (_story-modal.html.twig + story-profile.html.twig
   + barrioNpmStoryModal JS).

   NOTE: this is the GRID presentation only. The project detail page shows
   related stories as a compact vertical LIST in its rail (.np-related-story*
   in project-detail.css) — a deliberately different layout, not this grid.

   `data-count` on the grid drives the single-item cap:
     · 1 story  → 50% width (full width at phone)
     · 2+ stories → auto-fit grid (rows fill)
   ============================================================= */

.np-stories-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
/* A lone story would otherwise stretch to the full container width
   (auto-fit collapses the empty tracks); cap it at 50% — full width at
   phone. Multi-story rows fill via the auto-fit grid above. */
.np-stories-grid[data-count="1"] {
  grid-template-columns: minmax(0, 50%);
}
@media (max-width: 575.98px) {
  .np-stories-grid[data-count="1"] {
    grid-template-columns: 1fr;
  }
}
.np-story-card {
  display: flex;
}
.np-story-card-link {
  display: flex; flex-direction: column;
  width: 100%;
  text-decoration: none;
  color: #2c2c2b;
  background: #faf8f3;
  border: 1px solid #e4e0d8;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.np-story-card-link:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}
.np-story-card-link:hover .np-story-card-title {
  color: var(--hue-dk);
}
.np-story-card-img {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f1ece1;
  overflow: hidden;
}
.np-story-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.np-story-card-text {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px 18px;
}
.np-story-card-kicker {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--hue-dk);
}
.np-story-card-title {
  font-size: 15.5px; line-height: 1.3; font-weight: 700;
  transition: color .15s;
}
.np-story-card-body {
  font-size: 13px; line-height: 1.45; color: #6c675f;
}
