/* ============================================
   Diagnostics library additions
   Layered on top of blog.css / article.css
   ============================================ */

/* ---------- Pagination (163 guides => 14 pages) ---------- */
.pagination {
  width: 100%;
}

.pagination-numbers {
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}

.page-number {
  flex: 0 0 auto;
}

/* let grid children shrink instead of forcing document width */
.blog-main,
.blog-sidebar {
  min-width: 0;
}

.articles-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
}

/* ---------- Index ---------- */
.article-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

.article-title a:hover {
  color: var(--fire-red);
}

.article-card.is-hidden {
  display: none !important;
}

.blog-result-count {
  margin: -0.5rem 0 1.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dimmed);
}

.blog-empty {
  margin: 0 0 3rem;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--card-border);
  border-radius: 18px;
  background: var(--card-bg);
}

@media (max-width: 640px) {
  .blog-result-count { margin-top: -1rem; }
}

/* avatars/logo: always crop, never distort */
.article-hero .author-info img,
.author-bio > img,
.article-author img {
  object-fit: cover;
}

/* ---------- Article: source line ---------- */
.article-source {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-dimmed);
  text-align: center;
}

.article-source a {
  color: var(--fire-red);
  text-decoration: none;
  font-weight: 600;
}

.article-source a:hover { text-decoration: underline; }

/* ---------- Article: imported content ---------- */
.article-content figure {
  margin: 2rem 0;
  padding: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
}

.article-content figure img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 0;
}

.article-content figcaption {
  padding: 0.9rem 1.25rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-dimmed);
}

.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
}

.article-content figure img { margin: 0; }

.article-content h4 {
  margin: 1.75rem 0 0.6rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
}

.article-content a {
  color: var(--fire-red);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 0, 51, 0.35);
}

.article-content a:hover {
  color: var(--cyan-glow);
  border-bottom-color: var(--cyan-glow);
}

.article-content a.article-cta-link {
  display: inline-block;
  margin: 1.5rem 0;
  padding: 0.9rem 1.75rem;
  border: none;
  border-radius: 100px;
  background: var(--gradient-fire);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(var(--particle-color), 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.article-content a.article-cta-link:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(var(--particle-color), 0.5);
}

.article-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--fire-red);
  border-radius: 0 14px 14px 0;
  background: var(--card-bg);
  color: var(--text-secondary);
}

.article-content blockquote p:last-child { margin-bottom: 0; }

.article-content hr {
  margin: 2.5rem 0;
  border: none;
  border-top: 1px solid var(--card-border);
}

/* spec tables */
.article-content .table-wrap {
  margin: 2rem 0;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.article-content table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.article-content th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  background: rgba(var(--particle-color), 0.14);
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.article-content td {
  padding: 0.8rem 1rem;
  vertical-align: top;
  line-height: 1.55;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--card-border);
}

.article-content tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

:root[data-theme="light"] .article-content tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.03);
}

.article-content tbody tr:last-child td { border-bottom: none; }

.article-content tbody tr:hover {
  background: rgba(var(--particle-color), 0.06);
}

/* keep long product titles from blowing out the card */
.article-hero-title { overflow-wrap: anywhere; }

@media (max-width: 768px) {
  .article-content table { font-size: 0.8125rem; }
  .article-content th,
  .article-content td { padding: 0.65rem 0.75rem; }
}

/* ---------- Sidebar shop promo ---------- */
.sidebar-shop {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.sidebar-shop:hover {
  border-color: rgba(255, 0, 51, 0.4);
  background: rgba(255, 0, 51, 0.06);
}

.sidebar-shop img {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.sidebar-shop-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.sidebar-shop-text strong {
  color: var(--text-primary);
  font-size: 0.9rem;
}

.sidebar-shop-text span {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.sidebar-shop > i {
  margin-left: auto;
  color: var(--fire-red);
  font-size: 0.8rem;
}
