/* ═══════════════════════════════════════════════════════════════
   H2Via — style-blog.css
   Blog section styles — extends style.css, never modifies it
   All colors via CSS custom properties from style.css tokens
   ═══════════════════════════════════════════════════════════════ */

/* ── BLOG LISTING PAGE ────────────────────────────────────────── */

.blog-intro {
  padding: clamp(3rem, 5vw, 5rem) 5vw clamp(2rem, 3vw, 3rem);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.blog-intro .eyebrow { justify-content: center; }
.blog-intro h1 { margin-bottom: .6rem; }
.blog-intro p {
  color: var(--text2);
  max-width: 580px;
  font-weight: 300;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(.875rem, 1.1vw, .95rem);
  line-height: 1.78;
}

/* ── Blog grid ────────────────────────────────────────────────── */
.blog-section {
  padding: clamp(3rem, 5vw, 5rem) 5vw;
  background: var(--bg);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* ── Blog card ────────────────────────────────────────────────── */
.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .3s, border-color .3s, transform .3s;
}
.blog-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--green-lt);
  transform: translateY(-3px);
}

.blog-card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  position: relative;
  flex-shrink: 0;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .6s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); }

/* Placeholder when no image */
.blog-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--surface2) 0%, var(--green-xlt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-lt);
}
.blog-card-img-placeholder svg { opacity: .4; }

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .7rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
}
.blog-card-date {
  font-family: var(--fb);
  font-size: .68rem;
  color: var(--text3);
  font-weight: 400;
}
.blog-card-read {
  font-family: var(--fb);
  font-size: .68rem;
  color: var(--text3);
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.blog-card-read::before {
  content: '·';
  color: var(--border);
}

.blog-card-title {
  font-family: var(--fh);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--forest);
  line-height: 1.25;
  letter-spacing: -.015em;
  transition: color .2s;
}
.blog-card:hover .blog-card-title { color: var(--green2); }

.blog-card-excerpt {
  font-family: var(--fb);
  font-size: .85rem;
  color: var(--text2);
  line-height: 1.7;
  font-weight: 300;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--fb);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--forest);
  margin-top: .4rem;
  transition: gap .2s, color .2s;
}
.blog-card-cta svg {
  transition: transform .2s;
  flex-shrink: 0;
}
.blog-card:hover .blog-card-cta { color: var(--green2); gap: .55rem; }
.blog-card:hover .blog-card-cta svg { transform: translateX(3px); }

/* ── Empty state ──────────────────────────────────────────────── */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 4px;
}
.blog-empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--green-xlt);
  border: 1px solid var(--green-lt);
  border-radius: 50%;
  margin: 0 auto 1.2rem;
  color: var(--forest);
}
.blog-empty h3 {
  font-family: var(--fh);
  font-size: 1.1rem;
  color: var(--forest);
  margin-bottom: .5rem;
}
.blog-empty p {
  font-size: .875rem;
  color: var(--text2);
  font-weight: 300;
  max-width: 380px;
  margin: 0 auto;
}

/* ── Category filter strip ────────────────────────────────────── */
.blog-filters {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding: 0 5vw;
  padding-top: 2rem;
  background: var(--bg);
}
.blog-filter-btn {
  font-family: var(--fb);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .38rem .9rem;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.blog-filter-btn:hover,
.blog-filter-btn.active {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

/* ══════════════════════════════════════════════════════════════
   SINGLE POST TEMPLATE
   ══════════════════════════════════════════════════════════════ */

/* ── Post hero ────────────────────────────────────────────────── */
.post-hero {
  width: 100%;
  max-height: 520px;
  min-height: 300px;
  overflow: hidden;
  position: relative;
  background: var(--forest3);
}
.post-hero img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  opacity: .82;
}
.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 43, 31, 0) 30%,
    rgba(15, 43, 31, .55) 100%
  );
  pointer-events: none;
}

/* ── Post header ──────────────────────────────────────────────── */
.post-header {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3.5rem) 5vw 0;
}
.post-header .tag { margin-bottom: 1rem; }
.post-header h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 1.2rem;
  line-height: 1.12;
  letter-spacing: -.02em;
}
.post-byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.post-byline-author {
  font-family: var(--fb);
  font-size: .8rem;
  font-weight: 700;
  color: var(--forest);
}
.post-byline-sep {
  color: var(--border);
  font-size: .9rem;
}
.post-byline-date,
.post-byline-read {
  font-family: var(--fb);
  font-size: .78rem;
  color: var(--text3);
  font-weight: 400;
}

/* ── Lang toggle on post ──────────────────────────────────────── */
.post-lang {
  max-width: 740px;
  margin: 0 auto;
  padding: .7rem 5vw 0;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.post-lang-label {
  font-family: var(--fb);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text3);
}
.post-lang-links {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.post-lang-links a {
  font-family: var(--fb);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .28rem .6rem;
  color: var(--text2);
  transition: background .18s, color .18s;
  text-decoration: none;
  line-height: 1;
}
.post-lang-links a:hover { color: var(--forest); background: var(--surface); }
.post-lang-links a.lang-active { background: var(--forest); color: #fff; }

/* ── Post body ────────────────────────────────────────────────── */
.post-body {
  max-width: 740px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) 5vw clamp(2.5rem, 5vw, 4rem);
}

.post-body p {
  font-family: var(--fb);
  font-size: clamp(.95rem, 1.1vw, 1.05rem);
  color: var(--text);
  line-height: 1.82;
  font-weight: 300;
  margin-bottom: 1.4rem;
}
.post-body p strong { color: var(--forest); font-weight: 700; }
.post-body p em { font-style: italic; }

.post-body h2 {
  font-family: var(--fh);
  font-size: clamp(1.3rem, 2vw, 1.65rem);
  color: var(--forest);
  line-height: 1.18;
  margin-top: 2.5rem;
  margin-bottom: .9rem;
  letter-spacing: -.015em;
}
.post-body h3 {
  font-family: var(--fb);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-weight: 700;
  color: var(--forest2);
  line-height: 1.3;
  margin-top: 1.8rem;
  margin-bottom: .65rem;
  letter-spacing: -.01em;
}

.post-body ul,
.post-body ol {
  padding-left: 1.4rem;
  margin-bottom: 1.4rem;
}
.post-body ul { list-style: none; padding-left: 0; }
.post-body ul li {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: clamp(.9rem, 1vw, 1rem);
  color: var(--text);
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: .4rem;
}
.post-body ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  margin-top: .65rem;
}
.post-body ol li {
  font-size: clamp(.9rem, 1vw, 1rem);
  color: var(--text);
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: .4rem;
}

/* ── Pull quote ───────────────────────────────────────────────── */
.pull-quote {
  margin: 2.2rem 0;
  padding: 1.2rem 1.6rem;
  background: var(--green-xlt);
  border-left: 3px solid var(--green);
  border-radius: 0 3px 3px 0;
}
.pull-quote p {
  font-family: var(--fb);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  font-style: italic;
  font-weight: 400;
  color: var(--forest);
  line-height: 1.65;
  margin: 0;
}
.pull-quote cite {
  display: block;
  font-family: var(--fb);
  font-size: .75rem;
  font-weight: 700;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text2);
  margin-top: .65rem;
}

/* ── Post image with caption ──────────────────────────────────── */
.post-image {
  margin: 2rem 0;
}
.post-image img {
  width: 100%;
  border-radius: 3px;
  display: block;
  box-shadow: var(--shadow);
}
.post-image figcaption {
  font-family: var(--fb);
  font-size: .78rem;
  color: var(--text3);
  font-style: italic;
  font-weight: 300;
  margin-top: .5rem;
  line-height: 1.5;
  text-align: center;
}

/* ── Standards tag row in post ────────────────────────────────── */
.post-standards {
  margin: 2rem 0;
  padding: 1.1rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
}
.post-standards-label {
  font-family: var(--fb);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: .6rem;
  display: block;
}

/* ── Post divider ─────────────────────────────────────────────── */
.post-divider {
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

/* ── Post CTA block ───────────────────────────────────────────── */
.post-cta {
  background: var(--forest);
  padding: clamp(2.5rem, 5vw, 4rem) 5vw;
  text-align: center;
}
.post-cta h2 {
  color: #fff;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  margin-bottom: .8rem;
}
.post-cta p {
  color: rgba(255, 255, 255, .65);
  font-size: clamp(.875rem, 1.1vw, .95rem);
  font-weight: 300;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 2rem;
}

/* ── Related posts ────────────────────────────────────────────── */
.related-posts {
  padding: clamp(3rem, 5vw, 5rem) 5vw;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.related-posts .eyebrow { margin-bottom: 1.5rem; }
.related-posts h2 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin-bottom: 2rem;
}
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Back to blog link ────────────────────────────────────────── */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--fb);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text2);
  transition: color .2s;
  margin-bottom: 1.5rem;
}
.post-back:hover { color: var(--forest); }
.post-back svg { transition: transform .2s; }
.post-back:hover svg { transform: translateX(-3px); }

/* ── Share strip ──────────────────────────────────────────────── */
.post-share {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2rem 0;
}
.post-share-label {
  font-family: var(--fb);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text3);
}
.post-share-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--fb);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .38rem .8rem;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
  cursor: pointer;
}
.post-share-btn:hover {
  background: var(--forest);
  color: #fff;
  border-color: var(--forest);
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — BLOG
   ══════════════════════════════════════════════════════════════ */

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

@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .post-body { padding: 1.5rem 5vw 2.5rem; }
  .post-hero { max-height: 280px; min-height: 200px; }
  .post-hero img { max-height: 280px; }
  .post-share { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  .blog-filters { padding: 1.2rem 5vw 0; }
  .post-header { padding-top: 1.5rem; }
}
