/* ===== Shared Article Content Styles (Blog + Help) ===== */

/* ===== Article Images ===== */
.article-content img {
  max-width: 100%;
  display: block;
  margin: 0 auto;
  padding: 16px 0;
  border-radius: 0.5rem;
}

/* ===== Article Content Typography ===== */
.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  margin-bottom: 0.75rem;
  margin-top: 1.75rem;
}

.article-content h1:first-child,
.article-content h2:first-child,
.article-content h3:first-child {
  margin-top: 0;
}

.article-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bs-primary-text-emphasis);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--bs-border-color);
  margin-top: 2.25rem;
}

.article-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--bs-body-color);
}

.article-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--bs-body-color);
  font-style: italic;
}

.article-content p {
  margin-left: 0;
  line-height: 1.8;
  color: var(--bs-secondary-color);
}

.article-content li {
  line-height: 1.8;
  color: var(--bs-secondary-color);
}

/* Responsive table handling for markdown content */
.article-content table {
  width: auto;
  margin-bottom: 1rem;
  border-collapse: collapse;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: table;
}

.article-content table th,
.article-content table td {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--bs-border-color);
  vertical-align: top;
}

.article-content table thead th {
  background-color: var(--bs-tertiary-bg);
  font-weight: 600;
  border-bottom-width: 2px;
}

.article-content table tbody tr:hover {
  background-color: var(--bs-tertiary-bg);
}

/* ===== Table of Contents ===== */
.toc-container {
  background-color: var(--bs-tertiary-bg);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--bs-success);
}

.toc-container h6 {
  margin-top: 0;
}

.toc-container ul {
  margin-bottom: 0;
}

.toc-container a {
  text-decoration: none;
  color: var(--bs-secondary-color);
}

.toc-container a:hover {
  color: var(--bs-body-color);
}

/* ===== Mobile ===== */
@media (max-width: 767.98px) {
  .article-content img {
    padding: 8px 0;
  }

  .article-content a {
    display: inline-block;
    padding: 4px 0;
  }
}
