/* ══════════════════════════════════════════════════════════
   BLOG SECTION (homepage + archive)
   assets/css/blog.css
══════════════════════════════════════════════════════════ */

.blog {
  background: var(--iv-bg);
}

/* ── Header row ───────────────────────────────────────── */
.blog-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 44px;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
}
.blog-header-row .section-header { margin-bottom: 0; }

/* ── Blog grid ────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1240px;
  margin: 0 auto;
}

/* ── Blog card ────────────────────────────────────────── */
.blog-card {
  background: white;
  border: 1px solid rgba(123,47,255,.08);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 2px 14px rgba(0,0,0,.04);
  transition: all .3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(18px);
  text-decoration: none;
  color: inherit;
}
.blog-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(123,47,255,.22);
  box-shadow: 0 14px 36px rgba(123,47,255,.09);
}

/* Optional featured image */
.blog-card-img {
  width: 100%;
  height: 180px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  margin-bottom: 20px;
  flex-shrink: 0;
}

/* ── Card elements ────────────────────────────────────── */
.blog-cat {
  display: inline-block;
  background: rgba(123,47,255,.08);
  color: var(--iv-purple);
  border-radius: 100px;
  padding: 4px 13px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.blog-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--iv-text);
  line-height: 1.32;
  margin-bottom: 12px;
  flex: 1;
}
.blog-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--iv-text-secondary);
  line-height: 1.7;
  margin-bottom: 22px;
}

/* ── Card footer ──────────────────────────────────────── */
.blog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid rgba(123,47,255,.07);
}
.blog-author {
  display: flex;
  align-items: center;
  gap: 9px;
}
.blog-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--iv-purple), var(--iv-purple-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  font-family: 'Outfit', sans-serif;
  flex-shrink: 0;
}
.blog-meta {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--iv-text-muted);
  font-weight: 500;
}
.blog-arrow {
  color: var(--iv-purple);
  transition: transform .2s;
  flex-shrink: 0;
}
.blog-card:hover .blog-arrow { transform: translateX(4px); }

/* ── Archive page header ──────────────────────────────── */
.archive-header {
  max-width: 1240px;
  margin: 0 auto;
  padding: 60px 48px 0;
  text-align: center;
}

/* ── Pagination ───────────────────────────────────────── */
.archive-pagination .nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  position: static;
  transform: none;
}
.archive-pagination .page-numbers {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(123,47,255,.15);
  color: var(--iv-text-secondary);
  text-decoration: none;
  transition: all .2s;
}
.archive-pagination .page-numbers:hover,
.archive-pagination .page-numbers.current {
  background: var(--iv-purple);
  color: white;
  border-color: var(--iv-purple);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  .blog-grid       { grid-template-columns: 1fr; }
  .blog-header-row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .archive-header  { padding: 40px 20px 0; }
}
