@charset "utf-8";
/* ==========================================================================
   三晋生官网 · 响应式适配层
   设计原则：
   1) 本文件所有布局改动都写在 @media (max-width: ...) 内，PC（>1024px）呈现
      与原站 100% 一致，不会覆盖任何桌面样式。
   2) 仅在所有主题 CSS（style.css / site-img.css / fonts-safe-override.css）
      之后引入，用于兜底覆盖固定宽度与浮动布局。
   3) 断点：1024 平板横屏 / 768 平板竖屏·大屏手机（主断点） / 480 手机
   ========================================================================== */

/* 移动端导航组件：桌面端一律隐藏 */
.nav-toggle,
.mnav,
.mnav-mask {
    display: none;
}

/* --------------------------------------------------------------------------
   基础：仅作用于富文本正文的兜底规则（桌面端取值与原内联样式保持一致）
   把 news/detail.html 里写死的 style="float:left;margin-left:110px" 迁到类名，
   这样移动端才能覆盖它。
   -------------------------------------------------------------------------- */
.news-content {
    display: block;
    float: left;
    margin-left: 110px;
}

/* 富文本正文里的图片 / 表格：编辑器常写入固定 width/height 属性，必须 !important 兜底。
   注意：只限定正文容器（.news-content / .rich-content），
   不能用 .content .w1190 img —— 会误伤产品列表图（.container 也在 .content .w1190 下），
   导致 height:110px 失效、竖图撑高溢出错位。 */
.news-content img,
.rich-content img {
    max-width: 100% !important;
    height: auto !important;
}

.news-content table,
.rich-content table {
    width: 100% !important;
    max-width: 100%;
    height: auto;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.news-content td,
.rich-content td {
    display: block;
    width: auto !important;
    height: auto;
    box-sizing: border-box;
}

/* ==========================================================================
   断点一：<=1024px  平板横屏 / 小尺寸笔记本
   ========================================================================== */
@media screen and (max-width: 1024px) {

    .w1190,
    .col960,
    .proson2 {
        width: auto;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
        box-sizing: border-box;
    }

    /* 导航：logo + 菜单总宽超出 1024 时缩小间距 */
    #navul {
        padding-left: 20px;
    }
    #navul li {
        width: 92px;
        margin-left: 4px;
    }

    /* 首页三栏：1024 下收窄，保证 308+? 不超出容器（否则 .in3 会折行溢出） */
    .in1 {
        width: 270px;
    }
    .in2 {
        width: 380px;
    }
    .img-scroll,
    .zjk_conreb {
        width: 370px;
    }
    .img-list {
        width: 310px;
    }
    .in3 {
        width: 280px;
    }

    /* 首页产品分类条换行显示 */
    .cat_P ul li {
        float: left;
    }

    /* banner：旧 JS 按固定比例算高度，宽度变化时会露出第二张图，改为弹性布局 */
    .banner ul.images {
        position: relative !important;
        width: 200%;
        display: flex;
        left: 0 !important;
    }
    .banner ul.images li {
        flex: 0 0 50%;
        width: 50%;
    }
    .banner ul.images li img {
        width: 100%;
        height: auto;
        display: block;
    }
    .banner .images-region {
        height: auto !important;
        overflow: hidden;
    }
}

/* ==========================================================================
   断点二：<=768px  主断点（平板竖屏 / 大屏手机）
   ========================================================================== */
@media screen and (max-width: 768px) {

    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    html,
    body {
        overflow-x: hidden;
    }

    body {
        font-size: 14px;
        line-height: 1.7;
    }

    /* ---------- 顶部导航：定宽浮动 → 移动头 + 抽屉 ---------- */
    /* !important：覆盖 work.js capacityFixed() 写入的内联 position:absolute/top:0 */
    .navbg {
        position: relative !important;
        top: auto !important;
        height: auto !important;
        z-index: 6000;
    }
    .col960 {
        width: auto;
        padding: 0 12px;
        height: 56px;
        box-sizing: border-box;
    }
    .logo {
        float: left;
        padding-top: 8px;
        max-width: 60%;
    }
    .logo img {
        height: 40px;
        width: auto;
        max-width: 100%;
    }
    /* 桌面下拉大图导航在移动端隐藏，改用抽屉 */
    #navul {
        display: none !important;
    }
    .hei110,
    .posin {
        display: none;
    }
    .neibanner {
        padding-top: 0;
    }

    /* 汉堡按钮 */
    .nav-toggle {
        display: block;
        position: absolute;
        right: 12px;
        top: 50%;
        margin-top: -16px;
        width: 40px;
        height: 32px;
        padding: 0;
        border: 0;
        background: none;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }
    .nav-toggle span {
        display: block;
        height: 3px;
        margin: 6px 0;
        border-radius: 2px;
        background: #f3c36c;
        transition: transform .25s ease, opacity .2s ease;
    }
    body.mnav-open .nav-toggle span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    body.mnav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }
    body.mnav-open .nav-toggle span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    /* 抽屉菜单 */
    .mnav {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #4a2a0d;
        border-top: 1px solid rgba(243, 195, 108, .3);
        padding: 6px 0 18px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity .25s ease, transform .25s ease, visibility .25s;
        z-index: 6100;
    }
    body.mnav-open .mnav {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
    .mnav > ul > li {
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }
    .mnav a {
        display: block;
        padding: 13px 16px;
        color: #f3c36c;
        font-size: 15px;
        line-height: 1.4;
    }
    .mnav .mnav-sub {
        display: flex;
        flex-wrap: wrap;
        padding: 0 8px 10px 16px;
    }
    .mnav .mnav-sub a {
        padding: 6px 12px;
        margin: 0 8px 6px 0;
        font-size: 13px;
        color: #e8dbbf;
        background: rgba(0, 0, 0, .22);
        border-radius: 3px;
    }
    .mnav .mnav-sub a:active {
        background: rgba(243, 195, 108, .25);
    }

    /* 遮罩 */
    .mnav-mask {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: rgba(0, 0, 0, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .25s ease, visibility .25s;
        z-index: 5900;
    }
    body.mnav-open .mnav-mask {
        opacity: 1;
        visibility: visible;
    }

    /* ---------- 通用容器 ---------- */
    .w1190,
    .proson2 {
        width: auto;
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }
    .content {
        padding: 15px 0;
    }

    /* ---------- Banner / 内页头图 ---------- */
    .banner .images-region {
        width: 100% !important;
        height: auto !important;
        overflow: hidden;
    }
    .banner ul.images {
        /* !important：覆盖 index.html 内联 <style> 的 position:absolute */
        position: relative !important;
        width: 200%;
        display: flex;
        left: 0 !important;
    }
    .banner ul.images li {
        flex: 0 0 50%;
        width: 50%;
    }
    .banner ul.images li img {
        width: 100%;
        height: auto;
        display: block;
    }
    .arrow {
        padding: 0 16px;
        font-size: 46px;
    }
    .neibanner {
        height: auto;
        overflow: hidden;
    }
    .neibanner img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* ---------- 首页：产品分类 / 产品滚动 / 新闻三栏 → 纵向堆叠 ---------- */
    .incon {
        height: auto;
        padding-bottom: 24px;
        overflow: hidden;
        /* 背景图为 224px 固定高度纹理，内容增高后平铺会出现明显接缝，改为拉伸铺满 */
        background: url(../images/footbj.png) center top / 100% 100% no-repeat #5D3411;
    }
    .hei50,
    .hei50_2 {
        height: auto;
    }
    .hei50_2 img {
        max-width: 100%;
        height: auto;
    }
    .in1,
    .in2,
    .in3 {
        /* 原样式为 float+display:inline，去掉浮动后必须转 block，否则塌陷 */
        display: block;
        float: none;
        width: auto;
        max-width: 100%;
        background: none;
        padding-top: 12px;
    }
    /* 仅限定分类列表的直接子项（.in2 同时带有 .in1 类，不能用后代选择器） */
    .in1 > ul > li {
        float: left;
        width: auto;
        min-width: 50%;
        text-indent: 0;
        padding-right: 12px;
        box-sizing: border-box;
    }
    .in2 {
        padding-top: 4px;
    }
    .zjk_conre,
    .zjk_conreb,
    .img-scroll {
        width: auto;
        max-width: 100%;
        padding-left: 0;
        height: auto;
    }
    .img-scroll {
        height: auto;
        overflow: hidden;
    }
    .img-list {
        width: auto;
        max-width: 100%;
        height: auto;
        margin: 0 8px;
        overflow: hidden;
    }
    .img-list ul {
        height: auto;
        padding-top: 6px;
    }
    .img-list li,
    .zjzk_rd,
    .zjzk_rda {
        width: calc(50vw - 30px);   /* 每屏两张完整，第三张微露提示可滑动 */
        height: auto;
        margin-right: 12px;
        line-height: normal;
    }
    .zjzk_rd,
    .zjzk_rda {
        width: 100%;
    }
    .zjzk_rda img {
        width: 100%;
        height: auto;
        aspect-ratio: 190 / 110;
        object-fit: cover;
        border-width: 1px;
    }
    .in3 li {
        height: auto;
        line-height: 1.9;
        padding: 6px 0;
    }
    .in3 li:last-child {
        border-bottom: 0;
    }
    .in3 li span {
        position: static;
        display: block;
        color: #c9b892;
        font-size: 12px;
    }

    /* ---------- 产品中心 ---------- */
    .cat_P {
        position: static;
        width: auto;
        margin-bottom: 10px;
    }
    .cat_P ul {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }
    .cat_P ul li {
        flex: 0 0 auto;
        float: none;
    }
    .cat_P .leve11 {
        padding-left: 0;
        line-height: 30px;
    }
    .cat_P .leve11 a {
        padding: 4px 12px;
        white-space: nowrap;
        font-size: 13px;
    }
    .container {
        padding-top: 15px;
    }
    .container ul li {
        float: left;
        width: 50%;
        height: auto;
        padding: 0 6px 14px;
        box-sizing: border-box;
        text-align: center;
    }
    .container ul li img {
        width: 100%;
        height: auto;
        aspect-ratio: 190 / 110;
        object-fit: cover;
    }
    .container ul li div {
        font-size: 13px;
        line-height: 1.6;
    }

    /* ---------- 内页分类导航（lava lamp）横向滚动 ---------- */
    .sidbar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .sidbar .w1190 {
        padding-left: 0;
        padding-right: 0;
    }
    .lava_with_image {
        display: flex;
        flex-wrap: nowrap;
        height: auto;
        min-height: 44px;
        align-items: center;
    }
    .lava_with_image li {
        flex: 0 0 auto;
        float: none;
    }
    .lava_with_image li a {
        float: none;
        margin: 0 14px;
        font-size: 14px;
        white-space: nowrap;
    }

    /* ---------- 新闻列表 ---------- */
    .mianbao {
        font-size: 12px;
        line-height: 1.8;
        margin-bottom: 10px;
        word-break: break-all;
    }
    .newslist {
        padding: 10px 8px;
    }
    .newslist li {
        height: auto;
        line-height: 1.7;
        padding: 8px 80px 8px 8px;
        text-indent: 0;
        font-size: 13px;
        word-break: break-all;
    }
    .newslist li span {
        position: absolute;
        right: 8px;
        top: 8px;
        font-size: 12px;
        color: #999;
    }

    /* ---------- 新闻详情 ---------- */
    .newstitle {
        font-size: 18px;
        line-height: 1.5;
        padding: 10px 0;
    }
    .newstime {
        padding-bottom: 10px;
        font-size: 12px;
    }
    .news-content {
        float: none;
        margin-left: 0;
        width: auto;
        font-size: 14px;
    }
    .fanhui {
        margin: 20px auto;
    }
    .fanhui a {
        padding: 8px 0;
        background: rgba(255, 255, 255, .08);
        border-radius: 3px;
    }

    /* ---------- 单页 ---------- */
    .content .w1190 > div[style*="text-align"],
    .content .w1190 .info {
        max-width: 100%;
    }
    .gd_img #tupian td img {
        width: 100% !important;
        height: auto !important;
    }

    /* ---------- 分页 ---------- */
    .green-black {
        padding: 14px 0;
        line-height: 2.4;
        word-break: break-all;
    }
    .green-black a,
    .green-black span.current,
    .green-black span.disabled {
        display: inline-block;
        padding: 4px 9px;
        margin: 0 3px 6px;
        font-size: 13px;
    }

    /* ---------- 页脚：子项改横向标签，收紧纵向空间 ---------- */
    .foot {
        padding-top: 22px;
        padding-bottom: 16px;
    }
    .foot3,
    .foot5 {
        float: none;
        width: auto;
        display: block;
        padding-left: 0;
        margin-bottom: 14px;
        font-size: 15px;
    }
    .foot4 {
        width: auto;
    }
    .foot3 ul {
        padding-top: 8px;
        overflow: hidden;
    }
    .foot3 li {
        float: left;
        width: auto;
        margin: 0 10px 10px 0;
        font-size: 13px;
        line-height: 1;
    }
    .foot3 li a {
        display: inline-block;
        padding: 6px 12px;
        background: rgba(255, 255, 255, .08);
        border-radius: 3px;
    }
    .foot4 .Content,
    .foot4 p,
    .foot4 div {
        line-height: 1.7;
        font-size: 13px;
    }
    .foot4 br {
        line-height: 1.7;
    }
    .ewm,
    .ewm2 {
        position: static;
        margin: 10px 0;
    }
    .ewm img,
    .ewm2 img {
        max-width: 140px;
        height: auto;
    }
    .foot2 {
        line-height: 1.8;
        padding: 12px 10px;
        font-size: 12px;
    }
    .foot2 p a {
        display: inline-block;
    }

    /* ---------- fancybox 灯箱在移动端自适应 ---------- */
    #fancybox-wrap {
        max-width: 96% !important;
        left: 2% !important;
    }
    #fancybox-img {
        max-width: 100%;
        height: auto !important;
    }
}

/* ==========================================================================
   断点三：<=480px  手机
   ========================================================================== */
@media screen and (max-width: 480px) {

    body {
        font-size: 13px;
    }

    .logo img {
        height: 34px;
    }
    .col960 {
        height: 50px;
    }

    /* 首页产品滚动条：隐藏左右箭头，保留自动轮播 */
    .img-scroll .prev,
    .img-scroll .next {
        display: none;
    }

    /* 产品列表：小屏改为两列更紧凑 */
    .container ul li {
        padding: 0 4px 12px;
    }
    .container ul li img {
        aspect-ratio: 4 / 3;
    }

    .newstitle {
        font-size: 16px;
    }

    .mnav a {
        padding: 12px 14px;
        font-size: 14px;
    }

    .arrow {
        padding: 0 10px;
        font-size: 34px;
    }
}
