/* ========== 基础重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', '思源宋体', 'Times New Roman', Georgia, serif;
    background-color: #ffffff;;
    color: #2c2a28;
    line-height: 1.7;
    font-size: 18px;
    overflow-x: hidden; /* 防止横向滚动条 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ========== 头部区域 ========== */

.site-header {
    position: relative;
    background: 0; /* 保留底色 */
	border-bottom: 1px solid #007584;
}
.site-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://cvcnn.net/zb_users/upload/2026/05/20260524114329177959420995183.png') no-repeat center center;
    background-size: cover;
    opacity: 1; /* 控制图片透明度，调整数值 */
    z-index: -1;
}

/* 头部内容使用 flex 布局，方便移动端按钮对齐 */
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    flex: 0 0 auto;
}

.logo a {
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    color: #3f3a32;
    letter-spacing: 0px;
}

.site-desc {
    font-size: 14px;
    color: #8e8a7c;
    margin-left: 12px;
}

.logo img {
    vertical-align: middle;   /* 垂直居中对齐 */
}
/* 桌面端导航菜单 */
.main-nav {
    flex: 1 1 auto;
    text-align: right;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: #000;
    font-weight: 700;
}

.main-nav a:hover {
    color: #b08a5c;
}

/* 移动端菜单按钮 - 桌面端隐藏 */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

/* 三条杠图标 */
.navicon {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #333;
    position: relative;
}

.navicon::before,
.navicon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: #333;
    left: 0;
    transition: transform 0.3s ease;
}

.navicon::before {
    top: -8px;
}

.navicon::after {
    top: 8px;
}

/* 移动端样式 */
@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
        order: 2;
        margin-left: auto;
    }

    .main-nav {
        display: none;
        width: 100%;
        order: 3;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        text-align: left;
        margin-top: 20px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav li {
        border-bottom: 1px solid #eee;
    }

    .main-nav a {
        display: block;
        padding: 12px 20px;
    }
}
/* ========== 手机端文章页优化（高权重版） ========== */
@media screen and (max-width: 768px) {
    /* 使用更具体的选择器，确保覆盖原样式 */
    .site-main .post-full,
    .post-full {
        padding: 10px 0px !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    .site-main .main-content,
    .main-content {
        padding: 0 !important;
    }
    .post-title {
        font-size: 20px;
        word-break: break-word;
    }
	/* 文章页标题 */
    .post-title {
        font-size: 18px !important;
        font-weight: 700 !important;
    }
    /* 列表页标题（普通文章列表） */
    .post-item h2 {
        font-size: 16px !important;
        font-weight: 700 !important;
    }
    /* 分类模块卡片标题 */
    .grid-item h4 {
        font-size: 16px;
        font-weight: 700;
    }
}
/* ========== 首页Banner ========== */
.home-banner {
    text-align: center;
    padding: 60px 20px;
    background: #fffdf9;
    margin-bottom: 40px;
    border-radius: 24px;
}

.home-banner h1 {
    font-size: 33px;
    font-weight: 300;
}

.home-banner p {
    font-size: 20px;
    color: #6c5e4e;
    max-width: 800px;
    margin: 20px auto 0;
}

/* ========== 分类模块（首页聚合模式） ========== */
.category-module {
    margin-bottom: 50px;
}

/* 短横线重叠效果（修正右侧“更多”链接位置） */
.module-header {
    position: relative;
    border-bottom: 1px solid #d9d9d9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
	margin-top: 20px;
}
.module-header::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 89px;
    height: 3px;
    background-color: #006076;
    z-index: 1;
}
.module-header h3 {
    font-size: 22px;
    font-weight: 400;
    color: #3f3a32;
}

.module-header a {
    font-size: 14px;
    color: #2f2f2f;
    text-decoration: none;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.grid-item {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    transition: 0.3s;
    border: 1px solid #eae4d8;
}

.grid-item h4 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
}

.grid-item h4 a {
    text-decoration: none;
    color: #2f2b24;
}

.grid-item .item-meta {
    font-size: 13px;
    color: #9b8e7c;
    margin-bottom: 12px;
}

.grid-item .item-intro {
    font-size: 14px;
    color: #5e5a54;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 992px) {
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .article-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== 传统文章列表模式 ========== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
	border-top: 1px solid #0886a1;
}

.post-item {
    border-bottom: 1px solid #0886a1;
    padding-bottom: 22px;
}

.post-item h2 {
    font-size: 28px;
    font-weight: 400;
}

.post-item h2 a {
    text-decoration: none;
    color: #2f2b24;
}

.post-meta {
    font-size: 14px;
    color: #9b8e7c;
    margin: 12px 0;
	border-bottom: 1px solid #e2e2e2;
}

.post-excerpt {
    color: #4e4a44;
    margin: 16px 0;
}

.read-more {
    color: #b08a5c;
    text-decoration: none;
    border-bottom: 1px solid #dccfb8;
}

/* ========== 文章页 ========== */
.post-full {
    max-width: px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 28px;
}

.post-title {
    font-size: 22px;
    font-weight: 300;
    line-height: 1.3;
	font-weight: 700;
	margin-top: 20px;
}
}

.post-content {
    font-size: 18px;
    margin: 32px 0;
    overflow-x: auto;
    word-wrap: break-word;
}

.post-content h2, .post-content h3 {
    margin-top: 40px;
    font-weight: 400;
}

.post-content p {
    margin-bottom: 1.5em;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}

.post-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    border-collapse: collapse;
    width: 100%;
}

.post-content table td,
.post-content table th {
    border: 1px solid #ddd;
    padding: 8px;
}

/* 防止任何内容溢出 */
.post-content * {
    max-width: 100%;
    box-sizing: border-box;
}

/* 分页样式 */
.pagination {
    text-align: center;
    margin: 40px 0;
}

.page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 4px;
    background: #fff;
    border: 1px solid #e0d6c8;
    border-radius: 30px;
    text-decoration: none;
    color: #5e4c39;
}

.page-numbers.current {
    background: #b08a5c;
    color: #fff;
    border-color: #b08a5c;
}

/* ========== 页脚 ========== */
.site-footer {
    background: #014656;
    color: #bbbbbb;
    text-align: center;
    padding: 20px 0;
    margin-top: 80px;
    font-size: 14px;
}

.footer-info a {
    color: #bbbbbb;
    text-decoration: none;
}
/* ========== 修复卡片图片溢出 ========== */
.grid-item img,
.post-excerpt img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
    border-radius: 8px;
}

/* 强制卡片内文字换行，防止溢出 */
.grid-item,
.post-item {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 统一卡片最小高度（可选，避免高度不一致） */
.grid-item {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.grid-item h4 {
    flex-shrink: 0;
}

.grid-item .item-intro {
    flex-grow: 1;
}
/* ========== 搜索图标 + 弹窗样式 ========== */
.search-icon {
    position: relative;
    margin-left: 15px;
    cursor: pointer;
}
.search-trigger {
    font-size: 20px;
    display: inline-block;
    padding: 5px;
}
.search-form-popup {
    display: none;
    position: absolute;
    top: 40px;
    right: 0;
    width: 260px;
    background: #fff;
    border: 1px solid #e0d6c8;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
}
.search-icon:hover .search-form-popup {
    display: block;
}
.search-form-popup form {
    display: flex;
    gap: 8px;
}
.search-form-popup input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}
.search-form-popup button {
    background: #005163;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .search-icon {
        margin-left: auto;
        order: 2;
    }
    .search-form-popup {
        right: 0;
        left: auto;
        width: 240px;
    }
}
/* ========== 站内搜索框样式 ========== */
.search-form-header {
    display: inline-block;
    margin-left: 20px;
    vertical-align: middle;
}
.search-form-header form {
    display: flex;
    align-items: center;
}
.search-form-header input {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 30px;
    outline: none;
    font-size: 14px;
    width: 180px;
    transition: 0.2s;
}
.search-form-header input:focus {
    border-color: #b08a5c;
    width: 220px;
}
.search-form-header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin-left: -40px;
    padding: 6px 8px;
    opacity: 0.6;
}
.search-form-header button:hover {
    opacity: 1;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .search-form-header {
        display: block;
        margin: 10px 0 0;
        text-align: center;
    }
    .search-form-header input {
        width: calc(100% - 60px);
    }
    .search-form-header input:focus {
        width: calc(100% - 60px);
    }
}
/* ========== 友情链接样式 ========== */
.friends-links {
    margin: 30px 0 20px;
    padding: 20px 0;
    border-top: 1px solid #e0d6c8;
    border-bottom: 1px solid #e0d6c8;
}
.friends-links h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #3f3a32;
    font-weight: 500;
}
.friends-links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.friends-links li {
    margin: 0;
}
.friends-links li a {
    color: #6c5e4e;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}
.friends-links li a:hover {
    color: #b08a5c;
    text-decoration: underline;
}
@media (max-width: 768px) {
    .friends-links ul {
        gap: 12px;
    }
    .friends-links li a {
        font-size: 13px;
    }
}
/* 暂无搜索结果提示样式 */
.no-results {
    text-align: center;
    padding: 50px 20px;
    background: #fffdf9;
    border-radius: 24px;
    margin: 30px 0;
}
.no-results p {
    margin: 10px 0;
    color: #6c5e4e;
    font-size: 18px;
}
.no-results strong {
    color: #b08a5c;
}
/* 首页Banner全宽突破方案 */
.home-banner-img {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    line-height: 0;
}
.home-banner-img img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}
/* 移动端适配 */
@media screen and (max-width: 768px) {
    .home-banner-img img {
        height: 200px;
    }
}
/* 列表页（首页分类卡片、文章列表摘要）图片自适应 */
.grid-item img,
.post-excerpt img,
.article-list .post-item img {
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 10px 0;
}
/* 文章页图片自适应（防止手机端变形） */
.post-content img {
    max-width: 100%;
    height: auto !important;
    display: block;
    margin: 20px auto;
}
/* 全局图片自适应（所有图片不超出容器，保持比例） */
img {
    max-width: 100%;
    height: auto;
}
@media (max-width: 768px) {
    .grid-item .item-intro {
        -webkit-line-clamp: 2;
    }
}
/* 手机端文章内容区域防止横向滚动条 */
@media screen and (max-width: 768px) {
    .post-content {
        overflow-x: hidden;    /* 隐藏横向溢出内容，不显示滚动条 */
        word-wrap: break-word; /* 长单词或URL自动换行 */
        word-break: break-all; /* 必要时强制断行（适用于长英文/数字） */
    } 
}

/* 强制所有内部元素不超出父容器（包括表格、代码块） */
.post-content * {
    max-width: 100%;
    box-sizing: border-box;
}

/* 表格单独处理：允许横向滚动（保留滚动条）但不会撑开页面 */
.post-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}