/* ========================================
   FAQ页面增强样式 - 视觉+交互优化
   保护SEO：不使用opacity隐藏FAQ内容
   ======================================== */

/* 滚动进度条 */
.faq-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* 页面Banner增强 */
.page-hero--faq {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.page-hero--faq::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.page-hero--faq::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(180deg); }
}

/* 分类导航吸顶效果 */
.faq-nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.faq-nav-bar.is-scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.faq-nav {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.faq-nav::-webkit-scrollbar {
    display: none;
}

.faq-nav__item {
    flex-shrink: 0;
    padding: 12px 24px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.faq-nav__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.faq-nav__item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.faq-nav__item.active:hover {
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.faq-nav__item i {
    font-size: 16px;
}

/* FAQ统计区增强 */
.faq-stats {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.faq-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.faq-stats__item {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-stats__item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.faq-stats__number {
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

.faq-stats__label {
    font-size: 16px;
    color: #6c757d;
    font-weight: 500;
}

/* FAQ分组标题增强 */
.faq-group {
    margin-bottom: 50px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.faq-group.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.faq-group__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
}

.faq-group__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.faq-group__icon--address {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
}

.faq-group__icon--tax {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.3);
}

.faq-group__icon--license {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.3);
}

.faq-group__icon--other {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 4px 12px rgba(250, 112, 154, 0.3);
}

.faq-group__header h2 {
    flex: 1;
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.faq-group__link {
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.faq-group__link:hover {
    color: #764ba2;
    gap: 10px;
}

/* FAQ项增强 */
.faq-item {
    background: white;
    border-radius: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.faq-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.faq-item--open {
    border-color: #667eea;
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.faq-item__question {
    width: 100%;
    padding: 24px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 17px;
    font-weight: 600;
    color: #212529;
    transition: all 0.3s ease;
    line-height: 1.5;
}

.faq-item__question:hover {
    color: #667eea;
}

.faq-item__question span {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.faq-item__question i {
    font-size: 18px;
    color: #667eea;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.faq-item--open .faq-item__question i {
    transform: rotate(180deg);
}

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    /* SEO保护：不使用opacity:0，内容始终对爬虫可见 */
}

.faq-item__answer-inner {
    padding: 0 24px 28px 24px;
    color: #495057;
    line-height: 1.8;
}

.faq-item__answer p {
    margin: 14px 0;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.faq-item__answer p:first-child {
    margin-top: 0;
}

.faq-item__answer ul {
    margin: 12px 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}

.faq-item__answer li {
    margin: 12px 0 !important;
    padding-left: 40px !important;
    position: relative !important;
    line-height: 1.7 !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.faq-item__answer li i {
    position: absolute !important;
    left: 0 !important;
    top: 3px !important;
    width: 28px !important;
    text-align: center !important;
    color: #667eea !important;
    font-size: 16px !important;
    margin-right: 0 !important;
}

.faq-item__answer a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.faq-item__answer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.faq-item__answer strong {
    color: #212529;
    font-weight: 700;
}

/* 空状态增强 */
.faq-empty {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.faq-empty i {
    font-size: 64px;
    color: #dee2e6;
    margin-bottom: 20px;
}

.faq-empty p {
    font-size: 18px;
    color: #6c757d;
}

/* CTA区增强 */
.faq-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.faq-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 30s ease-in-out infinite;
}

.faq-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.faq-cta__content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.faq-cta__icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    backdrop-filter: blur(10px);
}

.faq-cta__text h2 {
    font-size: 32px;
    font-weight: 800;
    color: white;
    margin: 0 0 8px 0;
}

.faq-cta__text p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.faq-cta__actions {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.faq-cta__btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-cta__btn--primary {
    background: white;
    color: #667eea;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.faq-cta__btn--primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.faq-cta__btn--outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.faq-cta__btn--outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    transform: translateY(-4px);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .faq-nav {
        padding: 12px 0;
    }
    
    .faq-nav__item {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .faq-stats {
        padding: 40px 0;
    }
    
    .faq-stats__number {
        font-size: 36px;
    }
    
    .faq-group__header {
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
    }
    
    .faq-group__icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
    
    .faq-group__header h2 {
        font-size: 19px;
        flex: 1 1 calc(100% - 60px);
        min-width: 0;
    }
    
    .faq-group__link {
        flex: 0 0 100%;
        margin-top: 8px;
        font-size: 13px;
    }
    
    .faq-item__question {
        padding: 18px 16px;
        font-size: 15px;
        gap: 12px;
    }
    
    .faq-item__answer-inner {
        padding: 0 16px 20px 16px;
    }
    
    .faq-item__answer li {
        padding-left: 32px;
        margin: 10px 0;
        font-size: 14px;
    }
    
    .faq-item__answer li i {
        width: 20px;
        font-size: 14px;
    }
    
    .faq-cta__inner {
        flex-direction: column;
        text-align: center;
    }
    
    .faq-cta__content {
        flex-direction: column;
    }
    
    .faq-cta__text h2 {
        font-size: 24px;
    }
    
    .faq-cta__actions {
        flex-direction: column;
        width: 100%;
    }
    
    .faq-cta__btn {
        justify-content: center;
        width: 100%;
    }
}

/* 分类切换淡入淡出 */
.faq-group {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 滚动动画触发 */
.faq-group.is-visible {
    animation: slideInUp 0.6s ease forwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
