/* ═══════════════════════════════════════════
   EquitySight.app — Blog Pages Styles
   Layered on top of legal.css — inherits .legal-hero,
   .legal-body, .legal-section, typography, etc.
   ═══════════════════════════════════════════ */

.blog-breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3px;
  color: rgba(245, 240, 232, 0.55);
  margin-bottom: 20px;
  text-align: center;
}
.blog-breadcrumb a {
  color: var(--gold);
  text-decoration: none;
}
.blog-breadcrumb a:hover { text-decoration: underline; }
.blog-breadcrumb span { margin: 0 6px; color: rgba(245, 240, 232, 0.35); }

/* Article body */
.blog-article {
  max-width: 720px;
  margin: 0 auto;
}
.blog-article .blog-cover {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 32px;
  display: block;
}
.blog-excerpt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: rgba(28, 28, 30, 0.72);
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 20px;
  margin-bottom: 32px;
}

/* Main body text — override legal.css defaults slightly for article feel */
#blog-content p {
  font-size: 16px;
  line-height: 1.72;
  margin-bottom: 18px;
}
#blog-content h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  margin-top: 40px;
  margin-bottom: 14px;
  color: var(--charcoal);
}
#blog-content h3 {
  font-size: 18px;
  margin-top: 26px;
  margin-bottom: 10px;
}
#blog-content ul,
#blog-content ol {
  margin: 0 0 20px 22px;
  line-height: 1.72;
}
#blog-content li { margin-bottom: 6px; }
#blog-content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#blog-content .legal-highlight {
  background: rgba(201, 168, 76, 0.08);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 6px 6px 0;
  font-style: italic;
}

/* Author card */
.blog-author-card {
  background: rgba(28, 28, 30, 0.03);
  border: 1px solid rgba(28, 28, 30, 0.08);
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 40px;
}
.blog-author-head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.blog-author-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.blog-author-bio {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(28, 28, 30, 0.68);
}

/* Tag row */
.blog-tags {
  margin: 28px 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-tag-pill {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--charcoal);
  text-decoration: none;
}

/* Related reading */
.blog-related { margin-top: 40px; }
.blog-related h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--slate, #6b6b70);
  margin-bottom: 14px;
}
.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.blog-related-card {
  display: block;
  padding: 14px 16px;
  background: var(--warm-white);
  border: 1px solid rgba(28, 28, 30, 0.08);
  border-radius: 6px;
  text-decoration: none;
  color: var(--charcoal);
  transition: border-color 0.15s;
}
.blog-related-card:hover { border-color: var(--gold); }
.blog-related-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 6px;
}
.blog-related-card-excerpt {
  font-size: 12px;
  color: rgba(28, 28, 30, 0.6);
  line-height: 1.5;
}

/* Blog index grid */
.blog-index-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin: 0 auto 40px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--warm-white);
  border: 1px solid rgba(28, 28, 30, 0.1);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.blog-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.blog-card-cover {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: rgba(28, 28, 30, 0.05);
}
.blog-card-body { padding: 18px 20px; }
.blog-card-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.blog-card-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 10px;
  color: var(--charcoal);
}
.blog-card-excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(28, 28, 30, 0.68);
  margin-bottom: 12px;
}
.blog-card-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.5px;
  color: rgba(28, 28, 30, 0.5);
}

.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px auto 60px;
}
.blog-pagination a,
.blog-pagination span {
  padding: 8px 14px;
  border: 1px solid rgba(28, 28, 30, 0.15);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-decoration: none;
  color: var(--charcoal);
}
.blog-pagination a:hover { border-color: var(--gold); }
.blog-pagination .current {
  background: var(--charcoal);
  color: var(--cream);
  border-color: var(--charcoal);
}

/* Empty state */
.blog-empty {
  text-align: center;
  padding: 80px 20px;
  color: rgba(28, 28, 30, 0.5);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body.theme-dark .blog-excerpt {
    color: rgba(245, 240, 232, 0.78);
    border-left-color: var(--gold);
  }
  body.theme-dark #blog-content h2,
  body.theme-dark #blog-content h3 { color: var(--cream); }
  body.theme-dark .blog-author-card {
    background: rgba(245, 240, 232, 0.04);
    border-color: rgba(245, 240, 232, 0.1);
  }
  body.theme-dark .blog-author-bio { color: rgba(245, 240, 232, 0.68); }
  body.theme-dark .blog-card {
    background: rgba(245, 240, 232, 0.04);
    border-color: rgba(245, 240, 232, 0.1);
  }
  body.theme-dark .blog-card-title { color: var(--cream); }
  body.theme-dark .blog-card-excerpt { color: rgba(245, 240, 232, 0.65); }
  body.theme-dark .blog-related-card {
    background: rgba(245, 240, 232, 0.04);
    border-color: rgba(245, 240, 232, 0.1);
    color: var(--cream);
  }
}

/* ═══════════════════════════════════════════
   Blog comments (build-time static + live form)
   ═══════════════════════════════════════════ */
.blog-comments-section {
  max-width: 720px;
  margin: 48px auto 0;
  padding-top: 32px;
  border-top: 1px solid rgba(28, 28, 30, 0.12);
}
.blog-comments-heading {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 20px;
  color: rgba(28, 28, 30, 0.9);
}
.blog-comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.blog-comment-card {
  background: rgba(28, 28, 30, 0.03);
  border: 1px solid rgba(28, 28, 30, 0.08);
  border-radius: 10px;
  padding: 16px 18px;
}
.blog-comment-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3px;
  color: rgba(28, 28, 30, 0.55);
  margin-bottom: 8px;
}
.blog-comment-user {
  font-weight: 600;
  color: rgba(28, 28, 30, 0.8);
}
.blog-comment-dot { opacity: 0.5; }
.blog-comment-body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(28, 28, 30, 0.82);
  white-space: pre-wrap;
}

.blog-comment-more-btn {
  display: block;
  margin: 16px auto 0;
  padding: 10px 22px;
  background: transparent;
  border: 1px solid rgba(28, 28, 30, 0.18);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(28, 28, 30, 0.75);
  cursor: pointer;
  transition: all 0.15s ease;
}
.blog-comment-more-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}
.blog-comment-more-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Comment submit form ─────────────────────────────────────── */
.blog-comment-form-wrap {
  max-width: 720px;
  margin: 40px auto 0;
  padding-top: 32px;
  border-top: 1px solid rgba(28, 28, 30, 0.12);
}
.blog-comment-form-wrap h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: rgba(28, 28, 30, 0.9);
}
.blog-comment-intro {
  font-size: 13px;
  color: rgba(28, 28, 30, 0.6);
  margin: 0 0 18px;
}
.blog-comment-guest {
  background: rgba(28, 28, 30, 0.03);
  border: 1px dashed rgba(28, 28, 30, 0.14);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}
.blog-comment-guest p {
  margin: 0 0 14px;
  font-size: 14px;
  color: rgba(28, 28, 30, 0.7);
}

.blog-comment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.blog-comment-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.blog-comment-field > span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: rgba(28, 28, 30, 0.55);
}
.blog-comment-field > span small {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  opacity: 0.75;
}
.blog-comment-field textarea {
  width: 100%;
  padding: 12px 14px;
  background: rgba(28, 28, 30, 0.02);
  border: 1px solid rgba(28, 28, 30, 0.14);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: rgba(28, 28, 30, 0.9);
  resize: vertical;
  box-sizing: border-box;
  min-height: 120px;
}
.blog-comment-field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.blog-comment-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(28, 28, 30, 0.5);
}
.blog-comment-counter.is-ok { color: #137333; }

.blog-comment-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.blog-comment-notice {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(28, 28, 30, 0.55);
}
.blog-comment-result {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  display: none;
}
.blog-comment-result.is-success {
  display: block;
  background: rgba(19, 115, 51, 0.1);
  color: #137333;
}
.blog-comment-result.is-error {
  display: block;
  background: rgba(217, 48, 37, 0.1);
  color: #b3261e;
}

/* Dark mode — comments */
@media (prefers-color-scheme: dark) {
  body.theme-dark .blog-comments-section,
  body.theme-dark .blog-comment-form-wrap {
    border-top-color: rgba(245, 240, 232, 0.12);
  }
  body.theme-dark .blog-comments-heading,
  body.theme-dark .blog-comment-form-wrap h2 { color: var(--cream); }
  body.theme-dark .blog-comment-card,
  body.theme-dark .blog-comment-guest {
    background: rgba(245, 240, 232, 0.04);
    border-color: rgba(245, 240, 232, 0.1);
  }
  body.theme-dark .blog-comment-guest { border-style: dashed; }
  body.theme-dark .blog-comment-guest p,
  body.theme-dark .blog-comment-intro { color: rgba(245, 240, 232, 0.65); }
  body.theme-dark .blog-comment-head,
  body.theme-dark .blog-comment-notice,
  body.theme-dark .blog-comment-counter,
  body.theme-dark .blog-comment-field > span {
    color: rgba(245, 240, 232, 0.55);
  }
  body.theme-dark .blog-comment-user { color: rgba(245, 240, 232, 0.85); }
  body.theme-dark .blog-comment-body { color: rgba(245, 240, 232, 0.78); }
  body.theme-dark .blog-comment-field textarea {
    background: rgba(245, 240, 232, 0.04);
    border-color: rgba(245, 240, 232, 0.12);
    color: var(--cream);
  }
  body.theme-dark .blog-comment-more-btn {
    border-color: rgba(245, 240, 232, 0.22);
    color: rgba(245, 240, 232, 0.8);
  }
  body.theme-dark .blog-comment-counter.is-ok { color: #78d18a; }
  body.theme-dark .blog-comment-result.is-success { background: rgba(120, 209, 138, 0.12); color: #78d18a; }
  body.theme-dark .blog-comment-result.is-error { background: rgba(255, 120, 110, 0.12); color: #ff786e; }
}
