/* ==========================================================================
   Reviorum — pages/blog.css
   blog.html (home.php / archive) and article.html (single.php).
   ========================================================================== */

/* ---------- Post card (template-parts/post-card.php) ---------- */
.rv-post-card { display: flex; flex-direction: column; height: 100%; overflow: hidden; }
.rv-post-card__cover { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: var(--rv-surface-2); }
.rv-post-card__body { display: flex; flex-direction: column; gap: var(--rv-s-2); padding: 18px; }
.rv-post-card__kicker { color: var(--rv-accent); font-size: var(--rv-fs-xs); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.rv-post-card__title { font-size: 1.0625rem; line-height: 1.35; font-weight: 700; }

/* ---------- Blog list ---------- */
.rv-blog { display: flex; flex-direction: column; gap: var(--rv-s-6); padding-bottom: 3.5rem; }
.rv-blog__head { display: flex; flex-direction: column; gap: var(--rv-s-2); }
.rv-blog__title { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.75rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.035em; }
.rv-blog__lead { max-width: 640px; color: var(--rv-ink-2); font-size: 1.0625rem; line-height: 1.6; }

.rv-blog-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  overflow: hidden;
  border: 0;
  background: var(--rv-night);
  color: #fff;
}
.rv-body .rv-blog-featured,
.rv-body .rv-blog-featured:hover { color: #fff; }
.rv-blog-featured__img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.rv-blog-featured__body { display: flex; flex-direction: column; justify-content: center; gap: var(--rv-s-3); padding: var(--rv-s-8); }
.rv-blog-featured .rv-post-card__kicker { color: var(--rv-sun); }
.rv-blog-featured__title { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.025em; }
.rv-blog-featured__excerpt { color: var(--rv-night-text); line-height: 1.6; }
.rv-blog-featured .rv-meta { color: #9da2c4; }

.rv-blog__latest { display: flex; flex-direction: column; gap: var(--rv-s-4); }
.rv-blog__latest-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--rv-s-3); }
.rv-blog__filter { min-width: 0; max-width: 100%; }
/* Topic chips are links to category archives, so they stay visible without JS. */
.rv-blog__item { display: flex; }
.rv-blog__item > .rv-post-card { flex: 1; }

/* ---------- Article ---------- */
.rv-article__head { display: flex; flex-direction: column; gap: var(--rv-s-3); max-width: 960px; padding-bottom: var(--rv-s-6); }
.rv-article__title { font-size: clamp(2rem, 1.4rem + 2.2vw, 2.875rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.035em; }
.rv-article__byline { display: flex; align-items: center; gap: var(--rv-s-3); font-size: var(--rv-fs-md); line-height: 1.5; }
.rv-article__hero {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 380;
  border-radius: var(--rv-r-xl);
  object-fit: cover;
  background: var(--rv-hue-hosting);
}

.rv-article__layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 300px;
  grid-template-rows: auto auto 1fr;
  justify-content: space-between;
  column-gap: var(--rv-s-12);
  row-gap: var(--rv-s-4);
  padding-block: var(--rv-s-8) var(--rv-s-4);
}
.rv-article__body { grid-column: 1; grid-row: 1 / span 3; min-width: 0; }
.rv-article-toc { grid-column: 2; grid-row: 1; }
.rv-article__cta { grid-column: 2; grid-row: 2; }

.rv-article-toc__details { padding: var(--rv-s-5); border: 1px solid var(--rv-line); border-radius: var(--rv-r-lg); background: var(--rv-surface); }
.rv-article-toc__summary {
  display: flex;
  justify-content: space-between;
  color: var(--rv-accent);
  font-size: var(--rv-fs-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.rv-article-toc__summary::-webkit-details-marker { display: none; }
.rv-article-toc__summary::after { content: "–"; color: var(--rv-muted); font-size: var(--rv-fs-base); line-height: 1; }
.rv-article-toc__details:not([open]) .rv-article-toc__summary::after { content: "+"; }
.rv-article-toc__list { display: flex; flex-direction: column; gap: 4px; margin: var(--rv-s-3) 0 0; padding: 0; list-style: none; }
.rv-article-toc__list a { display: block; padding: 6px 0; font-size: var(--rv-fs-md); font-weight: 500; }
.rv-body .rv-article-toc__list a { color: var(--rv-ink-2); }
.rv-body .rv-article-toc__list a:hover { color: var(--rv-accent); }

/* Long-form typography: in WordPress this wraps the_content() */
.rv-article__body > * + * { margin-top: var(--rv-s-4); }
.rv-article__body p,
.rv-article__body li { color: var(--rv-ink-2); font-size: 1.0625rem; line-height: 1.75; }
.rv-article__body .rv-article__lead { color: var(--rv-ink); font-size: 1.1875rem; line-height: 1.65; }
.rv-article__body h2 {
  margin-top: var(--rv-s-10);
  font-size: clamp(1.375rem, 1.15rem + 0.8vw, 1.625rem);
  line-height: 1.25;
  font-weight: 800;
  scroll-margin-top: calc(var(--rv-header-h) + var(--rv-s-4));
}
.rv-article__entity { display: flex; align-items: center; gap: var(--rv-s-3); padding: var(--rv-s-4); }
.rv-article__entity-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rv-body .rv-article__entity-body { color: var(--rv-ink); font-size: var(--rv-fs-md); line-height: 1.45; }
.rv-article__quote {
  margin-inline: 0;
  padding: var(--rv-s-4) var(--rv-s-5);
  border-left: 3px solid var(--rv-sun);
  border-radius: 0 var(--rv-r-md) var(--rv-r-md) 0;
  background: var(--rv-warm);
}
.rv-body .rv-article__quote p { color: var(--rv-ink); font-size: var(--rv-fs-lg); font-weight: 500; }
.rv-article__quote footer { margin-top: var(--rv-s-2); color: var(--rv-muted); font-size: var(--rv-fs-sm); }
.rv-article__body .rv-notice { margin-top: var(--rv-s-6); }
.rv-article__body .rv-notice svg { flex: none; color: var(--rv-accent); }
.rv-body .rv-article__body .rv-notice span { font-size: var(--rv-fs-md); line-height: 1.5; }
.rv-article__author {
  display: flex;
  gap: var(--rv-s-4);
  margin-top: var(--rv-s-10);
  padding-top: var(--rv-s-6);
  border-top: 1px solid var(--rv-line);
}
.rv-body .rv-article__author p { font-size: var(--rv-fs-md); line-height: 1.55; }
.rv-body .rv-article__author p strong { color: var(--rv-ink); }

.rv-article__cta { display: flex; flex-direction: column; gap: 10px; padding: var(--rv-s-5); border: 0; background: var(--rv-night); color: #fff; }
.rv-article__cta-title { font-size: var(--rv-fs-lg); font-weight: 700; }
.rv-article__cta p { color: var(--rv-night-text); font-size: var(--rv-fs-md); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .rv-article__layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .rv-article-toc,
  .rv-article__body,
  .rv-article__cta { grid-column: 1; grid-row: auto; }
  .rv-article__cta { margin-top: var(--rv-s-6); }
}

@media (max-width: 768px) {
  .rv-blog-featured { grid-template-columns: minmax(0, 1fr); }
  .rv-blog-featured__img { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
  .rv-blog-featured__body { padding: var(--rv-s-5); }
}

@media (max-width: 640px) {
  .rv-blog { gap: var(--rv-s-5); }
  .rv-blog__lead { font-size: var(--rv-fs-base); }
  .rv-blog__latest-head { flex-direction: column; align-items: stretch; }
  .rv-blog__filter { width: calc(100% + var(--rv-gutter) * 2); max-width: none; margin-inline: calc(var(--rv-gutter) * -1); padding-inline: var(--rv-gutter); }
  .rv-article__hero { border-radius: var(--rv-r-lg); aspect-ratio: 16 / 9; }
  .rv-article__body p,
  .rv-article__body li { font-size: var(--rv-fs-base); }
  .rv-article__body .rv-article__lead { font-size: 1.0625rem; }
  .rv-article__entity { flex-wrap: wrap; }
  .rv-article__entity .rv-btn { width: 100%; }
}
