/* ==========================================================================
   三伍新闻资讯 3455.com.cn —— 移动端适配 + 页面级 SEO 样式
   纯追加式覆盖，不改原 newey.css
   断点：1199（容器流体）/ 900（固定宽度块堆叠）/ 768（手机排版）/ 380（超小屏）
   背景：原 newey.css 是 1200px 固定版式，窄屏必然出现横向滚动；
        以下按“先流体容器、再拆固定块、最后调手机排版”三层处理。
   ========================================================================== */

/* ---------- 栏目/分页页 H1（原来列表页没有 H1） ---------- */
.seo-cat-title {
    font-size: 22px;
    font-weight: bold;
    color: #04ce9b;
    line-height: 1.25;
    margin: 4px 0 16px;
    padding: 2px 0 2px 14px;
    border-left: 5px solid #04ce9b;
    font-family: "Microsoft YaHei";
}
.seo-cat-title small { font-size: 14px; color: #999; font-weight: normal; margin-left: 8px; }

/* ==========================================================================
   第 0 层：桌面端“装饰元素跑进容器外边距”的兜底
   原设计把返回顶部按钮放在 left:50% + margin-left:610px、轮播箭头放在 ±40px，
   都依赖 1200px 容器两侧的那条外边距；视口不够宽时它们会被推到屏幕外，
   既点不到、又会把整页撑出横向滚动条。阈值按几何精确推导：
     返回顶部 右边缘 = 视口/2 + 670  → 需视口 ≥ 1340
     轮播箭头 右边缘 = 视口/2 + 640  → 需视口 ≥ 1280
   ========================================================================== */
@media (max-width: 1339px) {
    .g-float {
        left: auto !important;
        right: 8px !important;
        bottom: 16px !important;
        margin-left: 0 !important;
    }
}
@media (max-width: 1279px) {
    .g-list-two > b.m-prev-page,
    .g-list-two > b.m-next-page { display: none !important; }
}

/* ==========================================================================
   第 1 层：≤1199px —— 容器流体化
   ========================================================================== */
@media (max-width: 1199px) {
    .g-box-1200 {
        width: 100% !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        box-sizing: border-box;
    }
    .g-infocont .m-main p img { max-width: 100% !important; height: auto !important; }

    /* 友情链接：原 width:1200px，窄屏必然把整页撑宽 */
    .g-linkul {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        height: auto !important;
        line-height: 2 !important;
        margin: 18px 0 0 !important;
        padding: 10px 12px 0 !important;
        border-top: 1px solid #eee;
    }
    .g-linkul span { display: block; }
    .g-linkul a { display: inline-block; padding: 0 6px !important; }
}

/* ==========================================================================
   第 2 层：≤900px —— 首页固定宽度块 → 流体单栏
   原布局：g-banner 715 + g-headnews 470 / g-le-img 330 + g-cnet 530 + g-rt-list 310
   ========================================================================== */
@media (max-width: 900px) {
    .w845, .w310 { width: 100% !important; float: none !important; }
    .w310 { margin-top: 22px; }
    .g-news-zuozhe li { padding-left: 210px !important; height: auto !important; }
    .g-news-zuozhe li i { width: 190px !important; }
    .g-news-zuozhe li i img { width: 190px !important; height: auto !important; }

    /* --- 顶部轮播 715px + 右侧头条 470px → 单栏堆叠 --- */
    .g-banner,
    .g-headnews {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        height: auto !important;
    }
    .g-banner-img { width: 100% !important; height: auto !important; float: none !important; }
    .g-banner-img li,
    .g-banner-img li img { width: 100% !important; height: auto !important; }
    .g-banner-img li p {
        width: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        height: auto !important;
        padding: 8px 12px !important;
    }
    .g-banner-img li p span {
        height: auto !important;
        line-height: 1.5 !important;
        font-size: 15px !important;
        text-align: left !important;
        margin: 0 !important;
    }
    .g-banner-img li p strong { display: none; }
    .g-banner-ico { width: 100% !important; float: none !important; margin-top: 10px !important; }
    .g-banner-ico li {
        width: 100% !important;
        float: none !important;
        height: auto !important;
        margin: 0 0 8px !important;
    }
    .g-banner-ico li a { width: auto !important; height: auto !important; padding: 10px 12px !important; }
    .g-banner-ico li a span { height: auto !important; line-height: 1.5 !important; font-size: 13px !important; }

    .g-headnews { margin-top: 18px !important; }
    .g-headnews .u-first-list h1 a {
        max-width: 100% !important;
        white-space: normal !important;
        height: auto !important;
        line-height: 1.5 !important;
        padding-right: 0 !important;
        background: none !important;
    }
    .g-headnews .u-first-list p { height: auto !important; }
    .g-headnews .g-head-click span { width: 50% !important; }
    .g-headnews .g-head-list li .u-info { width: auto !important; background-image: none !important; }
    .g-headnews ul li {
        height: auto !important;
        white-space: normal !important;
        line-height: 1.8 !important;
    }
    .g-headnews ul li i { float: none !important; }

    /* --- 三栏 330 + 530 + 310 → 单栏堆叠 --- */
    .g-le-img,
    .g-cnet,
    .g-le-box,
    .g-rt-list {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .g-cnet,
    .g-le-box,
    .g-rt-list { margin-top: 18px !important; }
    .g-le-img { height: auto !important; }
    .g-le-img li { width: 100% !important; }
    .g-le-img li i,
    .g-le-img li i img { width: 100% !important; height: auto !important; }
    .g-rt-list { height: auto !important; }

    /* 890px 图文块内的 204px 小图 → 两列自适应
       （原来 4 张横排，窄屏会被 ul 的 height+overflow 裁掉） */
    .g-le-box ul.u-first { height: auto !important; }
    .g-le-box ul.u-first li {
        float: left !important;
        width: 48% !important;
        height: auto !important;
        margin: 0 4% 12px 0 !important;
    }
    .g-le-box ul.u-first li:nth-child(2n) { margin-right: 0 !important; }
    .g-le-box ul.u-first li a img,
    .g-le-box ul.u-first li i { width: 100% !important; height: auto !important; }
    .g-le-box ul.u-first li p {
        width: auto !important;
        height: auto !important;
        left: 0 !important;
        right: 0 !important;
        padding: 6px 8px !important;
        white-space: normal !important;
        text-overflow: clip !important;
        line-height: 1.4 !important;
        font-size: 13px !important;
    }

    /* 530px 资讯块：左图 215px + 链接 240px → 自适应 */
    .g-cnet-top a { padding-left: 124px !important; height: auto !important; }
    .g-cnet-top a i,
    .g-cnet-top a i img { width: 110px !important; height: auto !important; }
    .g-cnet-top a p {
        height: auto !important;
        white-space: normal !important;
        text-overflow: clip !important;
        line-height: 1.5 !important;
    }
    .g-cnet-top a strong { margin: 6px 0 !important; }
    .g-cnet-bottom li { width: 100% !important; float: none !important; margin-top: 12px !important; }
    .g-cnet-bottom li a {
        width: calc(100% - 14px) !important;
        height: auto !important;
        white-space: normal !important;
        line-height: 1.7 !important;
    }
    .g-rt-list li { padding-left: 124px !important; height: auto !important; }
    .g-rt-list li i,
    .g-rt-list li i img { width: 110px !important; height: auto !important; }

    /* --- 首页小轮播：SuperSlide 运行时注入 .tempWrap 并写死内联宽度
           （tempWrap width:1184px、ul width:5328px + left:-1776px），
           且左右箭头定位在 -40px 已跑出可视区 → 窄屏改为纵向列表 --- */
    .g-list-two { padding: 12px !important; }
    .g-list-dome { margin-left: 0 !important; overflow: visible !important; }
    .g-list-dome > .tempWrap {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
    }
    .g-list-dome ul {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        left: 0 !important;
    }
    .g-list-dome ul li {
        float: none !important;
        display: block !important;
        width: 100% !important;
        margin: 0 0 12px !important;
    }
    .g-list-dome ul li img { width: 100% !important; height: auto !important; }
    .g-list-dome ul li p {
        width: auto !important;
        height: auto !important;
        left: 0 !important;
        right: 0 !important;
        padding: 6px 8px !important;
        white-space: normal !important;
        text-overflow: clip !important;
        line-height: 1.4 !important;
        font-size: 13px !important;
    }
    /* 箭头隐藏见第 0 层（≤1279px），此处无需重复 */

    /* 浮层客服贴边 */
    .main-im { right: 0 !important; }
}

/* ==========================================================================
   第 3 层：≤768px —— 手机排版
   ========================================================================== */
@media (max-width: 768px) {
    body { -webkit-text-size-adjust: 100%; }

    /* 顶部工具条 */
    .g-headTop { height: auto !important; line-height: 1.7; padding: 4px 0; }
    .g-headTop span.f-fl { float: none !important; display: block; }
    .g-headTop p.f-fr { float: none !important; display: block; text-align: left; }
    .g-headTop p.f-fr a { padding: 0 8px 0 0 !important; border-right: 0 !important; }

    /* 头部 logo + 搜索 */
    .g-logo-full { height: auto !important; padding: 10px 0 !important; }
    .g-logo-full .g-logobox { float: none !important; text-align: center; }
    .g-logo-full .g-logobox .u-logo { float: none !important; display: inline-block; }
    .g-logo-full .g-logobox .u-logo img { max-height: 44px; width: auto; }
    .g-logo-full .g-logobox p { display: none; }
    .g-logo-full .f-fr { float: none !important; }
    .g-search2019 { float: none !important; margin-top: 8px; }
    .g-search2019 form { display: flex; }
    .u-search-input { width: 100% !important; flex: 1 1 auto; min-width: 0; box-sizing: border-box; }
    .u-search-btn2019 { flex: 0 0 auto; }

    /* 主导航：横向滚动 */
    .g-nav-full { height: auto !important; overflow-x: auto; overflow-y: hidden;
                  -webkit-overflow-scrolling: touch; }
    .g-nav-full .g-box-1200 { padding: 0 !important; }
    .g-nav-full ul { display: flex; flex-wrap: nowrap; white-space: nowrap; overflow-x: auto; }
    .g-nav-full ul li { float: none !important; flex: 0 0 auto; }
    .g-nav-full ul li a { padding: 0 14px !important; font-size: 15px !important; line-height: 42px !important; }

    /* 面包屑 / 栏目标题 */
    .g-jknav { font-size: 13px; line-height: 1.8; }
    .seo-cat-title { font-size: 18px; margin-bottom: 12px; }

    /* 文章正文 */
    .g-infocont h1 { font-size: 20px !important; line-height: 1.5 !important; margin: 16px 0 10px !important; }
    .g-infocont .u-info { height: auto !important; padding-bottom: 12px !important; font-size: 12px; }
    .g-infocont .u-info span { padding-right: 12px !important; }
    .g-infocont .m-main { padding-top: 14px !important; font-size: 16px !important; line-height: 1.9 !important; }
    .g-infocont .m-main p { font-size: 16px !important; line-height: 1.9 !important; margin-bottom: 16px !important; }
    .g-infocont .m-main p img { max-width: 100% !important; height: auto !important; display: block; }
    .g-infocont .m-main h4 { font-size: 17px !important; }

    /* 文章列表项
       注意：原文靠 li{padding-left:273px} 给绝对定位的缩略图让位，
       这里把 padding 改小后，必须给 p / font / span 逐个补 margin-left，
       否则摘要 font 会横向压在缩略图上（原 font 选择器优先级为
       .g-newslist li a font，比 .g-newslist li font 高，必须同级覆盖）。 */
    .g-newslist li { padding: 12px 0 !important; }
    .g-newslist li a { height: auto !important; }
    .g-newslist li a i { width: 108px !important; height: 72px !important; top: 12px !important; }
    .g-newslist li a i img { width: 108px !important; height: 72px !important; object-fit: cover; }
    .g-newslist li a p {
        margin-left: 120px !important;
        height: auto !important; max-height: 44px;
        font-size: 15px !important; line-height: 1.45 !important; overflow: hidden;
    }
    .g-newslist li a font {
        margin-left: 120px !important;
        max-height: 44px !important;
        line-height: 22px !important; font-size: 13px !important;
    }
    .g-newslist li a span { margin-left: 120px !important; font-size: 12px !important; }

    /* 首页轮播 */
    .scroll, .scroll_box { width: 100% !important; height: auto !important; }
    .scroll_wrap li img { width: 100% !important; height: auto !important; }
    .g-qxzx-first { padding-left: 0 !important; }

    /* 图文混排 / 推荐块 */
    .g-jtgx ul li, .g-jptj ul li { width: 100% !important; float: none !important; margin-right: 0 !important; }
    .g-jptj ul { width: 100% !important; }
    .g-jptj ul li a img { height: auto !important; }
    .g-jtgx ul li a p.f-fl { float: none !important; width: 100% !important; height: auto !important; margin-right: 0 !important; }
    .g-jtgx ul li a p.f-fl img { width: 100% !important; height: auto !important; }
    .g-news-zuozhe li { padding: 12px 0 !important; padding-left: 124px !important; height: auto !important; }
    .g-news-zuozhe li i { width: 108px !important; }
    .g-news-zuozhe li i img { width: 108px !important; height: auto !important; }
    .g-news-zuozhe h3 { font-size: 18px !important; }

    /* 上一篇 / 下一篇 */
    .m-mainbot p { width: 100% !important; height: auto !important; float: none !important; margin-bottom: 8px !important; }
    .m-mainbot p a { width: auto !important; height: auto !important; line-height: 1.6 !important;
                     padding: 8px 12px !important; white-space: normal !important; display: block;
                     text-overflow: clip !important; }
    .m-mainbot .u-back-home { float: none !important; display: block; margin: 8px 0 !important; }

    /* 分页 */
    .m-page { text-align: center; }
    .m-page a, .m-page span { display: inline-block; margin: 3px 2px !important; }

    /* 页脚 */
    .g-footer { padding: 14px 12px !important; }
    .g-footer span { margin: 0 6px !important; }
    .g-footer-nav { height: auto !important; line-height: 1.9 !important; }

    /* 兜底：表格可横向滚动，长英文不撑破 */
    .g-infocont .m-main table { width: 100% !important; display: block; overflow-x: auto; }
    .g-infocont .m-main,
    .g-infocont .m-main p,
    .g-infocont .m-main div { word-wrap: break-word; overflow-wrap: break-word; }
    .g-infocont .m-main * { max-width: 100% !important; }
    img { max-width: 100%; height: auto; }
}

/* ==========================================================================
   第 4 层：≤380px —— 超小屏
   ========================================================================== */
@media (max-width: 380px) {
    .g-infocont h1 { font-size: 18px !important; }
    .g-newslist li a i { width: 92px !important; height: 62px !important; }
    .g-newslist li a i img { width: 92px !important; height: 62px !important; }
    .g-newslist li a p,
    .g-newslist li a font,
    .g-newslist li a span { margin-left: 102px !important; }
}
