/* ========================================
   QA Page – 迋斯生技 Figma OEM/ODM 常見問題
   ======================================== */

#qa-main.qa-main {
  margin-top: var(--header-height);
  background: var(--color-wants-dark);
}

.qa-container {
  position: relative;
  z-index: 2;
  max-width: 1002px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Hero ---------- */
.qa-hero {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
}

.qa-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qa-hero picture {
  display: block;
  width: 100%;
  height: 100%;
}

.qa-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(630px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 0;
  text-align: center;
}

.qa-hero__text {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.qa-hero__title {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 26px;
  font-weight: 400;
  line-height: normal;
  color: #fff;
  margin: 0;
}

.qa-hero__subtitle {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  color: #fff;
  margin: 0;
}

.qa-search {
  display: flex;
  height: 45px;
  padding: 14px 30px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-radius: 30px;
  border: 1px solid #d7ccc8;
  background: #fff;
  box-sizing: border-box;
}

.qa-search__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  color: var(--color-wants-dark);
  outline: none;
}

.qa-search__input::placeholder {
  color: #888;
}

.qa-search:focus-within {
  border-color: var(--color-brand-orange);
  box-shadow: 0 0 0 2px rgba(135, 124, 85, 0.2);
}

/* ---------- Body / Background ---------- */
.qa-body {
  position: relative;
  overflow: hidden;
  padding: 24px 0 80px;
  background-color: #444746;
}

.qa-body__decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.qa-body__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ---------- Categories ---------- */
.qa-categories {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.qa-cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  height: 40px;
  padding: 10px 24px;
  border: 1px solid #fff;
  border-radius: 20px;
  background: transparent;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.qa-cat-btn:hover,
.qa-cat-btn:focus-visible {
  opacity: 0.9;
  outline: none;
}

.qa-cat-btn.is-active {
  background: var(--color-brand-orange);
  border-color: var(--color-brand-orange);
  color: #fff;
}

/* ---------- Accordion ---------- */
.qa-accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.qa-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 5px;
  overflow: hidden;
}

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

.qa-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  cursor: pointer;
  list-style: none;
}

.qa-question::-webkit-details-marker {
  display: none;
}

.qa-question__text {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 16px;
  font-weight: 700;
  line-height: normal;
  color: var(--color-wants-dark);
  text-align: left;
}

.qa-item.is-open .qa-question__text,
.qa-item[open] .qa-question__text {
  color: var(--color-brand-orange);
}

.qa-icon {
  flex-shrink: 0;
  width: 20px;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  color: #888;
  text-align: center;
}

.qa-icon::before,
.qa-icon::after {
  content: none;
  position: static;
  display: inline;
  width: auto;
  height: auto;
  background: none;
  transform: none;
  opacity: 1;
  transition: none;
}

.qa-item.is-open .qa-icon,
.qa-item[open] .qa-icon {
  color: var(--color-brand-orange);
}

.qa-item .qa-icon::before {
  content: '+';
}

.qa-item.is-open .qa-icon::before,
.qa-item[open] .qa-icon::before {
  content: '−';
}

.qa-item.is-open .qa-icon::after,
.qa-item[open] .qa-icon::after {
  content: none;
  display: none;
}

.qa-answer {
  padding: 0 24px 20px;
  border-top: 1px solid #eee;
}

.qa-answer p {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 12px;
  font-weight: 400;
  line-height: normal;
  color: #000;
  margin: 0 0 8px;
}

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

/* ---------- Contact Banner ---------- */
.qa-contact {
  margin-top: 8px;
}

.qa-contact__banner {
  position: relative;
  min-height: 151px;
  border: 1px solid #fff;
  border-radius: 15px;
  overflow: hidden;
  box-sizing: border-box;
}

.qa-contact__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qa-contact__banner picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.qa-contact__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 151px;
  padding: 24px 20px;
  text-align: center;
}

.qa-contact__text {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  max-width: 168px;
}

.qa-contact__title {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 20px;
  font-weight: 700;
  line-height: normal;
  color: #fff;
  margin: 0;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.qa-contact__subtitle {
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 14px;
  font-weight: 400;
  line-height: normal;
  color: #fff;
  margin: 0;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.qa-contact__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  max-width: 300px;
}

.qa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 35px;
  padding: 10px 44px;
  border-radius: 60px;
  font-family: 'Georgia', 'Noto Sans TC', serif;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  text-align: center;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.qa-btn:hover {
  opacity: 0.85;
}

.qa-btn--primary {
  background: var(--color-brand-orange);
  color: #fff;
}

.qa-btn--outline {
  border: 1px solid #fff;
  color: var(--color-wants-cream);
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .qa-hero {
    height: clamp(178px, 37.1vw, 230px);
  }

  .qa-hero__content {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: clamp(34px, 7.4vw, 46px) 0 0;
    gap: clamp(14px, 3.1vw, 19px);
    box-sizing: border-box;
  }

  .qa-hero__text {
    gap: clamp(7px, 1.8vw, 11px);
  }

  .qa-hero__title {
    font-family: 'Noto Serif TC', 'Georgia', serif;
    font-size: clamp(22px, 5.2vw, 32px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }

  .qa-hero__subtitle {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: clamp(15px, 3.4vw, 21px);
    line-height: 1.35;
    white-space: nowrap;
  }

  .qa-search {
    width: clamp(260px, 61.3vw, 380px);
    height: clamp(45px, 8.7vw, 54px);
    align-self: center;
    padding: 0 clamp(28px, 6.4vw, 40px);
    border-radius: 999px;
    border-color: #d7ccc8;
  }

  .qa-search__input {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: clamp(14px, 3.2vw, 20px);
    line-height: 1.2;
  }

  .qa-question {
    padding: 14px 16px;
  }

  .qa-question__text {
    font-size: 15px;
  }

  .qa-answer {
    padding: 0 16px 16px;
  }

  .qa-contact {
    width: clamp(280px, 80.3vw, 498px);
    margin: clamp(8px, 2.1vw, 13px) auto 0;
  }

  .qa-contact__banner {
    width: 100%;
    min-height: 0;
    aspect-ratio: 2 / 1;
    border-radius: 5px;
  }

  .qa-contact__content {
    position: absolute;
    inset: 0;
    min-height: 0;
    gap: clamp(8px, 4.2vw, 26px);
    padding: clamp(10px, 3.5vw, 22px) clamp(20px, 5.2vw, 32px);
    box-sizing: border-box;
  }

  .qa-contact__text {
    gap: clamp(5px, 1.6vw, 10px);
    max-width: none;
  }

  .qa-contact__title {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: clamp(14px, 3.5vw, 22px);
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
  }

  .qa-contact__subtitle {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: clamp(12px, 2.9vw, 18px);
    line-height: 1.35;
    white-space: nowrap;
  }

  .qa-contact__actions {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: clamp(10px, 2.5vw, 15px);
    max-width: none;
  }

  .qa-btn {
    width: clamp(170px, 37.4vw, 232px);
    height: clamp(28px, 6.5vw, 40px);
    padding: 0 24px;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: clamp(14px, 3.5vw, 22px);
    font-weight: 700;
    border-radius: 999px;
  }
}

@media (max-width: 480px) {
  .qa-body {
    padding: 21px 0 60px;
  }

  .qa-container {
    max-width: none;
    padding: 0;
  }

  .qa-categories {
    flex-wrap: nowrap;
    gap: 15px;
    width: 281px;
    margin: 0 auto 28px;
    padding: 0;
  }

  .qa-cat-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 30px;
    padding: 0 8px;
    border-radius: 0;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 13px;
    line-height: 1;
  }

  .qa-accordion {
    width: calc(100% - 68px);
    max-width: 311px;
    gap: 20px;
    margin: 0 auto 40px;
  }

  .qa-item {
    border-radius: 3px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
  }

  .qa-item[open],
  .qa-item.is-open {
    margin-bottom: 14px;
  }

  .qa-question {
    min-height: 51px;
    padding: 14px 24px;
    gap: 12px;
  }

  .qa-item[open] .qa-question,
  .qa-item.is-open .qa-question {
    min-height: 58px;
  }

  .qa-question__text {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 13px;
    line-height: 20px;
  }

  .qa-icon {
    width: 14px;
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 17px;
  }

  .qa-answer {
    padding: 14px 24px 14px;
  }

  .qa-answer p {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 12px;
    line-height: 17px;
    margin-bottom: 12px;
  }

  .qa-contact__actions {
    flex-direction: column;
    gap: 12px;
  }
}
