/* 移动端优化 */

.xhjj-title {
    color: #004993;
    border-bottom: 1px solid #ddd;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-size: 16px;
}

.xhjj-title a {
    color: #004993;
    text-decoration: none; /* 去掉下划线，可选 */
}

/* 更新分页样式，使其适应屏幕 */
.xhjj-index {
    display: flex;
    justify-content: center;
    padding-top: 100px;
    padding-bottom: 10px;
}

/* 设置父容器高度为100vh，确保它始终占据整个视口 */
.main-container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
    height: auto;
    /* 高度调整为自适应 */
    flex-direction: row;
    box-sizing: border-box;
}

/* 左侧导航栏 */
.sidebar {
    width: 261px;
    background-color: #fff;
    padding: 20px;
    border-right: 1px solid #ddd;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    margin-top: 40px;
    margin-bottom: 80px;
    border-radius: 4px;
    flex-shrink: 0;
    min-height: calc(100vh - 120px);
}

/* 导航菜单 */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 菜单项 */
.sidebar-menu li {
    margin-bottom: 15px;
    border-radius: 5px;
}

/* 菜单项链接 */
.sidebar-menu li a {
    color: #333;
    text-decoration: none;
    font-size: 20px;
    display: block;
    padding: 15px 30px;
    transition: all 0.3s ease;
    background-color: #F5F5F5;
}

/* 菜单项悬浮效果 */
.sidebar-menu li a:hover {
    background-color: #8DAAD7;
    color: white;
}

/* 激活菜单项的样式 */
.sidebar-menu li a.active {
    background-color: #8DAAD7;
    color: white;
}

/* 右侧内容区域 */
.content-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* 文章列表 */
.article-list {
    margin: 0;
    padding-top: 25px;
  	padding-left: 25px;
    list-style: none;
}

/* 文章项 */
.article-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 0;
    border-bottom: 1px dashed #ccc;
    transition: all 0.3s ease;
}

.article-item:hover {
    background-color: #f9f9f9;
}

.article-title {
    position: relative;
    padding-left: 20px;
    flex: 1;
}

.article-title a {
    font-size: 18px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.article-title a:hover {
    color: #004993;
}

.article-title a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: #004993;
    border-radius: 50%;
}

.article-date {
    font-size: 16px;
    color: #999;
    text-align: right;
    min-width: 120px;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.article-item:hover .article-date {
    color: #004993;
}

/* 响应式布局调整 */
@media (max-width: 768px) {

    /* 主容器调整为列布局 */
    .main-container {
        flex-direction: column;
        padding: 0;
        height: auto;
    }

    /* 左侧导航栏隐藏，使用顶部导航 */
    .sidebar {
        width: 100%;
        padding: 15px;
        border-right: none;
        margin-bottom: 20px;
        position: relative;
    }

    /* 右侧内容区域 */
    .content-container {
        padding: 15px;
    }

    /* 调整字体大小 */
    .article-title a {
        font-size: 16px;
    }

    .article-date {
        font-size: 14px;
    }

    /* 文章项间距调整 */
    .article-item {
        padding: 15px 0;
    }

    /* 分页样式调整 */
    .xhjj-index {
        padding-top: 40px;
    }

    /* 菜单调整为顶部导航栏 */
    .sidebar-menu {
        display: flex;
        justify-content: space-around;
        flex-wrap: wrap;
        margin: 0;
    }

    .sidebar-menu li {
        margin-bottom: 0;
        flex-basis: 48%;
        margin-right: 4%;
    }

    .sidebar-menu li a {
        padding: 10px;
        font-size: 18px;
    }

    .sidebar-menu li a:hover {
        background-color: #8DAAD7;
        color: white;
    }

    /* 调整页面标题样式 */
    .xhjj-title {
        font-size: 18px;
    }
}