/* AI知识库主页样式 - 参考简道云设计 */

.ai-knowledge-main {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.ai-knowledge-container {
    min-height: 100vh;
    background: #f8fafc;
}

/* ==================== 头部横幅区域 ==================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-rows: auto auto;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-text {
    text-align: left;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 20px;
    background: linear-gradient(45deg, #fff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 400;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
}

/* ==================== 水平菜单栏（在hero-section底边） ==================== */
.horizontal-menu-section {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 0;
    transition: all 0.3s ease;
}

.menu-tabs {
    display: flex;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

.menu-tab {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-right: 1px solid #dee2e6;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    min-height: 44px;
}

.menu-tab:last-child {
    border-right: none;
}

.menu-tab:hover {
    background: #e9ecef;
    color: #212529;
}

.menu-tab.active {
    background: #ffffff;
    color: #007bff;
    font-weight: 600;
    box-shadow: 0 -2px 0 0 #007bff inset;
}

.menu-tab.active:hover {
    background: #ffffff;
    color: #0056b3;
}

.tab-text {
    position: relative;
    z-index: 2;
    font-weight: inherit;
}

/* 搜索框 */
.search-container {
    margin-bottom: 3rem;
}

.search-form {
    max-width: 500px;
}

.search-input-wrapper {
    display: flex;
    background: white;
    border-radius: 50px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: #333;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 18px 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.search-btn:hover {
    background: #ff5252;
}

/* 统计数据（已移除，保留样式以防需要） */
.stats-row {
    display: flex;
    gap: 40px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 500;
}

/* ==================== 通用区域样式 ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #1a202c;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #718096;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.view-all-btn {
    position: absolute;
    top: 0;
    right: 0;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border: 2px solid #667eea;
    border-radius: 25px;
    transition: all 0.3s;
}

.view-all-btn:hover {
    background: #667eea;
    color: white;
}

/* ==================== 知识分类区域 ==================== */
.categories-section {
    padding: 100px 0;
    background: #f7fafc;
}

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

.category-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 16px;
    color: #1a202c;
}

.card-description {
    color: #718096;
    margin: 0 0 24px;
    line-height: 1.6;
}

.card-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #a0aec0;
    font-size: 0.9rem;
}

.stat-item i {
    color: #667eea;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.card-link:hover {
    color: #5a67d8;
    gap: 12px;
}

/* ==================== 推荐内容区域 ==================== */
.featured-section {
    padding: 100px 0;
    background: white;
}

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

.featured-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.featured-card .card-content {
    padding: 30px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.category-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.date-tag {
    color: #a0aec0;
    font-size: 0.9rem;
}

.featured-card .card-title {
    margin: 0 0 16px;
}

.featured-card .card-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-card .card-title a:hover {
    color: #667eea;
}

.card-excerpt {
    color: #718096;
    margin: 0 0 20px;
    line-height: 1.6;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.author-name {
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 500;
}

.card-stats .stat-item {
    color: #a0aec0;
    font-size: 0.9rem;
}

/* ==================== 最新内容区域 ==================== */
.latest-section {
    padding: 100px 0;
    background: #f7fafc;
}

.latest-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.latest-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.latest-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.latest-card .card-content {
    padding: 24px;
}

.latest-card .card-meta {
    margin-bottom: 12px;
}

.latest-card .card-title {
    font-size: 1.1rem;
    margin: 0 0 16px;
}

.latest-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: none;
    padding-top: 0;
}

.view-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #a0aec0;
    font-size: 0.85rem;
}

/* ==================== CTA区域 ==================== */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 20px;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin: 0 0 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.btn-primary:hover {
    background: #5a67d8;
    border-color: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #1a202c;
    transform: translateY(-2px);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        gap: 40px;
        text-align: center;
    }
    
    .hero-text {
        grid-column: 1;
        grid-row: 1;
    }
    
    .hero-visual {
        grid-column: 1;
        grid-row: 2;
    }
    
    .horizontal-menu-section {
        grid-column: 1;
        grid-row: 3;
        margin-top: 20px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    /* 水平菜单平板适配 */
    .menu-tab {
        padding: 18px 24px;
    }
    
    .tab-text {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }
    
    .hero-section {
        padding: 60px 0 0;
    }
    
    .hero-content {
        gap: 30px;
    }
    
    .horizontal-menu-section {
        padding: 12px 0;
        top: 70px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories-grid,
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .latest-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .view-all-btn {
        position: static;
        margin-top: 20px;
    }
    
    /* 水平菜单移动端适配（在hero-content内部） */
    .horizontal-menu-section {
        background: rgba(255, 255, 255, 0.9);
    }
    
    .menu-tabs {
        justify-content: flex-start;
        padding: 0 20px;
        gap: 6px;
    }
    
    .menu-tab {
        padding: 8px 14px;
        min-width: auto;
        flex-shrink: 0;
        font-size: 0.85rem;
    }
    
    .tab-text {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-content {
        gap: 20px;
    }
    
    .horizontal-menu-section {
        margin-top: 10px;
        border-radius: 6px 6px 0 0;
        padding: 10px 0;
    }
    
    .search-input-wrapper {
        border-radius: 25px;
    }
    
    .category-card,
    .featured-card {
        padding: 25px 15px;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    /* 水平菜单小屏幕适配（在hero-content内部） */
    .horizontal-menu-section {
        background: rgba(255, 255, 255, 0.95);
    }
    
    .menu-tabs {
        padding: 0 15px;
        gap: 4px;
    }
    
    .menu-tab {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .tab-text {
        font-size: 0.8rem;
    }
    
    .menu-tab.active::after {
        height: 2px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card,
.featured-card,
.latest-card {
    animation: fadeInUp 0.6s ease-out;
}

/* 加载状态 */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
} 