/* 知识库头部 */
.knowledge-header {
    background: linear-gradient(to bottom, var(--light-blue) 0%, rgba(255, 255, 255, 0) 100%);
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}

.knowledge-header h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    color: var(--primary);
    font-weight: 700;
}

.knowledge-header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 40px;
    color: var(--gray);
}

/* 内容布局 */
.content-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.articles-container {
    display: flex;
    flex-direction: column;
}

.section-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--secondary);
}

/* 分类筛选 */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 30px;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
}

.category-btn.active, .category-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 文章网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-card {
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.article-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.article-img img {
    width: 100%;
}

.article-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%);
}

.article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-tag {
    background: rgba(193, 157, 46, 0.1);
    color: var(--secondary);
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 15px;
    font-weight: 600;
}

.article-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary);
    transition: var(--transition);
}

.article-content h3:hover {
    color: var(--secondary);
}

.article-content p {
    color: var(--gray);
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.9rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 15px;
}

/* 侧边栏 */
.sidebar {
    background: var(--light-blue);
    border-radius: 10px;
    padding: 30px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary);
}

/* 热门文章 */
.popular-articles {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popular-article {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

.popular-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-img {
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.popular-img img {
    width: 100%;
}

.popular-content h4 {
    font-size: 1rem;
    margin-bottom: 5px;
    transition: var(--transition);
}

.popular-content h4:hover {
    color: var(--secondary);
}

.popular-meta {
    font-size: 0.8rem;
    color: var(--gray);
}

/* 分类列表 */
.categories-list li {
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list a {
    transition: var(--transition);
}

.categories-list a:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.category-count {
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 0.8rem;
}

/* 标签云 */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: var(--light);
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 1px solid #eee;
}

.tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 50px;
    gap: 10px;
}

.page {
    clear: both;
    margin: 10px 0;
    text-align: center;
}

.page a:hover {
    color: #009688;
}

.page-status {
    border-radius: 2px 0 0 2px;
}

.page-last {
    border-radius: 0 2px 2px 0;
}

.page-status, .page-index, .page-pre, .page-num, .page-next, .page-last {
    display: inline-block;
    *display: inline;
    *zoom: 1;
    vertical-align: middle;
    padding: 0 15px;
    height: 28px;
    line-height: 28px;
    margin: 0 -1px 5px 0;
    background-color: #fff;
    color: #333;
    font-size: 12px;
    border: 1px solid #e2e2e2;
}

.page-num-current {
    background-color: #009688;
    height: 30px;
    line-height: 30px;
    border-top: none;
    border-bottom: none;
    color: #fff;
}

a.page-num-current:hover {
    color: #fff;
}

.page-num:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* CTA Section */
.cta {
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    position: relative;
    overflow: hidden;
    color: white;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 20%);
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta p {
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
    font-size: 1.1rem;
}

.cta .btn {
    background: var(--secondary);
    border-color: var(--secondary);
}

.cta .btn:hover {
    background: #b08d28;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .content-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}