/*
 * Site — news archive.
 *
 * Loaded on is_home() || is_category() || is_page_template('page-news.php')
 * via `site-page-archive-news` handle in theme/inc/60-enqueue.php.
 * Templates: home.php, category.php, page-news.php.
 *
 * Slim page-header on Aktuality (no crumbs, no lead) — matches Projekty.
 */

.page-header { padding-bottom: 24px; }

.news-list {
  /* Top padding 0 — match .projects-list. The .section-head above
     already carries `padding-bottom: 24px` via the
     `.page-header + .section-head` override in global.css, so the gap
     filters → first card is identical on /news, /category and /projects. */
  padding: 0 var(--gutter) calc(100px * var(--scale));
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 24px;
}
.ncard {
  display: flex; flex-direction: column; gap: 18px; cursor: pointer;
}
.ncard .img-wrap {
  position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 8px;
  background: linear-gradient(135deg, var(--g1) 0%, var(--g2) 100%);
}
.ncard .img-wrap::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(70% 60% at 30% 30%, rgba(255,255,255,0.06), transparent 70%);
}
.ncard .img-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.5) 100%);
}
.ncard .meta { display: flex; flex-direction: column; gap: 10px; }
.ncard .meta-top { display: inline-flex; align-items: center; gap: 14px; }
.ncard .meta-top .date { font-size: calc(14px * var(--read-scale)); color: var(--ink-dim); letter-spacing: 0.02em; }
.ncard .meta-top .tag {
  padding: 4px 10px; border: 1px solid var(--rule-2); border-radius: 999px;
  color: var(--accent); font-weight: 500; font-size: calc(12.5px * var(--read-scale)); letter-spacing: 0.02em;
}
.ncard h3 {
  font-size: calc(22px * var(--read-scale)); font-weight: 500; letter-spacing: -0.02em; line-height: 1.25;
  transition: color .2s;
}
.ncard:hover h3 { color: var(--accent); }
.ncard .excerpt {
  font-size: calc(14.5px * var(--read-scale)); line-height: 1.55; color: var(--ink-dim); text-wrap: pretty;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ncard .read {
  margin-top: 4px;
  color: var(--accent); font-size: calc(13px * var(--read-scale)); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap .2s;
}
.ncard:hover .read { gap: 12px; }

@media (max-width: 768px) {
  .news-list {
    grid-template-columns: 1fr;
    gap: 36px;
    /* Top padding 0 — match .projects-list mobile. */
    padding: 0 var(--gutter) 60px;
  }
  .ncard h3 { font-size: clamp(20px, 5.5vw, 24px); }
}

/* Tablet (769–1024px) — drop the news grid from 3 → 2 cols so cards
   stay readable at portrait-tablet widths. */
@media (min-width: 769px) and (max-width: 1024px) {
  .news-list { grid-template-columns: 1fr 1fr; }
}
