/* ============================================
   Blog Content Styles - استایل‌های محتوای وبلاگ
   برای خوانایی بهتر و تجربه کاربری بهتر
   ============================================ */

/* Main Content Container */
.blog-content,
article.prose,
.entry-content,
.wp-block-post-content {
  /* Typography */
  font-size: 1.125rem; /* 18px */
  line-height: 1.75; /* 28px - optimal for reading */
  letter-spacing: 0.01em;
  word-spacing: 0.05em;
  text-align: justify;
  
  /* Colors */
  color: var(--text-light, #111827);
  
  /* Spacing - Remove max-width constraint to allow full width */
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Paragraphs */
.blog-content p,
article.prose p,
.entry-content p,
.wp-block-post-content p {
  margin-bottom: 1.5em;
  margin-top: 0;
  font-size: 1.125rem;
  line-height: 1.75;
  color: inherit;
  text-align: justify;
}

/* Headings */
.blog-content h1,
article.prose h1,
.entry-content h1,
.wp-block-post-content h1 {
  font-size: 2.25rem; /* 36px */
  line-height: 1.3;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  color: var(--text-light, #111827);
  letter-spacing: -0.02em;
}

.blog-content h2,
article.prose h2,
.entry-content h2,
.wp-block-post-content h2 {
  font-size: 1.875rem; /* 30px */
  line-height: 1.4;
  font-weight: 700;
  margin-top: 1.75em;
  margin-bottom: 0.875em;
  color: var(--text-light, #111827);
  letter-spacing: -0.01em;
  padding-bottom: 0.5em;
  border-bottom: 2px solid var(--border-light, #e5e7eb);
}

.blog-content h3,
article.prose h3,
.entry-content h3,
.wp-block-post-content h3 {
  font-size: 1.5rem; /* 24px */
  line-height: 1.5;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  color: var(--text-light, #111827);
}

.blog-content h4,
article.prose h4,
.entry-content h4,
.wp-block-post-content h4 {
  font-size: 1.25rem; /* 20px */
  line-height: 1.6;
  font-weight: 600;
  margin-top: 1.25em;
  margin-bottom: 0.625em;
  color: var(--text-light, #111827);
}

/* Links */
.blog-content a,
article.prose a,
.entry-content a,
.wp-block-post-content a {
  color: var(--primary, #4f46e5);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
  transition: all 0.2s ease;
}

.blog-content a:hover,
article.prose a:hover,
.entry-content a:hover,
.wp-block-post-content a:hover {
  color: var(--primary, #4f46e5);
  text-decoration-thickness: 2px;
  opacity: 0.85;
}

/* Lists */
.blog-content ul,
article.prose ul,
.entry-content ul,
.wp-block-post-content ul,
.blog-content ol,
article.prose ol,
.entry-content ol,
.wp-block-post-content ol {
  margin: 1.5em 0;
  padding-right: 2em;
  padding-left: 0;
}

.blog-content li,
article.prose li,
.entry-content li,
.wp-block-post-content li {
  margin-bottom: 0.75em;
  line-height: 1.75;
  padding-right: 0.5em;
}

.blog-content ul li,
article.prose ul li,
.entry-content ul li,
.wp-block-post-content ul li {
  list-style-type: disc;
}

.blog-content ol li,
article.prose ol li,
.entry-content ol li,
.wp-block-post-content ol li {
  list-style-type: decimal;
}

/* Blockquotes */
.blog-content blockquote,
article.prose blockquote,
.entry-content blockquote,
.wp-block-post-content blockquote {
  margin: 2em 0;
  padding: 1.5em 2em;
  border-right: 4px solid var(--primary, #4f46e5);
  background: var(--subtle-light, #f3f4f6);
  border-radius: 0.5rem;
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text-light, #111827);
}

/* Code */
.blog-content code,
article.prose code,
.entry-content code,
.wp-block-post-content code {
  background: var(--subtle-light, #f3f4f6);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
  color: var(--text-light, #111827);
}

.blog-content pre,
article.prose pre,
.entry-content pre,
.wp-block-post-content pre {
  background: var(--subtle-light, #f3f4f6);
  padding: 1.5em;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5em 0;
  line-height: 1.6;
}

.blog-content pre code,
article.prose pre code,
.entry-content pre code,
.wp-block-post-content pre code {
  background: transparent;
  padding: 0;
}

/* Images */
.blog-content img,
article.prose img,
.entry-content img,
.wp-block-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 2em 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Tables */
.blog-content table,
article.prose table,
.entry-content table,
.wp-block-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 1rem;
}

.blog-content th,
article.prose th,
.entry-content th,
.wp-block-post-content th,
.blog-content td,
article.prose td,
.entry-content td,
.wp-block-post-content td {
  padding: 0.75em 1em;
  border: 1px solid var(--border-light, #e5e7eb);
  text-align: right;
}

.blog-content th,
article.prose th,
.entry-content th,
.wp-block-post-content th {
  background: var(--subtle-light, #f3f4f6);
  font-weight: 600;
}

/* Horizontal Rule */
.blog-content hr,
article.prose hr,
.entry-content hr,
.wp-block-post-content hr {
  border: none;
  border-top: 2px solid var(--border-light, #e5e7eb);
  margin: 3em 0;
}

/* Strong and Emphasis */
.blog-content strong,
article.prose strong,
.entry-content strong,
.wp-block-post-content strong {
  font-weight: 700;
  color: inherit;
}

.blog-content em,
article.prose em,
.entry-content em,
.wp-block-post-content em {
  font-style: italic;
  color: inherit;
}

/* WordPress Block Styles */
.wp-block-image {
  margin: 2em 0;
}

.wp-block-quote {
  margin: 2em 0;
}

.wp-block-separator {
  margin: 3em 0;
}

.wp-block-group {
  margin: 1.5em 0;
}

/* Responsive Typography */
@media (max-width: 768px) {
  .blog-content,
  article.prose,
  .entry-content,
  .wp-block-post-content {
    font-size: 1rem; /* 16px on mobile */
    line-height: 1.7;
    padding: 0 0.5rem;
  }
  
  .blog-content h1,
  article.prose h1,
  .entry-content h1,
  .wp-block-post-content h1 {
    font-size: 1.875rem; /* 30px */
  }
  
  .blog-content h2,
  article.prose h2,
  .entry-content h2,
  .wp-block-post-content h2 {
    font-size: 1.5rem; /* 24px */
  }
  
  .blog-content h3,
  article.prose h3,
  .entry-content h3,
  .wp-block-post-content h3 {
    font-size: 1.25rem; /* 20px */
  }
  
  .blog-content p,
  article.prose p,
  .entry-content p,
  .wp-block-post-content p {
    font-size: 1rem;
    margin-bottom: 1.25em;
  }
}

/* Table of Contents Styles */
.toc-link {
  position: relative;
  padding-right: 1rem;
  border-right: 3px solid transparent;
  transition: all 0.2s ease;
}

.toc-link:hover {
  border-right-color: var(--primary, #4f46e5);
}

.toc-link.text-primary {
  border-right-color: var(--primary, #4f46e5);
  background: var(--primary, #4f46e5) !important;
  background: rgba(79, 70, 229, 0.1) !important;
}

/* Print Styles */
@media print {
  .blog-content,
  article.prose,
  .entry-content,
  .wp-block-post-content {
    font-size: 12pt;
    line-height: 1.6;
    color: #000;
  }
  
  .blog-content a,
  article.prose a,
  .entry-content a,
  .wp-block-post-content a {
    color: #000;
    text-decoration: underline;
  }
}

