/* ===========================================
   FAQ 常见问题样式
   v3.0 - 单页分类+列表
   =========================================== */

.faq-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

/* 页面头部 */
.faq-header {
    text-align: center;
    margin-bottom: 30px;
}

.faq-header h1 {
    font-size: 36px;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.faq-header p {
    font-size: 18px;
    color: #666;
}

/* 搜索区域 */
.faq-search {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.faq-search form {
    display: flex;
    gap: 12px;
    max-width: 700px;
    margin: 0 auto;
}

.faq-search input {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.faq-search input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.faq-search button {
    padding: 16px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.faq-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* 分类区域 */
.faq-categories {
    margin-bottom: 30px;
}

.faq-categories h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid #3b82f6;
}

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

.category-item {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.category-item:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.category-item.active {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.category-item a {
    display: block;
    padding: 16px 24px;
    text-decoration: none;
}

.category-item .category-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.category-item.active .category-name {
    color: #fff;
}

.category-item .faq-count {
    font-size: 13px;
    color: #666;
}

.category-item.active .faq-count {
    color: rgba(255, 255, 255, 0.85);
}

/* 问题列表区域 */
.faq-list-section {
    margin-bottom: 40px;
}

.faq-list-container {
    min-height: 200px;
}

.faq-list-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 问题卡片 */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.faq-question {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    gap: 16px;
}

.faq-q-badge {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-q-text {
    flex: 1;
    font-size: 17px;
    font-weight: 500;
    color: #1a1a1a;
    line-height: 1.5;
}

.faq-q-arrow {
    flex-shrink: 0;
    color: #9ca3af;
    transition: transform 0.3s;
}

.faq-item.active .faq-q-arrow {
    transform: rotate(180deg);
}

/* 答案区域 */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
}

.faq-answer-inner {
    display: flex;
    gap: 16px;
    padding: 0 24px 24px 24px;
}

.faq-a-badge {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-a-text {
    flex: 1;
    font-size: 15px;
    color: #4b5563;
    line-height: 1.8;
    padding-top: 6px;
}

/* 空状态 */
.faq-empty {
    text-align: center;
    padding: 60px 20px;
}

.faq-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.faq-empty-text {
    font-size: 18px;
    color: #6b7280;
    margin-bottom: 8px;
}

.faq-empty-hint {
    font-size: 14px;
    color: #9ca3af;
}

/* 分页 */
.faq-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.faq-pagination .pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-pagination .pagination li {
    display: inline-block;
}

.faq-pagination .pagination li a,
.faq-pagination .pagination li span {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.faq-pagination .pagination li a:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.faq-pagination .pagination li.active span {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.faq-pagination .pagination li.disabled span {
    color: #d1d5db;
    cursor: not-allowed;
}

/* 响应式 */
@media (max-width: 768px) {
    .faq-header h1 {
        font-size: 28px;
    }
    
    .faq-header p {
        font-size: 16px;
    }
    
    .faq-search {
        padding: 20px;
    }
    
    .faq-search form {
        flex-direction: column;
    }
    
    .faq-search button {
        width: 100%;
    }
    
    .category-list {
        flex-direction: column;
    }
    
    .category-item a {
        padding: 12px 16px;
    }
    
    .faq-question {
        padding: 16px;
    }
    
    .faq-q-text {
        font-size: 15px;
    }
    
    .faq-answer-inner {
        padding: 0 16px 20px 16px;
    }
}
