/* ============================================================
   知识库样式  knowledge.css
   桌面端宽度 1200px 居中，不做移动端响应式
   ============================================================ */

/* 容器 */
.knowledge-container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ---- 面包屑 ---- */
.knowledge-breadcrumb {
    padding: 18px 0 14px;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}
.knowledge-breadcrumb a {
    color: #666;
    text-decoration: none;
}
.knowledge-breadcrumb a:hover {
    color: #3270FF;
    text-decoration: underline;
}
.knowledge-breadcrumb span {
    color: #333;
}
.knowledge-breadcrumb-sep {
    margin: 0 6px;
    color: #ccc;
}

/* ---- 类型导航标签（顶部水平） ---- */
.knowledge-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e5e5;
}
.knowledge-type-tab {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.2s, border-color 0.2s;
}
.knowledge-type-tab:hover {
    color: #3270FF;
    text-decoration: none;
}
.knowledge-type-tab-active {
    color: #3270FF;
    border-bottom-color: #3270FF;
    font-weight: 600;
}

/* ---- 主布局：左侧主内容 + 右侧边栏 ---- */
.knowledge-layout {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}
.knowledge-main {
    width: 780px;
    min-width: 0;
}
.knowledge-side {
    width: 380px;
    min-width: 0;
}

/* ---- 页面标题 ---- */
.knowledge-page-title {
    font-size: 26px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #3270FF;
}
.knowledge-type-desc {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px;
    line-height: 1.7;
}

/* ---- 文章列表（水平标题+日期） ---- */
.knowledge-list {
    border-top: 1px solid #e5e5e5;
}
.knowledge-list-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: #999;
    border-bottom: 2px solid #e5e5e5;
}
.knowledge-list-header-type {
    flex: 0 0 auto;
    min-width: 70px;
}
.knowledge-list-header-title {
    flex: 1;
    min-width: 0;
}
.knowledge-list-header-date {
    flex: 0 0 auto;
    width: 100px;
    text-align: right;
}
.knowledge-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid #e5e5e5;
}
.knowledge-list-item:last-child {
    border-bottom: none;
}
.knowledge-list-title {
    font-size: 15px;
    color: #333;
    text-decoration: none;
    line-height: 1.5;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.knowledge-list-title:hover {
    color: #3270FF;
    text-decoration: underline;
}
.knowledge-list-type {
    display: inline-block;
    padding: 2px 10px;
    font-size: 12px;
    color: #3270FF;
    background: #eef3ff;
    border-radius: 3px;
    white-space: nowrap;
    flex: 0 0 auto;
    min-width: 70px;
    text-align: center;
    box-sizing: border-box;
}
.knowledge-list-date {
    font-size: 14px;
    color: #999;
    flex: 0 0 auto;
    width: 100px;
    text-align: right;
}

/* ---- 类型标签 ---- */
.knowledge-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    color: #3270FF;
    background: #eef3ff;
    border-radius: 3px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.knowledge-tag:hover {
    background: #d8e4ff;
    text-decoration: none;
}

/* ---- Tab 面板 ---- */
.knowledge-tab-panels {
    margin-top: 0;
}
.knowledge-tab-panel {
    display: block;
}

/* ---- 空状态 ---- */
.knowledge-empty {
    padding: 60px 0;
    text-align: center;
    font-size: 15px;
    color: #999;
}

/* ---- 分页 ---- */
.knowledge-pagination-wrap {
    margin-top: 30px;
    text-align: center;
}
.knowledge-pagination {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}
.knowledge-pagination a,
.knowledge-pagination span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
    color: #333;
    text-decoration: none;
    line-height: 1.4;
}
.knowledge-pagination a:hover {
    border-color: #3270FF;
    color: #3270FF;
}
.knowledge-pagination span.current {
    background: #3270FF;
    border-color: #3270FF;
    color: #fff;
    font-weight: 600;
}

/* ---- 侧边栏块 ---- */
.knowledge-side-block {
    margin-bottom: 30px;
}
.knowledge-side-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3270FF;
}
.knowledge-side-types {
    list-style: none;
    margin: 0;
    padding: 0;
}
.knowledge-side-types li {
    padding: 6px 0;
    font-size: 14px;
}
.knowledge-side-types li a {
    color: #333;
    text-decoration: none;
}
.knowledge-side-types li a:hover {
    color: #3270FF;
    text-decoration: underline;
}
.knowledge-side-type-active {
    color: #3270FF;
    font-weight: 600;
}
.knowledge-side-latest {
    list-style: none;
    margin: 0;
    padding: 0;
}
.knowledge-side-latest li {
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px dashed #eee;
}
.knowledge-side-latest li:last-child {
    border-bottom: none;
}
.knowledge-side-latest li a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.knowledge-side-latest li a:hover {
    color: #3270FF;
    text-decoration: underline;
}

/* ============================================================
   详情页
   ============================================================ */
.knowledge-article {
    max-width: 780px;
    margin-bottom: 40px;
}
.knowledge-article-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    margin: 0 0 16px;
}

/* ---- 元信息行 ---- */
.knowledge-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #999;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
}
.knowledge-meta a {
    color: #3270FF;
    text-decoration: none;
}
.knowledge-meta a:hover {
    text-decoration: underline;
}

/* ---- 摘要（引用样式） ---- */
.knowledge-summary {
    background: #f7f8fa;
    border-left: 4px solid #3270FF;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #555;
    line-height: 1.75;
    border-radius: 0 4px 4px 0;
}

/* ---- 正文 ---- */
.knowledge-content {
    font-size: 16px;
    line-height: 1.75;
    color: #333;
    word-wrap: break-word;
}
.knowledge-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 32px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}
.knowledge-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 26px 0 12px;
}
.knowledge-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 22px 0 10px;
}
.knowledge-content p {
    margin: 0 0 16px;
}
.knowledge-content a {
    color: #3270FF;
    text-decoration: underline;
}
.knowledge-content a:hover {
    color: #1a5ad4;
}
.knowledge-content strong {
    font-weight: 700;
    color: #222;
}
.knowledge-content em {
    font-style: italic;
}
.knowledge-content ul,
.knowledge-content ol {
    margin: 0 0 16px;
    padding-left: 24px;
}
.knowledge-content li {
    margin-bottom: 6px;
    line-height: 1.7;
}
.knowledge-content blockquote {
    margin: 0 0 16px;
    padding: 12px 18px;
    background: #f7f8fa;
    border-left: 4px solid #ccc;
    color: #555;
    font-size: 15px;
    line-height: 1.7;
}
.knowledge-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 16px auto;
}
.knowledge-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 16px;
    font-size: 14px;
}
.knowledge-content table th,
.knowledge-content table td {
    border: 1px solid #e5e5e5;
    padding: 8px 12px;
    text-align: left;
    line-height: 1.6;
}
.knowledge-content table th {
    background: #f7f8fa;
    font-weight: 700;
    color: #333;
}
.knowledge-content hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 24px 0;
}
.knowledge-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
    font-family: Consolas, Monaco, monospace;
}
.knowledge-content pre {
    background: #f7f8fa;
    padding: 14px 18px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.6;
}

/* ---- 相关文章 ---- */
.knowledge-related {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
}
.knowledge-related-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 14px;
}
.knowledge-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.knowledge-related-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 14px;
}
.knowledge-related-list li:last-child {
    border-bottom: none;
}
.knowledge-related-list li a {
    color: #333;
    text-decoration: none;
}
.knowledge-related-list li a:hover {
    color: #3270FF;
    text-decoration: underline;
}

/* ---- 上下篇导航 ---- */
.knowledge-siblings {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 40px;
    margin-bottom: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e5e5;
}
.knowledge-siblings a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 1 auto;
    max-width: 48%;
    min-width: 0;
    padding: 14px 18px;
    background: #f7f8fa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}
.knowledge-siblings a:hover {
    background: #eef3ff;
    border-color: #3270FF;
}
.knowledge-siblings a:hover .knowledge-siblings-label {
    color: #3270FF;
}
.knowledge-siblings-label {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    transition: color 0.2s;
}
.knowledge-siblings-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s;
}
.knowledge-siblings a:hover .knowledge-siblings-title {
    color: #3270FF;
}
.knowledge-siblings-prev {
    align-items: flex-start;
    text-align: left;
}
.knowledge-siblings-next {
    align-items: flex-end;
    text-align: right;
    margin-left: auto;
}
.knowledge-siblings-next .knowledge-siblings-title {
    text-align: right;
}
.knowledge-siblings-empty {
    flex: 0 1 auto;
    max-width: 48%;
}

/* ============================================================
   错误页
   ============================================================ */
.knowledge-error {
    text-align: center;
    padding: 80px 20px 100px;
}
.knowledge-error-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px;
}
.knowledge-error-desc {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px;
}
.knowledge-error-links {
    display: flex;
    justify-content: center;
    gap: 16px;
}
.knowledge-error-links a {
    display: inline-block;
    padding: 10px 28px;
    font-size: 14px;
    color: #fff;
    background: #3270FF;
    border-radius: 4px;
    text-decoration: none;
}
.knowledge-error-links a:hover {
    background: #1a5ad4;
    text-decoration: none;
}
