/* 
   AI知识库页面样式
   Knowledge Page Styles
   基于courses.css结构，使用蓝色配色方案
*/

/* 知识库头部区域 */
.knowledge-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    padding: 40px 0 50px;
    position: relative;
    overflow: hidden;
}

.knowledge-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
}

.knowledge-header-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.knowledge-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.knowledge-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* 页面介绍区域 */
.knowledge-intro-section {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.knowledge-intro-section.section-padding {
    padding: 40px 0 30px;
}

.knowledge-intro-section + .knowledge-list-section.section-padding {
    padding: 40px 0 60px;
}

.intro-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px 45px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.intro-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
}

.intro-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.intro-icon i {
    font-size: 3rem;
    color: #ffffff;
}

.intro-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.intro-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 20px;
    text-align: left;
}

/* 统计数据区域 */
.stats-box {
    margin-top: 28px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 15px;
    border: 2px solid rgba(37, 99, 235, 0.15);
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 0.95rem;
    color: #6b7280;
    margin-top: 5px;
}

/* 列表区域 */
.knowledge-list-section {
    background: #f9fafb;
}

.knowledge-list-section.section-padding {
    padding: 50px 0 80px;
}

/* 侧边栏 */
.knowledge-sidebar {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.sidebar-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 20px 25px;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
}

.sidebar-menu {
    list-style: none;
    padding: 15px 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 25px;
    color: #374151;
    text-decoration: none;
    transition: all 0.25s ease;
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: #f3f4f6;
    color: #2563eb;
}

.sidebar-item.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: #2563eb;
    border-left-color: #2563eb;
    font-weight: 600;
}

.sidebar-item i {
    width: 20px;
    text-align: center;
    color: #6b7280;
}

.sidebar-item.active i {
    color: #2563eb;
}

/* 知识卡片 */
.knowledge-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.knowledge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.15) !important;
    border-color: #93c5fd;
}

.knowledge-image-wrapper {
    overflow: hidden;
}

.knowledge-image-wrapper img {
    transition: transform 0.4s ease;
}

.knowledge-card:hover .knowledge-image-wrapper img {
    transform: scale(1.08);
}

.knowledge-category-badge .badge {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    font-weight: 500;
    padding: 6px 12px;
    font-size: 0.8rem;
}

.knowledge-content {
    background: #ffffff;
}

.knowledge-title {
    font-size: 1.1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.knowledge-title a {
    color: #1f2937;
    transition: color 0.25s ease;
}

.knowledge-title a:hover {
    color: #2563eb;
}

.knowledge-excerpt {
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 详情页头部 */
.knowledge-detail-header {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 20px 0;
    border-bottom: 1px solid #e5e7eb;
}

.knowledge-detail-header .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.knowledge-detail-header .breadcrumb-item a {
    color: #2563eb;
    text-decoration: none;
}

.knowledge-detail-header .breadcrumb-item a:hover {
    text-decoration: underline;
}

.knowledge-detail-header .breadcrumb-item.active {
    color: #6b7280;
}

/* 详情页主体 */
.knowledge-detail-main {
    padding: 50px 0 80px;
    background: #ffffff;
}

.knowledge-detail-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.knowledge-detail-category {
    display: inline-block;
    margin-bottom: 15px;
}

.knowledge-detail-category a {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.knowledge-detail-category a:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
}

.knowledge-detail-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
    margin-bottom: 20px;
}

.knowledge-detail-meta {
    display: flex;
    gap: 20px;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.knowledge-detail-meta i {
    margin-right: 5px;
    color: #2563eb;
}

.knowledge-detail-image img {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
}

.knowledge-detail-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #374151;
}

.knowledge-detail-body h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 35px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.knowledge-detail-body h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 28px;
    margin-bottom: 15px;
}

.knowledge-detail-body p {
    margin-bottom: 18px;
}

.knowledge-detail-body ul,
.knowledge-detail-body ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.knowledge-detail-body li {
    margin-bottom: 10px;
}

.knowledge-detail-body strong {
    color: #1f2937;
}

.knowledge-detail-body a {
    color: #2563eb;
    text-decoration: none;
}

.knowledge-detail-body a:hover {
    text-decoration: underline;
}

/* 标签 */
.knowledge-detail-tags {
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.knowledge-detail-tags strong {
    color: #6b7280;
    margin-right: 10px;
}

.tag-link {
    display: inline-block;
    background: #f3f4f6;
    color: #4b5563;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
}

.tag-link:hover {
    background: #2563eb;
    color: #ffffff;
}

/* 上下篇导航 */
.knowledge-detail-nav {
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.knowledge-nav-link {
    display: block;
    padding: 18px 22px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.knowledge-nav-link:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #93c5fd;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
}

.nav-label {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.nav-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.knowledge-nav-next {
    text-align: right;
}

/* 侧边栏小部件 */
.knowledge-sidebar-widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.knowledge-sidebar-widget .widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    position: relative;
}

.knowledge-sidebar-widget .widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
}

.category-list,
.related-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.related-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.category-list li:last-child,
.related-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.category-list a,
.related-list a {
    color: #4b5563;
    text-decoration: none;
    transition: all 0.25s ease;
    display: block;
    padding: 8px 0;
}

.category-list a:hover,
.related-list a:hover {
    color: #2563eb;
    padding-left: 8px;
}

/* 响应式 */
@media (max-width: 991px) {
    .knowledge-sidebar {
        position: static;
        margin-bottom: 30px;
    }
    
    .knowledge-title {
        font-size: 2rem;
    }
    
    .knowledge-detail-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .knowledge-header {
        padding: 30px 0 40px;
    }
    
    .knowledge-title {
        font-size: 1.8rem;
    }
    
    .knowledge-subtitle {
        font-size: 1rem;
    }
    
    .intro-card {
        padding: 30px 25px;
    }
    
    .intro-title {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .knowledge-detail-content {
        padding: 25px;
    }
    
    .knowledge-detail-title {
        font-size: 1.4rem;
    }
    
    .knowledge-nav-next {
        text-align: left;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .stats-box {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        min-width: auto;
    }
}
