/* The shared blog card (.blog-card) and the Blogs page (blogs.php). The card rules lived in index.css until the
   homepage blog section was removed (2026-09-30); they were moved here so there is one definition. */

/* SHARED BLOG CARD (.blog-card) */
.blog-card {
  background: var(--surface-card);
  border: 1px solid #e8ecf2;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.12);
  z-index: 2;
}
/* Whole card is one link — :focus-visible carries the keyboard-focus ring */
.blog-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}
.blog-card-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
  border-radius: var(--radius-lg);
}
/* Inset from the card's edges (not flush) — same recipe as .cs-story-img-wrap. */
.blog-card-img-wrap {
  position: relative;
  display: block;
  width: calc(100% - 24px);
  margin: 12px 12px 0;
  aspect-ratio: 3 / 2; /* taller than the previous 16/9, owner request 2026-08-20 */
  overflow: hidden;
  border-radius: 14px;
  flex-shrink: 0;
}
.blog-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-img-wrap img { transform: scale(1.04); }
/* Category badge sits over the thumbnail's bottom-left corner. */
.blog-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: var(--cta-bg);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.4px;
  z-index: 3;
}
.blog-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.blog-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--fg-muted);
}
.blog-meta [data-lucide] { width: 13px; height: 13px; stroke: #aab2bc; }

/* Clamped to a fixed number of lines (+ min-height) so every card in a row */
.blog-card-title {
  font-family: var(--h-font);
  font-size: 17px;
  font-weight: 700;
  color: var(--fg-primary);
  line-height: 1.35;
  min-height: calc(1.35em * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-excerpt {
  font-size: 13.5px;
  color: var(--fg-body);
  line-height: 1.65;
  flex: 1;
  min-height: calc(1.65em * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: auto;
  transition: gap 0.2s ease, color 0.2s ease;
}
.blog-read-more [data-lucide] { width: 14px; height: 14px; stroke: var(--accent-deep); transition: stroke 0.2s; }
.blog-card-link:hover .blog-read-more { gap: 10px; color: var(--accent-deep); }
.blog-card-link:hover .blog-read-more [data-lucide] { stroke: var(--accent-deep); }

/* BLOGS PAGE — blogs.php */

/* Hero content width — same pattern as .downloads-hero */
.blogs-hero .hero-content { max-width: 880px; }

.blogs-section {
  background: var(--bg);
  padding: var(--space-section) var(--site-pad-x);
}
.blogs-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.blogs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
  margin-bottom: 20px;
}
.blogs-head h2 {
  font-family: var(--h-font, 'Inter', sans-serif);
  font-size: 28px;
  font-weight: 800;
  color: var(--fg-primary);
  letter-spacing: -0.3px;
  margin: 0;
}
.blogs-status {
  font-family: var(--p-font, 'Inter', sans-serif);
  font-size: 14px;
  color: var(--fg-muted);
  margin: 0;
}

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}
.blogs-grid [hidden] { display: none; }

/* "Show more articles" — the filter script owns [hidden]; display:flex would otherwise beat it */
.blogs-more {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}
.blogs-more[hidden] { display: none; }

@media (max-width: 960px) {
  .blogs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
}
@media (max-width: 600px) {
  .blogs-head h2 { font-size: 22px; }
  .blogs-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .blogs-more { margin-top: 36px; }
}
