/* Article Specific Styles */

.article-container {
  max-width: 820px;
  margin: 48px auto;
  padding: 32px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

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

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

.breadcrumb span {
  color: var(--muted);
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 500;
}

/* Article Header */
.article-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--border);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.article-category {
  background: var(--primary-light);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
}

.article-date,
.read-time {
  color: var(--muted);
}

.article-header h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  margin: 0 0 16px 0;
  color: var(--text);
}

.article-intro {
  font-size: 1.2rem;
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

/* Table of Contents */
.toc-box {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
  margin-bottom: 48px;
}

.toc-box h3 {
  margin: 0 0 16px 0;
  color: var(--text);
}

.toc-box ol {
  margin: 0;
  padding-left: 20px;
}

.toc-box li {
  margin-bottom: 8px;
}

.toc-box a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.toc-box a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* Article Content */
.article-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text);
}

.article-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: var(--text);
  scroll-margin-top: 100px;
}

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

.article-content h4 {
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 1.2rem;
  color: var(--text);
}

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

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

.article-content li {
  margin-bottom: 12px;
  line-height: 1.8;
}

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

/* Special Boxes */
.info-box,
.tip-box,
.warning-box,
.example-box,
.formula-box,
.calculation-box,
.summary-box {
  padding: 20px;
  border-radius: 12px;
  margin: 32px 0;
}

.info-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
}

.tip-box {
  background: #f0fdf4;
  border-left: 4px solid #10b981;
}

.warning-box {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
}

.example-box {
  background: #f8fafc;
  border: 2px solid var(--border);
}

.formula-box {
  background: #faf5ff;
  border-left: 4px solid #a855f7;
  font-family: 'Courier New', monospace;
}

.calculation-box {
  background: #ecfdf5;
  border: 2px dashed #10b981;
  font-family: 'Courier New', monospace;
}

.summary-box {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border: 2px solid var(--primary);
}

/* Tables */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comparison-table thead {
  background: var(--primary);
  color: white;
}

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

.comparison-table tbody tr:hover {
  background: #f8fafc;
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

/* CTA Box */
.cta-box {
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: white;
  padding: 32px;
  border-radius: 16px;
  text-align: center;
  margin: 48px 0;
}

.cta-box h3 {
  margin: 0 0 12px 0;
  color: white;
}

.cta-box p {
  margin: 0 0 24px 0;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  padding: 14px 32px;
  background: white;
  color: var(--primary);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.2);
}

/* FAQ Section */
.faq-section {
  margin-top: 48px;
}

.faq-section h3 {
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}

.faq-section p {
  margin-left: 20px;
  padding-left: 20px;
  border-left: 3px solid var(--border);
}

/* Related Links */
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 32px 0;
}

.related-links a {
  display: block;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  transition: all 0.2s ease;
}

.related-links a:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Author Box */
.author-box {
  margin-top: 48px;
  padding: 24px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.author-info h4 {
  margin: 0 0 12px 0;
  color: var(--text);
}

.author-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

/* Article Navigation */
.article-navigation {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--border);
}

.nav-button {
  flex: 1;
  padding: 14px 20px;
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  transition: all 0.2s ease;
}

.nav-button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .article-container {
    padding: 24px;
    margin: 24px 16px;
  }

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

  .article-intro {
    font-size: 1.05rem;
  }

  .article-content {
    font-size: 1rem;
  }

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

  .article-content h3 {
    font-size: 1.2rem;
  }

  .article-navigation {
    flex-direction: column;
  }

  .comparison-table {
    font-size: 0.9rem;
  }

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

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

.back-to-top a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.back-to-top a:hover {
  background-color: #1d4ed8;
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

@media print {
  .back-to-top {
    display: none;
  }
}
