/* FAQ 섹션 */
.section-faq {
  width: 100%;
  padding: 100px 20px;
  box-sizing: border-box;
  background-color: #fafbfc;
  color: #1f2937;
}

.faq-container {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.faq-title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  margin: 0 0 60px 0;
  line-height: 1.2;
  color: #111827;
  text-align: center;
  letter-spacing: -0.02em;
}

.faq-categories {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 레이아웃: 수직 구조 (기본) */
.faq-layout-vertical {
  display: flex !important;
  flex-direction: column !important;
  gap: 20px;
}

/* 레이아웃: 수평 구조 */
.faq-layout-horizontal {
  display: flex !important;
  flex-direction: row !important;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}

.faq-layout-horizontal .faq-category {
  flex: 1;
  min-width: 200px;
  max-width: calc(50% - 8px);
}

/* 공유 드롭다운 영역 (수평 구조) */
.faq-shared-dropdown {
  width: 100%;
  margin-top: 20px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, padding 0.5s ease;
  background: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.faq-shared-dropdown.active {
  max-height: 5000px;
  opacity: 1;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* 카테고리 제목 버튼 */
.faq-category {
  border: none;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.faq-category:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.faq-category.active {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}

.faq-category-title {
  width: 100%;
  padding: 24px 28px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: clamp(18px, 2vw, 20px);
  font-weight: 500;
  color: #111827;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.faq-category-title::after {
  content: '+';
  font-size: 24px;
  color: #6b7280;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f3f4f6;
  font-weight: 300;
  line-height: 1;
}

.faq-category.active .faq-category-title::after {
  transform: rotate(45deg);
  background: #059669;
  color: #ffffff;
}

.faq-category-title:hover {
  color: #059669;
}

.faq-category-title:hover::after {
  background: #059669;
  color: #ffffff;
}

/* 수평 구조에서 카테고리 제목 버튼 스타일 조정 */
.faq-layout-horizontal .faq-category-title {
  padding: 20px 24px;
  font-size: clamp(16px, 1.8vw, 18px);
  white-space: nowrap;
  text-align: center;
  justify-content: center;
}

.faq-layout-horizontal .faq-category-title::after {
  display: none;
}

/* 카테고리 항목들 컨테이너 */
.faq-category-items {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 28px;
}

.faq-category.active .faq-category-items {
  max-height: 5000px;
  opacity: 1;
  padding: 0 28px 28px 28px;
}

.faq-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: #f9fafb;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 3px solid transparent;
}

.faq-item:hover {
  background: #f3f4f6;
  border-left-color: #059669;
}

.faq-item.active {
  background: #ffffff;
  border-left-color: #059669;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: clamp(16px, 1.8vw, 17px);
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  color: #6b7280;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffffff;
  font-weight: 300;
  line-height: 1;
}

.faq-item.active .faq-question::after {
  transform: rotate(45deg);
  background: #059669;
  color: #ffffff;
}

.faq-question:hover {
  color: #059669;
}

.faq-question:hover::after {
  background: #059669;
  color: #ffffff;
}

.faq-answer {
  padding: 0 24px;
  font-size: clamp(15px, 1.8vw, 16px);
  line-height: 1.75;
  color: #6b7280;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.5s ease, opacity 0.4s ease;
}

.faq-item.active .faq-answer {
  padding: 0 24px 24px 24px;
  max-height: 2000px;
  opacity: 1;
}

.faq-answer p {
  margin: 0 0 16px 0;
}

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

.faq-answer strong {
  color: #111827;
  font-weight: 600;
}

/* FAQ 반응형 */
@media (max-width: 768px) {
  .section-faq {
    padding: 80px 20px;
    background-color: #ffffff;
  }

  .faq-title {
    font-size: clamp(28px, 6vw, 36px);
    margin-bottom: 48px;
    font-weight: 600;
  }

  .faq-categories {
    gap: 16px;
  }

  /* 수평 구조 모바일에서 수직으로 변경 */
  .faq-layout-horizontal {
    flex-direction: column;
  }

  .faq-layout-horizontal .faq-category {
    max-width: 100%;
  }

  .faq-category {
    border-radius: 10px;
  }

  .faq-category-title {
    padding: 20px 24px;
    font-size: clamp(17px, 4vw, 19px);
  }

  .faq-category.active .faq-category-items {
    padding: 0 24px 24px 24px;
  }

  .faq-question {
    padding: 18px 20px;
    font-size: clamp(15px, 3.5vw, 16px);
  }

  .faq-answer {
    padding: 0 20px;
    font-size: clamp(14px, 3.2vw, 15px);
    line-height: 1.7;
  }

  .faq-item.active .faq-answer {
    padding: 0 20px 20px 20px;
  }

  .faq-shared-dropdown.active {
    padding: 24px;
    border-radius: 10px;
  }
}

