/* ============================================================
   FAQ Shortcode — 前端样式
   设计规范：B2B 企业官网 FAQ
   ============================================================ */

/* ---------- 外层容器 ---------- */
.faq-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* ---------- 单个 FAQ Card ---------- */
.faq-item {
    background: #ffffff;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
    overflow: hidden;
    transition: box-shadow .3s ease;
    border: none;
    outline: none;
}

/* 激活时顶部红线 */
.faq-item.active {
    border-top: 2px solid #ff2a2a;
}

/* ---------- Hover ---------- */
.faq-item:hover {
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.faq-item:hover .faq-title {
    color: #333;
}

/* ---------- Header（可点击区域）---------- */
.faq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    min-height: 72px;
    box-sizing: border-box;
}

/* ---------- 标题区域 ---------- */
.faq-title {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: Roboto, Arial, "Helvetica Neue", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #555;
    line-height: 1.4;
    flex: 1;
    transition: color .3s ease;
}

/* ---------- Q / A 图标 ---------- */
.faq-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.faq-icon-q svg {
    width: 20px;
    height: 20px;
    display: block;
}

.faq-icon-a {
    margin-top: 1px; /* 微调与文字对齐 */
}

.faq-icon-a svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* ---------- 右侧 +/- 按钮 ---------- */
.faq-toggle {
    flex-shrink: 0;
    margin-left: 20px;
    font-size: 15px;
    font-weight: 400;
    color: #666;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s ease;
}

.faq-item.active .faq-toggle {
    content: "−"; /* JS 控制文本切换，此处定义过渡 */
    transform: rotate(45deg); /* + 旋转 45° 视觉上接近 ×，保留简洁感；JS 会替换文字为 − */
}

/* ---------- Body / Answer 区域 ---------- */
.faq-body {
    overflow: hidden;
}

.faq-content {
    padding: 4px 24px 22px 30px;  /* 30px 左侧定位：使 A 正文与 Q 标题文字左对齐 (24+20+16 ≈ 30+18+12) */
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #777;
    font-family: Roboto, Arial, "Helvetica Neue", sans-serif;
    font-size: 13px;
    line-height: 22px;
}

/* A 正文区域 */
.faq-answer-text {
    flex: 1;
    min-width: 0;
}

.faq-answer-text p {
    margin: 0 0 8px;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .faq-header {
        padding: 18px 16px;
    }

    .faq-title {
        font-size: 14px;
        gap: 12px;
    }

    .faq-icon-q svg {
        width: 18px;
        height: 18px;
    }

    .faq-content {
        padding: 4px 16px 18px 26px;
    }
}

@media (max-width: 480px) {
    .faq-header {
        padding: 16px 12px;
    }

    .faq-title {
        font-size: 13px;
        gap: 10px;
    }

    .faq-icon-q svg {
        width: 16px;
        height: 16px;
    }

    .faq-toggle {
        margin-left: 12px;
    }

    .faq-content {
        padding: 4px 12px 16px 22px;
        font-size: 12px;
        line-height: 20px;
    }
}
