/* ========================================
   FAQ常见问题 - 增强版样式
   ======================================== */

/* FAQ搜索框 */
.faq-search {
  position: relative;
  margin-bottom: 2rem;
}

.faq-search input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid rgba(59, 130, 246, 0.1);
  border-radius: 12px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.faq-search input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.faq-search .search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

/* FAQ分类标签 */
.faq-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.faq-category-btn {
  padding: 0.5rem 1rem;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  color: #374151;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.faq-category-btn:hover,
.faq-category-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

/* FAQ列表容器 */
.faq-list {
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 16px !important;
  padding: 1.5rem !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
}

/* FAQ项目 */
.faq-item {
  border: none !important;
  border-radius: 12px !important;
  margin-bottom: 0.75rem !important;
  background: rgba(248, 250, 252, 0.6) !important;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease !important;
  overflow: hidden;
}

/* 确保默认收起状态 */
.faq-item:not([open]) {
  background: rgba(248, 250, 252, 0.6) !important;
}

.faq-item:not([open]) .faq-icon {
  background: rgba(59, 130, 246, 0.1) !important;
  color: #3b82f6 !important;
  transform: rotate(0deg);
}

.faq-item:hover {
  background: rgba(59, 130, 246, 0.05) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}

.faq-item[open] {
  background: rgba(59, 130, 246, 0.08) !important;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

/* FAQ问题标题 */
.faq-item summary {
  padding: 1.25rem 1.5rem !important;
  cursor: pointer !important;
  list-style: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-weight: 600 !important;
  color: #1f2937 !important;
  transition: all 0.3s ease !important;
  border-radius: 12px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: #3b82f6 !important;
}

/* FAQ问题文本 */
.faq-question {
  flex: 1;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  margin-right: 1rem;
}

/* FAQ图标 */
.faq-icon {
  width: 32px !important;
  height: 32px !important;
  background: rgba(59, 130, 246, 0.1) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  font-weight: 700 !important;
  color: #3b82f6 !important;
  transition: all 0.3s ease !important;
  flex-shrink: 0;
}

.faq-item[open] .faq-icon {
  background: #3b82f6 !important;
  color: white !important;
  transform: rotate(180deg);
}

/* FAQ答案内容 */
.faq-answer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: #4b5563;
  line-height: 1.7;
  font-size: 0.95rem;
  animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 查看更多按钮样式 */
.faq-more-btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3) !important;
}

/* 分类标签 */
.faq-category-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}

/* 无结果提示 */
.faq-no-results {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.faq-no-results svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  opacity: 0.5;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .faq-categories {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  
  .faq-category-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .faq-item summary {
    padding: 1rem !important;
  }
  
  .faq-question {
    font-size: 0.9rem !important;
  }
  
  .faq-answer {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.875rem;
  }
  
  .faq-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 1rem !important;
  }
}

/* 加载动画 */
.faq-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: #6b7280;
}

.faq-loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}