/* ============================================================
   بلاگ — لیست مقالات
   تم سراسری (هدر، فوتر، نوار موبایل، پس‌زمینه، توکن‌ها) از
   style.css ارث می‌رسد؛ این فایل فقط استایل محتوای صفحه است.
   ============================================================ */

/* ---------- هیرو بلاگ ---------- */
.blog-hero {
  width: min(900px, 94%);
  margin: 36px auto 0;
  text-align: center;
}
.blog-hero h1 {
  display: inline-block;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  color: var(--text);
  padding-bottom: 14px;
  position: relative;
}
.blog-hero h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), var(--violet));
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.5);
}
.blog-hero p {
  margin-top: 12px;
  color: var(--muted);
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 2;
}

/* ---------- فیلتر دسته‌بندی ---------- */
.blog-filters {
  width: min(1200px, 94%);
  margin: 26px auto 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.filter-btn:hover {
  color: var(--green-2);
  border-color: rgba(33, 241, 168, 0.45);
  transform: translateY(-2px);
}
.filter-btn.active {
  background: linear-gradient(135deg, #21f1a8, #15c98a);
  border-color: transparent;
  color: #04150c;
  box-shadow: 0 8px 22px var(--green-glow);
}

/* ---------- مقاله ویژه ---------- */
.featured-post {
  width: min(1200px, 94%);
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight), 0 18px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.featured-image {
  min-height: 300px;
}
.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.featured-content {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
}
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(33, 241, 168, 0.14);
  border: 1px solid rgba(33, 241, 168, 0.4);
  color: var(--green-2);
  font-size: 13.5px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: 999px;
}
.featured-title {
  font-size: clamp(21px, 2.4vw, 30px);
  font-weight: 900;
  color: var(--text);
  line-height: 1.6;
}
.featured-excerpt {
  color: var(--muted);
  font-size: 16px;
  line-height: 2;
}
.featured-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 12px 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, #21f1a8, #15c98a);
  color: #04150c;
  font-size: 15.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 26px var(--green-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(33, 241, 168, 0.45);
}

/* ---------- گرید مقالات ---------- */
.blog-grid {
  width: min(1200px, 94%);
  margin: 40px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  padding: 40px 0;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight), 0 14px 38px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(33, 241, 168, 0.4);
  box-shadow: var(--glass-highlight), 0 22px 54px rgba(0, 0, 0, 0.45);
}

.blog-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-image img { transform: scale(1.06); }

.blog-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(4, 21, 12, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(33, 241, 168, 0.5);
  color: var(--green-2);
  font-size: 12.5px;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 999px;
}

.blog-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 18px;
  flex-grow: 1;
}
.blog-meta {
  color: var(--muted);
  font-size: 13.5px;
  display: flex;
  gap: 14px;
}
.blog-meta i { color: var(--green-2); margin-left: 5px; }

.blog-title {
  font-size: 18.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.7;
}
.blog-excerpt {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.95;
}

.blog-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green-2);
  font-size: 14.5px;
  font-weight: 800;
  text-decoration: none;
  transition: gap 0.25s ease;
}
.read-more:hover { gap: 13px; }

/* ---------- دسته‌بندی‌ها ---------- */
.categories-section {
  width: min(1200px, 94%);
  margin: 56px auto 0;
  text-align: center;
}
.categories-title {
  display: inline-block;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--text);
  padding-bottom: 12px;
  position: relative;
}
.categories-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 52px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), var(--violet));
  box-shadow: 0 0 14px rgba(236, 72, 153, 0.5);
}
.categories-grid {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.category-card {
  display: block;
  text-decoration: none;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-highlight), 0 14px 38px rgba(0, 0, 0, 0.3);
  padding: 28px 16px;
  transition: transform 0.35s ease, border-color 0.35s ease;
}
.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(33, 241, 168, 0.4);
}
.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(33, 241, 168, 0.12);
  color: var(--green-2);
  font-size: 22px;
  box-shadow: 0 0 24px var(--green-glow);
  margin-bottom: 14px;
}
.category-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.category-count {
  font-size: 13.5px;
  color: var(--muted);
}

/* ---------- خبرنامه ---------- */
.newsletter-section {
  width: min(760px, 94%);
  margin: 56px auto 0;
  text-align: center;
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
    var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  backdrop-filter: blur(20px) saturate(1.6);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-highlight), 0 24px 70px rgba(0, 0, 0, 0.35);
  padding: 42px 28px;
}
.newsletter-title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
}
.newsletter-desc {
  color: var(--muted);
  font-size: 16px;
  line-height: 2;
  margin-bottom: 26px;
}
/* دکمه عضویت در کانال تلگرام */
.newsletter-telegram-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8, #0088cc);
  color: #ffffff;
  font-size: 16.5px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.newsletter-telegram-btn i { font-size: 19px; }
.newsletter-telegram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(56, 189, 248, 0.5);
}

/* ============================================================
   ریسپانسیو
   ============================================================ */
@media (max-width: 992px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-image { min-height: 220px; max-height: 300px; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .blog-hero { margin-top: 24px; }

  /* فیلترها: ردیف اسکرول‌شونده افقی مثل اپ‌ها */
  .blog-filters {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .blog-filters::-webkit-scrollbar { display: none; }
  .filter-btn { padding: 9px 18px; font-size: 14px; }

  .featured-content { padding: 24px 18px; gap: 12px; }

  .blog-grid { grid-template-columns: 1fr; gap: 18px; }
  .blog-title { font-size: 17.5px; }

  .categories-grid { gap: 12px; }
  .category-card { padding: 22px 12px; }
  .category-icon { width: 50px; height: 50px; font-size: 19px; }
  .category-name { font-size: 15.5px; }

  .newsletter-section { padding: 32px 18px; }
  .newsletter-telegram-btn { width: 100%; }
}

@media (max-width: 480px) {
  .blog-hero h1 { font-size: 26px; }
  .featured-title { font-size: 19px; }
  .featured-excerpt { font-size: 14.5px; }
  .blog-content { padding: 16px 14px; }
}
