/* ==========================================================================
   junj-faq — unified FAQ accordion
   Variants: light (white bg, Q/A markers) | dark (transparent bg, white text)
   Markup: native <details>/<summary> (zero-JS baseline), JS for icon swap +
           single-open mode enforcement.
   ========================================================================== */

.junj-faq {
  --junj-faq-gap: 16px;
  --junj-faq-radius: 10px;
  --junj-faq-divider: rgba(11, 68, 135, 0.12);
  --junj-faq-bg: #fff;
  --junj-faq-fg: #0b4487;
  --junj-faq-answer-fg: #555;
  --junj-faq-marker-size: 28px;
  --junj-faq-q-offset: 60px;
  box-sizing: border-box;
  color: var(--junj-faq-fg);
}

.junj-faq *,
.junj-faq *::before,
.junj-faq *::after {
  box-sizing: inherit;
}

/* 隐藏浏览器默认 disclosure marker，统一用自定义 .junj-faq__icon */
.junj-faq__item>summary {
  list-style: none;
  cursor: pointer;
}

.junj-faq__item>summary::-webkit-details-marker {
  display: none;
}

.junj-faq__item>summary::marker {
  content: "";
}

.junj-faq__item {
  border-radius: var(--junj-faq-radius);
  background: var(--junj-faq-bg);
  overflow: hidden;
  transition: box-shadow 220ms ease, border-color 220ms ease;
}

.junj-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 18px 24px;
  color: inherit;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  transition: color 220ms ease, background-color 220ms ease;
}

.junj-faq__question:focus-visible {
  outline: 2px solid var(--junj-faq-fg);
  outline-offset: -2px;
}

.junj-faq__q-text {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 8px;
  overflow-wrap: anywhere;
  font-size: 22px;
}

.junj-faq__icon {
  display: inline-grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(11, 68, 135, 0.08);
  color: var(--junj-faq-fg);
  font-size: 22px;
  line-height: 1;
  transition: background-color 220ms ease, color 220ms ease,
    transform 220ms ease;
}

.junj-faq__item[open] .junj-faq__icon {
  background: var(--junj-faq-fg);
  color: #fff;
}

.junj-faq__answer {
  padding: 4px 24px 22px;
  color: var(--junj-faq-answer-fg);
  font-size: 16px;
  line-height: 1.7;
}

.junj-faq__answer>*:last-child {
  margin-bottom: 0;
}

.junj-faq__answer p {
  text-align: left;
  margin: 0 0 16px;
}

/* Q/A 装饰字符（仅 light + show-qa 启用，FAQ 归档设计稿：纯文字 Q/A + 左侧展开蓝条） */
.junj-faq__marker {
  flex: 0 0 auto;
  display: block;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--junj-faq-fg);
  font-family: inherit;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.4;
}

.junj-faq--show-qa .junj-faq__question {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  padding: 24px 24px 16px;
  gap: 12px;
}

.junj-faq--show-qa .junj-faq__marker {
  align-self: start;
  margin-top: 0;
}

.junj-faq--show-qa .junj-faq__icon {
  align-self: start;
  margin-top: 2px;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--junj-faq-fg);
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.junj-faq--show-qa .junj-faq__item[open] .junj-faq__icon {
  background: transparent;
  color: var(--junj-faq-fg);
}

/* Q/A 共用同一列宽和间距，避免长文本与响应式断点下错位。 */
.junj-faq--show-qa .junj-faq__answer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  padding: 0 24px 24px;
}

.junj-faq__marker--a {
  background: transparent;
  color: var(--junj-faq-fg);
}

/* FAQ 归档展开态：左侧强调蓝条，无阴影 */
.junj-faq--show-qa.junj-faq--multi .junj-faq__item[open] {
  border-left: 4px solid var(--junj-faq-fg);
  border-color: var(--junj-faq-divider);
  border-left-color: var(--junj-faq-fg);
  box-shadow: none;
}

.junj-faq__a-text {
  min-width: 0;
}

/* ---- 多开模式：每张卡片统一描边，间距统一控制 ---- */
.junj-faq--multi {
  display: flex;
  flex-direction: column;
  gap: var(--junj-faq-gap);
}

.junj-faq--multi .junj-faq__item {
  border: 1px solid var(--junj-faq-divider);
}

.junj-faq--multi .junj-faq__item[open] {
  border-color: var(--junj-faq-fg);
  box-shadow: 0 8px 22px rgba(11, 68, 135, 0.08);
}

/* ---- 单开模式：用分隔线代替卡片 ---- */
.junj-faq--single .junj-faq__item {
  border-radius: 0;
  background: transparent;
  border-top: 1px solid var(--junj-faq-divider);
}

.junj-faq--single .junj-faq__item:last-child {
  border-bottom: 1px solid var(--junj-faq-divider);
}

.junj-faq--single .junj-faq__question {
  min-height: 0;
  padding: 18px 0;
}

.junj-faq--single .junj-faq__answer {
  padding-inline: 0;
  text-align: left;
}

.junj-faq--single .junj-faq__item[open] .junj-faq__question {
  color: var(--junj-faq-fg);
}

/* ==========================================================================
   dark variant — 深色叠加场景（contact-section 底部）
   ========================================================================== */

.junj-faq--dark {
  --junj-faq-divider: rgba(255, 255, 255, 0.28);
  --junj-faq-bg: transparent;
  --junj-faq-fg: #fff;
  --junj-faq-answer-fg: rgba(255, 255, 255, 0.9);
}

.junj-faq--dark .junj-faq__question {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding-block: 20px;
}

.junj-faq--dark .junj-faq__icon {
  flex-basis: 20px;
  width: 20px;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--junj-faq-fg);
  font-size: 22px;
  transition: none;
}

.junj-faq--dark .junj-faq__item[open] .junj-faq__icon {
  background: transparent;
  color: var(--junj-faq-fg);
}

.junj-faq--dark .junj-faq__answer {
  font-size: 13px;
  line-height: 1.7;
  padding-block: 0 18px;
}

.junj-faq--dark .junj-faq--show-qa .junj-faq__marker {
  background: rgba(255, 255, 255, 0.18);
}

.junj-faq--dark.junj-faq--show-qa .junj-faq__marker--a {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
  .junj-faq__question {
    min-height: 56px;
    padding: 16px 20px;
    font-size: 18px;
  }

  .junj-faq__q-text {
    font-size: 18px;
  }

  .junj-faq__answer {
    padding: 4px 20px 20px;
    font-size: 15px;
  }

  .junj-faq--dark .junj-faq__question {
    padding-block: 18px;
    font-size: 14px;
  }
}

@media (max-width: 767.98px) {
  .junj-faq__question {
    min-height: 52px;
    padding: 14px 16px;
    gap: 12px;
    font-size: 15px;
    line-height: 1.5;
  }

  .junj-faq__icon {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    font-size: 18px;
  }

  .junj-faq__answer {
    padding: 4px 16px 18px;
    font-size: 14px;
    line-height: 1.65;
  }

  .junj-faq--show-qa .junj-faq__question {
    padding: 18px 16px 12px;
    gap: 10px;
  }

  .junj-faq--show-qa .junj-faq__marker {
    font-size: 18px;
  }

  .junj-faq--show-qa .junj-faq__icon {
    font-size: 20px;
  }

  .junj-faq--show-qa .junj-faq__answer {
    column-gap: 10px;
    padding: 0 16px 18px;
  }

  .junj-faq--dark .junj-faq__question {
    padding-block: 16px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .junj-faq__item,
  .junj-faq__question,
  .junj-faq__icon {
    transition: none !important;
  }
}
