/* ============================================
   رز دولوپ - استایل صفحه سوالات متداول
   فایل مستقل و مخصوص FAQ
   ============================================ */

/* ===========================================
   1. PAGE HERO (بخش بالای صفحه)
   =========================================== */
.faq-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 60px;
  position: relative;
  overflow: hidden;
}

.faq-hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  pointer-events: none;
}

.faq-hero-glow-blue {
  background: rgba(37, 99, 235, 0.4);
  top: -200px;
  right: -100px;
}

.faq-hero-glow-cta {
  background: rgba(245, 158, 11, 0.2);
  bottom: -100px;
  left: -100px;
}

.faq-hero-content {
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

.faq-hero-title {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
}

.faq-hero-subtitle {
  font-size: var(--font-size-md);
  color: var(--text-secondary);
  line-height: 1.9;
  max-width: 600px;
  margin-inline: auto;
}

/* ===========================================
   2. SEARCH BOX (جستجو)
   =========================================== */
.faq-search-wrapper {
  max-width: 600px;
  margin: 0 auto;
}

.faq-search-form {
  display: flex;
  gap: 0.75rem;
}

.faq-search-input-wrapper {
  flex: 1;
  position: relative;
}

.faq-search-icon {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.faq-search-input {
  width: 100%;
  padding: 1rem 3rem 1rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-size-base);
  outline: none;
  transition: border-color 0.3s ease;
}

.faq-search-input:focus {
  border-color: var(--color-blue);
}

.faq-search-result {
  margin-top: 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

.faq-search-result strong {
  color: var(--text-primary);
}

.faq-search-clear {
  color: var(--color-blue);
  margin-right: 0.5rem;
  text-decoration: none;
}

/* ===========================================
   3. CATEGORY SECTION (بخش دسته‌ها)
   =========================================== */
.faq-section {
  padding: 3rem 0;
}

.faq-section-alt {
  background: var(--bg-card);
}

.faq-category-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.faq-category-header {
  text-align: center;
  margin-bottom: 2rem;
}

.faq-category-title {
  font-size: var(--font-size-xl);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
}

.faq-category-desc {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
  margin: 0;
}

/* ===========================================
   4. FAQ ACCORDION (اصل کار!)
   =========================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.3s ease;

  /* 🔑 مهم: مطمئن میشیم همیشه نمایان باشه */
  opacity: 1;
  visibility: visible;
}

.faq-item.is-open {
  border-color: var(--color-blue);
}

/* ─── سوال (دکمه) ─── */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-size: var(--font-size-base);
  font-weight: 700;
  color: var(--text-primary);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: right;
  font-family: inherit;
  transition: color 0.3s ease;
}

.faq-question:hover {
  color: var(--color-blue);
}

.faq-question > span {
  flex: 1;
}

.faq-question-category {
  display: block;
  font-size: 0.75rem;
  color: var(--color-blue);
  margin-bottom: 0.25rem;
  font-weight: 600;
}

/* ─── آیکون + / × ─── */
.faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease, color 0.3s ease;
  color: var(--text-muted);
}

.faq-item.is-open .faq-icon {
  transform: rotate(45deg);
  color: var(--color-blue);
}

/* ─── پاسخ (بخش پنهان) ─── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item.is-open .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 1.5rem 1.25rem;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.9;
  margin: 0;
}

/* ===========================================
   5. NO RESULT (وقتی نتیجه‌ای نیست)
   =========================================== */
.faq-no-result {
  text-align: center;
  padding: 3rem 2rem;
  max-width: 500px;
  margin: 0 auto;
}

.faq-no-result svg {
  margin: 0 auto 1rem;
  display: block;
}

.faq-no-result h3 {
  color: var(--text-primary);
  margin: 0 0 1rem;
  font-size: var(--font-size-lg);
}

.faq-no-result p {
  color: var(--text-secondary);
  margin: 0 0 2rem;
  line-height: 1.7;
}

/* ===========================================
   6. CTA SECTION (پایین صفحه)
   =========================================== */
.faq-cta-section {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-primary) 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.faq-cta-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.15);
  filter: blur(120px);
  pointer-events: none;
}

.faq-cta-box {
  padding: 4rem 2rem;
  text-align: center;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
}

.faq-cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-blue), var(--color-cta));
}

.faq-cta-title {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.faq-cta-text {
  font-size: var(--font-size-md);
  color: var(--text-secondary);
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.faq-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================================
   7. RESPONSIVE - TABLET
   =========================================== */
@media (max-width: 1024px) {
  .faq-hero-title {
    font-size: var(--font-size-3xl);
  }
}

/* ===========================================
   8. RESPONSIVE - MOBILE
   =========================================== */
@media (max-width: 768px) {
  .faq-hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 20px);
  }

  .faq-hero-title {
    font-size: var(--font-size-2xl);
  }

  .faq-search-form {
    flex-direction: column;
  }

  .faq-question {
    padding: 1rem 1.25rem;
    font-size: var(--font-size-sm);
  }

  .faq-answer p {
    padding: 0 1.25rem 1rem;
  }

  .faq-icon {
    width: 20px;
    height: 20px;
  }

  .faq-cta-box {
    padding: 2.5rem 1.5rem;
  }

  .faq-cta-title {
    font-size: var(--font-size-xl);
  }
}

/* ===========================================
   9. RESPONSIVE - SMALL MOBILE
   =========================================== */
@media (max-width: 480px) {
  .faq-category-title {
    font-size: var(--font-size-lg);
  }
}