/* ==========================================================================
   Blog: post hero, key takeaways, in-article CTA, sources, post cards
   ========================================================================== */

/* Post hero */
.post-hero { padding-bottom: clamp(36px, 5vw, 64px); }
.post-hero h1 { font-size: clamp(1.6rem, 1.2rem + 1.76vw, 2.56rem); }
.post-meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 20px; font-size: var(--t-small); color: var(--c-muted);
}
.post-hero__lead { margin-bottom: 0; }

/* Key takeaways */
.takeaways {
  margin-bottom: clamp(32px, 4vw, 48px);
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--c-line); border-left: 3px solid var(--c-purple);
  border-radius: var(--r-lg); background: var(--c-white);
}
.takeaways__title {
  margin-bottom: 16px; font-size: var(--t-label); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--c-purple);
}
.takeaways .checks li { color: var(--c-ink); }

/* Tables and callouts inside long-form */
.prose .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.prose table { min-width: 560px; background: var(--c-white); border: 1px solid var(--c-line); border-radius: var(--r-md); }
.prose thead th { background: var(--c-sand); font-size: var(--t-small); }
.prose td { vertical-align: top; }
.prose .stat-callout {
  background: var(--c-white); color: var(--c-ink);
  border: 1px solid var(--c-line); border-left: 4px solid var(--c-purple);
}
.prose .stat-callout strong { color: var(--c-purple); }
.prose .stat-callout p { color: var(--c-ink-soft); font-size: 1rem; line-height: 1.6; }
.prose .stat-callout a { color: var(--c-purple); }
.prose .stat-callout + .stat-callout { margin-top: 12px; }
.prose h2 + p, .prose h3 + p { margin-top: .6em; }

/* In-article CTA: light lilac card, no dark blocks */
.post-cta {
  display: grid; gap: 24px;
  margin-top: clamp(40px, 5vw, 64px);
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid var(--c-line); border-radius: var(--r-xl);
  background: var(--c-purple-soft); color: var(--c-ink);
}
.post-cta__eyebrow {
  margin-bottom: 10px; font-size: var(--t-label); font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--c-purple);
}
.post-cta h2 { font-size: clamp(1.2rem, 0.96rem + 0.8vw, 1.6rem); }
.post-cta p { margin-top: 10px; color: var(--c-ink-soft); max-width: 640px; }
.post-cta--wide { margin-top: 0; }

/* Sources */
.post-sources {
  margin-top: clamp(40px, 5vw, 56px); padding-top: 28px;
  border-top: 1px solid var(--c-line);
}
.post-sources h2 { font-size: 1rem; margin-bottom: 14px; }
.post-sources ol { list-style: decimal; padding-left: 1.3em; display: grid; gap: 8px; font-size: var(--t-small); color: var(--c-muted); }
.post-sources a { color: var(--c-ink-soft); text-underline-offset: 3px; overflow-wrap: anywhere; }
.post-sources a:hover { color: var(--c-purple); }

/* Post cards (index + related) */
.post-card { display: flex; flex-direction: column; height: 100%; color: var(--c-ink); }
.post-card h3 { font-size: 1rem; line-height: 1.3; }
.post-card__cat {
  margin-bottom: 14px; font-size: var(--t-label); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--c-purple) !important;
}
.post-card__meta { margin-top: auto; padding-top: 18px; font-size: var(--t-small); color: var(--c-muted) !important; }

/* Featured post on the index */
.post-featured {
  display: grid; gap: 28px; align-items: center;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--c-line); border-radius: var(--r-xl);
  background: var(--c-white); text-decoration: none; color: var(--c-ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.post-featured:hover { border-color: var(--c-ink); box-shadow: var(--shadow-md); }
.post-featured h2 { font-size: clamp(1.28rem, 0.96rem + 1.28vw, 2rem); margin-bottom: 14px; }
.post-featured p { color: var(--c-ink-soft); }
.post-featured__label {
  display: inline-block; margin-bottom: 16px; padding: 4px 12px;
  border-radius: var(--r-pill); background: var(--c-purple-soft);
  font-size: var(--t-label); font-weight: 600; color: var(--c-purple);
}
.post-featured__aside {
  padding: 24px; border-radius: var(--r-lg); background: var(--c-sand);
}
.post-featured__aside h3 { font-size: var(--t-label); text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin-bottom: 14px; }
.post-featured__aside .checks li { color: var(--c-ink); font-size: var(--t-small); }
@media (min-width: 960px) { .post-featured { grid-template-columns: 1.4fr 1fr; gap: 48px; } }

/* Article and card images */
.post-image { margin-top: clamp(20px, 3vw, 32px); }
.post-image img, .post-image picture img { width: 100%; height: auto; border-radius: var(--r-lg); border: 1px solid var(--c-line); }
.post-card__img, .post-card picture img { width: calc(100% + 2 * clamp(24px, 3vw, 32px)); max-width: none; margin: calc(-1 * clamp(24px, 3vw, 32px)) calc(-1 * clamp(24px, 3vw, 32px)) 18px; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--c-line); }
.post-card { overflow: hidden; }
.post-featured__img, .post-featured picture img { width: 100%; height: auto; border-radius: var(--r-md); }
.post-featured > picture, .post-featured > .post-featured__img { grid-column: 1 / -1; }
.post-featured picture img, .post-featured__img { aspect-ratio: 21 / 9; object-fit: cover; }

/* Photo thumbnails with review overlay */
.post-thumb { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--c-sand); }
.post-thumb > img, .post-thumb > picture, .post-thumb > picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-thumb__review {
  position: absolute; left: 6%; bottom: 9%; max-width: 58%;
  padding: 12px 14px; border-radius: 12px; background: var(--c-white);
  box-shadow: 0 12px 30px -10px rgba(26, 16, 40, .45); color: var(--c-ink);
}
.post-thumb__head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.post-thumb__head img { width: 18px; height: 18px; }
.post-thumb__stars { color: var(--c-gold); letter-spacing: 1px; font-size: .875rem; }
.post-thumb__review p { font-size: .875rem; line-height: 1.35; font-weight: 500; color: var(--c-ink) !important; margin: 0; }
.post-thumb__name { display: block; margin-top: 4px; font-size: .875rem; color: var(--c-muted); }
.post-thumb__logos { position: absolute; top: 6%; right: 5%; display: flex; gap: 6px; }
.post-thumb__logos li { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c-white); box-shadow: 0 4px 12px -4px rgba(26, 16, 40, .35); }
.post-thumb__logos img { width: 16px; height: 16px; }
.post-thumb--hero { border-radius: var(--r-lg); aspect-ratio: 16 / 9; }
.post-thumb--hero .post-thumb__review { padding: 16px 18px; max-width: 46%; }
.post-thumb--hero .post-thumb__review p { font-size: 1rem; }
@media (max-width: 520px) { .post-thumb__review { max-width: 78%; } .post-thumb__logos { display: none; } }

/* Knowledge base: filters and compact cards */
.kb-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 28px; }
.kb-filter__topics { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-chip {
  padding: 8px 14px; border: 1px solid var(--c-line); border-radius: var(--r-pill);
  background: var(--c-white); color: var(--c-ink-soft); font: 500 .875rem/1 var(--f-sans); cursor: pointer;
}
.kb-chip:hover { border-color: var(--c-purple); color: var(--c-purple); }
.kb-chip[aria-pressed="true"] { background: var(--c-purple); border-color: var(--c-purple); color: var(--c-white); }
.kb-filter__sector { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--c-muted); }
.kb-filter__sector select { padding: 8px 12px; border: 1px solid var(--c-line); border-radius: var(--r-btn); font: 500 .875rem var(--f-sans); color: var(--c-ink); background: var(--c-white); }
@media (max-width: 719px) {
  .kb-filter__topics { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .kb-chip { flex: none; }
}
.kb-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .kb-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .kb-grid { grid-template-columns: repeat(3, 1fr); } }
.kb-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--c-line); border-radius: var(--r-lg); background: var(--c-white); text-decoration: none; color: var(--c-ink); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.kb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c-purple); }
.kb-card[hidden] { display: none; }
.kb-card__plain { display: grid; place-items: center; aspect-ratio: 3 / 2; background: var(--c-sand); color: var(--c-purple); font-weight: 600; }
.kb-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.kb-card__topic { font-size: .875rem; font-weight: 600; color: var(--c-purple) !important; }
.kb-card__title { font-size: 1.05rem; line-height: 1.3; letter-spacing: -.01em; }
.kb-card__meta { margin-top: auto; font-size: .875rem; color: var(--c-muted) !important; }
.kb-empty { margin-top: 18px; color: var(--c-muted); }
