/* BDStall - pages/blog.css
   Blog list and detail page styling.

   Bilingual (Bangla / English) — Bangla primary in BD market.
   Bangla font: Tiro Bangla (body, optimized for reading).
   English font: Inter (matches the rest of the site).
   Bangla headings: Hind Siliguri (compact, good at large sizes).

   Server-side language toggle: clicking "Read in English" navigates to
   the English URL (/blog/en/{slug}) — no client-side switch.
*/

/* ════════════════════════════════════════════════════════════
   FONT FAMILIES — Bangla support
   ════════════════════════════════════════════════════════════ */

:root {
  --font-bangla:         'Tiro Bangla', 'Hind Siliguri', 'SolaimanLipi', 'Kalpurush', sans-serif;
  --font-bangla-display: 'Hind Siliguri', 'Tiro Bangla', sans-serif;
}

/* When [lang="bn"] is set on a container or page, switch fonts */
[lang="bn"], [lang="bn"] * {
  font-family: var(--font-bangla);
}
[lang="bn"] h1, [lang="bn"] h2, [lang="bn"] h3,
[lang="bn"] .blog-card-title,
[lang="bn"] .blog-detail-title,
[lang="bn"] .blog-page-title {
  font-family: var(--font-bangla-display);
}

/* ════════════════════════════════════════════════════════════
   BLOG LIST PAGE
   ════════════════════════════════════════════════════════════ */

.blog-page-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 0 40px;
}
@media (min-width: 768px) {
  .blog-page-wrap { padding: 24px 0 60px; }
}

/* ─── Page header ─── */
.blog-page-header {
  text-align: center;
  margin: 8px 0 24px;
}
.blog-page-title {
  margin: 0 0 8px;
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
@media (min-width: 768px) {
  .blog-page-title { font-size: 2.125rem; }
}
.blog-page-lede {
  margin: 0 auto;
  max-width: 580px;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}
[lang="bn"] .blog-page-lede {
  font-size: 1rem;
  line-height: 1.7;
}

/* ─── Language toggle (top right of header) ─── */
.blog-lang-row {
  display: flex; align-items: center; justify-content: center;
  gap: 4px;
  margin-bottom: 12px;
  background: white;
  border: 1px solid var(--color-border-tertiary);
  border-radius: 22px;
  padding: 3px;
  width: fit-content;
  margin-left: auto; margin-right: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.blog-lang-btn {
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 18px;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: transparent;
  cursor: pointer;
}
.blog-lang-btn.active {
  background: var(--green);
  color: white;
}
.blog-lang-btn:not(.active):hover {
  color: var(--green-dark);
}

/* ─── Category chip filter ─── */
.blog-categories {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-padding: 4px;
  -webkit-overflow-scrolling: touch;
}
.blog-categories::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .blog-categories {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: visible;
    margin-bottom: 32px;
  }
}
.blog-category-chip {
  display: inline-flex; align-items: center;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: white;
  border: 1px solid var(--color-border-tertiary);
  border-radius: 22px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-family: inherit;
  cursor: pointer;
}
.blog-category-chip:hover {
  border-color: var(--green);
  color: var(--green-dark);
}
.blog-category-chip.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}

/* ─── Article grid ─── */
.blog-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 32px;
}
@media (min-width: 768px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}
@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
  }
}

/* ─── Article card ─── */
.blog-card {
  display: flex; flex-direction: column;
  background: white;
  border: 1px solid var(--color-border-tertiary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  text-decoration: none;
  color: var(--color-text-primary);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  position: relative;
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 24px rgba(20,154,73,0.12);
  border-color: var(--green);
}
.blog-card:active {
  transform: translateY(-1px);
}

.blog-card-img-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;  /* 16:9 ratio */
  background: var(--green) url("../img/blog-default-cover.svg") center/cover no-repeat;
  overflow: hidden;
}

/* ─── Default blog cover (fallback when no per-post image) ───
   Three ways to use:
   1. CSS fallback — .blog-card-img-wrap has the default as background-image,
      so omitting <img> still shows it.
   2. Add <img> with real cover photo — it sits on top of the default and
      hides it. Best for production.
   3. Set src="img/blog-default-cover.svg" explicitly on <img> when CMS data
      has no cover assigned (preferred for SEO — alt text still works).
*/
.blog-card-img.is-default,
.blog-detail-cover img.is-default {
  /* When using the default explicitly, no transform on hover (it's static art) */
  transition: none;
}
.blog-card:hover .blog-card-img.is-default {
  transform: none;
}

.blog-card-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.blog-card:hover .blog-card-img {
  transform: scale(1.04);
}

.blog-card-cat-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 4px 10px;
  background: rgba(20,154,73,0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 14px;
  z-index: 1;
}

.blog-card-body {
  padding: 14px 14px 16px;
  display: flex; flex-direction: column;
  flex: 1;
}
@media (min-width: 768px) {
  .blog-card-body { padding: 16px; }
}

.blog-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.4;
  margin: 0 0 8px;
  letter-spacing: -0.005em;
  /* Clamp to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 768px) {
  .blog-card-title {
    font-size: 1rem;
    -webkit-line-clamp: 3;
  }
}
[lang="bn"] .blog-card-title {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 600;
}
@media (min-width: 768px) {
  [lang="bn"] .blog-card-title {
    font-size: 1.0625rem;
  }
}

.blog-card-meta {
  display: flex; align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--color-text-tertiary);
  margin-top: auto;
  font-weight: 500;
}
.blog-card-meta-sep {
  color: var(--color-border-secondary);
}

/* ─── Pagination (reuses brand pagination but with adjustments) ─── */
.blog-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.blog-pagination a, .blog-pagination span {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border-tertiary);
  background: white;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s;
}
.blog-pagination a:hover {
  border-color: var(--green);
  color: var(--green-dark);
}
.blog-pagination .active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.blog-pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* ════════════════════════════════════════════════════════════
   BLOG DETAIL PAGE
   ════════════════════════════════════════════════════════════ */

/* ─── Detail wrap (narrower than list for readability) ─── */
.blog-detail-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 0 40px;
}
@media (min-width: 768px) {
  .blog-detail-wrap { padding: 24px 0 60px; }
}

/* ─── Breadcrumb (small, above title) ─── */
.blog-breadcrumb {
  display: flex; align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.blog-breadcrumb a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}
.blog-breadcrumb a:hover {
  text-decoration: underline;
}
.blog-breadcrumb-sep { color: var(--color-border-secondary); }

/* ─── Detail header ─── */
.blog-detail-header {
  margin-bottom: 24px;
}
.blog-detail-cat-row {
  display: flex; align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.blog-detail-cat-chip {
  display: inline-flex; align-items: center;
  padding: 4px 12px;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 12px;
  text-decoration: none;
}
.blog-detail-meta {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  display: inline-flex; align-items: center;
  gap: 6px;
}
.blog-detail-meta-sep { color: var(--color-border-secondary); }

.blog-detail-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 16px;
}
@media (min-width: 768px) {
  .blog-detail-title { font-size: 2rem; }
}
[lang="bn"] .blog-detail-title {
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0;
}

/* ─── Detail header action row (lang toggle + share) ─── */
.blog-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;  /* share buttons align right; lang toggle removed (handled by header) */
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border-tertiary);
}
.blog-detail-lang-toggle {
  display: inline-flex; align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--orange);
  color: white;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: filter 0.15s;
}
.blog-detail-lang-toggle:hover { filter: brightness(0.92); }
.blog-detail-lang-toggle .icon { font-size: 0.875rem; }

.blog-detail-share {
  display: inline-flex; align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  font-weight: 600;
}
.blog-detail-share-btns {
  display: inline-flex; align-items: center;
  gap: 6px;
}
.blog-detail-share-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.blog-detail-share-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.22);
}
.blog-detail-share-btn svg { display: block; }
.blog-detail-share-btn.whatsapp { background: var(--whatsapp); color: white; }
.blog-detail-share-btn.facebook { background: var(--facebook); color: white; }
.blog-detail-share-btn.copy {
  background: var(--color-bg-subtle);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-tertiary);
}
.blog-detail-share-btn.copy:hover {
  background: white;
  color: var(--green-dark);
  border-color: var(--green);
}

/* ─── Cover image ─── */
.blog-detail-cover {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--green) url("../img/blog-default-cover.svg") center/cover no-repeat;
  aspect-ratio: 16/9;
}
.blog-detail-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── Two-column layout (TOC sidebar + body) on desktop ─── */
.blog-detail-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 1024px) {
  .blog-detail-layout {
    grid-template-columns: 1fr 240px;
    gap: 48px;
  }
}

/* ─── Body article ─── */
.blog-detail-body {
  font-size: 1.0625rem;          /* 17px — better for long-form reading */
  line-height: 1.75;
  color: #2A2A28;                /* Near-black, much higher contrast than text-secondary
                                    for sustained reading. WCAG: 14.5:1 on white. */
  max-width: 720px;
}
[lang="bn"] .blog-detail-body {
  font-size: 1.125rem;           /* 18px — Bangla letterforms need more space */
  line-height: 2;                /* Looser line-height for dense Bangla characters */
  color: #1F1F1D;                /* Bangla benefits from extra contrast (denser glyphs) */
}
.blog-detail-body p {
  margin: 0 0 18px;
}
[lang="bn"] .blog-detail-body p {
  margin-bottom: 22px;  /* Bangla paragraphs need more space */
}

.blog-detail-body h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
  line-height: 1.3;
  scroll-margin-top: 80px;
}
[lang="bn"] .blog-detail-body h2 {
  font-size: 1.375rem;
  line-height: 1.5;
}
.blog-detail-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 28px 0 10px;
  line-height: 1.35;
}
[lang="bn"] .blog-detail-body h3 {
  font-size: 1.125rem;
  line-height: 1.55;
}

.blog-detail-body ul, .blog-detail-body ol {
  margin: 0 0 18px;
  padding-left: 24px;
}
.blog-detail-body li {
  margin-bottom: 8px;
}

.blog-detail-body strong {
  color: #000;
  font-weight: 700;
}

/* Inline body links — always-visible underline so readers know they're tappable
   on mobile (no hover state). Color: brand green-dark with subtle visual weight. */
.blog-detail-body a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(14, 122, 56, 0.35);  /* muted underline — softer than text */
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s, color 0.15s;
}
.blog-detail-body a:hover {
  text-decoration-color: var(--green-dark);
  color: var(--green);
}
.blog-detail-body a:active {
  color: var(--green-dark);
}
/* Visited links — subtle desaturation to help readers see what they've already read */
.blog-detail-body a:visited {
  color: #0A5828;  /* slightly desaturated green-dark */
}

.blog-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  display: block;
}

.blog-detail-body figure {
  margin: 20px 0;
}
.blog-detail-body figcaption {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

.blog-detail-body blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  background: var(--green-subtle);
  border-left: 4px solid var(--green);
  border-radius: 0 8px 8px 0;
  font-size: 1.0625rem;
  color: var(--color-text-primary);
  font-style: italic;
}
[lang="bn"] .blog-detail-body blockquote {
  font-style: normal;
  font-weight: 500;
}

/* Inline product CTA card (deep linking from blog body to category/product)
   Layout: [icon-circle 40px] [title + subtitle stacked, flex-1] [arrow]
   Robust against title text wrapping or Bangla glyph height variance. */
.blog-detail-body .inline-product-cta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--orange-light);
  border: 1px solid #F0CC9A;
  border-radius: 10px;
  margin: 24px 0;
  text-decoration: none;
  font-style: normal;
  transition: transform 0.15s, box-shadow 0.15s;
}
.blog-detail-body .inline-product-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 131, 32, 0.18);
}
/* Underline override — links inside body have underline by default */
.blog-detail-body .inline-product-cta {
  text-decoration: none;
}
.blog-detail-body .inline-product-cta:hover {
  text-decoration: none;
}

.blog-detail-body .inline-product-cta-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.blog-detail-body .inline-product-cta-body {
  flex: 1 1 auto;
  min-width: 0;     /* allow shrinking for long titles */
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Title and subtitle — reset all paragraph inheritance so they behave predictably
   regardless of [lang="bn"] paragraph rules elsewhere in the body. */
.blog-detail-body .inline-product-cta-title,
[lang="bn"] .blog-detail-body .inline-product-cta-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.blog-detail-body .inline-product-cta-subtitle,
[lang="bn"] .blog-detail-body .inline-product-cta-subtitle {
  font-size: 0.8125rem;
  color: var(--orange-dark);
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
}

.blog-detail-body .inline-product-cta-arrow {
  color: var(--orange-dark);
  font-size: 1.25rem;
  flex-shrink: 0;
  font-weight: 700;
  margin-left: 4px;
  transition: transform 0.15s;
}
.blog-detail-body .inline-product-cta:hover .inline-product-cta-arrow {
  transform: translateX(3px);
}

/* ─── Sticky TOC sidebar (desktop) ─── */
.blog-detail-toc {
  display: none;
}
@media (min-width: 1024px) {
  .blog-detail-toc {
    display: block;
    position: sticky;
    top: 80px;
    align-self: start;
    background: white;
    border: 1px solid var(--color-border-tertiary);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    padding: 16px 18px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}
.blog-detail-toc-title {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-tertiary);
  margin: 0 0 12px;
}
.blog-detail-toc-list {
  list-style: none;
  margin: 0; padding: 0;
}
.blog-detail-toc-list li {
  margin-bottom: 4px;
}
.blog-detail-toc-list a {
  display: block;
  padding: 6px 10px;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
  text-decoration: none;
}
.blog-detail-toc-list a:hover {
  background: var(--green-subtle);
  color: var(--green-dark);
}
.blog-detail-toc-list a.active {
  background: var(--green-light);
  color: var(--green-dark);
  font-weight: 700;
}

/* ─── Author byline (end of article) ─── */
.blog-detail-author {
  display: flex; align-items: center;
  gap: 14px;
  padding: 18px;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-tertiary);
  border-radius: 10px;
  margin-top: 32px;
}
.blog-detail-author-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.blog-detail-author-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.blog-detail-author-info {
  flex: 1; min-width: 0;
}
.blog-detail-author-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 2px;
  line-height: 1.3;
}
.blog-detail-author-bio {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.45;
}

/* ─── Related articles ─── */
.blog-related {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border-tertiary);
}
.blog-related-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 16px;
}
.blog-related-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .blog-related-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile: hide page numbers beyond the first 3 + ellipsis */
@media (max-width: 479.98px) {
  .blog-pagination .pg-far,
  .blog-pagination .pg-ellipsis {
    display: none;
  }
  .blog-pagination a,
  .blog-pagination span {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 0.75rem;
  }
}

/* ─── Blog card excerpt & read-more ─── */
.blog-card-excerpt {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-read-more {
  margin-left: auto;
  color: var(--green-dark);
  font-weight: 600;
  white-space: nowrap;
}
.blog-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--color-text-tertiary);
  font-size: 0.9375rem;
}

/* ─── ToC back link ─── */
.blog-detail-toc-back {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-tertiary);
  font-size: 0.8125rem;
}
.blog-detail-toc-back a {
  color: var(--green-dark);
  font-weight: 600;
  text-decoration: none;
}
.blog-detail-toc-back a:hover { text-decoration: underline; }

/* ─── Blog detail ToC sub-list ─── */
.blog-detail-toc-sub { padding-left: 12px; }

/* ─── Star ratings ─── */
.blog-star { color: var(--color-border-secondary); font-style: normal; }
.blog-star.filled { color: #f5a623; }

/* ─── Comments section ─── */
.blog-detail-comments {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border-tertiary);
}
.blog-detail-comments-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.blog-detail-comments-count {
  font-weight: 400;
  color: var(--color-text-tertiary);
  font-size: 0.9375rem;
}
.blog-detail-login-prompt {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin: 0 0 20px;
}
.blog-detail-login-prompt a {
  color: var(--green-dark);
  font-weight: 600;
}
.blog-detail-comment-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.blog-detail-rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.blog-detail-rating-label {
  font-size: 0.8125rem;
  color: var(--color-text-tertiary);
}
.blog-detail-comment-textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--color-border-secondary);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.875rem;
  font-family: inherit;
  resize: vertical;
  color: var(--color-text-primary);
  background: white;
  box-sizing: border-box;
}
.blog-detail-comment-textarea:focus {
  outline: none;
  border-color: var(--green);
}
.blog-detail-comment-submit {
  align-self: flex-start;
  padding: 9px 20px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.blog-detail-comment-submit:hover { background: var(--green-dark); }
.blog-detail-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.blog-detail-comment-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.blog-detail-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-bg-subtle);
}
.blog-detail-comment-body { flex: 1; min-width: 0; }
.blog-detail-comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  font-size: 0.8125rem;
}
.blog-detail-comment-meta strong { color: var(--color-text-primary); font-weight: 700; }
.blog-detail-comment-meta time { color: var(--color-text-tertiary); }
.blog-detail-comment-text {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0;
}

/* ─── Related posts (uses .blog-grid / .blog-card) ─── */
.blog-related {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border-tertiary);
}
