/* ==========================================================================
   慧航AI · 「常见问题与方案说明」手风琴（全站共用）
   无第三方依赖（图标用内联 SVG，不依赖 Font Awesome）
   主题通过 CSS 变量适配：默认 #0052D9（Tailwind primary），
   .hh-faq--jiameng 覆盖为 jiameng 模板的 --blue
   ========================================================================== */

.hh-faq,
.hh-faq__list {
    --hhfaq-accent: #0052D9;
    --hhfaq-accent-soft: rgba(0, 82, 217, .09);
    --hhfaq-line: #e8edf5;
    --hhfaq-title: #0f172a;
    --hhfaq-text: #5a6b85;
    --hhfaq-muted: #93a2b8;
    --hhfaq-radius: 20px;
    --hhfaq-bg: #f7f9fc;
    --hhfaq-shadow: 0 1px 3px rgba(15, 23, 42, .045);
    --hhfaq-shadow-hover: 0 14px 36px rgba(15, 23, 42, .10);
}

.hh-faq {
    background: var(--hhfaq-bg);
    border-top: 1px solid var(--hhfaq-line);
    padding: 96px 0;
}

/* jiameng 独立模板适配（无 Tailwind 依赖，配色走它自己的 --blue） */
.hh-faq--jiameng {
    --hhfaq-accent: #0b63ff;
    --hhfaq-accent-soft: rgba(11, 99, 255, .10);
    --hhfaq-line: rgba(51, 104, 190, .14);
    --hhfaq-text: #667694;
    --hhfaq-radius: 18px;
    --hhfaq-bg: transparent;
}

.hh-faq__inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- 标题区 ---------- */
.hh-faq__head {
    text-align: center;
    margin-bottom: 52px;
}

.hh-faq__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--hhfaq-accent-soft);
    color: var(--hhfaq-accent);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .06em;
    margin-bottom: 20px;
}

.hh-faq__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.hh-faq__title {
    font-size: clamp(23px, 3vw, 33px);
    line-height: 1.4;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--hhfaq-title);
    margin: 0 0 16px;
}

.hh-faq__lead {
    max-width: 720px;
    margin: 0 auto;
    color: var(--hhfaq-text);
    font-size: 16px;
    line-height: 1.95;
}

/* ---------- 手风琴列表 ---------- */
.hh-faq__list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hh-faq__item {
    background: #fff;
    border: 1px solid var(--hhfaq-line);
    border-radius: var(--hhfaq-radius);
    box-shadow: var(--hhfaq-shadow);
    overflow: hidden;
    transition: border-color .3s ease, box-shadow .3s ease;
}

.hh-faq__item:hover,
.hh-faq__item.is-open {
    border-color: var(--hhfaq-accent);
    box-shadow: var(--hhfaq-shadow-hover);
}

.hh-faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
    margin: 0;
    padding: 21px 26px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--hhfaq-title);
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.hh-faq__q:focus-visible {
    outline: 2px solid var(--hhfaq-accent);
    outline-offset: -4px;
    border-radius: var(--hhfaq-radius);
}

.hh-faq__q-text {
    flex: 1 1 auto;
}

/* 折叠箭头（内联 SVG，无需图标字体） */
.hh-faq__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--hhfaq-accent-soft);
    color: var(--hhfaq-accent);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1),
                background-color .3s ease, color .3s ease;
}

.hh-faq__icon svg {
    width: 14px;
    height: 14px;
    display: block;
}

.hh-faq__item.is-open .hh-faq__icon {
    transform: rotate(180deg);
    background: var(--hhfaq-accent);
    color: #fff;
}

/* 高度动画：grid-template-rows 0fr -> 1fr */
.hh-faq__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .38s cubic-bezier(.4, 0, .2, 1);
}

.hh-faq__item.is-open .hh-faq__panel {
    grid-template-rows: 1fr;
}

.hh-faq__panel > div {
    overflow: hidden;
}

.hh-faq__a {
    margin: 0;
    padding: 0 26px 23px;
    color: var(--hhfaq-text);
    font-size: 15px;
    line-height: 1.95;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .3s ease .06s, transform .3s ease .06s;
}

.hh-faq__item.is-open .hh-faq__a {
    opacity: 1;
    transform: none;
}

/* ---------- 相关方案 ---------- */
.hh-faq__rel {
    margin-top: 54px;
    padding-top: 34px;
    border-top: 1px solid var(--hhfaq-line);
}

.hh-faq__rel-title {
    margin: 0 0 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--hhfaq-muted);
}

.hh-faq__rel-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hh-faq__rel-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid var(--hhfaq-line);
    border-radius: 999px;
    background: #fff;
    color: #33415c;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color .3s ease, border-color .3s ease,
                box-shadow .3s ease, transform .3s ease;
}

.hh-faq__rel-link .hh-faq__arrow {
    opacity: 0;
    margin-left: -6px;
    font-size: 11px;
    line-height: 1;
    transition: opacity .3s ease, margin-left .3s ease;
}

.hh-faq__rel-link:hover {
    color: var(--hhfaq-accent);
    border-color: var(--hhfaq-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.hh-faq__rel-link:hover .hh-faq__arrow {
    opacity: 1;
    margin-left: 0;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .hh-faq { padding: 64px 0; }
    .hh-faq__inner { padding: 0 18px; }
    .hh-faq__head { margin-bottom: 34px; }
    .hh-faq__q { gap: 14px; padding: 18px; font-size: 15.5px; }
    .hh-faq__a { padding: 0 18px 19px; font-size: 14.5px; }
    .hh-faq__icon { width: 30px; height: 30px; }
    .hh-faq__rel { margin-top: 38px; padding-top: 26px; }
    .hh-faq__rel-link { padding: 10px 18px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .hh-faq__panel,
    .hh-faq__a,
    .hh-faq__icon,
    .hh-faq__item,
    .hh-faq__rel-link,
    .hh-faq__rel-link .hh-faq__arrow {
        transition: none !important;
    }
}
