/* =========================================================
   صفحه جزئیات مقاله - استایل‌های اختصاصی
   ========================================================= */

/* ===== تایپوگرافی محتوای مقاله ===== */
.article-content {
  color: #2c4149;
  font-size: 1rem;
  line-height: 2.1;
}

.article-content .lead {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgb(23 52 60 / 10%);
  color: #40575e;
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 2.2;
}

.article-content h2 {
  position: relative;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-right: 1.25rem;
  color: #10272e;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.6;
  scroll-margin-top: 100px;
}

.article-content h2::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 4px;
  background: #b96835;
}

.article-content h3 {
  margin-top: 2.25rem;
  margin-bottom: 1rem;
  color: #17343c;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.7;
  scroll-margin-top: 100px;
}

.article-content p {
  margin-bottom: 1.35rem;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-right: 1.5rem;
}

.article-content ul {
  list-style: none;
}

.article-content ul li {
  position: relative;
  margin-bottom: 0.75rem;
  padding-right: 1.5rem;
}

.article-content ul li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.85rem;
  width: 8px;
  height: 8px;
  background: #b96835;
  border-radius: 50%;
}

.article-content ol {
  list-style: decimal;
}

.article-content ol li {
  margin-bottom: 0.75rem;
  padding-right: 0.5rem;
}

.article-content blockquote {
  position: relative;
  margin: 2.5rem 0;
  padding: 1.5rem 2.5rem 1.5rem 1.5rem;
  background: rgb(185 104 53 / 6%);
  border-right: 4px solid #b96835;
  color: #17343c;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 2;
  font-style: italic;
}

.article-content blockquote::before {
  content: "\201C";
  position: absolute;
  top: -0.5rem;
  right: 0.75rem;
  color: rgb(185 104 53 / 30%);
  font-size: 3rem;
  font-family: serif;
  line-height: 1;
}

.article-content a {
  color: #b96835;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgb(185 104 53 / 40%);
  transition: border-color 0.2s ease;
}

.article-content a:hover {
  border-bottom-color: #b96835;
}

.article-content strong {
  color: #10272e;
  font-weight: 800;
}

.article-content img {
  margin: 2rem 0;
  width: 100%;
  height: auto;
  border: 1px solid rgb(23 52 60 / 10%);
}

/* ===== باکس CTA درون مقاله ===== */
.cta-box {
  margin: 3rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f6f0 0%, #ece6d9 100%);
  border: 1px solid rgb(185 104 53 / 20%);
}

/* ===== تگ‌ها ===== */
.tag-item {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background: rgb(23 52 60 / 6%);
  color: #40575e;
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.tag-item:hover {
  background: #b96835;
  color: #fff;
}

/* ===== فهرست مطالب (TOC) ===== */
#toc {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

.toc-link {
  display: block;
  position: relative;
  padding: 0.65rem 1rem 0.65rem 0.5rem;
  color: #607177;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.7;
  text-decoration: none;
  border-right: 2px solid transparent;
  margin-right: -2px;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.toc-link:hover {
  color: #b96835;
  background: rgb(185 104 53 / 4%);
}

.toc-link.active {
  color: #b96835;
  border-right-color: #b96835;
  background: rgb(185 104 53 / 6%);
  font-weight: 800;
}

.toc-link.toc-sub {
  padding-right: 1.5rem;
  font-size: 0.72rem;
  color: #748288;
}

/* ===== دکمه‌های اشتراک‌گذاری ===== */
.share-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgb(23 52 60 / 15%);
  background: #fff;
  color: #40575e;
  font-size: 0.95rem;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.share-btn:hover {
  border-color: #b96835;
  background: #b96835;
  color: #fff;
  transform: translateY(-2px);
}

/* آیکون‌های اجتماعی نویسنده */
.social-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgb(23 52 60 / 15%);
  color: #40575e;
  font-size: 0.85rem;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.social-icon:hover {
  border-color: #b96835;
  background: #b96835;
  color: #fff;
}

/* ===== کارت مقالات مرتبط ===== */
.related-card {
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;
}

.related-card:hover {
  transform: translateY(-3px);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  background: rgb(185 104 53 / 10%);
  color: #b96835;
  font-size: 0.65rem;
  font-weight: 800;
}

/* ===== دکمه بازگشت به بالا ===== */
#scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ===== Toast ===== */
#toast.show {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

/* ===== نظرات ===== */
.comment-item {
  animation: commentFadeIn 0.4s ease-out both;
}

@keyframes commentFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ریسپانسیو ===== */
@media (max-width: 640px) {
  .article-content {
    font-size: 0.95rem;
    line-height: 2;
  }

  .article-content .lead {
    font-size: 1.05rem;
  }

  .article-content h2 {
    font-size: 1.4rem;
  }

  .article-content h3 {
    font-size: 1.15rem;
  }

  .article-content blockquote {
    padding: 1.25rem 2rem 1.25rem 1rem;
    font-size: 0.95rem;
  }

  .cta-box {
    padding: 1.5rem;
  }
}

/* کاهش حرکت */
@media (prefers-reduced-motion: reduce) {
  .related-card,
  .share-btn,
  .comment-item {
    transition: none;
    animation: none;
    transform: none;
  }
}