/* ═══════════════════════════════════════════════
   KCC Blog — Index / Listing Page Styles
   ═══════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────── */
.blog-index-hero {
  background: var(--navy);
  padding: 3.5rem var(--post-pad) 3rem;
}
.blog-index-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}
.blog-eyebrow {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--magenta);
  margin: 0 0 0.6rem;
}
.blog-index-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}
.blog-index-title em {
  color: var(--teal);
  font-style: normal;
}
.blog-index-sub {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: #94a3b8;
  margin: 0;
  max-width: 560px;
}

/* ── Tag filter bar ────────────────────────────── */
.blog-tag-bar {
  background: var(--light);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem var(--post-pad);
  position: sticky;
  top: 70px; /* match navbar height */
  z-index: 10;
}
.blog-tag-bar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag-filter {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--font-head);
  font-size: 0.78rem;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tag-filter:hover {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}
.tag-filter--active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ── Grid section ──────────────────────────────── */
.blog-grid-section {
  padding: 3rem var(--post-pad) 5rem;
}
.blog-grid-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}
.blog-empty {
  font-family: var(--font-head);
  color: var(--mid);
  text-align: center;
  padding: 3rem 0;
}

/* ── Post card ─────────────────────────────────── */
.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover {
  box-shadow: 0 8px 30px rgba(15,31,61,0.12);
  transform: translateY(-2px);
}

/* Featured card spans full width on wide screens */
.post-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.post-card--featured .post-card-image-wrap {
  flex: 0 0 45%;
  max-height: 340px;
}
.post-card--featured .post-card-body {
  padding: 2rem;
}
.post-card--featured .post-card-title {
  font-size: 1.5rem;
}
.post-card--featured .post-card-excerpt {
  display: block;
  -webkit-line-clamp: 4;
}

/* Card image */
.post-card-image-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--light);
}
.post-card-image {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.post-card:hover .post-card-image {
  transform: scale(1.03);
}

/* Card body */
.post-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card-category {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--magenta);
  margin-bottom: 0.5rem;
  display: block;
}
.post-card-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.6rem;
  line-height: 1.3;
}
.post-card-title a {
  color: inherit;
  text-decoration: none;
}
.post-card-title a:hover { color: var(--teal); }

.post-card-subtitle,
.post-card-excerpt {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--mid);
  line-height: 1.6;
  margin: 0 0 1rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Card meta */
.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-head);
  font-size: 0.78rem;
  color: var(--mid);
}
.post-card-author { color: var(--dark); font-weight: 600; }
.post-card-date::before,
.post-card-read::before { content: '·'; margin-right: 0.4rem; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 700px) {
  .post-card--featured { flex-direction: column; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-tag-bar { top: 60px; }
}
