/* Article Page Styling */

.posts-page main,
.post-page main {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Article Header */
.article-header {
  margin-bottom: 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 2rem;
}

.article-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  color: var(--text-light);
  font-size: 0.9rem;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-meta i {
  color: var(--primary-color);
}

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

.article-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 2.5rem 0 1.5rem 0;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 2rem 0 1rem 0;
}

.article-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 1.5rem 0 1rem 0;
}

.article-content p {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.article-content blockquote {
  background: var(--background-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.article-content blockquote p {
  margin-bottom: 0;
  color: var(--text-medium);
}

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

.article-content a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 2px;
}

/* Table of Contents */
.toc {
  background: var(--background-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--text-dark);
}

.toc ul {
  margin: 0;
  list-style: none;
  padding-left: 0;
}

.toc ul ul {
  margin-left: 1rem;
  margin-top: 0.5rem;
}

.toc li {
  margin-bottom: 0.25rem;
}

.toc a {
  text-decoration: none;
  color: var(--text-medium);
  font-size: 0.95rem;
}

.toc a:hover {
  color: var(--primary-color);
}

/* Info Boxes */
.info-box {
  background: var(--background-light);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  position: relative;
  padding-left: 4rem;
}

.info-box::before {
  content: "\f05a"; /* Font Awesome info icon */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  color: var(--primary-color);
  font-size: 1.5rem;
}

.info-box.warning {
  background: #fef3cd;
  border-color: #ffeaa7;
}

.info-box.warning::before {
  content: "\f071"; /* Font Awesome warning icon */
  color: #e17055;
}

.info-box.tip {
  background: #d1f2eb;
  border-color: #52c41a;
}

.info-box.tip::before {
  content: "\f0eb"; /* Font Awesome lightbulb icon */
  color: #52c41a;
}

/* Article Footer */
.article-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.article-tags {
  margin-bottom: 2rem;
}

.article-tags h4 {
  font-size: 1rem;
  color: var(--text-medium);
  margin-bottom: 0.5rem;
}

.tag {
  display: inline-block;
  background: var(--background-light);
  color: var(--text-medium);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: background-color 0.2s;
}

.tag:hover {
  background: var(--border-medium);
}

/* Navigation between articles */
.article-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.nav-link {
  display: block;
  background: var(--background-light);
  padding: 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  transition: background-color 0.2s;
  border: 1px solid var(--border-light);
}

.nav-link:hover {
  background: var(--background-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-link.prev {
  text-align: left;
}

.nav-link.next {
  text-align: right;
}

.nav-direction {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-title {
  font-weight: 500;
  line-height: 1.4;
}

/* Related Articles */
.related-articles {
  background: var(--background-light);
  border-radius: 8px;
  padding: 2rem;
  margin-top: 3rem;
}

.related-articles h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.related-list {
  display: grid;
  gap: 1rem;
}

.related-item {
  display: block;
  color: var(--text-dark);
  text-decoration: none;
  padding: 1rem;
  background: var(--background-white);
  border-radius: 6px;
  border: 1px solid var(--border-light);
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.related-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.related-excerpt {
  font-size: 0.9rem;
  color: var(--text-medium);
  line-height: 1.5;
}

/* Breadcrumbs */
.breadcrumbs {
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.breadcrumbs a {
  color: var(--text-medium);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--primary-color);
}

.breadcrumbs span {
  color: var(--text-light);
  margin: 0 0.5rem;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.share-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.2s;
}

.share-button:hover {
  transform: translateY(-1px);
}

.share-button.twitter {
  background: #1da1f2;
  color: white;
}

.share-button.facebook {
  background: #1877f2;
  color: white;
}

.share-button.linkedin {
  background: #0077b5;
  color: white;
}

.share-button.email {
  background: var(--text-medium);
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  .posts-page main,
  .post-page main {
    padding: 2rem 1rem;
  }

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

  .article-meta {
    gap: 1rem;
  }

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

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

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

  .article-nav {
    grid-template-columns: 1fr;
  }

  .share-buttons {
    flex-wrap: wrap;
  }

  .info-box {
    padding-left: 1.5rem;
  }

  .info-box::before {
    display: none;
  }
}