/* ===== BLOG SECTION - PUBLIC SITE ===== */

/* بخش وبلاگ */
.blog-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.blog-section .section-title {
  text-align: center;
  margin-bottom: 50px;
}
.blog-section .section-title h2 {
  font-size: clamp(24px, 5vw, 36px);
  background: linear-gradient(135deg, #00bcd4, #9c27b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}
.blog-section .section-title p {
  color: #9b9b9b;
  font-size: 15px;
}

/* گرید کارت‌های مقاله */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* کارت مقاله */
.blog-card {
  background: rgba(0, 11, 167, 0.178);
  border: 1px solid rgba(225, 0, 255, 0.829);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}
.blog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(0,188,212,0.05), rgba(156,39,176,0.05));
  opacity: 0;
  transition: opacity 0.3s;
}
.blog-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 188, 212, 0.4);
  box-shadow: 0 20px 50px rgba(0, 188, 212, 0.15);
}
.blog-card:hover::before { opacity: 1; }

/* عکس کارت */
.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
}
.blog-card:hover .blog-card-img { transform: scale(1.05); }
.blog-card-no-img {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, rgba(0,188,212,0.1), rgba(156,39,176,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}

/* متن کارت */
.blog-card-body {
  padding: 20px;
}
.blog-card-title {
  font-size: 17px;
  color: #fff;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-excerpt {
  font-size: 13px;
  color: #999;
  line-height: 1.7;
  margin: 0 0 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
}
.blog-card-meta .date { color: #555; }
.blog-card-read {
  color: #00bcd4;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* مودال مقاله کامل */
#blogModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #060612;
  overflow-y: auto;
  animation: blogModalIn 0.4s ease;
}
@keyframes blogModalIn {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bm-header {
  position: sticky;
  top: 0; 
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(6, 6, 18, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,188,212,0.2);
}
.bm-header h2 {
  color: #00bcd4;
  font-size: 18px;
  margin: 0;
  max-width: calc(100% - 60px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bm-close {
  background: rgba(239,83,80,0.15);
  border: 1px solid rgba(239,83,80,0.4);
  color: #ef5350;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
  padding-bottom: 4px;
}
.bm-close:hover { background: #ef5350; color: #fff; transform: rotate(90deg); }

/* محتوای مقاله */
.bm-article {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* عکس اول - بزرگ و کامل */
.bm-cover {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 36px;
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

/* استایل‌های محتوای مقاله */
.bm-content {
  color: #ddd;
  font-size: 16px;
  line-height: 2;
}
.bm-content p.lead,
.bm-content p:first-of-type {
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  border-right: 4px solid #00bcd4;
  padding-right: 18px;
  margin-bottom: 28px;
  line-height: 1.9;
}
.bm-content h2 {
  font-size: 22px;
  color: #00bcd4;
  margin: 36px 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,188,212,0.2);
}
.bm-content p {
  margin: 0 0 18px;
  color: #ccc;
}
.bm-content strong { color: #fff; }

/* عکس‌های میانی مقاله */
.bm-inline-img {
  width: 100%;
  border-radius: 14px;
  margin: 28px 0;
  display: block;
  object-fit: cover;
  max-height: 380px;
  border: 1px solid rgba(0,188,212,0.2);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* گالری عکس‌های انتهایی */
.bm-gallery {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.bm-gallery-title {
  font-size: 16px;
  color: #888;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bm-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.bm-gallery-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.07);
}
.bm-gallery-img:hover {
  transform: scale(1.03);
  border-color: rgba(0,188,212,0.5);
  box-shadow: 0 8px 20px rgba(0,188,212,0.2);
}

/* بخش سوالات متداول */
.faq-section {
  padding: 80px 20px;
  max-width: 800px;
  margin: 0 auto;
}
.faq-section .section-title {
  text-align: center;
  margin-bottom: 40px;
}
.faq-section .section-title h2 {
  font-size: clamp(22px, 4vw, 32px);
  background: linear-gradient(135deg, #00bcd4, #9c27b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.3s;
}
.faq-item.open {
  border-color: rgba(0,188,212,0.35);
  background: rgba(0,188,212,0.04);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  color: #e8e8e8;
  font-size: 15px;
  font-family: inherit;
  padding: 18px 20px;
  text-align: right;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: color 0.3s;
}
.faq-question:hover { color: #00bcd4; }
.faq-item.open .faq-question { color: #00bcd4; }

.faq-icon {
  width: 28px; height: 28px;
  background: rgba(0,188,212,0.1);
  border: 1px solid rgba(0,188,212,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  color: #00bcd4;
  transition: all 0.3s;
}
.faq-item.open .faq-icon {
  background: rgba(0,188,212,0.2);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer-inner {
  padding: 0 20px 20px;
  color: #aaa;
  font-size: 14px;
  line-height: 2;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
}

/* ===== موبایل ===== */
@media (max-width: 768px) {
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .blog-card-img, .blog-card-no-img { height: 180px; }

  .bm-article { padding: 24px 16px 60px; }
  .bm-cover { max-height: 260px; margin-bottom: 24px; }
  .bm-content { font-size: 15px; }
  .bm-content p.lead,
  .bm-content p:first-of-type { font-size: 16px; }
  .bm-content h2 { font-size: 18px; }
  .bm-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

  .faq-question { font-size: 14px; padding: 16px; }
}
