/* ============================================================
   چرخ گستر سهند - استایل وبلاگ تخصصی
   هماهنگ با تم صنعتی
   ============================================================ */

.blog-section {
  background: linear-gradient(180deg, #060e1a 0%, var(--atlas-deep-blue) 50%, var(--atlas-mid-blue) 100%);
  min-height: 100vh;
  font-family: 'IRANSans', 'Vazirmatn', 'Tahoma', sans-serif;
  direction: rtl;
  padding: 2rem 1.5rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.blog-gears-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.03;
}

.blog-gear {
  position: absolute;
}

.blog-gear-1 {
  top: -80px;
  right: -80px;
  width: 450px;
  height: 450px;
  animation: blogGearSpin 35s linear infinite;
}

@keyframes blogGearSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.blog-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.blog-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--atlas-gold);
  border-radius: 50%;
  animation: blogParticleFloat 7s ease-in infinite;
  opacity: 0;
}

@keyframes blogParticleFloat {
  0% {
    transform: translateY(105vh) scale(0);
    opacity: 0;
  }

  20% {
    opacity: 0.7;
  }

  80% {
    opacity: 0.2;
  }

  100% {
    transform: translateY(-10vh) scale(2);
    opacity: 0;
  }
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.blog-container-detail {
  max-width: 850px;
}

/* ==================== هدر ==================== */
.blog-header {
  text-align: center;
  margin-bottom: 3rem;
}

.blog-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(212, 175, 55, 0.1);
  color: var(--atlas-gold);
  padding: 0.4rem 1.4rem;
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 2px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  margin-bottom: 1rem;
}

.blog-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--atlas-gold);
  border-radius: 50%;
  animation: blogDotPulse 2s infinite;
}

@keyframes blogDotPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1
  }

  50% {
    transform: scale(1.6);
    opacity: 0.3
  }
}

.blog-title {
  color: var(--atlas-white);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.gold-text {
  color: var(--atlas-gold);
}

.blog-subtitle {
  color: var(--atlas-text-muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto;
}

.blog-divider {
  width: 80px;
  height: 2px;
  background: var(--atlas-gold);
  margin: 1.5rem auto;
}

/* ==================== لی‌اوت ==================== */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

.blog-main-content {
  min-width: 0;
}

/* ==================== کارت مقاله ==================== */
.blog-card {
  background: linear-gradient(145deg, rgba(19, 64, 116, 0.2), rgba(10, 26, 47, 0.5));
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s;
  margin-bottom: 1.5rem;
}

.blog-card:hover {
  border-color: rgba(212, 175, 55, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

.blog-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  font-size: 0.75rem;
}

.blog-card-category {
  background: rgba(212, 175, 55, 0.12);
  color: var(--atlas-gold);
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  text-decoration: none;
  font-weight: 600;
}

.blog-card-date {
  color: var(--atlas-text-muted);
}

.blog-card-reading {
  color: var(--atlas-gold-light);
}

.blog-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.blog-card-title a {
  color: var(--atlas-white);
  text-decoration: none;
  transition: color 0.3s;
}

.blog-card-title a:hover {
  color: var(--atlas-gold);
}

.blog-card-excerpt {
  color: var(--atlas-text-muted);
  font-size: 0.85rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--atlas-gold);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.blog-read-more:hover {
  color: var(--atlas-white);
  gap: 0.6rem;
}

/* ==================== مقالات ویژه ==================== */
.blog-card-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.blog-card-featured .blog-card-image {
  height: 100%;
}

/* ==================== گرید مقالات ==================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.posts-grid-mini {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ==================== سایدبار ==================== */
.blog-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background: linear-gradient(145deg, rgba(19, 64, 116, 0.2), rgba(10, 26, 47, 0.5));
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-title {
  color: var(--atlas-gold);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 0.5rem;
}

.category-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--atlas-text-on-dark);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
  transition: all 0.3s;
}

.category-list a:hover {
  color: var(--atlas-gold);
  padding-right: 0.5rem;
}

.cat-count {
  background: rgba(212, 175, 55, 0.12);
  color: var(--atlas-gold);
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
}

.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.recent-posts-list li {
  margin-bottom: 0.8rem;
}

.recent-posts-list a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.recent-post-title {
  color: var(--atlas-white);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.3s;
}

.recent-posts-list a:hover .recent-post-title {
  color: var(--atlas-gold);
}

.recent-post-date {
  color: var(--atlas-text-muted);
  font-size: 0.7rem;
}

.sidebar-cta p {
  color: var(--atlas-text-muted);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

/* ==================== جزئیات مقاله ==================== */
.blog-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.8rem;
  flex-wrap: wrap;
}

.blog-breadcrumb a {
  color: var(--atlas-text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.blog-breadcrumb a:hover {
  color: var(--atlas-gold);
}

.breadcrumb-sep {
  color: var(--atlas-gold);
}

.breadcrumb-current {
  color: var(--atlas-gold);
  font-weight: 600;
}

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

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

.article-date {
  color: var(--atlas-text-muted);
}

.article-reading,
.article-views {
  color: var(--atlas-gold-light);
}

.article-title {
  color: var(--atlas-white);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.article-tag {
  color: var(--atlas-gold);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.3s;
}

.article-tag:hover {
  color: var(--atlas-white);
}

.article-featured-image {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 2rem;
}

.article-featured-image img {
  width: 100%;
  object-fit: cover;
}

.article-content {
  color: var(--atlas-text-on-dark);
  font-size: 1rem;
  line-height: 2.3;
}

.article-content p {
  margin-bottom: 1.2rem;
}

.article-content h2,
.article-content h3 {
  color: var(--atlas-gold);
  margin: 2rem 0 1rem;
}

.article-footer {
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding-top: 1.5rem;
  margin-top: 3rem;
}

.article-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--atlas-text-muted);
  font-size: 0.85rem;
}

.share-link {
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
}

.telegram {
  background: rgba(0, 136, 204, 0.1);
  color: #08c;
}

.whatsapp {
  background: rgba(37, 211, 102, 0.1);
  color: #25d366;
}

.related-title {
  color: var(--atlas-gold);
  font-size: 1.3rem;
  margin: 3rem 0 1.5rem;
}

/* ==================== صفحه‌بندی ==================== */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.blog-page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--atlas-text-on-dark);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s;
}

.blog-page-link:hover,
.blog-page-link.active {
  background: rgba(212, 175, 55, 0.15);
  color: var(--atlas-gold);
  border-color: var(--atlas-gold);
}

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

  .blog-card-featured {
    grid-template-columns: 1fr;
  }

  .blog-card-featured .blog-card-image {
    height: 200px;
  }

  .article-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 600px) {
  .blog-section {
    padding: 1.5rem 0.8rem;
  }

  .blog-title {
    font-size: 1.4rem;
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== دکمه CTA سایدبار ==================== */
.sidebar-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, var(--atlas-gold), var(--atlas-copper));
  color: var(--atlas-deep-blue);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: all 0.3s;
  width: 100%;
  box-sizing: border-box;
}

.sidebar-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

/* ==================== بهبود ریسپانسیو ==================== */
@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    top: auto;
  }
}

@media (max-width: 600px) {
  .blog-card-footer {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .blog-card-footer .blog-read-more {
    margin-right: auto;
  }
}