/* ==========================================================================
   响应式适配
   源站为固定宽度 PC 模板(容器 1200px、卡片 225/290/380px、无任何 @media),
   本文件在其之上叠加断点规则实现 PC/平板/手机自适应,不改动原主题 CSS。
   断点:1240 / 992 / 768 / 480
   ========================================================================== */

/* ------------------------------ 基础自适应 ------------------------------ */

/* 正文与卡片内的图片不撑破容器 */
.details_divs1 img,
.details_divs3 img,
.details_divs9 img,
.CMDiv img,
.itemsMainDivSmin img,
.news_cont3 img,
.liyi_center img,
#adoutMainTopLeftImg img,
#troduce img {
    max-width: 100%;
    height: auto;
}

/* 侧栏悬浮客服在小屏下缩放,避免遮挡内容 */
#comsidebar {
    z-index: 900;
}

/* 空内容占位(无数据时不塌陷) */
.waiMRPage {
    padding: 16px 0;
    text-align: center;
    font-size: 14px;
}

.waiMRPage a {
    display: inline-block;
    padding: 4px 12px;
    margin: 0 6px;
    border: 1px solid #ddd;
    color: #666;
}

/* ------------------------------ ≤1400px:内页主区收缩 ------------------------------ */
/* 源站内页主区为固定 1400px,在 ≥1401px 视口下可完整显示,故断点设在 1400
   以保持宽屏下与源站完全一致;低于该宽度才改为流式避免横向溢出。 */

@media screen and (max-width: 1400px) {
    #waiMainRight {
        width: calc(100% - 380px) !important;
        box-sizing: border-box;
    }

    #outreach {
        width: 340px !important;
    }

    .outreachF1,
    .outreachF2 {
        width: 100% !important;
        box-sizing: border-box;
    }
}

/* ------------------------------ ≤1240px:容器流式 ------------------------------ */

@media screen and (max-width: 1240px) {
    #troduceMain,
    #serviceMain,
    #adoutMain,
    #adoutMainBottom,
    #adoutTelephone,
    #itemsMain,
    #oneMain,
    #stopMain,
    #caseMain,
    .news_cont2,
    .news_cont3_center,
    .liyi_center,
    .topMain,
    .navberMain,
    .footerTopMain,
    .footerCenterMain,
    .foorerConterMain,
    .footerBottomMain,
    .fw,
    .fw_content,
    #SEMDFK {
        width: 100% !important;
        max-width: 1200px;
        box-sizing: border-box;
        padding-left: 12px;
        padding-right: 12px;
    }

    #SEMDFK {
        padding: 0;
        height: 0 !important;
    }

    #serviceMainDiv,
    #waiMainRight {
        width: 100% !important;
        box-sizing: border-box;
    }

    #outreach {
        width: 100% !important;
        float: none !important;
        margin-top: 20px;
        box-sizing: border-box;
    }

    .SMDprocess1,
    .SMDprocess2 {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .SMDprocess1 ul,
    .SMDprocess2 ul {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* 首页新闻面板内的三个 370px 列 */
    .news_cont3_center1,
    .wars1,
    .wars2 {
        max-width: 100%;
    }
}

/* ------------------------------ ≤992px:栅格折行 ------------------------------ */

@media screen and (max-width: 992px) {
    /* 顶部:logo 与电话纵向排列 */
    .topMain {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    .logo img {
        max-width: 200px;
        height: auto;
    }

    .topTaxt {
        flex: 1 1 auto;
        min-width: 200px;
    }

    .telephone {
        flex: 1 1 100%;
        margin-top: 8px;
    }

    /* 导航允许换行 */
    .navberMain {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .navberMain .nav {
        padding: 10px 14px;
        font-size: 15px;
    }

    /* 首页四大服务承诺:两列 */
    .troduceMainDiv {
        width: 50% !important;
        margin-bottom: 16px;
    }

    /* 服务流程:每行 5 个 */
    .SMDprocess1,
    .SMDprocess2 {
        width: 100% !important;
    }

    .SMDprocess1 ul li,
    .SMDprocess2 ul li {
        width: 20% !important;
    }

    #candle {
        display: none;
    }

    /* 关于我们:图文上下 */
    #adoutMainTopLeft,
    #adoutMainTopRight {
        width: 100% !important;
        float: none !important;
    }

    #adoutMainTopLeft {
        margin-bottom: 16px;
        text-align: center;
    }

    #adoutMainTopRightP,
    #adoutMainTopRight .adoutMainTopRightP {
        height: auto !important;
    }

    /* 六宫格荣誉:每行 3 个 */
    .AMDDiv {
        width: 33.33% !important;
    }

    /* 服务项目:每行 2 个 */
    .itemsMainDiv a,
    .itemsMainDivSmin {
        width: 50% !important;
        box-sizing: border-box;
        margin-bottom: 16px;
    }

    /* 一条龙套餐:flex 行换行,每行 2 个 */
    .oneMainDiv {
        flex-wrap: wrap;
    }

    .oneMainDivZym {
        flex: 0 1 48% !important;
        box-sizing: border-box;
        margin: 0 1% 20px;
    }

    /* 服务案例:每行 2 个 */
    .caseMainDiv .CMDiv {
        width: 48% !important;
        margin: 0 1% 20px;
        box-sizing: border-box;
    }

    /* 新闻面板:三列改上下堆叠 */
    .news_cont3_center1,
    .news_cont3_center2,
    .news_cont3_center3,
    .wars1,
    .wars2,
    .news_cont3_center .wars1,
    .news_cont3_center .wars2 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 16px;
    }

    /* 殡葬礼仪列表:单列 */
    .liyi_center ul li {
        width: 100% !important;
    }

    /* 页脚:四宫格两列,栏目两列 */
    .foorerCenterMainDiv {
        width: 50% !important;
    }

    .FCMContact,
    .FCMPackage,
    .FCMFengx {
        width: 50% !important;
        box-sizing: border-box;
        margin-bottom: 16px;
    }

    /* 内页:左侧栏目导航与正文上下排列 */
    #wai {
        display: block;
    }

    .waiMRNav {
        width: 100% !important;
        float: none !important;
    }

    .waiMRNav .aaa {
        width: 100% !important;
    }

    .waiMRNav .aaa ul {
        display: flex;
        flex-wrap: wrap;
    }

    .waiMRNav .aaa ul li {
        width: 33.33% !important;
        box-sizing: border-box;
        text-align: center;
    }

    .waiMRNew {
        width: 100% !important;
        float: none !important;
    }

    /* 右侧栏(文章分类/热门文章)移到内容下方 */
    #outreach,
    .outreachF1,
    .outreachF2 {
        width: 100% !important;
        float: none !important;
        box-sizing: border-box;
    }
}

/* ------------------------------ ≤768px:手机单列 ------------------------------ */

@media screen and (max-width: 768px) {
    /* 移动端禁止页面级横向滚动(导航内部自带横向滚动) */
    body {
        overflow-x: hidden;
    }

    .topMain {
        padding: 8px 0;
    }

    .topTaxt {
        font-size: 13px;
    }

    .telephone {
        font-size: 13px;
    }

    .telephone img {
        max-width: 42px;
        height: auto;
    }

    /* 导航:横向滚动,避免挤压换行 */
    .navber {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navberMain {
        flex-wrap: nowrap;
        justify-content: flex-start;
        white-space: nowrap;
    }

    .navberMain .nav {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* 内页横幅高度自适应 */
    #nybanner,
    #nybanner img {
        min-height: 0 !important;
        height: auto !important;
    }

    /* 轮播图:移动端统一固定高度,避免图片比例不同导致高度跳变 */
    .war,
    .war .imglist li,
    .war .imglist li img {
        height: 200px !important;
    }

    .war .imglist li img {
        object-fit: cover;
    }

    /* 五心服务卡片:适应窄屏 */
    .wx-grid {
        gap: 12px;
    }

    .wx-card {
        width: calc((100% - 24px) / 3);
        min-width: 96px;
        padding: 14px 6px 12px;
    }

    .wx-icon {
        width: 52px;
        height: 52px;
        margin-bottom: 8px;
    }

    .wx-name {
        font-size: 15px;
    }

    .wx-desc {
        font-size: 11px;
    }

    /* 轮播信息卡:移动端缩小,避开左右箭头 */
    .banner-title {
        right: 56px;
        padding: 12px 14px;
        border-radius: 8px;
    }

    .banner-title-brand {
        font-size: 21px;
        letter-spacing: 3px;
    }

    .banner-title-sub {
        margin-top: 8px;
        font-size: 11px;
        line-height: 1.6;
        max-width: 170px;
    }

    /* 全部栅格单列 */
    .troduceMainDiv,
    .itemsMainDiv a,
    .itemsMainDivSmin,
    .oneMainDivZym,
    .caseMainDiv .CMDiv,
    .foorerCenterMainDiv,
    .FCMContact,
    .FCMPackage,
    .FCMFengx {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        flex: 0 1 100% !important;
    }

    .AMDDiv {
        width: 50% !important;
    }

    .SMDprocess1 ul li,
    .SMDprocess2 ul li {
        width: 33.33% !important;
        margin-bottom: 12px;
    }

    .SMDprocess1 ul li img,
    .SMDprocess2 ul li img {
        max-width: 100%;
        height: auto;
    }

    /* 新闻选项卡:两列,去浮动(装饰图标为源模板绝对定位,手机端隐藏) */
    .news_cont2 ul li {
        float: none !important;
        width: 50% !important;
        text-align: center;
        padding: 6px 0;
    }

    .news_cont2 ul li img {
        display: none !important;
    }

    /* 新闻面板:去浮动、图片自适应 */
    .news_cont3_center1,
    .news_cont3_center2,
    .news_cont3_center3,
    .wars2 {
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .news_divs1,
    .news_cont3_center2_divs1 {
        max-width: 100% !important;
    }

    .news_divs1 img,
    .news_cont3_center2_divs1 img {
        max-width: 100% !important;
        height: auto !important;
    }

    #adoutMainTopLeftK {
        display: none !important;
    }

    .stopMainRight {
        float: none !important;
        margin-right: 0 !important;
    }

    /* 模板残留的固定宽度子块全部流式化 */
    .news_cont1,
    .news_cont1_divs2,
    .news_cont2 ul,
    #adoutMainTopLeftImg,
    #adoutMainTopLeftK,
    #adoutTelephoneMain,
    .SMLDiv,
    .SMLDivText,
    .stopMainRight,
    .caseMainTete,
    .caseMainTeteH1,
    .waiMRNewMain,
    .waiMRList,
    .waiMRPage,
    .weizhi,
    .details_divs1,
    .details_divs2,
    .details_divs3,
    .details_divs4,
    .details_divs5,
    .details_divs6,
    .details_divs7,
    .details_divs8,
    .details_divs9 {
        width: 100% !important;
        max-width: 100%;
    }

    .details_divs3,
    .details_divs9 {
        overflow-wrap: break-word;
    }

    .news_cont2 ul li img,
    .news_cont1 img,
    .caseMainTete img {
        max-width: 100%;
    }

    /* 正文排版 */
    .details_divs1 {
        font-size: 18px !important;
        line-height: 1.5;
    }

    .details_divs3,
    .details_divs9 {
        font-size: 15px !important;
        line-height: 1.8;
        word-break: break-word;
    }

    .details_divs3 table,
    .details_divs9 table,
    .details_divs3 iframe,
    .details_divs9 iframe {
        max-width: 100%;
    }

    /* 面包屑与左导航 */
    .weizhi {
        font-size: 13px;
        word-break: break-all;
    }

    .waiMRNav .aaa ul li {
        width: 50% !important;
    }

    /* 悬浮客服:手机端隐藏(电话/微信入口保留在页脚,避免遮挡正文) */
    #comsidebar {
        display: none !important;
    }
}

/* ------------------------------ ≤480px:小屏微调 ------------------------------ */

@media screen and (max-width: 480px) {
    .logo img {
        max-width: 150px;
    }

    .topTaxt {
        font-size: 12px;
    }

    /* 轮播信息卡:超小屏进一步压缩 */
    .banner-title {
        right: 53px;
        padding: 10px 12px;
        border-radius: 8px;
    }

    .banner-title-brand {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .banner-title-sub {
        margin-top: 6px;
        font-size: 10px;
        line-height: 1.6;
        max-width: 138px;
    }

    .telephone_divs1,
    .telephone_divs2,
    .telephone_divs3,
    .telephone_divs4 {
        display: none;
    }

    .SMDprocess1 ul li,
    .SMDprocess2 ul li {
        width: 50% !important;
    }

    .news_cont2 ul li {
        width: 100% !important;
    }

    .details_divs1 {
        font-size: 16px !important;
    }

    #comsidebar {
        display: none;
    }
}

/* ==========================================================================
   服务项目栏目页(fw 版式)响应式
   源站: .fw{min-width:1200px} + 左 200px 分类 / 右 960px 产品网格(每行 3 个 288px)
   ========================================================================== */

@media screen and (max-width: 1240px) {
    .fw {
        min-width: 0 !important;
        width: 100% !important;
    }

    .fw_content {
        width: 100% !important;
        max-width: 1200px;
        box-sizing: border-box;
        padding: 0 12px;
    }
}

@media screen and (max-width: 992px) {
    .fw_content_left,
    .fw_content_right {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        box-sizing: border-box;
    }

    .fw_content_right1,
    .fw_content_right2 {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* 左栏原为固定 520px 高,窄屏改自适应 */
    .fw_content_left2 {
        height: auto !important;
        padding: 20px 0;
    }

    .fw_content_left2 ul li {
        height: auto !important;
        line-height: 2.2;
        text-indent: 0;
        padding: 0 16px;
    }
}

@media screen and (max-width: 768px) {
    .fw_content_right2 ul li {
        width: 48% !important;
        margin-right: 2% !important;
        height: auto !important;
    }

    .fw_content_right2 ul li:nth-child(3n) {
        margin-right: 2% !important;
    }

    .fw_content_right2 ul li:nth-child(2n) {
        margin-right: 0 !important;
    }

    .fw_divs1 {
        height: auto !important;
    }

    .fw_content_right1 {
        height: auto !important;
        text-indent: 0 !important;
        padding: 10px 0;
        line-height: 1.8;
    }
}

@media screen and (max-width: 480px) {
    .fw_content_right2 ul li {
        width: 100% !important;
        margin-right: 0 !important;
    }

    .fw_content_right2 ul li:nth-child(2n) {
        margin-right: 0 !important;
    }
}

/* ==========================================================================
   大云堂移动端修复(2026-09-22):汉堡菜单 + 板块防挤压
   追加在文件末尾统一覆盖,仅作用于小屏;桌面 ≥993px 布局不受影响。
   ========================================================================== */

/* ---- 汉堡按钮:桌面隐藏,手机显示 ---- */
.navbar-toggle {
    display: none;
}

/* ---- 导航栏内的缩小 logo:桌面隐藏,手机显示 ---- */
.navbar-logo {
    display: none;
}

/* ---- 平板(≤992px):顶部取消固定高度,避免标语/电话溢出压住下方 ---- */
@media screen and (max-width: 992px) {
    .top {
        height: auto !important;
        padding-bottom: 8px;
    }

    .telephone {
        float: none !important;
        position: static !important;
        top: auto !important;
        width: 100% !important;
        margin-top: 8px;
        padding-left: 12px;
    }

    .telephone img {
        display: none;
    }

    .telephoneDiv {
        float: none !important;
        font-size: 16px;
    }

    .telephoneDiv span {
        font-size: 20px;
    }

    .telephone_divs1,
    .telephone_divs2,
    .telephone_divs3,
    .telephone_divs4 {
        display: none !important;
    }
}

/* ---- 平板(769-992px):导航换行后条高自适应 ---- */
@media screen and (min-width: 769px) and (max-width: 992px) {
    .navber {
        height: auto !important;
    }

    .navberMain {
        height: auto !important;
    }

    .navberMain a .nav,
    .navberMain .nav {
        height: auto !important;
        line-height: 44px;
        white-space: nowrap;
    }
}

/* ---- 手机(≤768px):汉堡菜单 + 板块竖排适配 ---- */
@media screen and (max-width: 768px) {
    /* 顶部:logo 缩小,标语/电话各占一行,不再压住导航 */
    .top {
        height: auto !important;
        padding-bottom: 10px;
    }

    .logo,
    .logo img {
        height: auto !important;
    }

    .logo img {
        max-height: 88px;
    }

    .topTaxt {
        width: 100% !important;
        padding-left: 12px;
        padding-top: 6px;
        font-size: 13px;
        line-height: 1.6;
    }

    .topTaxt1 {
        margin-top: 2px;
    }

    .telephone {
        float: none !important;
        position: static !important;
        top: auto !important;
        width: 100% !important;
        margin-top: 8px;
        padding-left: 12px;
    }

    .telephone img {
        display: none;
    }

    .telephoneDiv {
        float: none !important;
        font-size: 16px;
    }

    .telephoneDiv span {
        font-size: 20px;
    }

    /* 导航条:去掉横向滚动,改为汉堡按钮 + 下拉面板;logo 缩放入左侧 */
    .topMain > .logo {
        display: none !important;
    }

    .navber {
        position: relative;
        height: 48px;
        overflow-x: visible !important;
        display: flex;
        align-items: center;
    }

    .navbar-logo {
        display: flex !important;
        align-items: center;
        height: 48px;
        padding-left: 14px;
    }

    .navbar-logo img {
        height: 38px;
        width: auto;
        display: block;
    }

    .navbar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        position: absolute;
        top: 0;
        right: 0;
        width: 48px;
        height: 48px;
        background: transparent;
        border: 0;
        cursor: pointer;
        z-index: 1100;
    }

    .navbar-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #fff;
        margin: 3px 0;
    }

    .navberMain {
        display: none !important;
        position: absolute !important;
        top: 48px;
        left: 0;
        right: 0;
        width: 100% !important;
        height: auto !important;
        background: #223244;
        z-index: 1000;
        box-shadow: 0 8px 16px rgba(0, 0, 0, .35);
    }

    .navberMain.open {
        display: block !important;
    }

    .navberMain a {
        display: block;
    }

    .navberMain .nav {
        width: 100% !important;
        float: none !important;
        height: auto !important;
        padding: 0 !important;
        text-align: center;
        line-height: 46px;
        border-top: 1px solid #33465c;
    }

    /* 首页"关于我们":图文竖排、固定高度改自适应,荣誉宫格折行 2 列 */
    #adoutMainTop,
    #adoutMainTopLeft,
    #adoutMainTopRight {
        height: auto !important;
    }

    #adoutMainTopRight {
        margin-left: 0 !important;
    }

    #adoutMainBottom {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px 24px;
        height: auto !important;
        margin-top: 24px;
    }

    #adoutMainBottom .AMDDiv {
        width: calc(50% - 12px) !important;
        float: none !important;
    }

    #adoutMainBottom .AMDDiv img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain;
    }

    #adoutTelephoneMain {
        width: 100% !important;
        padding: 0 12px;
    }

    #adoutTelephoneMainImg {
        display: none;
    }

    #adoutTelephoneMainText {
        float: none !important;
        margin: 6px 0 0 !important;
        white-space: normal !important;
        font-size: 18px;
        text-align: center;
        line-height: 1.6;
    }

    /* 通栏专页(民俗文化馆等):正文不再右偏 */
    #waiMainRight.hallPage {
        width: auto !important;
        margin: 20px 12px !important;
    }

    /* 内页:正文列右裁修复,相关文章/列表项不再 710px 溢出 */
    .waiMRNew {
        width: calc(100% - 24px) !important;
        margin-left: 12px !important;
    }

    .waiMRNewMain,
    .waiMRNewMain ul,
    .waiMRNewMain ul li,
    .details_divs7,
    .details_divs7 ul,
    .details_divs7 ul li,
    .details_divs3 ul,
    .details_divs3 ul li {
        width: 100% !important;
        box-sizing: border-box;
    }

    .details_divs7 {
        height: auto !important;
    }

    /* 页脚四宫格承诺条:与容器同宽,不再右侧溢出 */
    .foorerCenterMainDiv {
        width: 100% !important;
        box-sizing: border-box;
        padding-left: 12px !important;
    }

    /* 首页装饰角标(按 1200px 定位,小屏隐藏避免撑宽页面) */
    .captionDiva,
    .caption1 .juxing_img1 {
        display: none !important;
    }
}

/* ---- 平板 769-992px:内页/通栏专页与手机同规则,避免右侧溢出 ---- */
@media screen and (min-width: 769px) and (max-width: 992px) {
    #waiMainRight.hallPage {
        width: auto !important;
        margin: 20px 12px !important;
    }

    .waiMRNew {
        width: calc(100% - 24px) !important;
        margin-left: 12px !important;
    }

    .waiMRNewMain,
    .waiMRNewMain ul,
    .waiMRNewMain ul li,
    .details_divs7,
    .details_divs7 ul,
    .details_divs7 ul li,
    .details_divs3 ul,
    .details_divs3 ul li {
        width: 100% !important;
        box-sizing: border-box;
    }

    .details_divs7 {
        height: auto !important;
    }
}
