﻿/* ========== 统一FAQ组件样式 ========== */

.faq-container {
  margin: 20px 0;
}

.faq-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.faq-item.active {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  user-select: none;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: #f8fafc;
}

.faq-question .faq-question-text {
  flex: 1;
  padding-right: 16px;
  line-height: 1.5;
}

.faq-question .faq-arrow {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #6b7280;
  transition: transform 0.3s ease, color 0.2s ease;
}

/* 通用i标签小箭头样式，确保始终靠右 */
.faq-question i {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 16px;
  text-align: center;
}

.faq-item.active .faq-question .faq-arrow {
  transform: rotate(180deg);
  color: #3b82f6;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
}

.faq-item.active .faq-answer {
  max-height: 2000px;
  padding: 0 20px 16px 20px;
}

.faq-answer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
}

.faq-answer ul,
.faq-answer ol {
  margin: 8px 0;
  padding-left: 20px;
}

.faq-answer li {
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
  margin-bottom: 4px;
}

.faq-answer strong {
  color: #1f2937;
  font-weight: 600;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .faq-question {
    padding: 14px 16px;
    font-size: 14px;
  }

  .faq-question i {
    margin-left: auto;
    flex-shrink: 0;
  }

  .faq-answer {
    padding: 0 16px;
  }

  .faq-item.active .faq-answer {
    padding: 0 16px 14px 16px;
  }

  .faq-answer p,
  .faq-answer li {
    font-size: 13px;
  }
}
