/* ==================== ROOT VARIABLES ==================== */
:root {
  --primary: #7C4DFF;
  --secondary: #FF4081;
  --gold: #D4A843;
  --gradient: linear-gradient(135deg, #7C4DFF, #FF4081);
  --gradient-gold: linear-gradient(135deg, #D4A843, #F0D078);
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --text-primary: #212121;
  --text-secondary: #6C757D;
  --text-muted: #9E9E9E;
  --border-light: #E0E0E0;
  --border-subtle: #F0F0F0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --transition-fast: 0.15s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2);
}

/* ==================== SELECTION ==================== */
::selection {
  background: rgba(124, 77, 255, 0.2);
  color: var(--text-primary);
}
::-moz-selection {
  background: rgba(124, 77, 255, 0.2);
  color: var(--text-primary);
}

/* ==================== MOBILE LINK BASE ==================== */
.mobile-link {
  text-decoration: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  transition: all var(--transition-fast);
}
.mobile-link:hover {
  background: #F3E5F5;
  color: var(--primary);
}

/* ==================== BLOG CARD HOVER ==================== */
.blog-card {
  transition: all var(--transition-base);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ==================== FEATURED POST HOVER ==================== */
.featured-post {
  transition: all var(--transition-base);
}
.featured-post:hover {
  box-shadow: var(--shadow-lg);
}

/* ==================== CATEGORY BUTTON ==================== */
.cat-btn {
  transition: all var(--transition-base);
}
.cat-btn:hover {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

/* ==================== PAGINATION BUTTON ==================== */
.page-btn {
  transition: all var(--transition-base);
}
.page-btn:hover {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}

/* ==================== ARTICLE SINGLE PAGE STYLES ==================== */
.article-container {
  max-width: 750px;
  margin: 0 auto;
  padding: 100px 20px 40px;
}

.article-header {
  text-align: center;
  margin-bottom: 32px;
}

.article-cat {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}

.article-cat.study { background: #E8F5E9; color: #2E7D32; }
.article-cat.exam { background: #FFF3E0; color: #E65100; }
.article-cat.tech { background: #E8EAF6; color: #283593; }
.article-cat.tips { background: #FCE4EC; color: #880E4F; }
.article-cat.general { background: #F3E5F5; color: #4A148C; }

.article-header h1 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.article-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.article-meta i {
  margin-left: 4px;
}

.article-featured {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  position: relative;
  overflow: hidden;
}

.article-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.article-featured .img-fallback {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}

/* ==================== ARTICLE CONTENT ==================== */
.article-content h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.article-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--text-primary);
}

.article-content p {
  font-size: 14px;
  color: #424242;
  margin-bottom: 14px;
  line-height: 1.9;
}

.article-content ul,
.article-content ol {
  margin: 12px 0;
  padding-right: 20px;
}

.article-content li {
  font-size: 14px;
  color: #424242;
  margin-bottom: 6px;
  line-height: 1.8;
}

.article-content blockquote {
  background: #F3E5F5;
  border-right: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.article-content a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.article-content a:hover {
  text-decoration: underline;
}

.article-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 16px 0;
}

.article-content code {
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'Vazirmatn', monospace;
}

.article-content pre {
  background: #212121;
  color: #E0E0E0;
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 16px 0;
  direction: ltr;
  text-align: left;
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

/* ==================== SHARE BOX ==================== */
.share-box {
  display: flex;
  gap: 8px;
  margin-top: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border-light);
  justify-content: center;
  align-items: center;
}

.share-box span {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 8px;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #fff;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.share-btn:hover {
  transform: scale(1.1);
}

.share-btn.tg { background: #0088cc; }
.share-btn.wa { background: #25D366; }
.share-btn.tw { background: #1DA1F2; }
.share-btn.copy { background: var(--text-secondary); }

/* ==================== RELATED POSTS ==================== */
.related-posts {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.related-posts h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.related-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text-primary);
  transition: all var(--transition-base);
}

.related-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.related-card span {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 900px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .article-header h1 {
    font-size: 22px;
  }

  .article-featured {
    height: 200px;
    font-size: 50px;
  }

  .article-content h2 {
    font-size: 18px;
  }

  .article-content h3 {
    font-size: 16px;
  }

  .article-content p,
  .article-content li {
    font-size: 13px;
  }
}

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* اضافه کن به <style> توی blog.html */
.newsletter-inputs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.newsletter-inputs input {
  flex: 1;
  min-width: 120px;
  padding: 12px 16px;
  border-radius: 14px;
  border: none;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 13px;
  outline: none;
  transition: all 0.3s;
}

.newsletter-inputs input:focus {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.newsletter-form button {
  padding: 12px 20px;
  border-radius: 14px;
  border: none;
  background: #fff;
  color: var(--primary);
  font-family: 'Vazirmatn', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  width: 100%;
}

.newsletter-form button:hover {
  transform: scale(1.02);
}

.newsletter-form button.success {
  background: #4CAF50;
  color: #fff;
}

.newsletter-form button.error {
  background: #FF5252;
  color: #fff;
}

.newsletter-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .newsletter-inputs {
    flex-direction: column;
  }
}

