/* Article Container */
.article-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Breadcrumb Navigation */
.breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: ">";
  margin-left: 0.5rem;
  color: #666;
}

.breadcrumb a {
  color: #007bff;
  text-decoration: none;
}

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

/* Article Header */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: #666;
}

.article-meta .author::before {
  content: "By ";
}

.reading-time::before {
  content: "| ";
}

/* Table of Contents */
.toc-container {
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}

.toc-title {
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  margin: 0;
  padding: 0.5rem 0;
}

.toc-container details[open] .toc-title {
  margin-bottom: 0.5rem;
}

#TableOfContents {
  margin-top: 0.5rem;
}

#TableOfContents ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#TableOfContents > ul > li {
  margin: 0.75rem 0;
}

#TableOfContents ul ul {
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}

#TableOfContents ul ul li {
  margin: 0.4rem 0;
  font-size: 0.95rem;
}

#TableOfContents a {
  color: #333;
  text-decoration: none;
  transition: color 0.2s;
}

#TableOfContents a:hover {
  color: #007bff;
}

/* Article Content */
.article-content {
  line-height: 1.8;
  font-size: 1.05rem;
}

.article-content h1 {
  font-size: 2.2rem;
  margin: 2rem 0 1rem;
  color: #1a1a1a;
}

.article-content h2 {
  font-size: 1.6rem;
  margin: 2.5rem 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
  color: #222;
}

.article-content h3 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  color: #333;
}

.article-content h4 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  color: #444;
}

.article-content p {
  margin: 1rem 0;
}

.article-content a {
  color: #007bff;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.article-content a:hover {
  border-bottom-color: #007bff;
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}

.article-content table thead {
  background: #343a40;
  color: white;
}

.article-content table th {
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
}

.article-content table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #dee2e6;
}

.article-content table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

.article-content table tbody tr:hover {
  background: #e9ecef;
}

/* Callout Boxes */
.callout {
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 6px;
  border-left: 4px solid;
}

.callout-info {
  background: #e7f3ff;
  border-color: #007bff;
}

.callout-warning {
  background: #fff3e0;
  border-color: #ff9800;
}

.callout-tip {
  background: #e8f5e9;
  border-color: #4caf50;
}

.callout-danger {
  background: #ffebee;
  border-color: #f44336;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.callout-content {
  font-size: 0.95rem;
}

.callout-content p {
  margin: 0.5rem 0;
}

.callout-content p:first-child {
  margin-top: 0;
}

.callout-content p:last-child {
  margin-bottom: 0;
}

/* Highlight Boxes */
.highlight-box {
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 8px;
  font-size: 1.05rem;
}

.highlight-blue {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.highlight-green {
  background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  color: white;
}

.highlight-orange {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.highlight-dark {
  background: linear-gradient(135deg, #232526 0%, #414345 100%);
  color: white;
}

.highlight-box a {
  color: inherit;
  text-decoration: underline;
}

/* Stats Display */
.stat-box {
  display: inline-block;
  text-align: center;
  padding: 1.5rem 2rem;
  margin: 1rem 0.75rem 1rem 0;
  border-radius: 8px;
  background: #f8f9fa;
  vertical-align: top;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-label {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}

.stat-blue .stat-number { color: #007bff; }
.stat-green .stat-number { color: #28a745; }
.stat-orange .stat-number { color: #fd7e14; }
.stat-red .stat-number { color: #dc3545; }
.stat-purple .stat-number { color: #9147ff; }

/* Article Footer */
.article-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.article-tags span {
  font-weight: 600;
  margin-right: 0.5rem;
}

.article-tags a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: #e9ecef;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #495057;
  text-decoration: none;
  transition: all 0.2s;
}

.article-tags a:hover {
  background: #007bff;
  color: white;
}

/* FAQ Section Styling */
.article-content h3:has(+ p) {
  color: #007bff;
}

/* Lists */
.article-content ul,
.article-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.article-content li {
  margin: 0.5rem 0;
}

/* Blockquotes */
.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: #f8f9fa;
  border-left: 4px solid #6c757d;
  font-style: italic;
}

.article-content blockquote p {
  margin: 0;
}

/* Key Takeaway Box */
.key-takeaway {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.key-takeaway strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .article-container {
    padding: 1.5rem 1rem;
    border-radius: 0;
    margin: 0;
  }

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

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

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

  .article-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .reading-time::before {
    content: "";
  }

  .stat-box {
    display: block;
    margin: 1rem 0;
  }

  .article-content table {
    font-size: 0.85rem;
  }

  .article-content table th,
  .article-content table td {
    padding: 0.5rem;
  }
}

/* Print Styles */
@media print {
  .toc-container,
  .breadcrumb,
  .article-tags {
    display: none;
  }

  .article-container {
    box-shadow: none;
    max-width: none;
  }
}
