/* ═══════════════════════════════════════
   FAQ — faq.css
   자주 묻는 질문 — 버튼 아코디언(한 번에 하나, 슬라이드 다운)
   · button + aria-expanded, 인라인 SVG 화살표(이모지 아님)
   · 슬라이드: grid-template-rows 0fr→1fr (부드러운 height 전환)
   · 점진적 향상: JS 없으면 모두 펼친 상태(.is-js 부여 시 접힘 동작)
   · 흰/연노랑/골드. 검정 텍스트는 본문 가독용(아이콘·강조는 골드).
═══════════════════════════════════════ */

.faq {
  background: var(--white);
}
.faq__head {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}
.faq__title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 900;
  color: var(--black);
  word-break: keep-all;
}
.faq__title em {
  font-style: normal;
  color: var(--gold);
}

.faq__list {
  max-width: 820px;
  margin: 0 auto;
}
.faq__item {
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 12px;
  background: var(--white);
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}
.faq__item.is-open {
  border-color: color-mix(in srgb, var(--gold, #f0c000) 45%, #ffffff);
  box-shadow: 0 8px 22px rgba(240, 192, 0, 0.1);
}

/* 질문 — 버튼(전체 클릭, 44px 터치) */
.faq__q-wrap {
  margin: 0;
}
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  min-height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-weight: 700;
  color: var(--black);
  word-break: keep-all;
}
.faq__q-text {
  transition: color 0.2s ease;
}
.faq__q:hover .faq__q-text,
.faq__item.is-open .faq__q-text {
  color: var(--gold-dark, #c9a000);
}
.faq__q:focus-visible {
  outline: 2px solid var(--gold, #f0c000);
  outline-offset: -2px;
  border-radius: 12px;
}

/* 펼침 표시 — 인라인 SVG 화살표(열리면 180° 회전) */
.faq__icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-dark, #c9a000);
  transition: transform 0.3s ease;
}
.faq__icon svg {
  width: 22px;
  height: 22px;
  display: block;
}
.faq__item.is-open .faq__icon {
  transform: rotate(180deg);
}

/* 답 — 슬라이드 다운(grid 0fr→1fr) */
.faq__a {
  display: grid;
  grid-template-rows: 1fr; /* JS 없으면 펼침(접근성/SEO) */
}
.faq.is-js .faq__a {
  grid-template-rows: 0fr; /* JS 동작 시 기본 접힘 */
}
.faq.is-js .faq__item.is-open .faq__a {
  grid-template-rows: 1fr;
}
/* 전환은 첫 페인트 이후에만 켜서 로드 시 접힘 깜빡임 방지 */
.faq.faq--anim .faq__a {
  transition: grid-template-rows 0.35s ease;
}
.faq__a-inner {
  overflow: hidden;
}
.faq__a-inner p {
  margin: 0;
  padding: 2px 24px 22px;
  color: #555;
  line-height: 1.8;
  font-size: 0.95rem;
  word-break: keep-all;
}

/* 모션 줄이기 — 슬라이드/회전 정지(토글은 즉시) */
@media (prefers-reduced-motion: reduce) {
  .faq__a,
  .faq__icon,
  .faq__item {
    transition: none;
  }
}

/* 모바일 */
@media (max-width: 640px) {
  .faq__head {
    margin-bottom: 32px;
  }
  .faq__q {
    padding: 18px 18px;
  }
  .faq__a-inner p {
    padding: 2px 18px 18px;
  }
}
