/* =========================================================================
   BLOG.CSS — Blog / Board Resources page sections only
   (Hero + CTA band use shared component.css styles.)
   ========================================================================= */

/* ---- 02 Content Categories (dynamic) ---------------------------------- */
.blog-categories {
  background: var(--surface-light);
  padding: var(--section-pad) 0;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}

.category-card {
  flex: 0 1 260px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 24px 26px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy);
  transition:
    transform 0.15s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
  color: var(--navy);
}

.cat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 6px;
  border-radius: var(--radius-sm);
  background: var(--icon-bg);
  color: var(--icon);
  font-size: 1.125rem;
}

.cat-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--navy);
}

.cat-count {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Empty-state placeholder centering */
.blog-categories .placeholder-inline,
.blog-posts .placeholder-inline {
  display: block;
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}

/* ---- 03a Featured Post ------------------------------------------------ */
.blog-featured {
  background: var(--bg);
  padding: var(--section-pad) 0 0;
}

.featured-post {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.featured-thumb {
  display: block;
  min-height: 320px;
  overflow: hidden;
  background: var(--surface-alt);
}

.featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-thumb .post-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-sub);
  font-size: 2.5rem;
}

.featured-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: clamp(28px, 4vw, 48px);
}

.featured-flag {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--gold);
  padding: 4px 10px;
  border-radius: 3px;
}

.featured-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
  margin: 0;
}

.featured-title a {
  color: inherit;
}

.featured-title a:hover {
  color: var(--accent-dark);
}

.featured-excerpt {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.featured-body .btn {
  margin-top: 8px;
}

/* ---- 03 Featured / Recent Posts (dynamic) ----------------------------- */
.blog-posts {
  background: var(--bg);
  padding: var(--section-pad) 0;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.post-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-light);
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--text-sub);
  font-size: 2rem;
}

.post-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 24px 26px;
  flex: 1;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.post-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--navy);
  margin: 0;
}

.post-title a {
  color: inherit;
}

.post-title a:hover {
  color: var(--accent-dark);
}

.post-excerpt {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.post-body .text-cta {
  margin-top: 4px;
}

/* Pagination */
.blog-pagination {
  margin-top: 44px;
}

.blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--navy);
  background: var(--bg);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.blog-pagination .page-numbers:hover {
  border-color: var(--gold);
  color: var(--accent-dark);
}

.blog-pagination .page-numbers.current {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--gold);
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 860px) {
  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-thumb {
    min-height: 220px;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 900px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}
