/* ============================================================
   2026-09-17 新增需求4：文章栏目样式（列表页 + 详情页）
   ============================================================ */

/* 共用变量（与 kpi-common.css 保持一致） */
.article-list-page,
.article-detail-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 12%, rgba(166, 205, 173, .16), transparent 25%),

  


        #f5f8f4;
    color: #17372a;
}

.article-list-page *,
.article-detail-page * {
    box-sizing: border-box;
}

/* ==================== 列表页：英雄区 ==================== */
.articles-hero {
    padding: 50px 0 30px;
    background: linear-gradient(125deg, #1692e9, #8a2cc5);
  
    color: #fff;
}
.articles-hero .eyebrow {
    color: #cde2d2;
    font-size: 12px;
    letter-spacing: .17em;
    text-transform: uppercase;
    font-weight: 600;
}
.articles-hero h1 {
    margin: 8px 0 6px;
    font: 32px Georgia, "STSong", serif;
}
.articles-hero p {
    margin: 0 0 24px;
    color: #cde2d2;
    max-width: 560px;
}

/* 搜索框 */
.articles-search {
    display: flex;
    gap: 8px;
    max-width: 480px;
}
.articles-search input {
    flex: 1 1 auto;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 9px;
    background: rgba(255,255,255,.12);
    color: #fff;
    font: inherit;
}
.articles-search input::placeholder {
    color: rgba(255,255,255,.6);
}
.articles-search button {
    padding: 11px 22px;
    border: 0;
    border-radius: 9px;
    background: #fff;
    color: #207046;
    font-weight: 700;
    cursor: pointer;
}
.articles-search button:hover {
    background: #eaf4eb;
}

/* ==================== 列表页：主区 ==================== */
.articles-main {
    padding: 30px 22px;
}
.articles-current-cat {
    padding: 10px 16px;
    margin-bottom: 20px;
    background: #eaf4eb;
    border: 1px solid #cfe0cf;
    border-radius: 8px;
    color: #2d6a3f;
    font-size: 14px;
}
.articles-current-cat a {
    margin-left: 12px;
    color: #207046;
    font-weight: 700;
    text-decoration: none;
}

.articles-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* 左侧分类导航 */
.articles-sidebar {
    flex: 0 0 220px;
    padding: 16px;
    background: #fff;
    border: 1px solid #dce8dc;
    border-radius: 12px;
    position: sticky;
    top: 20px;
}
.articles-sidebar h3 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #94a89a;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 1px solid #eef3ee;
}
.articles-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.articles-sidebar li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: 7px;
    color: #315340;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background .15s;
}
.articles-sidebar li a:hover {
    background: #f5f8f4;
}
.articles-sidebar li a.active {
    background: #eaf4eb;
    color: #207046;
}
.cat-count {
    color: #94a89a;
    font-size: 11px;
    font-weight: 400;
    background: #f5f8f4;
    padding: 1px 7px;
    border-radius: 8px;
}
.articles-sidebar li a.active .cat-count {
    background: #fff;
    color: #207046;
}

/* 右侧内容区 */
.articles-content {
    flex: 1 1 auto;
    min-width: 0;
}

/* 空状态 */
.articles-empty {
    padding: 50px 20px;
    text-align: center;
    color: #748477;
    font-size: 15px;
    background: #fff;
    border: 1px dashed #d3e2d3;
    border-radius: 12px;
}

/* 文章卡片网格 */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.article-card {
    background: #fff;
    border: 1px solid #dce8dc;
    border-radius: 14px;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}
.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.article-cover-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e6efe6;
}
.article-cover-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.article-card:hover .article-cover-link img {
    transform: scale(1.05);
}
.article-category-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    background: rgba(32,112,70,.92);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
}
.article-body {
    padding: 16px;
}
.article-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.4;
    color: #1d3024;
}
.article-body h3 a {
    color: inherit;
    text-decoration: none;
}
.article-body h3 a:hover {
    color: #207046;
}
.article-body p {
    margin: 0 0 10px;
    color: #68796d;
    font-size: 13px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-meta {
    display: flex;
    gap: 12px;
    color: #94a89a;
    font-size: 12px;
}

/* 分页 */
.articles-pager {
    margin-top: 30px;
    text-align: center;
}
.articles-pager ul,
.articles-pager li {
    display: inline;
    list-style: none;
    margin: 0;
    padding: 0;
}
.articles-pager li {
    margin: 0 2px;
}
.articles-pager li a,
.articles-pager li span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #dce8dc;
    border-radius: 6px;
    background: #fff;
    color: #315340;
    text-decoration: none;
    font-size: 13px;
}
.articles-pager li.active span {
    background: #207046;
    color: #fff;
    border-color: #207046;
}
.articles-pager li.disabled span {
    color: #c4d9c9;
    background: #f5f8f4;
}

/* ==================== 详情页 ==================== */
.article-detail-main {
    padding: 30px 22px 60px;
}
.article-back {
    display: inline-block;
    margin-bottom: 20px;
    color: #53685a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.article-back:hover {
    color: #207046;
}

.article-detail {
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #dce8dc;
    border-radius: 14px;
    padding: 36px 40px;
}

.article-detail-header {
    margin-bottom: 24px;
}
.article-detail-category {
    display: inline-block;
    padding: 3px 12px;
    margin-bottom: 12px;
    background: #eaf4eb;
    color: #207046;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
}
.article-detail-header h1 {
    margin: 0 0 12px;
    font: 30px Georgia, "STSong", serif;
    color: #1d3024;
    line-height: 1.3;
}
.article-detail-meta {
    display: flex;
    gap: 16px;
    color: #94a89a;
    font-size: 13px;
}

.article-detail-cover {
    margin: 0 0 24px;
    border-radius: 10px;
    overflow: hidden;
}
.article-detail-cover img {
    width: 100%;
    display: block;
    max-height: 460px;
    object-fit: cover;
}

.article-detail-summary {
    padding: 16px 20px;
    margin-bottom: 24px;
    background: #f5f8f4;
    border-left: 4px solid #207046;
    color: #2d6a3f;
    font-size: 15px;
    line-height: 1.7;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

/* 正文：处理常见 HTML 标签 */
.article-detail-content {
    color: #1d3024;
    font-size: 15px;
    line-height: 1.85;
}
.article-detail-content h2,
.article-detail-content h3,
.article-detail-content h4 {
    margin: 28px 0 14px;
    color: #1d3024;
    line-height: 1.4;
}
.article-detail-content h2 { font-size: 22px; }
.article-detail-content h3 { font-size: 18px; }
.article-detail-content p {
    margin: 0 0 16px;
}
.article-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}
.article-detail-content ul,
.article-detail-content ol {
    padding-left: 24px;
    margin: 0 0 16px;
}
.article-detail-content li {
    margin-bottom: 6px;
}
.article-detail-content blockquote {
    margin: 16px 0;
    padding: 10px 20px;
    border-left: 4px solid #207046;
    background: #f5f8f4;
    color: #53685a;
    font-style: italic;
}
.article-detail-content code {
    padding: 2px 6px;
    background: #f5f8f4;
    border-radius: 4px;
    font-family: Consolas, monospace;
    font-size: 13px;
}
.article-detail-content pre {
    padding: 16px;
    background: #f5f8f4;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
}
.article-detail-content a {
    color: #207046;
    text-decoration: underline;
}

/* 相关推荐 */
.article-related {
    max-width: 820px;
    margin: 40px auto 0;
}
.article-related h2 {
    margin: 0 0 20px;
    font-size: 20px;
    color: #1d3024;
    padding-bottom: 10px;
    border-bottom: 2px solid #207046;
    display: inline-block;
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 800px) {
    .articles-hero {
        padding: 30px 0 20px;
    }
    .articles-hero h1 {
        font-size: 26px;
    }
    .articles-hero p {
        font-size: 14px;
    }
    .articles-search {
        flex-direction: column;
    }
    .articles-layout {
        flex-direction: column;
    }
    .articles-sidebar {
        position: static;
        flex: 0 0 auto;
    }
    .articles-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .articles-sidebar li {
        display: inline-block;
    }
    .articles-sidebar li a {
        padding: 6px 12px;
        font-size: 13px;
    }
    .articles-grid {
        grid-template-columns: 1fr;
    }
    .article-detail {
        padding: 24px 18px;
    }
    .article-detail-header h1 {
        font-size: 24px;
    }
}
