/* Blog styles — extends stockhts.com_new design system */

.blog-page {
  background: var(--bg);
}

.blog-hero {
  padding: 48px 0 24px;
}

.blog-hero-inner {
  max-width: 820px;
}

.blog-eyebrow,
.blog-category {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.blog-hero h1,
.article-header h1 {
  margin: 0 0 16px;
  font-size: 42px;
  line-height: 1.15;
}

.blog-lead,
.article-summary {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.blog-section {
  padding: 48px 0;
}

.blog-section-head {
  margin-bottom: 28px;
}

.blog-section-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.blog-section-head p {
  color: var(--muted);
}

.blog-grid {
  display: grid;
  gap: 20px;
}

.blog-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(21, 34, 53, 0.06);
  transition: transform .2s ease, box-shadow .2s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.blog-card-link {
  display: block;
  padding: 24px;
  text-decoration: none;
  color: inherit;
}

.blog-card h3 {
  margin: 8px 0 10px;
  font-size: 20px;
  line-height: 1.35;
}

.blog-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.blog-card time {
  display: block;
  margin-top: 14px;
  color: #8a97a8;
  font-size: 13px;
}

.blog-list {
  display: grid;
  gap: 16px;
}

.blog-list-item {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.blog-list-item h3 {
  margin: 6px 0 8px;
  font-size: 18px;
}

.blog-list-item h3 a {
  color: var(--ink);
  text-decoration: none;
}

.blog-list-item h3 a:hover {
  color: var(--brand);
}

.blog-list-item p {
  color: var(--muted);
  font-size: 15px;
}

.blog-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-category-list a {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.blog-category-list a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.blog-cta-box {
  padding: 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
}

.blog-cta-box h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 28px;
}

.blog-cta-box p {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 20px;
}

.blog-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.blog-cta-row .btn {
  text-decoration: none;
}

.blog-cta-row .btn-light {
  background: #fff;
  color: var(--brand-dark);
}

/* Article layout */
.blog-article-wrap {
  padding: 40px 0 64px;
}

.article-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.article-toc {
  position: sticky;
  top: 96px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
}

.article-toc h2 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.article-toc ol {
  margin: 0;
  padding-left: 18px;
}

.article-toc li {
  margin-bottom: 8px;
}

.article-toc a {
  color: var(--ink);
  text-decoration: none;
}

.article-toc a.is-active,
.article-toc a:hover {
  color: var(--brand);
}

.article-toc .toc-subitem {
  list-style: circle;
  margin-left: 8px;
}

.article-content {
  max-width: 760px;
}

.article-content h2 {
  margin: 36px 0 14px;
  font-size: 26px;
}

.article-content h3 {
  margin: 24px 0 10px;
  font-size: 20px;
}

.article-content p,
.article-content li {
  color: #3d4d61;
  line-height: 1.75;
}

.article-content ul,
.article-content ol {
  margin: 12px 0;
  padding-left: 22px;
}

.article-content a {
  color: var(--brand);
}

.article-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.article-nav a {
  color: var(--brand);
  text-decoration: none;
  font-size: 15px;
}

.blog-back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 26px rgba(23, 107, 232, 0.32);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.blog-back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1040px) {
  .blog-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
  }
}

@media (max-width: 780px) {
  .blog-grid-3 {
    grid-template-columns: 1fr;
  }

  .blog-hero h1,
  .article-header h1 {
    font-size: 34px;
  }
}
