/* Blog CSS - Styles for blog pages */

:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-hover: #30363d;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --accent-blue: #58a6ff;
  --accent-green: #238636;
  --accent-green-hover: #2ea043;
}

/* Header Navigation Styles */
.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a.active {
  color: var(--accent-blue);
}

/* Logo Styles */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Breadcrumb Navigation */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.breadcrumb a {
  color: var(--accent-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-secondary);
}

/* Blog Index Page */
.blog-header {
  text-align: center;
  padding: 60px 0 40px;
}

.blog-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.blog-header p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* Blog Card Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  padding: 20px 0 60px;
}

.blog-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-blue);
}

.blog-card-image {
  width: 100%;
  height: 180px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card-image svg {
  width: 64px;
  height: 64px;
  color: var(--text-secondary);
}

.blog-card-content {
  padding: 24px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.blog-card-category {
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.blog-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.blog-card h2 a {
  color: inherit;
  text-decoration: none;
}

.blog-card h2 a:hover {
  color: var(--accent-blue);
}

.blog-card p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.read-more {
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.read-more:hover {
  text-decoration: underline;
}

.read-time {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Article Page */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px 80px;
}

.article-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.article-category {
  background: var(--bg-tertiary);
  padding: 6px 14px;
  border-radius: 16px;
  font-weight: 500;
}

.article-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 16px;
}

.article-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Article Content */
.article-content {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-primary);
}

.article-content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.article-content h3 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 32px;
  margin-bottom: 16px;
}

.article-content p {
  margin-bottom: 20px;
}

.article-content a {
  color: var(--accent-blue);
  text-decoration: none;
}

.article-content a:hover {
  text-decoration: underline;
}

.article-content ul,
.article-content ol {
  margin-bottom: 20px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 10px;
}

.article-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Code Blocks */
.article-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 14px;
  line-height: 1.6;
}

.article-content code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.article-content p code {
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Info Box */
.info-box {
  background: rgba(88, 166, 255, 0.1);
  border: 1px solid rgba(88, 166, 255, 0.3);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 24px 0;
}

.info-box-title {
  font-weight: 600;
  color: var(--accent-blue);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-box p {
  margin: 0;
  color: var(--text-secondary);
}

/* CTA Box */
.cta-box {
  background: var(--bg-secondary);
  border: 2px solid var(--accent-green);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  margin: 48px 0;
}

.cta-box h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.cta-button {
  display: inline-block;
  background: var(--accent-green);
  color: #fff;
  padding: 14px 32px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: background 0.2s;
}

.cta-button:hover {
  background: var(--accent-green-hover);
}

/* Step List */
.step-list {
  list-style: none;
  padding-left: 0;
  counter-reset: step-counter;
}

.step-list li {
  position: relative;
  padding-left: 50px;
  margin-bottom: 24px;
  counter-increment: step-counter;
}

.step-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

/* Comparison Table */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}

.comparison-table th,
.comparison-table td {
  padding: 14px 16px;
  text-align: left;
  border: 1px solid var(--border);
}

.comparison-table th {
  background: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

.comparison-table td {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.comparison-table tr:hover td {
  background: var(--bg-hover);
}

/* Article Footer */
.article-footer {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.related-articles-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-article-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-blue);
  text-decoration: none;
  font-size: 15px;
}

.related-article-link:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .blog-header h1 {
    font-size: 1.75rem;
  }

  .blog-header p {
    font-size: 1rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .article-header h1 {
    font-size: 1.75rem;
  }

  .article-description {
    font-size: 1.1rem;
  }

  .article-content {
    font-size: 16px;
  }

  .article-content h2 {
    font-size: 1.5rem;
  }

  .comparison-table {
    font-size: 13px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 10px 12px;
  }
}
