/* =========================================================================
   article.css
   The reading view for a single article, plus the news-card component styles
   (the card is defined here as it is the atomic unit of every article feed).
   ========================================================================= */

/* ---- News card ---- */
.news-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
  animation: rise .5s ease both;
  animation-delay: calc(var(--i, 0) * 55ms);
  height: 100%;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--line-2);
}
.news-card__link { display: flex; flex-direction: column; height: 100%; }
.news-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.news-card__img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .news-card__img { transform: scale(1.05); }
.news-card__cat {
  position: absolute; top: var(--sp-3); inset-inline-start: var(--sp-3);
  background: var(--signal); color: #fff; font-weight: 800;
  font-size: .72rem; letter-spacing: .03em; padding: 3px 10px; border-radius: 2px;
}
.news-card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-2); flex: 1; }
.news-card__city {
  font-size: .78rem; font-weight: 800; letter-spacing: .04em;
  color: var(--accent); text-transform: uppercase;
}
.news-card__title {
  font-size: 1.15rem; font-weight: 700; line-height: 1.25;
  color: var(--ink);
}
.news-card__summary { color: var(--muted); font-size: .92rem; flex: 1; }
.news-card__meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2); margin-top: var(--sp-2);
  padding-top: var(--sp-2); border-top: 1px solid var(--line);
}
.news-card__date { font-size: .8rem; color: var(--muted); }
.news-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.news-card__tag { font-size: .74rem; color: var(--accent); font-weight: 600; }

/* Wide variant (used in hero side column) */
.news-card--wide .news-card__link { flex-direction: row; }
.news-card--wide .news-card__media { width: 42%; aspect-ratio: auto; min-height: 110px; }
.news-card--wide .news-card__body { padding: var(--sp-3); }
.news-card--wide .news-card__title { font-size: 1rem; }
.news-card--wide .news-card__summary { display: none; }

/* ---- Article view ---- */
.article {
  max-width: 760px;
  margin-inline: auto;
}
.article__breadcrumb {
  font-size: .85rem; color: var(--muted); margin-bottom: var(--sp-4);
}
.article__breadcrumb a { color: var(--accent); font-weight: 600; }
.article__title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900; letter-spacing: -.01em; line-height: 1.1;
}
.article__summary {
  font-family: var(--display); font-size: 1.35rem; font-weight: 500;
  color: var(--ink-2); margin-top: var(--sp-4); line-height: 1.5;
}
.article__meta {
  display: flex; gap: var(--sp-2); align-items: center;
  margin-top: var(--sp-4); padding-block: var(--sp-3);
  border-block: 1px solid var(--line);
  color: var(--muted); font-size: .92rem; font-weight: 600;
}
.article__figure { margin: var(--sp-6) 0; }
.article__figure img { width: 100%; border-radius: var(--r-md); box-shadow: var(--shadow-md); }
.article__content { font-size: 1.12rem; line-height: 1.7; color: var(--ink); }
.article__content p { margin: 0 0 var(--sp-4); }
.article__content a {
  color: #1a73e8;
  text-decoration: underline;
}
.article__content a:hover { color: #1558b8; }
.article__tags {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line);
}
.article__tag {
  font-weight: 700; font-size: .9rem; color: var(--accent);
  background: var(--paper-2); padding: 5px 12px; border-radius: 999px;
  transition: background .15s, color .15s;
}
.article__tag:hover { background: var(--accent); color: #fff; }

.article__related {
  max-width: var(--maxw); margin: var(--sp-8) auto 0;
  border-top: 3px solid var(--ink); padding-top: var(--sp-5);
}
.article__related .section-title { margin-bottom: var(--sp-4); }

@media (max-width: 560px) {
  .news-card--wide .news-card__link { flex-direction: column; }
  .news-card--wide .news-card__media { width: 100%; aspect-ratio: 16/10; }
}

/* =========================================================================
   CMS additions — per-article display settings, breaking-news flags
   ========================================================================= */

/* Breaking-news ribbon on the article page */
.article__breaking {
  display: inline-block; background: var(--signal); color: #fff;
  font-family: var(--body); font-weight: 800; font-size: .78rem; letter-spacing: .04em;
  padding: 5px 13px; border-radius: 999px; margin-bottom: 12px; text-transform: uppercase;
}

/* Breaking badge on the news card */
.news-card__breaking {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: var(--signal); color: #fff; font-weight: 800; font-size: .72rem;
  padding: 3px 10px; border-radius: 999px; box-shadow: var(--shadow-sm); letter-spacing: .03em;
}

/* Text size */
.article--size-sm .article__content { font-size: 1rem; }
.article--size-lg .article__content { font-size: 1.22rem; }

/* Content width */
.article--width-narrow .article__content { max-width: 62ch; margin-inline: auto; }
.article--width-wide .article__content { max-width: none; }

/* Light / dark reading theme (scoped to the article block) */
.article--theme-dark {
  background: var(--ink); color: #ece7df; padding: 28px; border-radius: var(--r-lg);
}
.article--theme-dark .article__title { color: #fff; }
.article--theme-dark .article__summary,
.article--theme-dark .article__content { color: #d6cfc6; }
.article--theme-dark .article__breadcrumb,
.article--theme-dark .article__meta { color: #b6ada3; }
.article--theme-dark .article__content a { color: #6db3ff; }
