/* FAQ 页面专用样式 */

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s ease 0.3s forwards;
    opacity: 0;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

/* 搜索框样式 */
#faq-search:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 搜索建议样式 */
#search-suggestions {
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.search-suggestion-item {
    transition: all 0.2s ease;
}

.search-suggestion-item:hover {
    transform: translateY(-1px);
}

/* FAQ 标签样式 */
.faq-tab {
    transition: all 0.3s ease;
    font-weight: 500;
}

.faq-tab.active {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.faq-tab:not(.active):hover {
    transform: translateY(-1px);
}

/* FAQ 问题样式 */
.faq-question {
    position: relative;
    z-index: 10;
    font-size: 1.1rem;
    font-weight: 500;
}

.faq-question::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 6px;
    right: 6px;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.05);
    z-index: -1;
}

.faq-answer {
    transition: all 0.3s ease;
    border-top: 0 !important;
}

.faq-icon {
    transition: transform 0.3s ease;
}

/* FAQ 项目悬停效果 */
.bg-white.rounded-xl.shadow-sm.overflow-hidden {
    transition: all 0.3s ease;
}

.bg-white.rounded-xl.shadow-sm.overflow-hidden:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 热门问题样式 */
.popular-question-card {
    transition: all 0.3s ease;
}

.popular-question-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 联系我们按钮样式 */
.bg-secondary:hover,
.bg-white.border.hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 分类标题样式 */
.faq-category h2 {
    position: relative;
    margin-bottom: 2rem;
}

.faq-category h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 3rem;
    height: 0.25rem;
    background-color: var(--primary-color, #3b82f6);
    border-radius: 9999px;
}

/* 辅助功能样式 */
.faq-question:focus {
    outline: 2px solid rgba(59, 130, 246, 0.5);
    outline-offset: -2px;
}

/* 加载更多按钮 */
.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.5rem;
    background-color: transparent;
    color: var(--primary-color, #3b82f6);
    border: 1px solid var(--primary-color, #3b82f6);
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background-color: var(--primary-color, #3b82f6);
    color: white;
    transform: translateY(-1px);
}

/* 无搜索结果样式 */
#no-search-results {
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 滚动到顶部按钮 */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color, #3b82f6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 50;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    background-color: var(--secondary-color, #2563eb);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .faq-question {
        font-size: 1rem;
        padding: 1.25rem;
    }
    
    .faq-answer {
        padding: 0 1.25rem 1.25rem;
    }
    
    .faq-category {
        margin-bottom: 3rem !important;
    }
    
    .faq-tab {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    #search-suggestions {
        left: 0;
        transform: none;
        width: calc(100% - 2rem);
        margin: 0 1rem;
    }
}

@media (max-width: 480px) {
    .faq-question {
        font-size: 0.9375rem;
    }
    
    .grid-cols-1.md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .flex.flex-col.sm\:flex-row {
        flex-direction: column !important;
    }
    
    .flex.flex-col.sm\:flex-row > a {
        width: 100%;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .bg-white {
        background-color: #1e293b;
        color: #f8fafc;
    }
    
    .bg-gray-50 {
        background-color: #0f172a;
    }
    
    .text-gray-600 {
        color: #cbd5e1;
    }
    
    .text-gray-700 {
        color: #e2e8f0;
    }
    
    .text-gray-800 {
        color: #f8fafc;
    }
    
    .border-gray-100 {
        border-color: #334155;
    }
    
    .bg-gray-100 {
        background-color: #334155;
    }
    
    .hover\:bg-gray-50:hover {
        background-color: #334155;
    }
    
    .bg-primary\/5 {
        background-color: rgba(59, 130, 246, 0.1);
    }
    
    .search-suggestion-item {
        background-color: #334155;
        color: #f8fafc;
    }
    
    .search-suggestion-item:hover {
        background-color: var(--primary-color, #3b82f6);
    }
    
    #faq-search {
        background-color: #334155;
        color: #f8fafc;
        border-color: #475569;
    }
    
    #faq-search::placeholder {
        color: #94a3b8;
    }
    
    .shadow-sm {
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    }
}