/* 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;
}

/* ==================== 英雄区域统计数据 ==================== */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 30px;
    margin-top: 50px;
    padding: 40px 0;
}

.hero-stats .stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px 20px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.hero-stats .stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.hero-stats .stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-stats .stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
    color: white;
    font-weight: 500;
}

/* 统计数据兼容样式 */
.stats-row {
    display: flex;
    gap: 40px;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

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

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

section {
    padding: 60px 0;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
    position: relative;
}

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

.section-subtitle {
    font-size: 1.125rem;
    color: #718096;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* ==================== 分类区域 ==================== */
.categories-section {
    background: white;
    padding: 80px 0;
}

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

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

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

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

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

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    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.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 12px;
}

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

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

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

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

.card-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    text-decoration: none;
    color: inherit;
    z-index: 2;
}

.card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* ==================== 推荐文章区域 ==================== */
.featured-section {
    background: #f8fafc;
    padding: 80px 0;
}

.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.4s ease;
    border: 1px solid #f7fafc;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

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

.card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

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

.date-tag {
    color: #718096;
    font-size: 0.875rem;
}

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

.featured-card .card-title a {
    color: #2d3748;
    text-decoration: none;
    font-weight: 600;
}

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

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

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

.author-name {
    color: #2d3748;
    font-weight: 500;
    font-size: 0.875rem;
}

.card-stats .stat-item {
    font-size: 0.75rem;
}

/* ==================== 最新文章区域 ==================== */
.latest-section {
    background: white;
    padding: 80px 0;
}

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

.latest-card {
    background: white;
    border: 1px solid #f7fafc;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
}

.latest-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.latest-card .card-content {
    padding: 0;
}

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

.latest-card .card-title {
    font-size: 1rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

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

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

/* ==================== CTA区域 ==================== */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 80px 0;
}

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

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

.cta-subtitle {
    font-size: 1.125rem;
    margin-bottom: 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: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: transparent;
    color: white;
    border-color: white;
    transform: translateY(-2px);
}

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

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

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .hero-text {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
    }
    
    .horizontal-menu-section {
        padding: 8px 0;
        position: relative;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-tab {
        padding: 8px 16px;
    }
    
    .tab-text {
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 40px 0;
    }
    
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-content {
        gap: 20px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 30px;
        padding: 30px 0;
    }
    
    .hero-stats .stat-item {
        padding: 20px 15px;
    }
    
    .hero-stats .stat-number {
        font-size: 2.2rem;
    }
    
    .hero-stats .stat-label {
        font-size: 0.85rem;
    }
    
    .horizontal-menu-section {
        padding: 8px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .categories-grid,
    .featured-grid,
    .latest-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .view-all-btn {
        font-size: 0.875rem;
        padding: 10px 20px;
    }
    
    .horizontal-menu-section {
        position: relative;
    }
    
    .menu-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0 10px;
    }
    
    .menu-tab {
        flex: 0 0 auto;
        padding: 8px 12px;
        font-size: 0.8rem;
        border-right: 1px solid #dee2e6;
    }
    
    .tab-text {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-content {
        padding: 0 10px;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-top: 20px;
        padding: 20px 0;
    }
    
    .hero-stats .stat-item {
        padding: 15px 10px;
    }
    
    .hero-stats .stat-number {
        font-size: 1.8rem;
    }
    
    .hero-stats .stat-label {
        font-size: 0.8rem;
    }
    
    .horizontal-menu-section {
        padding: 6px 0;
    }
    
    .search-input-wrapper {
        border-radius: 25px;
    }
    
    .category-card,
    .featured-card {
        margin: 0 10px;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
    
    .horizontal-menu-section {
        position: relative;
    }
    
    .menu-tabs {
        padding: 0 5px;
    }
    
    .menu-tab {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .tab-text {
        font-size: 0.75rem;
    }
    
    .menu-tab.active::after {
        bottom: -6px;
        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 forwards;
}

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

html {
    scroll-behavior: smooth;
} 