:root {
    --primary: #65B530;
    --primary-dark: #4f8f26;
    --primary-light: #e8f5de;
    --primary-soft: #f0f9e9;
    --gray-bg: #f5f7fa;
    --border-light: #eef2f6;
    --text-muted: #5e6f7e;
}

/* ===== 页面主体容器 ===== */
.page-wrapper {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 60px;
    width: 100%;
}

/* ===== 左右网格布局 ===== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 32px;
    align-items: start;
}

/* ===== 左侧：文章主内容 ===== */
.main-content {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.04);
    padding: 44px 48px 48px;
    min-width: 0;
}

/* ===== 右侧：侧边栏容器 ===== */
.sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
}

/* ===== 侧边栏卡片通用 ===== */
.sidebar-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.04);
    padding: 24px 20px 28px;
    border: 1px solid var(--border-light);
}

/* ===== 侧边栏标题 ===== */
.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #0b1a2b;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.sidebar-title .badge {
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    padding: 0 10px;
    border-radius: 20px;
    line-height: 20px;
    margin-left: auto;
}

/* ===== 分类导航 ===== */
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-nav li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-radius: 10px;
    background: #f8fafc;
    color: #1e2a3a;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.sidebar-nav li a .cat-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sidebar-nav li a .cat-icon::before {
    content: "▸";
    color: #b0c4d9;
    font-size: 14px;
    transition: color 0.2s;
}

.sidebar-nav li a:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateX(2px);
}

.sidebar-nav li a:hover .cat-icon::before {
    color: var(--primary);
}

.sidebar-nav li a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(101, 181, 48, 0.25);
    transform: translateX(2px);
}

.sidebar-nav li a.active .cat-icon::before {
    color: #fff;
}

.sidebar-nav .count {
    background: #eef2f6;
    padding: 0 10px;
    border-radius: 20px;
    font-size: 12px;
    color: #5e6f7e;
    font-weight: 600;
    line-height: 20px;
    transition: 0.2s;
}

.sidebar-nav li a:hover .count {
    background: #d4e4ca;
    color: var(--primary-dark);
}

.sidebar-nav li a.active .count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ===== 作者名片 ===== */
.author-card-sidebar {
    text-align: center;
}

.author-card-sidebar .author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    /* background: var(--primary); */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 20px rgba(101, 181, 48, 0.25);
    border: 3px solid #fff;
    margin:0 auto;
    
}

.author-card-sidebar .author-name {
    font-size: 18px;
    font-weight: 700;
    color: #0b1a2b;
    margin-top:10px;
}

.author-card-sidebar .author-bio {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.author-card-sidebar .author-desc {
    font-size: 13px;
    color: #7a8b9c;
    margin-bottom: 18px;
    line-height: 1.6;
}

/* ===== 面包屑 ===== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: 14px;
    color: #7a8b9c;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb a {
    color: #5e6f7e;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .sep {
    color: #d0d7de;
}

.breadcrumb .current {
    color: #0b1a2b;
    font-weight: 500;
}

.breadcrumb .category-highlight {
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 2px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(101, 181, 48, 0.15);
}

/* ===== 分类页头部 ===== */
.category-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-light);
}

.category-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #0b1a2b;
    margin-bottom: 10px;
}

.category-header .cat-desc {
    font-size: 15px;
    color: #5e6f7e;
}

/* ===== 新闻列表卡片 ===== */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-item {
    display: flex;
    gap: 24px;
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-light);
    transition: all 0.25s ease;
    text-decoration: none;
    color: inherit;
}

.news-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(101, 181, 48, 0.08);
    transform: translateY(-2px);
}

.news-item-img {
    flex-shrink: 0;
    width: 220px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    background: #eef2f6;
}

.news-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-item-img img {
    transform: scale(1.05);
}

.news-item-img .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5de 0%, #d4e4ca 100%);
    color: #4a8a20;
    font-size: 42px;
    font-weight: 700;
}

.news-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.news-item-title {
    font-size: 20px;
    font-weight: 700;
    color: #0b1a2b;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item:hover .news-item-title {
    color: var(--primary);
}

.news-item-summary {
    font-size: 14px;
    color: #5e6f7e;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #7a8b9c;
    margin-top: auto;
}

.news-item-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-item-meta .meta-item i {
    font-size: 13px;
    color: var(--primary);
}

.news-item-meta .meta-author {
    color: #3d4e5e;
    font-weight: 500;
}

.news-item-meta .meta-category {
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ===== 响应式 ===== */
@media (max-width: 992px) {
    .content-grid {
        grid-template-columns: 1fr 240px;
        gap: 24px;
    }

    .main-content {
        padding: 32px 28px 36px;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 16px 12px 40px;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .main-content {
        padding: 24px 18px 32px;
        border-radius: 16px;
    }

    .sidebar {
        position: static;
        order: 2;
        gap: 20px;
    }

    .sidebar-card {
        padding: 20px 16px 24px;
    }

    .news-item {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }

    .news-item-img {
        width: 100%;
        height: 180px;
    }

    .news-item-title {
        font-size: 17px;
    }

    .news-item-meta {
        gap: 12px;
    }

    .category-header h1 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 18px 14px 24px;
    }

    .breadcrumb {
        font-size: 13px;
    }

    .news-item {
        padding: 14px;
        gap: 12px;
    }

    .news-item-img {
        height: 160px;
    }

    .news-item-title {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .news-item-summary {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .news-item-meta {
        font-size: 12px;
        gap: 8px;
    }

    .category-header h1 {
        font-size: 22px;
    }

    .author-card-sidebar .author-avatar {
        width: 64px;
        height: 64px;
        font-size: 26px;
    }
}
