/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: #ffffff;
    font-family: 'Segoe UI', Roboto, 'Noto Sans', system-ui, -apple-system, '微软雅黑', sans-serif;
    color: #333333;
    line-height: 1.5;
}
.container {
    width: 100%;
    margin: 0;
    background: white;
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
}

/* ========== 头部导航 ========== */
.header {
    background: linear-gradient(135deg, #eef5e8 0%, #d9e3cf 100%);
    padding: 1rem 2rem;
}
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    background: transparent;
}
.logo h1 {
    font-size: 1.8rem;
    color: #2a5c2a;
    margin: 0;
}
.logo a {
    color: #2a5c2a;
    text-decoration: none;
}
.logo p {
    font-size: 0.8rem;
    opacity: 0.8;
    color: #4a6741;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}
.nav-menu a {
    color: #2a5c2a;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
}
.nav-menu a:hover {
    color: #1b3b1b;
    text-decoration: underline;
}
.m-menu-open, .m-menu-close {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2a5c2a;
}

/* ========== 面包屑 ========== */
.crumb {
    background: #e6f2ff;
    padding: 12px 30px;
    font-size: 13px;
    color: #6CB4EE;
}
.crumb a {
    color: #6CB4EE;
}

/* ========== 主体两栏（旧布局，保留兼容） ========== */
.main-wrapper {
    display: flex;
    gap: 2rem;
    padding: 2rem;
}
.content-main {
    flex: 2;
    min-width: 250px;
}
.sidebar {
    flex: 1;
    min-width: 250px;
    background: #ffffff;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

/* ========== 轮播图基础样式 ========== */
.swiper-container {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.swiper-button-prev, .swiper-button-next {
    color: white;
    background: rgba(0,0,0,0.3);
    width: 30px;
    height: 30px;
    border-radius: 50%;
}
.swiper-button-prev:after, .swiper-button-next:after {
    font-size: 16px;
}
.swiper-pagination-bullet-active {
    background: #6CB4EE;
}

/* ========== 文章列表（旧） ========== */
.section-title {
    font-size: 1.3rem;
    border-left: 6px solid #6CB4EE;
    padding-left: 12px;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
    color: #333;
}
.article-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.article-item {
    border-bottom: 1px solid #e2e6d9;
    padding: 1rem 0;
}
.article-title {
    font-size: 1.2rem;
    font-weight: 600;
}
.article-title a {
    color: #2a5c2a;
    text-decoration: none;
}
.article-title a:hover {
    color: #6CB4EE;
}
.article-meta {
    font-size: 0.8rem;
    color: #8b9a6e;
    margin: 5px 0;
}
.article-desc {
    color: #555;
    line-height: 1.5;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    gap: 12px;
    margin: 1.5rem 0;
    justify-content: center;
}
.pagination a, .pagination span {
    padding: 4px 12px;
    border-radius: 20px;
    background: #e6f2ff;
    color: #6CB4EE;
    text-decoration: none;
}
.pagination .current {
    background: #6CB4EE;
    color: white;
}

/* ========== 侧边栏模块 ========== */
.search-box {
    background: transparent;
    border: 1px solid #ff0000;
    border-radius: 48px;
    padding: 0.5rem 1rem;
    display: flex;
    margin-bottom: 1.5rem;
}
.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
}
.search-box button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #333;
}
.side {
    margin-bottom: 30px;
}
.side h2 {
    background: #6CB4EE;
    color: #fff;
    padding: 10px 12px;
    font-size: 16px;
    margin-bottom: 15px;
    border-radius: 4px;
}
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag {
    background: #e6f2ff;
    padding: 5px 12px;
    border-radius: 30px;
    text-decoration: none;
    color: #6CB4EE;
    transition: 0.2s;
}
.tag:hover {
    background: #c7d2fe;
    transform: scale(1.05);
}
.hot-list {
    list-style: none;
}
.hot-list li {
    padding: 8px 0;
    border-bottom: 1px solid #ecf0e5;
}
.hot-list a {
    text-decoration: none;
    color: #333;
}
.hot-list a:hover {
    color: #6CB4EE;
}
.contact-info p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: #333;
}
.contact-info i {
    width: 26px;
    color: #6CB4EE;
}

/* ========== 底部 ========== */
footer {
    background: #ffffff;
    color: #000000;
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    border-top: 1px solid #e0e0e0;
}
footer a {
    color: #000000;
    text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}
.footer-bottom {
    margin: 0;
    padding: 0;
}

/* ========== 返回顶部 ========== */
.tool-bar {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 99;
}
.tool-item {
    background: #6CB4EE;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 22px;
}
.tool-item-name {
    font-size: 10px;
    margin-top: 4px;
}

/* ========== 响应式 ========== */
@media (max-width: 780px) {
    .main-wrapper {
        flex-direction: column;
        padding: 1rem;
    }
    .header .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    .nav-menu {
        justify-content: center;
    }
    .crumb {
        padding: 8px 15px;
    }
}

/* ========== 文章详情页样式 ========== */
.article-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e6d9;
}
.article-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #2c6e2c;
}
.article-content {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}
.article-content img {
    max-width: 100%;
    height: auto;
}
.article-tags {
    margin: 20px 0;
}
.article-tags .tag {
    background: #e6f2ff;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.8rem;
    margin-right: 8px;
    text-decoration: none;
    color: #6CB4EE;
}
.article-prenext {
    border-top: 1px solid #e2e6d9;
    padding-top: 15px;
    margin-top: 20px;
}
.article-prenext p {
    margin: 8px 0;
}

/* ========== 广告卡片（可选，保留样式但未使用） ========== */
.two-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
}
.card-item {
    flex: 1;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    height: 220px;
    position: relative;
    transition: transform 0.2s;
}
.card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.card-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}
.card-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7), rgba(0,0,0,0));
    padding: 15px 12px 10px;
    color: white;
}
.card-text h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 600;
}
.card-text p {
    font-size: 0.8rem;
    opacity: 0.9;
}
@media (max-width: 768px) {
    .two-cards {
        flex-direction: column;
        gap: 15px;
    }
    .card-item {
        height: 180px;
    }
}

/* ========== 搜索栏（旧） ========== */
.search-bar {
    max-width: 600px;
    margin: 20px auto 30px;
}
.search-bar form {
    display: flex;
    gap: 8px;
}
.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
}
.search-bar button {
    background-color: #2e7d32;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 30px;
    cursor: pointer;
}

/* ========== 顶部区域（新布局：Grid，实现右侧卡片与下面卡片对齐） ========== */
.top-area {
    display: grid;
    grid-template-columns: auto 1fr;  /* 左侧轮播图自动宽度，右侧占满剩余 */
    gap: 20px;
    margin: 30px 0;
    align-items: start;
}

/* 左侧轮播图容器：可调宽高、左右留白 */
.feature-slider {
    width: 360px !important;
    max-width: 500px !important;
    min-width: 500px !important;
    height: 360px !important;
    flex: none !important;
    margin-left: 120px;    /* 左间距，可改 */
    margin-right: 120px;   /* 右间距，可改 */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* 如果不想让右侧卡片宽度受轮播图 margin 影响，可在 .top-area 上设置 padding */
/* 轮播图内部图片填充 */
.feature-slider .swiper-slide img {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* 右侧卡片容器 */
.top-tab-box {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;            /* 两个卡片之间的间距，可调 */
}

/* ========== 下方两栏布局（与顶部右侧宽度自然对齐，因为都是 fr 单位） ========== */
.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* 两列等宽 */
    gap: 30px;
    margin-top: 10px;
}

/* 公共卡片样式 */
.col-left, .col-right {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* ========== 选项卡通用样式 ========== */
.tab-titles {
    display: flex;
    gap: 20px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
    padding-bottom: 8px;
}
.tab-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: 0.3s;
    padding: 0 4px 8px;
}
.tab-title.active {
    color: #2e7d32;
    border-bottom: 3px solid #ffc107;
}
/* 修复选项卡内容淡入淡出：父容器相对定位，子容器绝对定位 */
.tab-contents-wrapper {
    position: relative;
    min-height: 280px;
}
.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.tab-content.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

/* ========== 右侧顶部选项卡文章列表样式 ========== */
.feature-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.feature-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.feature-list li a {
    color: #333;
    text-decoration: none;
    flex: 1;
    font-size: 0.9rem;
}
.feature-list li a:hover {
    color: #2e7d32;
}
.feature-list li .date {
    font-size: 0.7rem;
    color: #999;
    margin-left: 12px;
    white-space: nowrap;
}

/* ========== 每个模块标题 ========== */
.module {
    margin-bottom: 16px;
}
.module-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2e7d32;
    border-left: 4px solid #ffc107;
    padding-left: 12px;
    margin-bottom: 16px;
}

/* ========== 层级列表 ========== */
.hierarchical-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hierarchical-list > li {
    margin-bottom: 20px;
}
.list-item-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}
.list-item-main a {
    font-weight: 600;
    color: #1a237e;
    text-decoration: none;
    flex: 1;
}
.list-item-main a:hover {
    color: #2e7d32;
}
.list-item-main span {
    font-size: 0.75rem;
    color: #999;
    margin-left: 16px;
    white-space: nowrap;
}
.sub-list {
    list-style: none;
    margin: 8px 0 0 28px;
    padding-left: 12px;
    border-left: 2px solid #ffc107;
}
.sub-list li {
    margin-bottom: 8px;
}
.sub-list .list-item-sub {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
}
.sub-list a {
    color: #555;
    font-size: 0.9rem;
    text-decoration: none;
}
.sub-list a:hover {
    color: #2e7d32;
}
.sub-list span {
    font-size: 0.7rem;
    color: #bbb;
    margin-left: 12px;
}

/* ========== 响应式（新布局） ========== */
@media (max-width: 768px) {
    .top-area {
        grid-template-columns: 1fr;  /* 手机上改为单列 */
    }
    .feature-slider {
        width: 100%;
        height: auto;
        margin-left: 0;
        margin-right: 0;
    }
    .two-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========== 右上角搜索框（头部内）- 线条改为蓝色 ========== */
.header-search {
    margin-left: auto;
    margin-right: 15px;
}
.header-search form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border: 1px solid #007bff;   /* 蓝色边框 */
    border-radius: 30px;
    padding: 4px 12px;
}
.header-search input {
    background: transparent;
    border: none;
    padding: 6px 8px;
    color: white;
    outline: none;
    width: 140px;
}
.header-search input::placeholder {
    color: rgba(255,255,255,0.7);
}
/* 搜索框内输入文字变红色 */
.header-search input {
    color: #ff0000 !important;
}
/* 放大镜图标变红色 */
.header-search button,
.header-search button i {
    color: #ff0000 !important;
}
/* 可选：占位符半透明红色 */
.header-search input::placeholder {
    color: rgba(255, 0, 0, 0.6) !important;
}
@media (max-width: 768px) {
    .header-search {
        display: none;
    }
    /* 手机端布局强制修改 */
@media (max-width: 768px) {
    /* 隐藏轮播图 */
    .feature-slider {
        display: none !important;
    }
    
    /* 顶部区域改为块级 */
    .top-area {
        display: block !important;
    }
    
    /* 右侧卡片占满 */
    .top-tab-box {
        width: 100% !important;
        margin-top: 0 !important;
    }
    
    /* 下方两栏改为单列 */
    .two-columns {
        display: block !important;
    }
    
    /* 左右栏占满 */
    .col-left, .col-right {
        width: 100% !important;
        margin-bottom: 20px !important;
    }
    
    /* 调整标题大小 */
    .tab-title {
        font-size: 14px !important;
        padding: 6px 12px !important;
    }
    
    /* 文章列表 */
    .list-item-main {
        display: block !important;
    }
    .list-item-main a {
        font-size: 13px !important;
        display: block !important;
        margin-bottom: 4px !important;
    }
    .list-item-main span {
        font-size: 11px !important;
    }
}
/* 手机端允许横向滚动 */
@media (max-width: 768px) {
    html, body {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    .container, .page, .top-area, .two-columns {
        min-width: 1200px !important;
        width: 1200px !important;
        overflow-x: visible !important;
    }
}
/* ========== 文章详情页 - 解决拥挤问题 ========== */

/* 1. 限制正文宽度，提高可读性（核心！） */
.article-content {
    max-width: 760px;        /* 经典阅读宽度，防止一行太长 */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;         /* 手机端左右留白 */
}

/* 2. 段落样式 - 增加呼吸感 */
.article-content p {
    line-height: 1.85;       /* 行高加大 */
    margin-bottom: 1.4em;    /* 段落间距加大 */
    font-size: 17px;         /* 稍微大一点更舒服 */
    color: #2c3e42;
}

/* 3. 标题样式 - 层次分明 */
.article-content h2 {
    font-size: 26px;
    margin-top: 1.8em;
    margin-bottom: 0.8em;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8edf0;
    font-weight: 600;
    color: #2a5c2a;
}

.article-content h3 {
    font-size: 22px;
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    font-weight: 600;
    color: #3a6b3a;
}

.article-content h4 {
    font-size: 18px;
    margin-top: 1.2em;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #4a7b4a;
}

/* 4. 列表样式 */
.article-content ul,
.article-content ol {
    margin: 1.2em 0;
    padding-left: 2em;
    line-height: 1.85;
}

.article-content li {
    margin-bottom: 0.5em;
}

/* 5. 引用块样式 - 重点突出 */
.article-content blockquote {
    margin: 1.8em 0;
    padding: 1.2em 1.8em;
    background: #f5f8f0;
    border-left: 5px solid #ffc107;
    font-style: normal;
    line-height: 1.75;
    color: #4a5a4a;
    border-radius: 0 12px 12px 0;
}

/* 6. 图片样式 - 居中加阴影 */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.8em auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 7. 表格样式 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

.article-content th,
.article-content td {
    border: 1px solid #ddd;
    padding: 10px 12px;
    text-align: left;
}

.article-content th {
    background: #eef5e8;
    font-weight: 600;
}

/* 8. 代码块样式（如果有） */
.article-content pre,
.article-content code {
    background: #f4f4f4;
    border-radius: 6px;
    font-family: monospace;
}

.article-content pre {
    padding: 1em;
    overflow-x: auto;
    margin: 1.2em 0;
}

.article-content code {
    padding: 2px 6px;
    font-size: 0.9em;
}

/* 9. 文章头部标题优化 */
.article-header h1 {
    font-size: 28px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

/* 10. 手机端适配 */
@media (max-width: 768px) {
    .article-content {
        padding: 0 16px;
    }
    
    .article-content p {
        font-size: 15px;
        line-height: 1.75;
        margin-bottom: 1.2em;
    }
    
    .article-content h2 {
        font-size: 22px;
    }
    
    .article-content h3 {
        font-size: 19px;
    }
    
    .article-header h1 {
        font-size: 22px;
        padding: 0 16px;
    }
}
/* ========== 文章详情页 - 左右缩进，瘦身阅读 ========== */

/* 文章主体区域：左右都往里缩 */
.content-main {
    padding-left: 40px !important;   /* 左边缩进，不贴边 */
    padding-right: 40px !important;  /* 右边缩进，不贴侧边栏 */
}

/* 如果上面没生效，再加强一下 */
.main-wrapper .content-main {
    padding-left: 40px !important;
    padding-right: 40px !important;
}

/* 正文内容本身也限制最大宽度，确保阅读舒适 */
.article-content {
    max-width: 720px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* 手机端适配：手机上缩进小一点 */
@media (max-width: 768px) {
    .content-main {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}