/* ============================================================
   Modoer 移动端响应式适配 CSS
   适用于文章详情页及其他页面的移动端显示优化
   ============================================================ */

/* ---------- 全局基础适配 ---------- */
@media screen and (max-width: 768px) {

    /* 取消固定宽度，改为自适应 */
    #header, #body, #menu_hr, #footer,
    #allcontent_new, #allcontent {
        width: 100% !important;
        min-width: 0 !important;
        padding: 0 5px !important;
        box-sizing: border-box;
    }

    /* ---- 移动端隐藏 PC 端头部区域 ---- */
    #index_top3,
    #top_content_new,
    #top_content1_new,
    #bigmenu_new,
    #normalmenu_new,
    #normalmenu_rss,
    #searchcontent_new,
    #searchcontent_new2,
    #topitem,
    #mdiv,
    #mdiv2,
    .search_cache,
    #gonggao,
    #city_new {
        display: none !important;
    }

    /* Logo 保留显示 */
    #logo_new {
        float: none !important;
        text-align: center;
        margin: 5px auto !important;
    }

    /* ---------- 文章详情页适配 ---------- */

    /* 文章主体 - 左右栏改为上下排列 */
    #article_left {
        float: none !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    #article_right {
        float: none !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* 文章下方模块改为单列 */
    .article-modules {
        grid-template-columns: 1fr !important;
    }

    /* 文章标题 */
    #article_left .detail h1.subject {
        font-size: 20px !important;
        line-height: 150% !important;
        word-break: break-word;
    }

    /* 文章元信息 */
    #article_left .detail div.info {
        font-size: 12px !important;
        word-break: break-all;
    }

    /* 摘要 */
    #article_left .detail div.introduce {
        font-size: 13px !important;
        padding: 8px !important;
        margin: 10px 0 !important;
    }

    /* 文章内容 - 关键：图片自适应 */
    #article_left .detail div.content {
        font-size: 15px !important;
        line-height: 170% !important;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    #article_left .detail div.content img {
        max-width: 100% !important;
        height: auto !important;
        border: 4px solid #EDEDED !important;
        display: block;
        margin: 10px auto;
        box-sizing: border-box;
    }

    #article_left .detail div.content p,
    #article_left .detail div.content div {
        max-width: 100% !important;
        overflow-wrap: break-word;
        word-break: break-word;
    }

    /* 操作按钮区域 - 换行显示 */
    #article_left .detail div.operation {
        padding: 8px 0 !important;
    }

    #article_left .detail div.operation a.my1 {
        display: inline-block;
        margin: 3px 2px !important;
        padding: 5px 8px !important;
        font-size: 12px;
    }

    /* 面包屑导航 */
    .link_path {
        height: auto !important;
        line-height: 20px;
    }

    .link_path em {
        float: none !important;
        display: block;
        margin-bottom: 5px;
    }

    .link_path .home-ico {
        font-size: 12px;
        word-break: break-all;
    }

    /* 上下篇导航 */
    #article_left .detail + .xiantiao + div,
    div[style*="background-color:#F6F6F6"] {
        padding: 8px !important;
        font-size: 12px !important;
    }

    /* 作者信息区 */
    .mainrail .article-author .t {
        width: auto !important;
        float: none !important;
        padding-left: 60px !important;
    }

    .mainrail .article-author .t p {
        word-break: break-all;
        font-size: 12px;
    }

    /* 商家信息 */
    .subject {
        width: 100% !important;
    }

    .subject_field_list {
        width: 100% !important;
    }

    .subject_field_list td {
        font-size: 12px !important;
        padding: 3px 5px !important;
    }

    /* 地图 iframe 自适应 */
    .mainrail iframe,
    .map-iframe {
        width: 100% !important;
        height: 200px !important;
        margin-left: 0 !important;
    }

    /* 上下篇导航 - 移动端隐藏浏览/评论统计 */
    .article-nav .article-nav-stat {
        display: none;
    }

    /* 推荐图文 */
    .mainrail .article-tuwen .p {
        width: 60px !important;
    }

    .mainrail .article-tuwen .p img {
        width: 58px !important;
        height: 58px !important;
    }

    .mainrail .article-tuwen .t {
        width: auto !important;
        float: none !important;
        padding-left: 72px !important;
    }

    .mainrail .article-tuwen .t h3 {
        font-size: 13px !important;
    }

    .mainrail .article-tuwen .t p {
        font-size: 12px !important;
    }

    /* 右侧列表通用 */
    .rail-list li {
        font-size: 13px !important;
        height: auto !important;
        line-height: 22px !important;
        padding: 3px 10px !important;
    }

    /* 评论区域 */
    .comment_foo {
        margin: 0 !important;
    }

    .mainrail.rail-border-3 {
        margin-bottom: 10px !important;
    }

    /* 页脚 */
    #footer_new {
        padding: 15px 0 !important;
    }

    #footer_new p {
        font-size: 11px !important;
        line-height: 20px !important;
    }
}

/* ---------- 更小屏幕 (<=480px) 的额外优化 ---------- */
@media screen and (max-width: 480px) {

    #top_content_new .topwenzi a {
        font-size: 11px;
        margin: 0 3px;
    }

    /* 文章标题更小 */
    #article_left .detail h1.subject {
        font-size: 18px !important;
    }

    /* 文章内容字号 */
    #article_left .detail div.content {
        font-size: 14px !important;
    }

    /* 文章元信息隐藏部分次要内容 */
    #article_left .detail div.info {
        font-size: 11px !important;
    }

    /* 操作按钮更紧凑 */
    #article_left .detail div.operation a.my1 {
        padding: 4px 6px !important;
        font-size: 11px;
        margin: 2px 1px !important;
    }

    /* 上下篇更紧凑 */
    div[style*="background-color:#F6F6F6"] {
        padding: 5px !important;
    }

    div[style*="background-color:#F6F6F6"] p {
        font-size: 12px !important;
        line-height: 22px !important;
    }

    /* 作者信息区头像缩小 */
    .mainrail .article-author .p {
        width: 40px !important;
    }

    .mainrail .article-author .p img {
        width: 36px !important;
        height: 36px !important;
        margin-left: 4px !important;
        margin-right: 4px !important;
    }

    .mainrail .article-author .t {
        padding-left: 48px !important;
    }

    /* 地图高度减小 */
    .mainrail iframe {
        height: 160px !important;
    }
}

/* ---------- 图片通用自适应（所有尺寸） ---------- */
img {
    max-width: 100%;
    height: auto;
}

/* ---------- 文章上下篇导航 ---------- */
.article-nav {
    line-height: 25px;
    font-size: 13px;
    background-color: #F6F6F6;
    color: #555555;
    padding: 0 8px;
}

.article-nav .article-nav-stat {
    color: #999999;
    font-size: 12px;
}

/* ---------- 地图 iframe 通用自适应 ---------- */
.map-iframe {
    max-width: 100%;
}

/* ---------- 表格自适应 ---------- */
@media screen and (max-width: 768px) {
    .maintable,
    .subject_field_list {
        display: block;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
