/* css/pages/newsroom.css
   The newsroom index — a vertical list of dated posts. Each row is a
   link: date | title+teaser | arrow. The arrow slides on hover, the
   same micro-motion as the buttons and the .news-cat pills use the
   teal accent. Individual article pages come later (slugged), at
   which point .news-cat may move to a shared component. */

.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 24px;
  align-items: center;
  /* Extra horizontal padding pulled back with a matching negative
     margin, so the hover card can extend past the text without
     shifting the layout or the row separators. */
  padding: 24px 18px;
  margin: 0 -18px;
  border-radius: 14px;
  border-bottom: 1px solid var(--line);
  color: inherit;
  transition: background 0.2s ease, box-shadow 0.2s ease,
              transform 0.2s ease, border-color 0.2s ease;
}
.news-item:first-child {
  border-top: 1px solid var(--line);
}
.news-item:hover {
  /* Body is --blue-tint, so the row lifts to a white card: soft
     brand-blue shadow, a 1px rise, and the hairline separators fade
     out so the card floats cleanly above the list. */
  background: var(--white);
  box-shadow: 0 10px 28px rgba(32, 38, 94, 0.1);
  transform: translateY(-1px);
  border-color: transparent;
  position: relative;   /* sit above neighbouring rows' borders */
  z-index: 1;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* Title + teaser stack vertically regardless of the inline spans. */
.news-main {
  display: flex;
  flex-direction: column;
}
.news-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.news-cat {
  padding: 3px 9px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  /* Default (teal) — also the fallback for any category not mapped
     below, so a new/unslugged cat still renders sensibly. */
  background: var(--teal-tint);
  color: var(--teal);
}

/* Per-category colors. Keyed off data-cat (the slugified category name
   set in the template loop). The palette is deliberately muted —
   tinted backgrounds with a same-hue darker text, matching the site's
   restrained teal/blue rather than six saturated primaries. Slugs come
   from Django's |slugify, so "Reference lab" -> "reference-lab". */
.news-cat[data-cat="fungiflex"]      { background: #E4F3F0; color: #157567; }  /* teal  — flagship product */
.news-cat[data-cat="mdx"]            { background: #EEF1FA; color: #2C368C; }  /* brand blue */
.news-cat[data-cat="investors"]      { background: #E9F5EE; color: #3E9E6B; }  /* green */
.news-cat[data-cat="team"]           { background: #F1EAF7; color: #7A459E; }  /* violet */
.news-cat[data-cat="reference-lab"]  { background: #F6EEE0; color: #99631A; }  /* amber/ochre */
.news-cat[data-cat="our-history"]    { background: #F6E9EF; color: #8A4A63; }  /* plum */
.news-title {
  margin-bottom: 5px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--blue-deep);
}
.news-teaser {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--muted);
}

.news-go {
  color: var(--muted);
  transition: transform 0.15s ease, color 0.15s ease;
}
.news-item:hover .news-go {
  transform: translateX(3px);
  color: var(--blue);
}

@media (max-width: 700px) {
  .news-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .news-go { display: none; }
}

/* ------------------------------------------------------------
   Individual article page — header (back link, category, title,
   date) above the article body. Reuses the .news-cat pill from the
   index for the category tag.
   ------------------------------------------------------------ */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 26px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.article-back:hover { color: var(--blue); }

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.article-title {
  max-width: 760px;
  font-family: var(--font-display);
  font-weight: 600;
  /* Page-headline scale — reads at hero size like every other page's
     H1, rather than shrinking to a section heading. */
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.15;
  color: var(--blue);
}
.article-date {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

/* Body — a single readable measure. */
.article-body {
  max-width: 700px;
  margin-top: 36px;
}
.article-body p {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
}
/* Pull-quote with the teal accent rule down the left edge. */
.article-body blockquote {
  margin: 28px 0;
  padding-left: 20px;
  border-left: 3px solid var(--teal);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.5;
  color: var(--blue-deep);
}
.article-body h3 {
  margin: 32px 0 12px;
  font-size: 18px;
}
.article-foot {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
/* CTA button — matches the example article's mono, pill-bordered ghost
   treatment (with a sliding arrow) rather than the site's default solid
   ghost button. Scoped to .article-foot so other buttons are untouched. */
.article-foot .btn {
  gap: 9px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--blue-deep);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.article-foot .btn:hover {
  border-color: var(--blue);
  background: var(--blue-tint);
  color: var(--blue-deep);
}
.article-foot .btn-arrow {
  transition: transform 0.15s ease;
}
.article-foot .btn:hover .btn-arrow {
  transform: translateX(3px);
}
