/* ========== 列表页全局响应式适配（修改版：左栏显示，上下布局） ========== */

/* 平板及以下（最大宽度 1024px） */
@media screen and (max-width: 1024px) {
    .p-content {
        width: 96% !important;
        padding: 15px;
        overflow: visible; /* 避免溢出隐藏影响布局 */
    }

    /* 左右两栏改为上下布局，都显示 */
    .m-listleft,
    .m-listright {
        float: none !important;
        width: 100% !important;
        margin: 0 0 20px 0;
    }

    /* 左侧菜单样式优化 */
    .m-listleft h1 {
        width: 100%;
        box-sizing: border-box;
        font-size: 16px;
        padding: 0 15px;
    }

    .m-listleft-bd {
        width: 100% !important;
        min-height: auto;
        border: 1px solid #ddd;
        background: #fcfcfc;
    }

    .m-listleft-bd ul li {
        width: 100%;
        height: auto;
        line-height: 44px;
        border-bottom: 1px solid #eee;
        float: none;
    }

    .m-listleft-bd ul li a {
        font-size: 14px;
        text-indent: 20px;
        background-position: right 15px center;
        padding: 0 15px;
        display: block;
    }

    /* 右侧列表区域 */
    .m-listright {
        min-height: auto;
    }

    /* 面包屑区域调整 */
    .m-location {
        margin-bottom: 15px;
        font-size: 14px;
        background-position: 5px -208px;
        padding-left: 28px;
        white-space: normal;
    }

    /* 通用列表样式优化 */
    .m-listbd ul li {
        line-height: 32px;
        padding: 0 8px;
        font-size: 14px;
        background-position: 8px -159px;
    }

    .m-listbd ul li span.date {
        font-size: 12px;
        float: right;
        margin-left: 10px;
    }

    /* 图片排列墙（魅力夹江栏目） */
    .picPageList {
        margin-right: 0;
    }
    .picPageList li {
        width: 100%;
        margin: 0 0 20px 0;
        float: none;
    }
    .picPageList .pic img {
        height: auto;
        max-height: 200px;
        object-fit: cover;
    }
    .picPageList .title,
    .picPageList .titleBg {
        width: 94%;
        margin: 3%;
        height: 40px;
        line-height: 40px;
    }
    .picPageList .title a {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 分页组件 */
    #page_div {
        text-align: center;
        padding: 10px 0;
    }
    #page_div .pagination_index,
    #page_div .pagination_index_num {
        padding: 0 6px;
        min-width: 28px;
        height: 28px;
        line-height: 28px;
        font-size: 14px;
    }
    #page_div .pagination_index_last {
        width: auto;
        float: none;
        text-align: center;
        margin-top: 10px;
    }
}

/* 手机屏幕（最大宽度 768px） */
@media screen and (max-width: 768px) {
    .p-content {
        padding: 12px;
    }

    .m-location {
        font-size: 12px;
        background-position: 0 -208px;
        padding-left: 0;
        margin-bottom: 12px;
    }

    /* 左侧菜单进一步优化 */
    .m-listleft h1 {
        font-size: 15px;
        height: 44px;
        line-height: 44px;
        background-position: right 15px center;
    }

    .m-listleft-bd ul li {
        line-height: 40px;
    }

    .m-listleft-bd ul li a {
        font-size: 13px;
        text-indent: 16px;
    }

    /* 右侧列表 */
    .m-listbd ul li {
        line-height: 30px;
        padding: 5px 5px;
        background-position: 5px -159px;
    }
    .m-listbd ul li a {
        font-size: 13px;
        display: inline-block;
        max-width: calc(80% - 30px);
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    .m-listbd ul li span.date {
        font-size: 12px;
        float: right;
        margin-left: 0;
    }

    /* 图片墙内部文字调整 */
    .picPageList .title,
    .picPageList .titleBg {
        height: 36px;
        line-height: 36px;
    }
    .picPageList .title a {
        font-size: 13px;
    }

    /* 分页按钮更小 */
    #page_div .pagination_index,
    #page_div .pagination_index_num {
        min-width: 26px;
        height: 26px;
        line-height: 26px;
        font-size: 12px;
    }
    #page_div input#pagination_input {
        width: 40px;
        height: 26px;
        line-height: 26px;
        margin: 0 5px;
    }
}

/* 超小屏（最大宽度 480px） */
@media screen and (max-width: 480px) {
    .m-location {
        font-size: 11px;
        word-break: break-all;
    }

    .m-listleft h1 {
        font-size: 14px;
        height: 40px;
        line-height: 40px;
    }

    .m-listleft-bd ul li {
        line-height: 38px;
    }

    .m-listleft-bd ul li a {
        font-size: 12px;
        text-indent: 12px;
    }

    .m-listbd ul li {
        line-height: 28px;
    }
    .m-listbd ul li a {
        font-size: 12px;
        max-width: 65%;
    }
    .m-listbd ul li span.date {
        font-size: 11px;
    }

    .picPageList .title,
    .picPageList .titleBg {
        height: 32px;
        line-height: 32px;
    }
    .picPageList .title a {
        font-size: 12px;
        padding: 0 6px;
    }

    /* 分页区域紧凑排列 */
    #page_div {
        font-size: 12px;
    }
    #page_div .pagination_index,
    #page_div .pagination_index_num {
        min-width: 24px;
        height: 24px;
        line-height: 24px;
        margin-right: 3px;
    }
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    margin: 10px 0 10px 15px;
    background: #1b51a0;
    border-radius: 4px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    margin: 4px 0;
    transition: 0.3s;
}
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 移动端侧边栏面板 */
.mobile-sidebar1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: #fff;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    overflow-y: auto;
}
.mobile-sidebar1.open {
    transform: translateX(0);
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #1b51a0;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}
.sidebar-close {
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}
.sidebar-content {
    padding: 0;
}
.sidebar-content .m-listleft-bd {
    width: 100%;
    border: none;
    min-height: auto;
}
.sidebar-content .m-listleft-bd ul li {
    width: 100%;
    float: none;
    border-bottom: 1px solid #eee;
}
.sidebar-content .m-listleft-bd ul li a {
    padding: 12px 20px;
    text-indent: 0;
    background-position: right 20px center;
}
/* 遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}
.sidebar-overlay.show {
    display: block;
}
/* ========== 侧边栏内容样式优化 ========== */

/* 侧边栏整体容器 */
.sidebar-content {
    background: #fff;
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
}

/* 侧边栏内的菜单容器（克隆自 .m-listleft-bd） */
.sidebar-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* 菜单列表项 */
.sidebar-content ul li {
    position: relative;
    margin: 0;
    padding: 0;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

/* 菜单链接 */
.sidebar-content ul li a {
    display: block;
    padding: 14px 20px 14px 48px;
    font-size: 15px;
    font-weight: normal;
    color: #333;
    text-decoration: none;
    background-position: 20px center;
    background-repeat: no-repeat;
    background-size: 18px;
    transition: all 0.2s;
}

/* 菜单项悬浮效果 */
.sidebar-content ul li:hover {
    background-color: #f9f9f9;
}
.sidebar-content ul li:hover a {
    color: #1b51a0;
    padding-left: 52px; /* 微调增加视觉动感 */
}

/* 当前栏目高亮（如果有 .listactive 类） */
.sidebar-content ul li.listactive {
    background: #f0f7ff;
    border-left: 4px solid #1b51a0;
}
.sidebar-content ul li.listactive a {
    color: #1b51a0;
    font-weight: 600;
    padding-left: 44px; /* 补偿左边框宽度 */
}

/* 可选：为不同层级菜单添加缩进（如果菜单有子级） */
.sidebar-content ul ul {
    padding-left: 20px;
}
.sidebar-content ul ul li a {
    padding-left: 60px;
    font-size: 14px;
}

/* 自定义图标（使用 Font Awesome 或背景图，这里用伪元素模拟小圆点） */
.sidebar-content ul li a::before {
    content: "";
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #bbb;
    border-radius: 50%;
    transition: 0.2s;
}
.sidebar-content ul li:hover a::before,
.sidebar-content ul li.listactive a::before {
    background: #1b51a0;
    width: 8px;
    height: 8px;
}

/* 移除原有 background-image 箭头（如果存在） */
.sidebar-content ul li a {
    background-image: none !important;
}

/* 增强滚动体验 */
.mobile-sidebar1 {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}
.mobile-sidebar1::-webkit-scrollbar {
    width: 5px;
}
.mobile-sidebar1::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.mobile-sidebar1::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}
/* 移动端显示按钮，隐藏原左侧菜单 */
@media screen and (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }
    .m-listleft {
        display: none !important;
    }
}