/* ==============================================
   News grid — card layout for posts + Puck Press CPTs
   Used by archive.php, search.php, and [ch_news_grid].
   ============================================== */

.ch-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 24px 0;
}

.ch-news-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.ch-news-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 13, 13, 0.08);
}

.ch-news-thumb {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--soft);
}

.ch-news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ch-news-card:hover .ch-news-thumb img {
  transform: scale(1.04);
}

.ch-news-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ch-news-grid .ch-news-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-ink);
  margin: 0;
}

.ch-news-grid .ch-news-meta .ch-news-cpt {
  color: var(--primary);
  font-weight: 700;
}

.ch-news-grid .ch-news-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0;
}

.ch-news-grid .ch-news-title a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.15s;
}
.ch-news-grid .ch-news-title a:hover {
  color: var(--primary);
}

.ch-news-grid .ch-news-excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 4px;
}

.ch-news-grid .ch-news-excerpt p {
  margin: 0;
}

.ch-news-empty {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  color: var(--muted-ink);
  background: var(--soft);
  border-radius: 6px;
}

/* Featured first card variant — opt-in via .ch-news-grid--featured */
.ch-news-grid--featured .ch-news-card:first-child {
  grid-column: span 2;
}

.ch-news-grid--featured .ch-news-card:first-child .ch-news-title {
  font-size: 1.6rem;
}

@media (max-width: 980px) {
  .ch-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ch-news-grid--featured .ch-news-card:first-child {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .ch-news-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .ch-news-grid--featured .ch-news-card:first-child {
    grid-column: span 1;
  }
}
