/* ==========================================================================
   移动端适配补丁 (<=600px)
   --------------------------------------------------------------------------
   唯一源文件在 _tools/mobile.css, 由 build.py / en_build.py 复制到站点 css/
   并注入页面 <head>. 发布目录里的副本是生成物, 重建会被覆盖 —— 要改请改源文件.

   PC 端完全不受影响: 所有规则都包在 max-width:600px 内.
   ========================================================================== */
@media only screen and (max-width: 600px) {

    /* ---------- 首页「安绣作品」(ul.picList) ----------
       原实现是 bxSlider 垂直轮播: 一屏只露 2 条, 缩略图被压到 91px 宽,
       右侧 139px 全是空白, 底下还挂两个 110x40 的灰色箭头按钮.

       手机上改成两列卡片: 图片铺满列宽、标题移到图片下方, 4 件作品一屏看完.
       配套: 构建时已把首页脚本改成移动端不初始化这个 bxSlider ——
       JS 会给 ul 加 transform、给 li 加 inline width, 纯 CSS 盖不住. */
    /* overflow:hidden 而非 visible —— li 是浮动的, 不给 ul 建 BFC 高度会塌成 0,
       下方「安绣集团」版块会往上叠 */
    .picList{ height: auto !important; overflow: hidden !important; }
    .picList > li{
        float: left !important; width: 50% !important; clear: none !important;
        height: auto !important; margin: 0 !important;
        padding: 0 4px 12px; box-sizing: border-box;
    }
    .picList > li > div{ width: 100% !important; float: none; }
    .picList > li img{
        width: 100% !important; height: 150px; object-fit: contain;
        max-height: none !important; display: block; margin: 0;
        background: rgba(71, 201, 175, 0.12);
    }
    .picList > li h3{
        font-size: 13px; line-height: 1.4;
        padding: 6px 0 0 !important; text-align: center;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    /* 描述文字(中文站为空, 英文站有)最多 2 行 ——
       卡片高度必须一致, 否则两列浮动会被较高的卡片卡住而错位 */
    .picList > li > div > a > div{
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
        overflow: hidden; font-size: 12px; line-height: 1.5; max-height: 3em;
        padding: 4px 2px 0 !important;
    }
    /* 上下翻页箭头是 ul.picList 的后续兄弟节点; 两列已一屏展示完, 不需要了 */
    .picList ~ div .next, .picList ~ div .prev{ display: none !important; }

    /* ---------- 首页「安绣集团」(indextab) ----------
       .bx-wrapper 在 PC 写死 height:200px, 手机上文字一多就被裁掉半截 */
    .indextab .bx-wrapper{ height: auto !important; min-height: 200px; }
    .indextab .bxslider li a{ font-size: 13px; line-height: 1.7; padding: 0 4px; }

    /* ---------- 新闻列表: 长标题走省略号, 不要硬截断 ---------- */
    .news ul li{ display: flex; align-items: baseline; }
    .news ul li span{ flex: none; margin-right: 6px; }
    .news ul li a{
        flex: 1 1 auto; min-width: 0; display: block;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
}
