/* ═══════ BLOG / NEWS HUB — PUBLIC ═══════ */

/* picture element should not break image containers */
.blog-featured-image picture,
.blog-card-image picture,
.blog-article-hero-image picture { display: contents; }

/* ── Hero ────────────────────────────────── */
.blog-hero {
  padding: 140px 24px 48px;
  text-align: center;
  background: var(--cream);
}
.blog-hero-inner { max-width: 640px; margin: 0 auto; }
.blog-hero-badge {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-light);
  padding: 5px 14px; border-radius: 980px;
  margin-bottom: 20px;
}
.blog-hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700; letter-spacing: -0.03em;
  margin-bottom: 12px;
}
.blog-hero-sub {
  font-size: 16px; color: var(--gray-600); line-height: 1.6;
}

/* ── Filter bar ──────────────────────────── */
.blog-filters {
  position: sticky; top: 60px; z-index: 50;
  background: rgba(250,250,250,0.85);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--gray-100);
}
.blog-filters-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.blog-filter-pills {
  display: flex; gap: 6px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.blog-filter-pills::-webkit-scrollbar { display: none; }

.blog-pill {
  flex-shrink: 0;
  font-family: 'Satoshi', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 7px 16px; border-radius: 980px;
  border: 1px solid var(--gray-100);
  background: var(--white); color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s ease;
}
.blog-pill:hover {
  border-color: var(--gray-200); color: var(--black);
}
.blog-pill.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}

.blog-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 980px;
  padding: 7px 16px;
  min-width: 200px;
  transition: border-color 0.2s;
  color: var(--gray-400);
}
.blog-search:focus-within {
  border-color: var(--accent-medium);
  color: var(--accent);
}
.blog-search-input {
  border: none; outline: none; background: none;
  font-family: 'Satoshi', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--black); width: 100%;
}
.blog-search-input::placeholder { color: var(--gray-400); }

/* ── Featured post (hero card) ───────────── */
.blog-featured {
  padding: 40px 24px 0;
}
.blog-featured-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  max-width: 1100px; margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.blog-featured-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.blog-featured-image {
  aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--gray-50);
  display: flex; align-items: center; justify-content: center;
}
.blog-featured-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-featured-card:hover .blog-featured-image img { transform: scale(1.03); }
.blog-featured-placeholder {
  color: var(--gray-200);
}

.blog-featured-body {
  padding: 40px 36px;
  display: flex; flex-direction: column; justify-content: center;
}
.blog-featured-title {
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700; letter-spacing: -0.02em;
  line-height: 1.3; margin-bottom: 10px;
}
.blog-featured-subtitle {
  font-size: 15px; color: var(--gray-600);
  line-height: 1.6; margin-bottom: 20px;
}
.blog-read-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600;
  color: var(--accent);
  transition: gap 0.2s ease;
}
.blog-featured-card:hover .blog-read-link { gap: 10px; }

/* ── Shared card meta ────────────────────── */
.blog-card-meta {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.blog-category-badge {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 3px 10px; border-radius: 980px;
}
.blog-card-meta time {
  font-size: 12px; color: var(--gray-400); font-weight: 500;
}
.blog-read-time {
  font-size: 12px; color: var(--gray-400); font-weight: 500;
}
.blog-card-meta time::before,
.blog-read-time::before {
  content: '·'; margin-right: 10px; color: var(--gray-200);
}
.blog-card-meta > :first-child::before { content: none; margin: 0; }

/* ── Section title ───────────────────────── */
.blog-section-title {
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gray-400);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ── Post grid ───────────────────────────── */
.blog-listing { padding: 48px 24px 100px; }
.blog-listing-inner { max-width: 1100px; margin: 0 auto; }
.blog-empty {
  text-align: center; color: var(--gray-400);
  font-size: 15px; padding: 60px 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.blog-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
  transform: translateY(-3px);
}

.blog-card-image {
  aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--gray-50);
}
.blog-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s ease;
}
.blog-card:hover .blog-card-image img { transform: scale(1.04); }
.blog-card-image--empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-200);
}

.blog-card-body {
  padding: 20px 24px 24px;
  display: flex; flex-direction: column; flex: 1;
}
.blog-card-title {
  font-size: 17px; font-weight: 700; line-height: 1.4;
  letter-spacing: -0.015em; margin-bottom: 6px;
}
.blog-card-subtitle {
  font-size: 14px; color: var(--gray-600); line-height: 1.55;
  flex: 1;
}
.blog-card-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-50);
}
.blog-card-footer .blog-read-time::before { content: none; margin: 0; }

/* ── See older posts button ──────────────── */
.blog-see-older-wrap {
  display: flex; justify-content: center;
  margin-top: 40px;
}
.blog-see-older {
  appearance: none;
  background: transparent;
  border: 1px solid var(--gray-100);
  color: var(--gray-700);
  font-size: 14px; font-weight: 600;
  padding: 12px 28px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.blog-see-older:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Empty filter state ──────────────────── */
.blog-empty-filter {
  text-align: center; padding: 80px 24px;
  color: var(--gray-400);
}
.blog-empty-filter svg { margin-bottom: 16px; color: var(--gray-200); }
.blog-empty-filter p { font-size: 15px; }

/* ── Blog article (detail page — unchanged) ── */
.blog-article { padding-top: 80px; }

.blog-article-hero-image {
  max-width: 900px; margin: 0 auto 40px;
  padding: 0 24px;
}
.blog-article-hero-image img {
  width: 100%; border-radius: var(--radius);
  object-fit: cover; max-height: 440px;
}

.blog-article-inner {
  max-width: 680px; margin: 0 auto;
  padding: 0 24px 100px;
}

.blog-fallback-notice {
  background: rgba(180,83,9,0.08);
  color: var(--guard-amber);
  padding: 10px 16px; border-radius: var(--radius-xs);
  font-size: 13px; margin-bottom: 24px;
}

.blog-article-meta {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.blog-article-meta time {
  font-size: 13px; color: var(--gray-400); font-weight: 500;
}
.blog-article-meta time::before,
.blog-article-meta .blog-read-time::before {
  content: '·'; margin-right: 10px; color: var(--gray-200);
}
.blog-article-meta > :first-child::before { content: none; margin: 0; }
.blog-article-edited { font-size: 13px; color: var(--gray-400); }
.blog-article-edited::before { content: none; }

.blog-article-author {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; margin-bottom: 24px;
}
.blog-article-author-label { color: var(--gray-400); font-weight: 500; }
.blog-article-author-name  { color: var(--black);    font-weight: 600; }

.blog-article-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.2; margin-bottom: 16px;
}
.blog-article-subtitle {
  font-size: 18px; color: var(--gray-600);
  line-height: 1.6; margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--accent);
}

.blog-article-body {
  font-size: 16px; line-height: 1.8;
  color: var(--gray-800);
}
/* Lead paragraph — slightly larger */
.blog-article-body p:first-child {
  font-size: 18px; line-height: 1.7;
  color: var(--black);
}
.blog-article-body p {
  margin-bottom: 1.5em;
}
.blog-article-body p:last-child { margin-bottom: 0; }
.blog-article-body strong {
  font-weight: 700; color: var(--black);
}
.blog-article-body em {
  font-style: italic; color: var(--gray-600);
}
.blog-article-body a {
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.blog-article-body a:hover { color: var(--accent-mid); }
.blog-article-body blockquote {
  margin: 2em 0;
  padding: 20px 28px;
  border-left: 3px solid var(--accent);
  background: var(--accent-lighter);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  font-style: italic;
  color: var(--gray-600);
}
.blog-article-body blockquote p { margin-bottom: 0.5em; }
.blog-article-body blockquote p:last-child { margin-bottom: 0; }
.blog-article-body ul,
.blog-article-body ol {
  margin: 1.5em 0;
  padding-left: 1.5em;
}
.blog-article-body ol {
  list-style: none;
  counter-reset: article-counter;
  padding-left: 0;
}
.blog-article-body ol li {
  counter-increment: article-counter;
  padding-left: 2em;
  position: relative;
}
.blog-article-body ol li::before {
  content: counter(article-counter) ".";
  position: absolute; left: 0;
  font-weight: 800; color: var(--accent);
  font-size: 15px;
}
.blog-article-body li {
  margin-bottom: 0.6em;
}
.blog-article-body h2 {
  font-size: 24px; font-weight: 700;
  letter-spacing: -0.02em;
  margin: 2.5em 0 0.8em; color: var(--black);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}
.blog-article-body h3 {
  font-size: 20px; font-weight: 700;
  letter-spacing: -0.015em;
  margin: 2em 0 0.6em; color: var(--accent);
}
.blog-article-body hr {
  border: none;
  border-top: 1px solid var(--gray-100);
  margin: 2.5em 0;
}
/* Video embedded in an article body. Portrait clips are phone screen
   recordings, so they are capped and centred, otherwise a 9:16 video
   towers over the 680px text column. */
.blog-article-body video {
  display: block;
  width: 100%;
  height: auto;
  margin: 1.75em 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
  background: #000;
}
.blog-article-body video.is-portrait {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}
/* From tablet up, a portrait clip sits left and the copy wraps to its right.
   Headings clear the float so the next section always starts on a fresh line. */
@media (min-width: 768px) {
  .blog-article-body video.is-portrait {
    float: left;
    max-width: 260px;
    margin: 0.3em 28px 1.25em 0;
  }
  .blog-article-body h2,
  .blog-article-body h3 { clear: both; }
}

.blog-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
  margin: 1.5em 0;
  display: block;
}
.blog-article-body table {
  width: 100%;
  margin: 2em 0;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: table;
}
.blog-article-body thead th {
  background: var(--accent-lighter);
  color: var(--accent);
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid var(--accent-light);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.blog-article-body tbody td {
  padding: 12px 16px;
  border-top: 1px solid var(--gray-100);
  vertical-align: top;
  color: var(--gray-800);
}
.blog-article-body tbody tr:nth-child(even) td {
  background: var(--gray-50, #fafafa);
}
.blog-article-body tbody tr:hover td {
  background: var(--accent-lighter);
}
.blog-article-body tbody td strong {
  color: var(--black);
}
@media (max-width: 720px) {
  .blog-article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.blog-article-back {
  margin-top: 48px; padding-top: 24px;
  border-top: 2px solid var(--accent);
}
.blog-article-back a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600;
  color: var(--accent); text-decoration: none;
  padding: 8px 16px;
  border: 1px solid var(--accent-light);
  border-radius: 980px;
  background: var(--accent-lighter);
  transition: all 0.2s;
}
.blog-article-back a:hover {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}

/* ── Responsive ──────────────────────────── */
@media (max-width: 768px) {
  .blog-featured-card {
    grid-template-columns: 1fr;
  }
  .blog-featured-image { aspect-ratio: 16 / 9; }
  .blog-featured-body { padding: 24px; }
  .blog-featured-title { font-size: 22px; }

  .blog-filters-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .blog-search { min-width: unset; }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .blog-hero { padding: 120px 20px 36px; }
  .blog-filters-inner { padding: 12px 16px; }
  .blog-pill { font-size: 12px; padding: 6px 12px; }
  .blog-listing { padding: 36px 16px 80px; }
  .blog-featured { padding: 28px 16px 0; }
}

/* ═══════ Related-posts aside on article pages ═══════ */
/* The aside is anchored to .blog-article-body-wrap, which sits AFTER
   the hero image. That keeps the aside from overlapping the wider
   hero (hero is up to 900px; the article column is 680px). On wide
   screens the aside floats into the right gutter so the article
   column stays exactly viewport-centered. On narrower screens the
   aside stacks below the article as a normal block. */

.blog-article-body-wrap { position: relative; }

.blog-article-related {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

.blog-related-heading {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
}

.blog-related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blog-related-card {
  display: flex;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
  background: var(--white);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.blog-related-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.06);
  transform: translateY(-2px);
  border-color: var(--accent-light);
}

.blog-related-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: var(--gray-50);
}
.blog-related-thumb picture,
.blog-related-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.blog-related-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.blog-related-cat {
  align-self: flex-start;
  font-size: 10px;
  padding: 2px 8px;
}
.blog-related-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 2px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-related-meta {
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
  line-height: 1.4;
}

/* ── Side-by-side at 1200px+ ──
   Article-inner stays max-width 680px centred (margin: 0 auto).
   Right edge of article = 50% + 340px. Aside anchored 20px to its
   right at width 200px → right edge of aside = 50% + 560px.
   For viewport 1200px that's 600 + 560 = 1160 (40px margin to edge). OK. */
@media (min-width: 1200px) {
  .blog-article-related {
    position: absolute;
    top: 0;                        /* top of body-wrap = top of article-inner, BELOW the hero */
    bottom: 0;
    left: calc(50% + 340px + 20px);
    width: 200px;
    max-width: 200px;
    margin: 0;
    padding: 0;
  }
  .blog-related-sticky {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 4px;            /* room for the thin scrollbar */
  }
  .blog-related-sticky::-webkit-scrollbar { width: 6px; }
  .blog-related-sticky::-webkit-scrollbar-thumb {
    background: var(--gray-100); border-radius: 3px;
  }
  /* Tight cards at the small end of side-by-side */
  .blog-related-thumb { flex-basis: 56px; width: 56px; height: 56px; }
  .blog-related-card  { padding: 8px; gap: 10px; }
  .blog-related-title { font-size: 12px; }
}

/* ── Roomier at 1400px+ ── */
@media (min-width: 1400px) {
  .blog-article-related {
    left: calc(50% + 340px + 32px);
    width: 240px;
    max-width: 240px;
  }
  .blog-related-thumb { flex-basis: 72px; width: 72px; height: 72px; }
  .blog-related-card  { padding: 10px; gap: 12px; }
  .blog-related-title { font-size: 13px; }
}

/* ── Generous on very wide screens ── */
@media (min-width: 1700px) {
  .blog-article-related {
    left: calc(50% + 340px + 48px);
    width: 280px;
    max-width: 280px;
  }
}

@media (max-width: 480px) {
  .blog-article-related { padding-bottom: 60px; }
  .blog-related-card { padding: 8px; }
  .blog-related-thumb { flex-basis: 60px; width: 60px; height: 60px; }
}