@charset "utf-8";

/* ==========================================================================
   1) ≤ 1240px —— 版心流式化 + 两栏等比
   ========================================================================== */
@media screen and (max-width: 1240px) {

    html { -webkit-text-size-adjust: 100%; }
    body { min-width: 0; }                                     /* 解除 default.css 的 1200px 锁定 */

    /* 版心：固定宽 → 流式（左右各 16px 安全边距） */
    .ni-wrap { width: auto; margin-left: 16px; margin-right: 16px; }

    /* 两栏：等分，中间保留 22px 间距 */
    .ni-col { width: calc(50% - 11px); }

    /* 列表标题：窄屏溢出用省略号截断，给右侧日期留出空间 */
    .ni-list li a {
        display: inline-block; vertical-align: top;
        max-width: calc(100% - 92px);
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }

    /* 清廉校园卡片跟随 li 实际宽度（SuperSlide 会写 inline width，这里避免与 a/img 的定宽冲突） */
    .ni-qlxy .bd li a.ni-qlxyItem,
    .ni-qlxy .bd li img { width: 100%; }

    /* 图片与装饰图不撑破容器 */
    .ni-header img, .ni-wrap img, #footer.ni-footer img { max-width: 100%; }
}


/* ==========================================================================
   2) ≤ 1024px —— 导航横滑 + 轮播降高
   ========================================================================== */
@media screen and (max-width: 1024px) {

    /* ---------- 导航：由 space-between 铺满改为横向滑动条 ---------- */
    .ni-nav { height: 48px; overflow: hidden; }
    .ni-navList {
        display: block; height: 48px; margin: 0; padding: 0 6px;
        white-space: nowrap; overflow-x: auto; overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .ni-navList::-webkit-scrollbar { width: 0; height: 0; display: none; }   /* 隐藏横滑滚动条 */
    .ni-navList > li { display: inline-block; float: none; vertical-align: top; }
    .ni-navList > li > a { display: block; height: 48px; line-height: 48px; padding: 0 14px; font-size: 15px; }
    /* 触屏下 hover 不可靠 → 收起二级下拉，点击一级栏目直接进入栏目页 */
    .ni-navList .ni-sub { display: none !important; }

    /* ---------- 主体轮播：宽度变窄，高度等比收缩 ---------- */
    .ni-focus { height: 320px; }
    .ni-focus .bd, .ni-focus .bd ul, .ni-focus .bd li, .ni-focus .bd li .pic { height: 320px; }
    .ni-focus .bd li img { height: 320px; }
    .ni-focus .bd li .ni-focusCon { height: 124px; }
    .ni-focus .ni-focusTag { left: 26px; bottom: 66px; font-size: 14px; }
    .ni-focus .ni-focusCon h3 { left: 26px; right: 130px; bottom: 34px; }
    .ni-focus .ni-focusCon h3 a { font-size: 21px; }
    .ni-focus .hd { right: 26px; bottom: 26px; }
    .ni-focus .ni-arrow { width: 40px; height: 40px; line-height: 38px; font-size: 19px; margin-top: -20px; }
    .ni-focus .ni-prev { left: 14px; }
    .ni-focus .ni-next { right: 14px; }

    /* ---------- 卡片：内边距收紧 ---------- */
    .ni-box { padding: 16px 20px 18px; }
    .ni-boxHd { height: 42px; line-height: 42px; margin-bottom: 10px; }

    /* ---------- 清廉校园：2 列（由 JS 传入 vis=2），间距随之收窄 ---------- */
    .ni-qlxy .bd li { margin-right: 20px; }
    .ni-qlxy .ni-qlxyArrow { width: 26px; height: 40px; line-height: 40px; }
}


/* ==========================================================================
   3) ≤ 900px —— 两栏 → 单栏堆叠
   ========================================================================== */
@media screen and (max-width: 900px) {

    .ni-cols { overflow: visible; }
    .ni-col, .ni-col.ni-colRight { float: none; width: 100%; }

    /* 轮播再降一档 */
    .ni-focus { height: 280px; }
    .ni-focus .bd, .ni-focus .bd ul, .ni-focus .bd li, .ni-focus .bd li .pic { height: 280px; }
    .ni-focus .bd li img { height: 280px; }
    .ni-focus .bd li .ni-focusCon { height: 110px; }
    .ni-focus .ni-focusTag { bottom: 58px; }
    .ni-focus .ni-focusCon h3 { bottom: 30px; }
    .ni-focus .ni-focusCon h3 a { font-size: 19px; }
}


/* ==========================================================================
   4) ≤ 640px —— 手机端
   ========================================================================== */
@media screen and (max-width: 640px) {

    .ni-wrap { margin-left: 10px; margin-right: 10px; }

    /* ---------- 头部 ---------- */
    .ni-banner, .ni-bannerInner { height: 64px; }
    .ni-banner .ni-decor { height: 64px; opacity: .55; }
    .ni-banner .ni-logo { top: 15px; }
    .ni-banner .ni-logo img { height: 34px; }

    /* ---------- 导航 ---------- */
    .ni-nav { height: 44px; }
    .ni-navList { height: 44px; padding: 0 4px; }
    .ni-navList > li > a { height: 44px; line-height: 44px; padding: 0 12px; font-size: 15px; letter-spacing: 0; }

    /* ---------- 轮播 ---------- */
    .ni-focus { height: 200px; margin-top: 10px; margin-bottom: 10px; border-radius: 4px; }
    .ni-focus .bd, .ni-focus .bd ul, .ni-focus .bd li, .ni-focus .bd li .pic { height: 200px; }
    .ni-focus .bd li img { height: 200px; }
    .ni-focus .bd li .ni-focusCon { height: 92px; }
    .ni-focus .ni-focusTag { left: 12px; bottom: 48px; padding-left: 8px; font-size: 12px; line-height: 15px; }
    .ni-focus .ni-focusTag:before { width: 2px; height: 11px; top: 2px; }
    .ni-focus .ni-focusCon h3 { left: 12px; right: 16px; bottom: 20px; }
    /* 标题限一行：26 字标题在窄屏折行会压到左下的「焦点新闻」标签 */
    .ni-focus .ni-focusCon h3 a {
        display: block; font-size: 16px; letter-spacing: 0; line-height: 1.4;
        overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    }
    .ni-focus .ni-arrow { display: none; }                        /* 真机为触屏，SuperSlide 自带触摸拖拽 */
    .ni-focus .hd { right: 12px; bottom: 12px; }
    .ni-focus .hd li { width: 16px; height: 3px; margin-left: 6px; border-radius: 2px; }
    .ni-focus .hd li.on { width: 22px; }

    /* ---------- 卡片 ---------- */
    .ni-box { padding: 12px 14px; margin-bottom: 10px; border-radius: 6px; }
    .ni-boxHd { height: 36px; line-height: 36px; margin-bottom: 6px; }
    .ni-boxHd .ni-boxTit { font-size: 17px; padding-left: 9px; }
    .ni-boxHd .ni-boxTit:before { width: 3px; height: 16px; top: 10px; }
    .ni-boxHd .ni-more { font-size: 12px; }

    /* ---------- 列表 ---------- */
    .ni-list li { height: 46px; line-height: 46px; padding: 0 6px 0 18px; }
    .ni-list li:before { left: 1px; top: 20px; width: 6px; height: 6px; }
    .ni-list li a { font-size: 15px; max-width: calc(100% - 86px); }
    .ni-list li .ni-time { right: 6px; font-size: 12px; }

    /* ---------- 信访举报 ---------- */
    .ni-xfjbBtn { height: 42px; line-height: 42px; font-size: 15px; margin-bottom: 12px; }
    .ni-xfjbInfo p { font-size: 13px; line-height: 24px; }
    .ni-xfjbInfo p .ni-label { display: inline-block; min-width: 58px; margin-right: 6px; }

    /* ---------- 清廉校园（1 列，由 JS 传入 vis=1） ---------- */
    .ni-qlxy { padding: 4px 0 2px; }
    .ni-qlxy .bd li { margin-right: 10px; }
    .ni-qlxy .bd li a.ni-qlxyItem { height: 168px; border-radius: 6px; }
    .ni-qlxy .bd li img { height: 168px; }
    .ni-qlxy .bd li a.ni-qlxyItem:before { left: 16px; top: 16px; width: 28px; height: 32px; }
    .ni-qlxy .bd li:nth-child(3n+2) a.ni-qlxyItem:before,
    .ni-qlxy .bd li:nth-child(3n+3) a.ni-qlxyItem:before { width: 30px; height: 26px; top: 19px; }
    .ni-qlxy .bd li span { left: 16px; right: 16px; bottom: 14px; font-size: 15px; }
    .ni-qlxy .ni-qlxyArrow { display: none !important; }

    /* ---------- 友情链接 + 站内搜索：改三行堆叠 ---------- */
    .ni-bottom { padding-top: 12px; padding-bottom: 14px; }
    .ni-linksRow { flex-wrap: wrap; }
    .ni-linksLabel { flex: 0 0 100%; margin: 0 0 8px; font-size: 14px; }
    .ni-linksList { flex: 1 1 100%; }
    .ni-linksList li { margin: 0 8px 8px 0; }
    .ni-linksList li a { height: 30px; line-height: 30px; padding: 0 13px; font-size: 13px; border-radius: 15px; }
    .ni-search { flex: 0 0 100%; width: 100%; margin: 2px 0 0; overflow: hidden; }   /* overflow 形成 BFC，包住内部 float */
    .ni-search input.ni-keyword { width: calc(100% - 64px); height: 38px; line-height: 38px; padding: 0 14px; font-size: 13px; }
    .ni-search input.ni-btn { width: 64px; height: 38px; font-size: 14px; letter-spacing: 1px; }

    /* ---------- 页脚 ---------- */
    #footer.ni-footer .ni-footerIn { padding: 14px 12px 12px; }
    #footer.ni-footer .ni-footerLine { width: 44px; height: 2px; margin-bottom: 10px; }
    #footer.ni-footer p { font-size: 12px; line-height: 20px; }

    /* ---------- 返回顶部 ---------- */
    #niGoTop { right: 10px; bottom: 56px; width: 38px; height: 38px; line-height: 38px; font-size: 12px; border-radius: 5px; }
}


/* ==========================================================================
   5) ≤ 380px —— 超小屏微调
   ========================================================================== */
@media screen and (max-width: 380px) {

    .ni-navList > li > a { padding: 0 10px; font-size: 14px; }
    .ni-focus { height: 176px; }
    .ni-focus .bd, .ni-focus .bd ul, .ni-focus .bd li, .ni-focus .bd li .pic { height: 176px; }
    .ni-focus .bd li img { height: 176px; }
    .ni-focus .ni-focusCon h3 a { font-size: 15px; }
    .ni-list li a { font-size: 14px; max-width: calc(100% - 78px); }
    .ni-list li .ni-time { font-size: 11px; }
    .ni-xfjbInfo p { font-size: 12px; }
    .ni-qlxy .bd li a.ni-qlxyItem { height: 150px; }
    .ni-qlxy .bd li img { height: 150px; }
    #footer.ni-footer p { font-size: 11px; }
}
