/* ============================================================
   TradeUpX — Blog & SEO Section Styles
   ============================================================ */

/* ── Blog body ──────────────────────────────────────────── */
.blog-body {
  background: var(--bg-base, #0f1117);
  color: var(--text-primary, #e8eaf0);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* ── Blog Header ───────────────────────────────────────── */
.blog-header {
  border-bottom: 1px solid var(--border, #1e2130);
  background: var(--bg-surface, #131620);
  position: sticky;
  top: 0;
  z-index: 100;
}
.blog-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.blog-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary, #e8eaf0);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.3px;
}
.blog-brand strong { color: #f59e0b; }
.blog-nav { display: flex; gap: 24px; }
.blog-nav a {
  color: var(--text-muted, #7b8097);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 120ms;
}
.blog-nav a:hover,
.blog-nav a[aria-current="page"] { color: var(--text-primary, #e8eaf0); }

/* ── Blog Main ─────────────────────────────────────────── */
.blog-main {
  flex: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 64px;
  width: 100%;
}

/* ── Blog Hero ─────────────────────────────────────────── */
.blog-hero {
  padding: 56px 0 40px;
  text-align: center;
}
.blog-hero-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #f59e0b;
  margin-bottom: 12px;
}
.blog-hero-title {
  font-size: clamp(28px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: -.5px;
  margin: 0 0 16px;
  line-height: 1.2;
}
.blog-hero-sub {
  color: var(--text-muted, #7b8097);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── Blog Grid ─────────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.blog-card {
  background: var(--bg-surface, #131620);
  border: 1px solid var(--border, #1e2130);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 150ms, transform 150ms;
}
.blog-card:hover {
  border-color: var(--border-strong, #2d3150);
  transform: translateY(-2px);
}
.blog-card-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.blog-card-meta {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-muted, #7b8097);
}
.blog-card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary, #e8eaf0);
  margin: 0;
}
.blog-card-intro {
  font-size: 13.5px;
  color: var(--text-secondary, #a3a9c0);
  line-height: 1.55;
  flex: 1;
  margin: 0;
}
.blog-card-cta {
  font-size: 13px;
  color: #f59e0b;
  font-weight: 500;
}

/* ── CTA Banner ────────────────────────────────────────── */
.blog-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(245,158,11,.1) 0%, rgba(245,158,11,.04) 100%);
  border: 1px solid rgba(245,158,11,.25);
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.blog-cta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.blog-cta-text strong { font-size: 16px; }
.blog-cta-text span { font-size: 13.5px; color: var(--text-muted, #7b8097); }
.blog-cta-btn {
  background: #f59e0b;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms;
}
.blog-cta-btn:hover { background: #fbbf24; }

/* ── Blog Footer ───────────────────────────────────────── */
.blog-footer {
  border-top: 1px solid var(--border, #1e2130);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  color: var(--text-muted, #7b8097);
  flex-wrap: wrap;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}
.blog-footer nav { display: flex; gap: 16px; }
.blog-footer a { color: var(--text-muted, #7b8097); text-decoration: none; }
.blog-footer a:hover { color: var(--text-primary, #e8eaf0); }

/* ── Blog Post ─────────────────────────────────────────── */
.post-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 0 64px;
}
.post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted, #7b8097);
  margin-bottom: 32px;
}
.post-breadcrumb a { color: var(--text-muted, #7b8097); text-decoration: none; }
.post-breadcrumb a:hover { color: var(--text-primary, #e8eaf0); }
.post-header { margin-bottom: 32px; }
.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted, #7b8097);
  margin-bottom: 16px;
}
.post-dot { opacity: .4; }
.post-title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -.4px;
  line-height: 1.2;
  margin: 0 0 16px;
}
.post-intro {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary, #a3a9c0);
  margin: 0;
  border-left: 3px solid #f59e0b;
  padding-left: 16px;
}

/* ── Table of Contents ─────────────────────────────────── */
.post-toc {
  background: var(--bg-surface, #131620);
  border: 1px solid var(--border, #1e2130);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.post-toc-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted, #7b8097);
  margin-bottom: 12px;
}
.post-toc-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.post-toc-list a {
  color: var(--text-secondary, #a3a9c0);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.4;
  transition: color 120ms;
}
.post-toc-list a:hover { color: #f59e0b; }

/* ── Post Body ─────────────────────────────────────────── */
.post-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text-secondary, #a3a9c0);
}
.post-section { margin-bottom: 40px; }
.post-section h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary, #e8eaf0);
  margin: 0 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border, #1e2130);
}
.post-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #e8eaf0);
  margin: 20px 0 10px;
}
.post-section p { margin: 0 0 14px; }
.post-section ul, .post-section ol {
  padding-left: 22px;
  margin: 0 0 14px;
}
.post-section li { margin-bottom: 8px; }
.post-section strong { color: var(--text-primary, #e8eaf0); font-weight: 600; }
.post-section em { color: var(--text-primary, #e8eaf0); font-style: italic; }
.post-section a { color: #f59e0b; text-decoration: none; }
.post-section a:hover { text-decoration: underline; }
.post-section pre {
  background: var(--bg-row, #161a26);
  border: 1px solid var(--border, #1e2130);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 14px 0;
}
.post-section code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: #f59e0b;
  background: rgba(245,158,11,.1);
  padding: 1px 5px;
  border-radius: 3px;
}
.post-section pre code {
  background: none;
  padding: 0;
  color: #c9d1d9;
}

/* ── FAQ ────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
  background: var(--bg-surface, #131620);
  border: 1px solid var(--border, #1e2130);
  border-radius: 8px;
  overflow: hidden;
}
.faq-item[open] { border-color: rgba(245,158,11,.3); }
.faq-q {
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary, #e8eaf0);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  color: #f59e0b;
  font-size: 20px;
  font-weight: 300;
  flex-shrink: 0;
}
.faq-item[open] .faq-q::after { content: '−'; }
.faq-a {
  padding: 0 18px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary, #a3a9c0);
}
.faq-a code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: #f59e0b;
  background: rgba(245,158,11,.1);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ── Post CTA ──────────────────────────────────────────── */
.post-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, rgba(245,158,11,.1) 0%, rgba(245,158,11,.04) 100%);
  border: 1px solid rgba(245,158,11,.25);
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.post-cta-text {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.post-cta-text strong { font-size: 16px; color: var(--text-primary, #e8eaf0); }
.post-cta-text span { font-size: 13.5px; color: var(--text-muted, #7b8097); }
.post-cta-btn {
  background: #f59e0b;
  color: #000;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 120ms;
}
.post-cta-btn:hover { background: #fbbf24; }

/* ── Related Posts ─────────────────────────────────────── */
.post-related {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border, #1e2130);
}
.post-related h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #e8eaf0);
  margin: 0 0 16px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--bg-surface, #131620);
  border: 1px solid var(--border, #1e2130);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 120ms;
}
.related-card:hover { border-color: var(--border-strong, #2d3150); }
.related-title { font-size: 13.5px; font-weight: 500; color: var(--text-primary, #e8eaf0); line-height: 1.4; }
.related-meta { font-size: 11.5px; color: var(--text-muted, #7b8097); }

/* ── SEO Section (Homepage) ────────────────────────────── */
.seo-section {
  border-top: 1px solid var(--border, #1e2130);
  margin-top: 48px;
  padding: 48px 20px 0;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.seo-h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary, #e8eaf0);
  margin: 0 0 16px;
  letter-spacing: -.3px;
}
.seo-intro p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary, #a3a9c0);
  margin: 0 0 12px;
}
.seo-intro a { color: #f59e0b; text-decoration: none; }
.seo-intro a:hover { text-decoration: underline; }
.seo-intro strong { color: var(--text-primary, #e8eaf0); }
.seo-intro { margin-bottom: 40px; }

/* Feature grid */
.seo-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.seo-feature {
  background: var(--bg-surface, #131620);
  border: 1px solid var(--border, #1e2130);
  border-radius: 10px;
  padding: 20px;
}
.seo-feature-icon { font-size: 22px; margin-bottom: 10px; }
.seo-feature h3 {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-primary, #e8eaf0);
  margin: 0 0 8px;
}
.seo-feature p {
  font-size: 13px;
  color: var(--text-muted, #7b8097);
  line-height: 1.55;
  margin: 0;
}

/* How it works */
.seo-how {
  margin-bottom: 48px;
}
.seo-how p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary, #a3a9c0);
  margin: 0 0 12px;
}
.seo-how a { color: #f59e0b; text-decoration: none; }
.seo-how a:hover { text-decoration: underline; }
.seo-how strong { color: var(--text-primary, #e8eaf0); }

/* FAQ on homepage */
.seo-faq { margin-bottom: 48px; }
.seo-faq .faq-list { gap: 6px; }

/* Blog teaser */
.seo-blog-teaser { margin-bottom: 48px; }
.seo-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.seo-blog-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 18px;
  background: var(--bg-surface, #131620);
  border: 1px solid var(--border, #1e2130);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 150ms;
}
.seo-blog-card:hover { border-color: rgba(245,158,11,.35); }
.sbc-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary, #e8eaf0);
  line-height: 1.4;
}
.sbc-meta {
  font-size: 11.5px;
  color: var(--text-muted, #7b8097);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .blog-header-inner { padding: 0 16px; }
  .blog-main { padding: 0 16px 48px; }
  .blog-hero { padding: 36px 0 28px; }
  .blog-cta-banner,
  .post-cta { flex-direction: column; align-items: flex-start; }
  .post-wrap { padding: 24px 0 48px; }
  .seo-section { padding: 36px 16px 0; }
}
