/* Country blog: the per-language articles under tests/<test>/<lang>/blog/.
 * The pages are built by scripts/build_country_blog.py inside each test's own
 * design (rd/pt/tc/ie/dt/cp), whose classes do the typography. This file adds
 * only what those designs lack: the article cards, the back link, the date
 * line, the CTA and a few prose fallbacks.
 */

.cb-page {
  --cb-ink: #1d1d3a;
  --cb-muted: #6e7071;
  --cb-line: #e6e9f2;
  --cb-brand: #634bf6;
  --cb-grad: linear-gradient(135deg, #634bf6, #4baef6);
  min-width: 0;
}

.cb-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--cb-brand);
  font-weight: 600;
  text-decoration: none;
}

.cb-back:hover { opacity: 0.8; }

.cb-meta {
  margin: 12px 0 0;
  color: var(--cb-muted);
  font-size: 14px;
}

/* The designs space their sections with a gap on <main>; the <article>
 * wrapper takes that over. */
.cb-article {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-bottom: 40px;
}

.cb-article > .cb-sec { margin: 0; }

/* Article prose: zero-specificity fallbacks, so each design's own
 * -h3 / -list styles win where they exist. */
:where(.cb-article) h3 {
  margin: 24px 0 8px;
  color: var(--cb-ink);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

:where(.cb-article) ul,
:where(.cb-article) ol {
  margin: 8px 0 16px;
  padding-left: 22px;
}

:where(.cb-article) ul { list-style: disc; }
:where(.cb-article) ol { list-style: decimal; }
:where(.cb-article) li { margin: 4px 0; }

.cb-article table { min-width: 100%; }
.cb-article .cb-table { overflow-x: auto; margin: 12px 0 20px; }

.cb-sources li {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.cb-sources a { color: var(--cb-brand); }

.cb-cta {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--cb-grad);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
}

.cb-cta:hover { opacity: 0.9; }

/* Blog index cards */
.cb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 16px;
  margin: 8px 0 32px;
}

.cb-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--cb-line);
  border-radius: 16px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cb-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(29, 29, 58, 0.1);
}

.cb-card__cover {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  min-height: 120px;
  padding: 16px;
  background: var(--cb-grad);
  color: #fff;
}

.cb-card__test {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cb-card__tag {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
}

.cb-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.cb-card__title {
  color: var(--cb-ink);
  font-size: 17px;
  line-height: 1.3;
}

.cb-card__text {
  color: var(--cb-muted);
  font-size: 14px;
  line-height: 1.45;
}

.cb-card__date {
  margin-top: auto;
  color: var(--cb-muted);
  font-size: 13px;
}

.cb-card__more {
  color: var(--cb-brand);
  font-size: 14px;
  font-weight: 700;
}

.cb-empty {
  color: var(--cb-muted);
}

@media (max-width: 767px) {
  .cb-card:hover { transform: none; }
  .cb-card__cover { min-height: 88px; }
  .cb-card__tag { font-size: 19px; }
}
