/* ===================================================
   EmDash Digital — Blog Styles
   Used by blog.html and blog-post.html
   =================================================== */

/* ── Blog Hero ──────────────────────────────────────── */
.blog-hero {
  background: var(--c-navy);
  padding-block: var(--sp-20) var(--sp-16);
  text-align: center;
}

.blog-hero .eyebrow { color: var(--c-lime); }

.blog-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw + 0.5rem, 3.5rem);
  font-weight: 900;
  color: var(--c-white);
  line-height: 1.1;
  margin-block: var(--sp-4) var(--sp-5);
}

.blog-hero-title em {
  color: oklch(84% 0.05 219);
  font-style: italic;
}

.blog-hero-sub {
  font-size: 1.05rem;
  color: oklch(72% 0.02 257);
  max-width: 520px;
  margin-inline: auto;
  line-height: 1.65;
}

/* ── Category Filters ───────────────────────────────── */
.blog-filters-wrap {
  border-bottom: 1px solid oklch(18% 0.04 257 / 0.08);
  padding-block: var(--sp-5);
}

.blog-filters {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-6);
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.blog-filters::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid oklch(18% 0.04 257 / 0.15);
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--c-blue);
  color: var(--c-navy);
}

.filter-pill.active {
  background: var(--c-navy);
  color: var(--c-white);
  border-color: var(--c-navy);
}

/* ── Cluster Badges ─────────────────────────────────── */
.cluster-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 3px 10px;
  width: fit-content;
}

.cluster-badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.cluster-industry-spotlights { color: oklch(44% 0.08 219); background: oklch(94% 0.025 219); }
.cluster-problem-posts       { color: var(--c-rose);        background: oklch(95% 0.035 25);  }
.cluster-service-explainers  { color: oklch(32% 0.05 257);  background: oklch(94% 0.012 257); }
.cluster-local-market        { color: oklch(50% 0.1 100);   background: oklch(94% 0.04 100);  }
.cluster-tools-tech          { color: oklch(40% 0.1 196);   background: oklch(94% 0.03 196);  }
.cluster-results-proof       { color: oklch(40% 0.12 148);  background: oklch(94% 0.03 148);  }
.cluster-ai-automation       { color: oklch(42% 0.12 287);  background: oklch(94% 0.03 287);  }

/* ── Blog Section ───────────────────────────────────── */
.blog-section { padding-block: var(--sp-16); }

.blog-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

/* ── Skeleton Loaders ───────────────────────────────── */
.blog-skeletons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
}

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0;  }
}

.skel {
  border-radius: var(--r-md);
  background: linear-gradient(
    90deg,
    oklch(94% 0 0) 25%,
    oklch(90% 0 0) 50%,
    oklch(94% 0 0) 75%
  );
  background-size: 1200px 100%;
  animation: shimmer 1.5s infinite;
}

.skel-img   { aspect-ratio: 16/9; border-radius: var(--r-lg); margin-bottom: var(--sp-4); }
.skel-badge { height: 22px; width: 110px; margin-bottom: var(--sp-3); border-radius: var(--r-pill); }
.skel-title { height: 20px; width: 88%; margin-bottom: var(--sp-2); }
.skel-title-2 { height: 20px; width: 60%; margin-bottom: var(--sp-3); }
.skel-text  { height: 14px; width: 100%; margin-bottom: var(--sp-1); }
.skel-text-2 { height: 14px; width: 75%; margin-bottom: var(--sp-3); }
.skel-meta  { height: 13px; width: 120px; }

/* ── Featured Post ──────────────────────────────────── */
.blog-featured {
  margin-bottom: var(--sp-16);
  padding-bottom: var(--sp-16);
  border-bottom: 1px solid oklch(18% 0.04 257 / 0.1);
}

.post-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
}

.post-featured-img-link {
  display: block;
}

.post-featured-img-wrap {
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--c-blue-light);
}

.post-featured-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.post-featured-img-link:hover .post-featured-img { transform: scale(1.04); }

.post-featured-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.post-featured-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-blue);
}

.post-featured-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.12;
  color: var(--c-navy);
}

.post-featured-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.12s;
}

.post-featured-title a:hover { color: var(--c-blue); }

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

.post-card-meta {
  font-size: 0.8rem;
  color: oklch(58% 0.02 257);
  letter-spacing: 0.01em;
}

/* ── Post Grid ──────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-10) var(--sp-8);
}

/* ── Post Card ──────────────────────────────────────── */
.post-card { display: flex; flex-direction: column; }

.post-card-img-link {
  display: block;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-4);
}

.post-card-img-wrap {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--c-blue-light);
}

.post-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card-img-link:hover .post-card-img { transform: scale(1.05); }

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--c-navy);
  margin-top: var(--sp-1);
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.12s;
}

.post-card-title a:hover { color: var(--c-blue); }

.post-card-excerpt {
  font-size: 0.875rem;
  line-height: 1.62;
  color: var(--c-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Empty / Error States ───────────────────────────── */
.blog-empty {
  text-align: center;
  padding-block: var(--sp-20);
  color: var(--c-text-muted);
}

.blog-empty p { font-size: 1rem; }

.setup-notice {
  max-width: 460px;
  margin-inline: auto;
  padding: var(--sp-8);
  border: 1px solid oklch(18% 0.04 257 / 0.1);
  border-radius: var(--r-xl);
}

.setup-notice h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--c-navy);
  margin-bottom: var(--sp-3);
}

.setup-notice code {
  font-family: monospace;
  font-size: 0.85rem;
  background: oklch(94% 0 0);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Blog Post Page ─────────────────────────────────── */

/* Post loading skeleton */
.post-skeleton-wrap {
  max-width: 760px;
  margin-inline: auto;
  padding: var(--sp-16) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* Post header */
.post-header {
  background: var(--c-white);
  padding-block: var(--sp-16) var(--sp-10);
  border-bottom: 1px solid oklch(18% 0.04 257 / 0.08);
}

.post-header-inner {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.post-back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-muted);
  text-decoration: none;
  margin-bottom: var(--sp-6);
  transition: color 0.12s;
}

.post-back:hover { color: var(--c-navy); }

.post-back svg { flex-shrink: 0; }

.post-header-badge { margin-bottom: var(--sp-4); }

.post-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw + 0.5rem, 3rem);
  font-weight: 900;
  line-height: 1.08;
  color: var(--c-navy);
  margin-bottom: var(--sp-5);
}

.post-meta-row {
  font-size: 0.875rem;
  color: oklch(55% 0.025 257);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.post-meta-sep {
  width: 3px;
  height: 3px;
  background: currentColor;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Post hero image */
.post-hero-img-wrap {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
  padding-block: var(--sp-8);
}

.post-hero-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--r-xl);
}

/* Article body */
.post-body-wrap {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
  padding-bottom: var(--sp-16);
}

.post-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--c-text);
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-navy);
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-4);
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-navy);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.post-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-navy);
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-2);
}

.post-body p { margin-bottom: var(--sp-5); }

.post-body a {
  color: var(--c-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-body a:hover { color: var(--c-navy); }

.post-body ul,
.post-body ol {
  margin-bottom: var(--sp-5);
  padding-left: var(--sp-6);
}

.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }

.post-body li { margin-bottom: var(--sp-2); }

.post-body blockquote {
  border-left: 3px solid var(--c-blue);
  margin-block: var(--sp-8);
  padding: var(--sp-4) var(--sp-6);
  background: var(--c-blue-light);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}

.post-body blockquote p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--c-navy);
  margin: 0;
}

.post-body code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.875em;
  background: oklch(93% 0.012 219);
  padding: 2px 6px;
  border-radius: var(--r-sm);
  color: oklch(32% 0.06 257);
}

.post-body pre {
  background: var(--c-navy);
  color: var(--c-white);
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  overflow-x: auto;
  margin-block: var(--sp-6);
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.9rem;
}

.article-img {
  margin-block: var(--sp-8);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.article-img img {
  width: 100%;
  height: auto;
  display: block;
}

.article-img figcaption {
  font-size: 0.82rem;
  color: oklch(58% 0.02 257);
  padding: var(--sp-2) var(--sp-1) 0;
  text-align: center;
}

/* Post CTA */
.post-cta {
  background: var(--c-blue-light);
  padding-block: var(--sp-16);
}

.post-cta-inner {
  max-width: 640px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-5);
}

.post-cta .eyebrow { color: var(--c-blue); }

.post-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--c-navy);
  line-height: 1.15;
}

.post-cta-title em { font-style: italic; color: var(--c-blue); }

.post-cta-sub {
  font-size: 0.975rem;
  color: var(--c-text-muted);
  line-height: 1.65;
  max-width: 460px;
}

.post-cta-btns {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
}

/* ── Content Offer ──────────────────────────────────── */
.post-offer {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--sp-6);
  padding-bottom: var(--sp-16);
}

.post-offer-link {
  display: block;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-offer-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.post-offer-img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-skeletons { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .post-featured { grid-template-columns: 1fr; gap: var(--sp-6); }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-skeletons { grid-template-columns: 1fr; }
  .blog-hero { padding-block: var(--sp-16) var(--sp-12); }
  .blog-section { padding-block: var(--sp-12); }
}
