/* ==========================================
   FAQ 페이지 - Toss-Inspired Design
   ========================================== */

/* 메인 컨테이너 */
.faq-main {
  min-height: calc(100vh - 200px);
  background: #f5f5f5;
  padding: 60px 0 80px;
}

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

/* ==========================================
   페이지 헤더
   ========================================== */
.page-header {
  text-align: center;
  margin-bottom: 48px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  color: #191f28;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.page-description {
  font-size: 16px;
  color: #6b7684;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

/* ==========================================
   검색 영역
   ========================================== */
.search-section {
  margin-bottom: 32px;
}

.search-wrapper {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b95a1;
  font-size: 18px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 56px;
  padding: 0 20px 0 52px;
  border: 1px solid #e5e8eb;
  border-radius: 12px;
  font-size: 15px;
  color: #191f28;
  background: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

.search-input::placeholder {
  color: #adb5bd;
}

.search-input:focus {
  border-color: #3182f6;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.1);
}

/* ==========================================
   카테고리 필터
   ========================================== */
.category-section {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 0;
}

.category-section::-webkit-scrollbar {
  display: none;
}

.category-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  border: 1px solid #e5e8eb;
  border-radius: 20px;
  background: #ffffff;
  color: #4e5968;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.category-btn:hover {
  background: #f2f4f6;
  border-color: #d1d6db;
}

.category-btn.active {
  background: #191f28;
  color: #ffffff;
  border-color: #191f28;
}

/* ==========================================
   FAQ 목록
   ========================================== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 48px;
}

/* FAQ 아이템 */
.faq-item {
  background: #ffffff;
  border: 1px solid #e5e8eb;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: #d1d6db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.faq-item.active {
  border-color: #3182f6;
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.08);
}

/* FAQ 질문 */
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.question-text {
  font-size: 16px;
  font-weight: 600;
  color: #191f28;
  line-height: 1.5;
  letter-spacing: -0.01em;
  flex: 1;
  padding-right: 16px;
}

.question-icon {
  font-size: 20px;
  color: #8b95a1;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

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

/* FAQ 답변 */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

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

.faq-answer p {
  padding: 0 28px 24px 28px;
  margin: 0;
  font-size: 15px;
  color: #6b7684;
  line-height: 1.7;
  background: #f9fafb;
}

/* ==========================================
   추가 문의 안내
   ========================================== */
.inquiry-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 36px;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border: 1px solid #e5e8eb;
  border-radius: 20px;
  margin-top: 48px;
}

.inquiry-content {
  flex: 1;
}

.inquiry-title {
  font-size: 20px;
  font-weight: 700;
  color: #191f28;
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.inquiry-description {
  font-size: 15px;
  color: #6b7684;
  margin: 0;
  line-height: 1.5;
}

.inquiry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: #191f28;
  color: #ffffff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.inquiry-btn:hover {
  background: #2c3440;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 31, 40, 0.2);
  color: #ffffff;
}

.inquiry-btn i {
  font-size: 16px;
  transition: transform 0.2s ease;
}

.inquiry-btn:hover i {
  transform: translateX(4px);
}

/* ==========================================
   반응형 디자인
   ========================================== */
@media (max-width: 768px) {
  .faq-main {
    padding: 40px 0 60px;
  }

  .faq-container {
    padding: 0 16px;
  }

  .page-header {
    margin-bottom: 32px;
  }

  .page-title {
    font-size: 26px;
  }

  .page-description {
    font-size: 15px;
  }

  .search-input {
    height: 52px;
    font-size: 14px;
  }

  .category-section {
    gap: 6px;
  }

  .category-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .faq-question {
    padding: 20px 20px;
  }

  .question-text {
    font-size: 15px;
  }

  .faq-answer p {
    padding: 0 20px 20px 20px;
    font-size: 14px;
  }

  .inquiry-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding: 24px 24px;
  }

  .inquiry-title {
    font-size: 18px;
  }

  .inquiry-description {
    font-size: 14px;
  }

  .inquiry-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 24px;
  }

  .faq-item {
    border-radius: 14px;
  }

  .inquiry-box {
    border-radius: 16px;
  }
}

/* ==========================================
   애니메이션
   ========================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.faq-item {
  animation: fadeInUp 0.4s ease backwards;
}

.faq-item:nth-child(1) { animation-delay: 0.05s; }
.faq-item:nth-child(2) { animation-delay: 0.1s; }
.faq-item:nth-child(3) { animation-delay: 0.15s; }
.faq-item:nth-child(4) { animation-delay: 0.2s; }
.faq-item:nth-child(5) { animation-delay: 0.25s; }
.faq-item:nth-child(6) { animation-delay: 0.3s; }
.faq-item:nth-child(7) { animation-delay: 0.35s; }
.faq-item:nth-child(8) { animation-delay: 0.4s; }
.faq-item:nth-child(9) { animation-delay: 0.45s; }
.faq-item:nth-child(10) { animation-delay: 0.5s; }
.faq-item:nth-child(11) { animation-delay: 0.55s; }
.faq-item:nth-child(12) { animation-delay: 0.6s; }
