/* FAQ Section */
.faq-section {
  padding: 5rem 0;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.faq-content {
  position: relative;
  z-index: 2;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: #fff;
  border-radius: 15px;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 8px 30px rgba(92, 89, 157, 0.2);
  transform: translateY(-2px);
}

.faq-item.active {
  border-color: var(--primary-color);
  box-shadow: 0 8px 30px rgba(44, 85, 48, 0.15);
}

.faq-question {
  padding: 1.5rem 2rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  transition: all 0.3s ease;
  position: relative;
}

.faq-question:hover {
  background: #f8f9fa;
  color: var(--primary-dark);
}

.faq-item.active .faq-question {
  background: var(--primary-color);
  color: #fff;
}

.faq-question-text {
  flex: 1;
  margin-right: 1rem;
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  color: var(--primary-color);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: #fff;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #fff;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0.5rem 2rem 1rem 2rem;
  color: #6c757d;
  line-height: 1.6;
  font-size: 1rem;
}

.faq-answer-content p {
  margin-bottom: 1rem;
}

.faq-answer-content p:last-child {
  margin-bottom: 0;
}

.faq-answer-content ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.faq-answer-content li {
  margin-bottom: 0.5rem;
}

/* FAQ Categories */
.faq-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.faq-category-btn {
  background: #fff;
  border: 2px solid #e9ecef;
  color: #6c757d;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.faq-category-btn:hover,
.faq-category-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px var(--primary-light);
}

/* Search Box */
.faq-search {
  max-width: 500px;
  margin: 0 auto 3rem auto;
  position: relative;
}

.faq-search-input {
  width: 100%;
  padding: 1rem 1.5rem 1rem 3rem;
  border: 2px solid #e9ecef;
  border-radius: 50px;
  font-size: 1rem;
  background: #fff;
  transition: all 0.3s ease;
}

.faq-search-input:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.faq-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 1.1rem;
}

/* No Results */
.faq-no-results {
  text-align: center;
  padding: 3rem 2rem;
  color: #6c757d;
  display: none;
}

.faq-no-results.show {
  display: block;
}

.faq-no-results-icon {
  font-size: 3rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .faq-section {
    padding: 4rem 0;
  }

  .faq-title {
    font-size: 2.5rem;
  }

  .faq-question {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }

  .faq-answer-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
  }

  .faq-categories {
    gap: 0.5rem;
  }

  .faq-category-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .faq-title {
    font-size: 2rem;
  }

  .faq-question {
    padding: 1rem;
    align-items: flex-start;
  }

  .faq-question-text {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  .faq-answer-content {
    padding: 0 1rem 1rem 1rem;
    padding: 10px 1rem 1rem 1rem;
    text-align: right;
  }

  .faq-categories {
    align-items: center;
  }

  .faq-search {
    margin: 0 auto 1rem auto;
  }

  .section-subtitle,
  .faq-categories {
    margin-bottom: 1rem;
  }
}

/* RTL Support */
[dir="rtl"] .faq-title::after {
  right: 50%;
  left: auto;
  transform: translateX(50%);
}

[dir="rtl"] .faq-question {
  text-align: right;
}

[dir="rtl"] .faq-question-text {
  margin-right: 0;
  margin-left: 1rem;
}

[dir="rtl"] .faq-search-input {
  padding: 1rem 3rem 1rem 1.5rem;
}

[dir="rtl"] .faq-search-icon {
  left: auto;
  right: 1rem;
}

/* Animation on scroll */
.faq-section.animate-in .faq-item {
  animation: faqFadeIn 0.6s ease-out forwards;
}

.faq-section.animate-in .faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-section.animate-in .faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-section.animate-in .faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-section.animate-in .faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-section.animate-in .faq-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes faqFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
