/*!
 * 响应式补充样式
 * 说明：源站 responsive.css 已从线上下线，这里按现行页面结构补一份移动端适配，
 *      只做布局收敛，不改变 PC 端视觉（所有收敛规则都写在 max-width 媒体查询内），
 *      样式细节仍以 common.css / list.css / detail.css / index.css 为准。
 *
 * 断点：1240 容器收敛 / 992 平板 / 767 手机 / 480 小屏
 * 全站统一入口：本文件被 home / list / listTL / detail / search 五个模板引用，
 * 改这里重新构建即对全部 500+ 页面生效。
 */

/* 栏目暂无内容时的提示（与其它栏目保持同一版面，不额外插入占位页） */
.newsList .empty-state {
    padding: 90px 20px;
    text-align: center;
    font-size: 18px;
    line-height: 1.9;
    color: #999;
    background: #fff;
}

/* 详情页附件下载：默认蓝色、悬停下划线链接转红，点击即下载 */
.fujian a {
    color: #1e50a2;
    text-decoration: underline;
    cursor: pointer;
    transition: color .2s ease;
}

.fujian a:visited {
    color: #1e50a2;
}

.fujian a:hover,
.fujian a:focus {
    color: #d9001b;
}

/* 侧栏中暂无独立页面的栏目（源站为空栏目），保持灰态、不可点击 */
.main .navBar ul li.is-disabled span {
    display: block;
    width: 100%;
    color: #999;
    cursor: not-allowed;
}

.main .navBar ul li.is-disabled:hover {
    background: #eff2f7;
}

/* ==================== 1240 以下：解除固定宽度 ==================== */
/* 关键：common.css 里 body{min-width:1360px} 与 .main{width:1200px}
   会让所有后续断点失效，必须先解除，其余收敛规则才有意义 */
@media screen and (max-width: 1240px) {
    body {
        min-width: 0;
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    .main {
        width: 100% !important;
        max-width: 1200px;
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
    }

    /* .w1200 都在 .main 内，左右留白由 .main 统一给，避免双层内边距 */
    .w1200 {
        width: 100% !important;
        max-width: 1200px;
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
    }

    /* 页头与页脚里写死 1200 的容器同步收敛 */
    .header .top,
    .header .banner .nav_box,
    .header .banner .nav_box .nav,
    .swiper_banner,
    .link .tit,
    .link .slt,
    .footer .con .txt {
        width: 100%;
        max-width: 1200px;
        box-sizing: border-box;
    }

    .header .top,
    .link .tit,
    .link .slt,
    .footer .con .txt {
        padding-left: 16px;
        padding-right: 16px;
    }

    .link .tit,
    .link .slt {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==================== 992 以下：平板 / 窄窗口 ==================== */
@media screen and (max-width: 992px) {
    /* 页头改为两行：logo 一行、搜索框一行，避免 510+422 溢出 */
    .header .top {
        height: auto;
        min-height: 84px;
        padding-top: 12px;
        padding-bottom: 12px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .header .top > a {
        display: block;
        max-width: 100%;
        line-height: 0;
    }

    .header .top .logo {
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 56px;
    }

    .header .top .search {
        width: 100%;
        height: auto;
        background: none;
        padding-left: 0;
    }

    .header .top .search form {
        width: 100%;
        display: flex;
        align-items: center;
    }

    .header .top .search form .search_txt {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        height: 44px;
        line-height: 44px;
        top: 0;
        font-size: 16px;
        padding-left: 16px;
    }

    .header .top .search form .search_btn {
        flex: 0 0 auto;
        width: 84px;
        height: 44px;
        line-height: 44px;
        top: 0;
    }

    /* 导航条：整行等分，不再被 1200 宽撑开 */
    .header .banner .nav_box {
        left: 0;
        transform: none;
        width: 100%;
    }

    .header .banner .nav_box .nav {
        width: 100%;
        padding: 0 8px;
        box-sizing: border-box;
        justify-content: space-around;
    }

    /* 列表页侧栏与正文改为上下堆叠 */
    .main .content .navBar,
    .main .content .newsList {
        float: none !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    .main .content .navBar {
        margin-bottom: 16px;
    }

    .newsList {
        width: 100% !important;
        padding: 10px 14px;
        box-sizing: border-box;
    }

    /* 首页轮播与 tab 改为上下堆叠 */
    .xw_box,
    .hydt_box {
        display: block;
    }

    .xw_box .swiper_lbt,
    .xw_box .tab_box,
    .hydt_box .tab_box {
        float: none !important;
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* index.css 给轮播设了 left:-15px，窄屏会顶出左边界 */
    .xw_box .swiper_lbt {
        left: 0;
    }

    .xw_box .tab_box {
        margin-top: 16px;
    }

    /* 首页「法律法规解读 / 政策解读」两个入口：原为 497×138 固定块，窄屏会溢出 */
    .img_box {
        width: 100% !important;
        padding-top: 16px;
    }

    .img_box ul {
        width: 100%;
    }

    .img_box ul li {
        width: 100%;
        height: 0;
        padding: 27.77% 0 0;
        margin-bottom: 12px;
        position: relative;
        box-sizing: border-box;
    }

    /* 源站 :nth-child 的 background 简写特异性更高，会把 background-size 重置为 auto，
       导致 497px 的整图被居中裁掉左侧文字，这里用同级特异性覆盖 */
    .img_box ul li:nth-child(1),
    .img_box ul li:nth-child(2) {
        background-size: 100% 100%;
    }

    .img_box ul li a {
        position: absolute;
        left: 6%;
        bottom: 13%;
        width: 19%;
        height: 26%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        line-height: 1;
        box-sizing: border-box;
    }

    /* 快捷入口：一行五个太挤，改为等分换行 */
    .top_list {
        height: auto !important;
        padding: 10px 0;
    }

    .top_list > ul {
        flex-wrap: wrap;
        height: auto;
    }

    .top_list > ul > li {
        width: 20%;
        min-width: 96px;
        height: auto;
        padding: 10px 4px;
        box-sizing: border-box;
    }

    .top_list > ul > li > a {
        height: auto;
    }

    .top_list > ul > li > a img {
        margin-bottom: 8px;
    }

    /* 首页 .main 为浮到 banner 上而设的 -70px 位移，窄屏取消 */
    body .main {
        top: 0;
    }

    /* 页脚友情链接下拉框改为纵向 */
    .link .slt {
        flex-wrap: wrap;
        gap: 8px;
    }

    .link select {
        width: 100%;
    }

    /* 搜索页 */
    .search-page .search-page-form {
        height: 46px;
    }

    .search-page .search-page-form button {
        width: 84px;
        letter-spacing: 2px;
    }
}

/* ==================== 767 以下：手机 ==================== */
@media screen and (max-width: 767px) {
    body {
        font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
            "Microsoft YaHei", "微软雅黑", "Helvetica Neue", Arial, sans-serif;
    }

    /* 导航条从「压在 banner 图上」改为独立色条，手机上更易点 */
    .header .banner .nav_box {
        position: static;
        height: auto;
        background-color: #1f4fa8;
    }

    /* 导航条已回到文档流占位，详情页为避让绝对定位导航而留的 82px 可以收回 */
    .main {
        margin-top: 16px;
    }

    .header .banner .nav_box .nav {
        height: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }

    .header .banner .nav_box .nav li {
        flex: 0 0 auto;
        padding: 0 14px;
    }

    .header .banner .nav_box .nav li a {
        display: block;
        line-height: 44px;
        font-size: 15px;
        white-space: nowrap;
    }

    .swiper_banner .swiper-button-next,
    .swiper_banner .swiper-button-prev {
        display: none;
    }

    /* 首页快捷入口三列；5 个入口时排成 3+2，居中避免最后一行左偏 */
    .top_list > ul {
        justify-content: center;
        gap: 10px;
    }

    .top_list > ul > li {
        width: calc(33.333% - 7px) !important;
        min-width: 0;
        padding: 10px 4px;
        background: #fff;
        border: 1px solid #e9eef7;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(31, 79, 168, .06);
    }

    /* 外层容器不再用整块白底＋竖线，改由各入口卡片自己表达 */
    .top_list {
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    /* tab 右上角「更多」在手机端显示，便于进入栏目列表 */
    .tab_box .hd {
        position: relative;
        padding-right: 64px;
    }

    .tab_box .hd .tab_more {
        display: block;
        position: absolute;
        right: 0;
        top: 0;
        font-size: 14px;
        line-height: 28px;
        color: #999;
    }

    .top_list > ul > li > a p {
        font-size: 13px;
        line-height: 1.5;
    }

    /* 首页轮播：多张海报原始宽高比不同，height:auto 会让切换时高度跳动，
       统一成同一高度并居中裁切，保证每张 slide 与容器高度一致 */
    .xw_box .swiper_lbt .swiper-slide a img {
        width: 100% !important;
        height: clamp(190px, 56vw, 280px) !important;
        object-fit: cover;
        object-position: center;
    }

    .xw_box .swiper_lbt .swiper-slide a p {
        padding-left: 12px;
        height: 36px;
        line-height: 36px;
    }

    .xw_box .swiper_lbt .swiper-slide a p span {
        font-size: 14px;
    }

    /* 首页 tab 列表：标题与日期改为两端对齐、允许换行 */
    .tab_box .hd ul li:nth-child(n + 2) {
        margin-left: 16px;
    }

    .tab_box .hd ul li a {
        font-size: 16px;
    }

    .tab_box .bd ul li {
        line-height: 40px;
        padding-left: 12px;
    }

    .tab_box .bd ul li a {
        flex: 1 1 auto;
        min-width: 0;
        width: auto;
        font-size: 15px;
    }

    .tab_box .bd ul li span.date {
        flex: 0 0 auto;
        margin-left: 8px;
        font-size: 13px;
    }

    /* 列表页：标题不再单行截断，日期换行到下一行 */
    #newsList li {
        display: block;
        line-height: 1.9;
        font-size: 16px;
    }

    #newsList li a {
        float: none;
        display: block;
        width: 100%;
        white-space: normal;
        overflow: visible;
    }

    #newsList li .date {
        float: none;
        display: block;
        margin-bottom: 4px;
        font-size: 14px;
    }

    .newsList {
        padding: 8px 12px;
    }

    .newsList ul li:nth-child(5n) {
        padding-bottom: 14px;
        margin-bottom: 14px;
    }

    /* 侧栏：横向滚动条式，避免手机上占满首屏 */
    .main .content .navBar h2 {
        height: 46px;
        line-height: 46px;
        font-size: 17px;
    }

    .main .content .navBar ul {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 15px;
    }

    .main .content .navBar ul li {
        flex: 0 0 auto;
        height: 42px;
        line-height: 42px;
        padding: 0 16px;
        white-space: nowrap;
    }

    .main .navBar ul li.is-disabled span {
        padding: 0 16px;
        box-sizing: border-box;
    }

    /* 详情页标题：34px 太大 */
    .titP {
        width: 100% !important;
        box-sizing: border-box;
        margin: 20px auto 14px;
    }

    .titP p {
        font-size: 21px;
        line-height: 1.55;
        text-align: left;
    }

    /* 来源/时间/分享条：原本固定 42px 高、单行 flex，手机上会溢出 */
    .main #content .titP .moreInfo {
        height: auto;
        line-height: 1.6;
        padding: 10px 12px;
        flex-wrap: wrap;
        gap: 6px 10px;
        margin-top: 14px;
    }

    .main #content .titP .moreInfo .source {
        width: 100%;
        padding-left: 0;
    }

    .main #content .titP .moreInfo .source span {
        display: inline-block;
        margin: 0 12px 0 0;
        font-size: 14px;
    }

    .main #content .titP .moreInfo .share {
        margin-left: 0;
    }

    .main #content .titP .moreInfo .share .sharetxt {
        font-size: 14px;
    }

    /* 分享按钮放大到 32px，便于手指点击 */
    .share-btn {
        width: 32px;
        height: 32px;
        background-size: auto 32px;
    }

    .share-btn.share-wx {
        background-position: 0 0;
    }

    .share-btn.share-wb {
        background-position: -41px 0;
    }

    /* 分享弹窗固定 420px 宽，窄屏会超出 */
    .share-modal .share-modal-box {
        width: auto;
        max-width: calc(100% - 32px);
        margin: 0 16px;
    }

    .share-modal .share-modal-hd {
        padding: 12px 14px;
        font-size: 15px;
    }

    .share-modal .share-modal-qr {
        padding: 18px 0 4px;
    }

    .share-modal .share-modal-qr img {
        width: 200px;
        height: 200px;
        max-width: 56vw;
    }

    .share-modal .share-modal-tip {
        padding: 0 14px;
        font-size: 13px;
    }

    /* 正文：字号、断词、图片与表格 */
    .conItem {
        width: 100% !important;
        box-sizing: border-box;
        font-size: 17px;
        line-height: 1.9;
        padding: 0 4px;
        word-break: break-word;
        overflow-wrap: break-word;
        text-align: left;
    }

    .conItem img {
        max-width: 100% !important;
        height: auto !important;
    }

    .conItem iframe,
    .conItem video,
    .conItem embed {
        max-width: 100% !important;
    }

    /* 宽表格在正文里横向滚动，不撑破页面 */
    .conItem table {
        display: block;
        width: 100% !important;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .conItem td,
    .conItem th {
        word-break: break-word;
    }

    .fujian {
        width: 100% !important;
        box-sizing: border-box;
        font-size: 16px;
        line-height: 1.9;
        padding: 0 4px;
    }

    .fujian a {
        word-break: break-all;
    }

    /* 面包屑与页脚 */
    .crumb p {
        font-size: 14px;
        line-height: 1.8;
        word-break: break-word;
    }

    .link .tit {
        font-size: 15px;
        line-height: 2;
        padding-top: 10px;
    }

    .link .slt {
        max-height: none;
        overflow: visible;
    }

    .footer .con .txt .fl {
        float: none;
    }

    .footer .con .txt p {
        font-size: 13px;
        line-height: 1.9;
    }

    /* 搜索页 */
    .search-page {
        padding: 18px 0 40px;
    }

    .search-page .search-page-form {
        height: 44px;
    }

    .search-page .search-page-form input[type="text"] {
        padding: 0 12px;
        font-size: 16px;
    }

    .search-page .search-page-form button {
        width: 76px;
        font-size: 16px;
        letter-spacing: 1px;
    }

    .search-page-tip {
        padding: 12px 14px;
        font-size: 14px;
        line-height: 1.7;
    }

    .search-page .search-page-list li {
        display: block;
        padding: 10px 14px;
        line-height: 1.8;
        font-size: 15px;
    }

    .search-page .search-page-list li a {
        white-space: normal;
        overflow: visible;
    }

    .search-page .search-page-list li .date {
        display: block;
        margin-top: 2px;
        font-size: 13px;
    }

    /* 横滑区域隐藏滚动条本身（滑动手势保留），避免被误认为整页可左右滚动 */
    .header .banner .nav_box .nav,
    .main .content .navBar ul {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .header .banner .nav_box .nav::-webkit-scrollbar,
    .main .content .navBar ul::-webkit-scrollbar {
        display: none;
    }
}

/* ==================== 480 以下：小屏 ==================== */
@media screen and (max-width: 480px) {
    .main {
        padding-left: 12px;
        padding-right: 12px;
    }

    .titP p {
        font-size: 19px;
    }

    .conItem {
        font-size: 16px;
    }

    .top_list > ul > li > a p {
        font-size: 12px;
    }

    .xw_box .swiper_lbt .swiper-slide a p span {
        font-size: 13px;
    }

    .share-modal .share-modal-qr img {
        width: 170px;
        height: 170px;
        max-width: 52vw;
    }
}
