/* 자주 묻는 질문(FAQ) — Figma IN0002 / MIN0002, .faq-page__content 스코프 */

.faq-page__content {
  display: block;
  width: 100%;
  background: #ffffff;
  padding-top: 64px;
}

.faq-page__content * {
  box-sizing: border-box;
}

.faq-list {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px 120px;
}

/* ----------------------------------------------------------
   타이틀
   ---------------------------------------------------------- */
.faq-list__header {
  padding: 100px 10px 0;
}

.faq-list__title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 44px;
  letter-spacing: -0.32px;
  color: #000000;
}

/* ----------------------------------------------------------
   카테고리 필터 탭 (PC pill / MO 스와이프+양끝 라운딩·그라데이션)
   ---------------------------------------------------------- */
.faq-list__tabs {
  position: relative;
  margin-top: 40px;
}

.faq-tabs-scroll {
  overflow-x: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  border-radius: 40px;
}

.faq-tabs-scroll::-webkit-scrollbar {
  display: none;
}

.faq-page__content .filter-tabs.faq-tabs {
  display: flex;
  align-items: center;
  width: 100%;
  background: #f3f5f6;
  border-radius: 40px;
}

.faq-page__content .faq-tabs .filter-tabs__tab {
  flex: 1 0 0;
  min-width: 0;
  height: 56px;
  padding: 10px;
  border: 0;
  border-radius: 40px;
  background: transparent;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.16px;
  color: #000000;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.faq-page__content .faq-tabs .filter-tabs__tab--active {
  background: #000000;
  color: #ffffff;
  font-weight: 700;
}

.faq-tabs-dim {
  display: none;
}

/* ----------------------------------------------------------
   Q&A 아코디언
   ---------------------------------------------------------- */
.faq-accordion {
  margin-top: 30px;
}

.faq-item {
  margin: 0;
  padding:0;
  border-bottom: 1px solid #e4e7ec; /* CLOSE: 질문 간 구분선 */
}

/* OPEN: 해당 질문 구분선 숨김 / 마지막 항목도 구분선 없음 */
.faq-item.faq-item--open,
.faq-item:last-child,
.faq-item.faq-item--last {
  border-bottom: 0;
}

.faq-item[hidden] {
  display: none;
}

.faq-item__question {
  margin: 0;
  padding:30px 0;
}

.faq-item__q-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 0 10px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.faq-item__q-mark {
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.2px;
  color: #ea002c;
}

.faq-item__q-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
  letter-spacing: -0.2px;
  color: #000000;
}

.faq-item__chevron {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  position: relative;
  transition: transform 0.2s ease;
}

.faq-item__chevron::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 6px;
  width: 10px;
  height: 10px;
  border-right: 1.6px solid #0d1120;
  border-bottom: 1.6px solid #0d1120;
  transform: rotate(45deg);
}

.faq-item--open .faq-item__chevron {
  transform: rotate(180deg);
}

/* 답변 — 회색 라운드 패널 (Figma) */
.faq-item__answer {
  display: none;
  /* margin: 20px 0 0; */
  padding: 0;
}

.faq-item--open .faq-item__answer {
  display: block;
}

.faq-item__answer-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px;
  border-radius: 12px;
  background: #f3f5f6;
}

.faq-item__answer-body,
.faq-item__answer-warn {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.16px;
}

.faq-item__answer-body {
  color: #000000;
}

.faq-item__answer-warn {
  color: #ea002c;
}

.faq-item__answer-panel .faq-item__answer-body + .faq-item__answer-warn {
  margin-top: -10px; /* body~warn 간격 10px (패널 gap 20 보정) */
}

.faq-item__answer-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 15px 8px 15px;
  border-radius: 20px;
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.16px;
}

.faq-item__answer-cta:hover,
.faq-item__answer-cta:focus-visible {
  color: #ffffff;
  text-decoration: none;
}

.faq-item__answer-cta-icon {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.faq-item.faq-item--open .faq-item__question{
  padding: 30px 0 0;
}

.faq-item.faq-item--open .faq-item__answer{
  margin: 20px 0 10px;
}

/* ----------------------------------------------------------
   모바일 (Figma MIN0002)
   ---------------------------------------------------------- */
@media (max-width: 1279.98px) {
  .faq-list {
    padding: 0 20px 80px;
  }

  .faq-list__header {
    padding: 40px 4px 0;
  }

  .faq-item__question{
    padding:20px 0;
  }

  .faq-item.faq-item--open .faq-item__question{
    padding: 20px 0 0;
  }
  
  .faq-item.faq-item--open .faq-item__answer{
    margin: 10px 0 10px;
  }

  .faq-list__title {
    font-size: 24px;
    line-height: 34px;
    letter-spacing: -0.24px;
  }

  .faq-list__tabs {
    margin-top: 24px;
  }

  .faq-tabs-scroll {
    border-radius: 60px; /* 상단 탭 양측 라운딩 */
  }

  .faq-page__content .filter-tabs.faq-tabs {
    width: max-content;
    min-width: 100%;
    height: 48px;
    border-radius: 60px;
  }

  .faq-page__content .faq-tabs .filter-tabs__tab {
    flex: 0 0 auto;
    height: 48px;
    padding: 0 24px;
    border-radius: 60px;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.14px;
  }

  /* 드래그 시 양끝 그라데이션 — 스크롤 가능 + 선택 탭이 끝에 없으면 .is-on */
  .faq-tabs-dim {
    display: block;
    position: absolute;
    top: 0;
    width: 40px;
    height: 48px;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.15s ease;
  }

  .faq-tabs-dim.is-on {
    opacity: 1;
  }

  .faq-tabs-dim--left {
    left: 0;
    border-radius: 40px 0 0 40px;
    background: linear-gradient(to right, #f3f5f6 27%, rgba(243, 245, 246, 0) 75%);
  }

  .faq-tabs-dim--right {
    right: 0;
    border-radius: 0 40px 40px 0;
    background: linear-gradient(to left, #f3f5f6 27%, rgba(243, 245, 246, 0) 75%);
  }

  .faq-accordion {
    margin-top: 20px;
  }

  .faq-item {
    padding: 0;
  }

  .faq-item__q-btn {
    padding: 0 4px;
    align-items: flex-start;
    gap: 5px;
  }

  .faq-item__q-mark,
  .faq-item__q-text {
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.14px;
  }

  .faq-item__chevron {
    width: 20px;
    height: 20px;
    margin-top: 1px;
  }

  .faq-item__chevron::before {
    top: 5px;
    left: 5px;
    width: 8px;
    height: 8px;
  }

  .faq-item__answer {
    margin-top: 10px;
  }

  .faq-item__answer-panel {
    gap: 10px;
    padding: 20px;
  }

  .faq-item__answer-body,
  .faq-item__answer-warn {
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.14px;
  }

  .faq-item__answer-panel .faq-item__answer-body + .faq-item__answer-warn {
    margin-top: 0;
  }

  .faq-item__answer-cta {
    min-height: 36px;
    padding: 7px 10px 7px 15px;
    gap: 2px;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: -0.14px;
  }

  .faq-item__answer-cta-icon {
    width: 16px;
    height: 16px;
  }
  .faq-page__content{
    padding-top: 56px;
  }
}
