/* FAQ page — cream / green / gold, matches design/faq-desktop.png */

.page-faq .page-hero-copy h1,
.page-faq .page-hero-subtitle {
  white-space: normal;
}

.page-faq .faq-handwriting {
  right: 4%;
  top: 42%;
  max-width: 11em;
  line-height: 1.5;
  transform: rotate(-8deg);
}

.faq-icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  display: block;
}

.faq-icon-fill {
  stroke: none;
}

/* Category tab bar */
.faq-tabs-wrap {
  position: relative;
  z-index: 5;
  margin-top: -34px;
  margin-bottom: 32px;
}

.faq-tabs {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0;
  padding: 8px 10px;
  background: #fffefb;
  border: 1px solid rgba(108, 74, 35, 0.08);
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(73, 47, 21, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}

.faq-tabs::-webkit-scrollbar {
  display: none;
}

.faq-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: max-content;
  padding: 12px 16px;
  border-radius: 999px;
  color: #4a4036;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.faq-tab .faq-icon {
  color: #b07a32;
  width: 1.2em;
  height: 1.2em;
}

.faq-tab:hover,
.faq-tab:focus-visible {
  color: var(--brand-green);
}

.faq-tab.is-active,
.faq-tab[aria-current="true"] {
  background: var(--brand-green);
  color: #fff;
}

.faq-tab.is-active .faq-icon,
.faq-tab[aria-current="true"] .faq-icon {
  color: #fff;
}

.faq-tab-sep {
  width: 1px;
  align-self: stretch;
  margin: 10px 2px;
  background: rgba(120, 100, 70, 0.18);
  flex: 0 0 auto;
}

.faq-tab.is-active + .faq-tab-sep,
.faq-tab-sep:has(+ .faq-tab.is-active) {
  opacity: 0;
}

/* Board: top 3 groups + sidebar; bottom 动物 | 救助+品牌 */
.faq-main {
  padding-bottom: 56px;
}

.faq-board {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr) 286px;
  gap: 22px 24px;
  align-items: start;
}

.faq-col-primary {
  grid-column: 1 / 3;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

.faq-sidebar {
  grid-column: 3;
  grid-row: 1;
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.faq-col-secondary {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.faq-col-tertiary {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 22px;
  min-width: 0;
}

/* Category group card */
.faq-group {
  padding: 22px 24px 20px;
  background: #f7f1e6;
  border: 1px solid rgba(108, 74, 35, 0.06);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(73, 47, 21, 0.05);
}

.faq-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
  width: 100%;
  margin: 0 0 16px;
}

.faq-group-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.faq-group-paw {
  width: 26px;
  height: 24px;
  object-fit: contain;
  flex: 0 0 auto;
  display: block;
  filter: sepia(0.35) saturate(1.8) hue-rotate(-12deg) brightness(1.05);
}

.faq-group-head h2 {
  margin: 0;
  color: #5c3a22;
  font-family: Times New Roman, "Songti SC", "STSong", serif;
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.faq-group-count {
  justify-self: end;
  align-self: center;
  margin: 0;
  padding: 0;
  color: #9a8f82;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.faq-col-secondary .faq-group-head h2,
.faq-col-tertiary .faq-group-head h2 {
  font-size: 1.28rem;
}

.faq-col-secondary .faq-group-count,
.faq-col-tertiary .faq-group-count {
  font-size: 0.8rem;
}

.faq-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Question bars — soft rounded rect, not pills */
.page-faq .faq-card {
  background: #fffefb;
  border: 1px solid rgba(180, 150, 110, 0.14);
  border-radius: 14px;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(73, 47, 21, 0.03);
}

.page-faq .faq-card[open] {
  border-radius: 14px;
  background: #fffefb;
}

.page-faq .faq-card summary {
  min-height: 50px;
  gap: 14px;
  padding: 12px 0;
}

.page-faq .faq-card summary h3 {
  margin: 0;
  color: #3f342a;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}

.page-faq .faq-card summary > span {
  position: relative;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  color: transparent;
  font-size: 0;
  transform: none !important;
}

.page-faq .faq-card summary > span::before {
  content: "";
  position: absolute;
  inset: 0.2em 0.15em auto;
  width: 0.5em;
  height: 0.5em;
  border-right: 1.6px solid #6b5644;
  border-bottom: 1.6px solid #6b5644;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.page-faq .faq-card[open] summary > span::before {
  inset: auto 0.15em 0.15em;
  transform: rotate(-135deg);
}

.page-faq .faq-answer {
  border-top: 1px solid rgba(180, 150, 110, 0.22);
  padding: 12px 2px 16px;
}

.page-faq .faq-answer p {
  margin: 0;
  color: #6d645a;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.86rem;
  line-height: 1.75;
}

/* Quick help sidebar */
.faq-help-card {
  position: relative;
  padding: 4px 2px 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.faq-help-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}

.faq-help-headset {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 2px;
  color: var(--brand-green);
}

.faq-help-headset .faq-icon {
  width: 1.6em;
  height: 1.6em;
}

.faq-help-head h2 {
  margin: 0 0 6px;
  color: #3f342a;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
}

.faq-help-head p {
  margin: 0;
  color: #7a7268;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.78rem;
  line-height: 1.55;
}

.faq-help-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-help-row {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  background: #fffefb;
  border: 1px solid rgba(180, 150, 110, 0.18);
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(73, 47, 21, 0.04);
  color: inherit;
}

.faq-help-row:hover,
.faq-help-row:focus-visible {
  border-color: rgba(26, 82, 65, 0.35);
}

.faq-help-row.is-static {
  cursor: default;
}

.faq-help-icon {
  color: #b07a32;
}

.faq-help-icon .faq-icon {
  width: 1.15em;
  height: 1.15em;
}

.faq-help-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.faq-help-copy strong {
  color: #3f342a;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.faq-help-copy span {
  color: #8a8176;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 0.74rem;
  line-height: 1.4;
}

.faq-help-chevron {
  color: #b07a32;
  font-size: 1.05rem;
  line-height: 1;
}

.faq-side-media {
  position: relative;
  min-height: 300px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #ebe3d6, #cfc4b4);
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.faq-side-media[data-media-state="ready"] {
  background-image: var(--home-background);
}

.faq-side-media .home-background-note {
  inset: auto 12px 12px;
  width: auto;
  transform: none;
}

.faq-side-media[data-media-state="ready"] .home-background-note {
  display: none;
}

.faq-side-handwriting {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 16px;
  left: 16px;
  margin: 0;
  color: #5c3a22;
  font-family: "Segoe Print", "Bradley Hand", "KaiTi", cursive;
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: right;
  text-shadow: 0 1px 0 rgba(255, 252, 246, 0.65);
}

.faq-side-heart {
  display: inline-block;
  margin-top: 2px;
}

/* Closing */
.faq-closing {
  position: relative;
  overflow: hidden;
  background: #f3e7d4;
  background-image: var(--home-background);
  background-size: cover;
  background-position: center;
}

.faq-closing-inner {
  position: relative;
  min-height: 180px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px 36px;
  padding-block: 36px;
}

.faq-closing[data-media-state="ready"] .faq-closing-inner {
  grid-template-columns: 28% 40% 32%;
  min-height: 240px;
  padding-block: 28px;
}

.faq-closing .home-background-note {
  display: none;
}

.faq-closing-handwriting {
  display: none;
  margin: 0;
  color: #683a25;
  font-family: "Segoe Print", "Bradley Hand", "KaiTi", cursive;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.5;
  transform: rotate(-6deg);
}

.faq-closing[data-media-state="ready"] .faq-closing-handwriting {
  display: block;
  grid-column: 1;
}

.faq-closing-copy {
  grid-column: 1;
  max-width: 460px;
}

.faq-closing[data-media-state="ready"] .faq-closing-copy {
  grid-column: 2;
  max-width: none;
}

.faq-closing-copy h2 {
  margin: 0 0 10px;
  color: #5c3a22;
  font-family: Times New Roman, "Songti SC", "STSong", serif;
  font-size: clamp(1.45rem, 2.1vw, 1.9rem);
  line-height: 1.3;
}

.faq-closing-copy p {
  margin: 0;
  color: #685f56;
  font-size: 0.92rem;
  line-height: 1.7;
}

.faq-closing-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.faq-closing[data-media-state="ready"] .faq-closing-actions {
  grid-column: 3;
}

.faq-closing-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.faq-closing-actions .faq-icon {
  width: 1.15em;
  height: 1.15em;
}

@media (max-width: 1100px) {
  .faq-board {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 260px;
    gap: 18px 20px;
  }

  .faq-tab {
    padding: 11px 12px;
    font-size: 0.84rem;
  }

  .faq-group-head h2 {
    font-size: 1.28rem;
  }
}

@media (max-width: 960px) {
  .page-faq .faq-handwriting {
    position: static;
    display: block;
    margin: 18px 0 0;
    transform: none;
    max-width: none;
  }

  .faq-tabs-wrap {
    margin-top: 12px;
  }

  .faq-tabs {
    justify-content: flex-start;
    border-radius: 22px;
    padding: 8px;
  }

  .faq-tab {
    flex: 0 0 auto;
  }

  .faq-tab-sep {
    margin: 8px 0;
  }

  .faq-board {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .faq-col-primary,
  .faq-sidebar,
  .faq-col-secondary,
  .faq-col-tertiary {
    grid-column: 1;
    grid-row: auto;
  }

  .faq-sidebar {
    position: static;
    order: -1;
  }

  .faq-side-media {
    max-width: 320px;
  }

  .faq-group {
    padding: 18px 16px 16px;
  }

  .faq-group-head {
    column-gap: 10px;
  }

  .faq-group-head h2 {
    font-size: 1.2rem;
  }

  .faq-group-count {
    font-size: 0.76rem;
  }

  .page-faq .faq-card,
  .page-faq .faq-card[open] {
    border-radius: 12px;
    padding: 0 14px;
  }

  .faq-main {
    padding-bottom: 40px;
  }

  .faq-closing-inner,
  .faq-closing[data-media-state="ready"] .faq-closing-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-block: 32px;
  }

  .faq-closing-handwriting,
  .faq-closing[data-media-state="ready"] .faq-closing-handwriting,
  .faq-closing-copy,
  .faq-closing[data-media-state="ready"] .faq-closing-copy,
  .faq-closing-actions,
  .faq-closing[data-media-state="ready"] .faq-closing-actions {
    grid-column: 1;
  }

  .faq-closing-handwriting,
  .faq-closing[data-media-state="ready"] .faq-closing-handwriting {
    display: block;
    transform: none;
  }

  .faq-closing-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .faq-help-row {
    grid-template-columns: 24px 1fr auto;
    padding: 11px 12px;
    border-radius: 10px;
  }

  .faq-closing-actions .button {
    width: 100%;
    justify-content: center;
  }
}
