/* ===== BLOG PAGE ===== */
.nav-active { color: var(--primary) !important; font-weight: 600 !important; }

.blog-hero {
  background: linear-gradient(135deg, #0F2B6E 0%, var(--primary) 100%);
  padding: 64px 0 48px;
  text-align: center;
}
.blog-hero-inner { max-width: 640px; margin: 0 auto; }
.blog-hero .section-badge { background: rgba(255,255,255,.15); color: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.25); }
.blog-hero h1 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; color: var(--white); letter-spacing: -0.5px; margin: 12px 0; }
.blog-hero p  { font-size: 17px; color: rgba(255,255,255,.75); margin-bottom: 28px; }

.blog-search {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.blog-search input {
  flex: 1;
  padding: 14px 18px;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
}
.search-btn {
  padding: 0 18px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  font-size: 18px;
  transition: background .2s;
}
.search-btn:hover { background: var(--accent-dark); }

/* Filters */
.blog-filters-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 64px;
  z-index: 50;
}
.blog-filters {
  display: flex;
  gap: 6px;
  padding: 12px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.blog-filters::-webkit-scrollbar { display: none; }

.filter-btn {
  padding: 7px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* Blog page sections */
.blog-page-section { padding: 52px 0; background: var(--bg); }
.blog-section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}

.blog-featured-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 8px;
}
.blog-side-cards { display: flex; flex-direction: column; gap: 20px; }

/* Articles grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.article-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  transition: all .2s;
}
.article-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.article-cat {
  display: inline-block;
  border-radius: 100px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}
.article-cat.start    { background: #EBF2FF; color: #1A56DB; }
.article-cat.docs     { background: #E0F7FA; color: #0277BD; }
.article-cat.strategy { background: #F3E8FF; color: #7C3AED; }
.article-cat.law      { background: #FFF3E0; color: #E65100; }
.article-cat.errors   { background: #FFEBEE; color: #C62828; }
.article-cat.news-cat { background: #E8F5E9; color: #2E7D32; }

.article-card h4 { font-size: 15px; font-weight: 600; line-height: 1.4; }
.article-card p  { font-size: 13px; color: var(--text-secondary); line-height: 1.55; flex: 1; }
.article-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }

.load-more-wrap { text-align: center; margin-top: 8px; }

.soft-cta-section { background: var(--bg); padding: 0 0 52px; }

/* ===== ARTICLE PAGE ===== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  align-items: start;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-secondary); transition: color .2s; }
.breadcrumb a:hover { color: var(--primary); }

.article-header { margin-bottom: 32px; }
.article-category-badge {
  display: inline-block;
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.article-category-badge.start { background: var(--primary-light); color: var(--primary); }

.article-header h1 {
  font-size: clamp(24px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.article-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.article-author { display: flex; align-items: center; gap: 10px; }
.author-avatar-sm {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.author-name-sm { font-size: 14px; font-weight: 600; }
.article-date   { font-size: 12px; color: var(--text-secondary); }

.share-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: transparent;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  transition: all .2s;
}
.share-btn:hover { border-color: var(--primary); color: var(--primary); }

.article-hero-img {
  height: 300px;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

/* Table of contents */
.toc {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}
.toc-title { font-size: 14px; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.toc-list { padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.toc-list a { font-size: 14px; color: var(--primary); transition: opacity .2s; }
.toc-list a:hover { opacity: .7; }

/* Article body */
.article-body { line-height: 1.8; color: var(--text); }
.article-lead { font-size: 18px; font-weight: 500; color: var(--text-secondary); margin-bottom: 28px; line-height: 1.7; }

.article-body h2 {
  font-size: 24px; font-weight: 700; margin: 36px 0 14px;
  padding-top: 36px; border-top: 1px solid var(--border);
  scroll-margin-top: 80px;
}
.article-body p  { margin-bottom: 16px; }
.article-body ul { margin: 0 0 16px 24px; display: flex; flex-direction: column; gap: 8px; }
.article-body ul li { font-size: 15px; position: relative; }
.article-body ul li::marker { color: var(--primary); }

/* Callouts */
.article-callout {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 24px 0;
}
.article-callout.info    { background: #EBF2FF; border-left: 3px solid var(--primary); }
.article-callout.warning { background: #FFFBEB; border-left: 3px solid var(--accent); }
.article-callout.success { background: #F0FDF4; border-left: 3px solid var(--success); }
.callout-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.article-callout strong { display: block; font-size: 14px; margin-bottom: 4px; }
.article-callout p { font-size: 14px; color: var(--text-secondary); margin: 0; }

/* In-article CTA */
.article-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #2563EB 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 36px 0;
}
.article-cta-inner { display: flex; align-items: center; gap: 20px; }
.article-cta-icon { font-size: 36px; flex-shrink: 0; }
.article-cta-text { flex: 1; }
.article-cta-text h3 { font-size: 18px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.article-cta-text p  { font-size: 14px; color: rgba(255,255,255,.8); margin: 0; }

/* Tags row */
.article-tags-row { display: flex; align-items: center; gap: 12px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-tags-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); flex-shrink: 0; }

/* SIDEBAR */
.article-sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; }

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.widget-cta {
  background: linear-gradient(160deg, var(--primary) 0%, #1344B8 100%);
  border-color: transparent;
  text-align: center;
}
.widget-icon { font-size: 32px; margin-bottom: 12px; }
.widget-cta h3 { font-size: 17px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.widget-cta p  { font-size: 13px; color: rgba(255,255,255,.75); margin-bottom: 16px; }

.widget-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.widget-articles { display: flex; flex-direction: column; gap: 12px; }
.widget-article {
  display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: inherit;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.widget-article:last-child { border-bottom: none; padding-bottom: 0; }
.widget-article p { font-size: 13px; font-weight: 500; line-height: 1.4; transition: color .2s; }
.widget-article:hover p { color: var(--primary); }
.widget-article-cat { display: inline-block; border-radius: 100px; padding: 2px 8px; font-size: 11px; font-weight: 600; width: fit-content; }
.widget-article-cat.docs     { background: #E0F7FA; color: #0277BD; }
.widget-article-cat.errors   { background: #FFEBEE; color: #C62828; }
.widget-article-cat.strategy { background: #F3E8FF; color: #7C3AED; }

/* Newsletter */
.widget-newsletter { background: var(--bg); }
.widget-newsletter .widget-icon { font-size: 28px; margin-bottom: 8px; }
.widget-newsletter h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.widget-newsletter p  { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; }
.newsletter-form { display: flex; flex-direction: column; gap: 8px; }
.newsletter-form input {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 14px; outline: none;
  transition: border-color .2s;
}
.newsletter-form input:focus { border-color: var(--primary); }

/* Related */
.related-section { background: var(--bg); padding: 52px 0; border-top: 1px solid var(--border); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ===== RESPONSIVE BLOG ===== */
@media (max-width: 900px) {
  .blog-featured-grid { grid-template-columns: 1fr; }
  .blog-side-cards { flex-direction: row; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .related-grid { grid-template-columns: 1fr; }
  .article-cta-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  .blog-side-cards { flex-direction: column; }
  .articles-grid { grid-template-columns: 1fr; }
  .article-meta-row { flex-direction: column; align-items: flex-start; }
  .article-hero-img { height: 180px; }
  .article-layout { padding: 24px 16px 40px; }
}
