/* ================================================
   responsibility-erji.html 社会责任二级列表页 移动端响应式样式
   - 覆盖板块：Banner、新闻列表（多列卡片改单列）、分页
   断点：仅 @media only screen and (max-width: 767px)
   顶部导航/页脚公共部分见 css/responsive/common-responsive.css
   ================================================ */
@media only screen and (max-width: 767px) {

    /* ---------- 顶部导航汉堡按钮对齐修复 ----------
       公共 header.html 的 DOM 顺序为 logo → nav → 汉堡 → 搜索表单，
       flex space-between 下汉堡不会自动靠右，而是悬在中间偏左；
       首页（index.css）给汉堡设置了 margin-left:auto 使其靠右。
       此处复刻首页写法：margin-left:auto 把汉堡推到最右，
       右侧间距与首页完全一致。 */
    header .nav-toggle,
    .header .nav-toggle {
        margin-left: auto !important;
    }

    /* 强制导航容器 flex 两端对齐（覆盖各内页自身 header 布局差异） */
    header,
    .header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 16px !important;
        box-sizing: border-box;
    }

    /* 清除 Logo 区多余左内边距，保证左右视觉对齐 */
    header .logo-area,
    .header .logo-area {
        padding-left: 0 !important;
    }

    /* ---------- Banner（覆盖页面内联 background-size:100%） ---------- */
    .banner {
        width: 100% !important;
        height: 180px;
        background-size: cover !important;
    }
    .banner-content {
        width: 100%;
        padding: 0 16px 0 12px;
        border-left: 3px solid #fff;
        box-sizing: border-box;
    }
    .banner-title-en {
        font-size: 22px;
        letter-spacing: 1px;
        line-height: 1.2;
    }
    .banner-title-cn {
        font-size: 24px;
        line-height: 1.2;
    }

    /* ---------- 列表容器（覆盖内联 padding:20px 0 / gap:20px） ---------- */
    section.dob_list > div.dob_list {
        padding: 12px 16px 20px !important;
        gap: 16px !important;
    }

    /* ---------- 新闻卡片：左右布局改单列 ---------- */
    section.dob_list .news-item-card {
        flex-direction: column !important;
    }
    section.dob_list .news-img-box {
        flex: none !important;
        width: 100% !important;
        height: 200px !important;
    }
    section.dob_list .news-img-box img {
        max-width: 100%;
        height: 100% !important;
        object-fit: cover;
    }
    section.dob_list .news-content-box {
        flex: 1;
        padding: 16px !important; /* 覆盖内联 padding:25px 30px */
    }
    section.dob_list .news-meta {
        font-size: 12px !important;
        margin-bottom: 8px !important;
        letter-spacing: 0;
    }
    section.dob_list .news-title {
        font-size: 18px !important;
        line-height: 1.4;
        margin-bottom: 10px !important;
    }
    section.dob_list .news-desc {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
    section.dob_list .news-more {
        margin-top: 14px !important;
        font-size: 14px;
    }

    /* ---------- 分页（横向滚动保持可滑动，触控目标 >=44px） ---------- */
    .pagination-container {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px !important;
        font-size: 14px;
        margin-top: 20px;
        padding: 8px 16px 12px;
    }
    .pagination-container::-webkit-scrollbar {
        display: none;
    }
    .pagination-info {
        margin-right: 0;
        white-space: nowrap;
        flex-shrink: 0;
        font-size: 13px;
        letter-spacing: 0;
    }
    .page-box,
    .page-select-box,
    .page-input-box,
    .page-confirm-box {
        height: 44px !important;
        flex-shrink: 0;
    }
    .page-box {
        width: 44px !important;
        font-size: 16px;
    }
    .page-select-box {
        padding: 0 12px;
        font-size: 14px;
    }
    .page-input-box {
        width: 56px !important;
        font-size: 16px;
    }
    .page-confirm-box {
        padding: 0 14px;
        font-size: 14px;
        min-width: 44px;
    }
    .page-label {
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* ================================================
   追加层：社会责任二级列表页 移动端分页统一适配
   - 仅 (max-width:767px) 生效，PC 端分页 100% 原样不动
   - 与新闻列表页 news.css 分页规则完全一致（统一改造标准）：
     1. 容器 100% 宽、水平居中、padding 上下留白、border-box
     2. 统计文字「共xx条 第x/x页」缩小字号、置顶居中
     3. 按钮 flex-wrap 自动换行、小 gap，杜绝横向溢出
     4. 按钮缩小宽高/字号、圆角放大；激活页码保留主题绿色
     5. 分页区上下边距与列表/页脚拉开，底部安全边距防悬浮按钮遮挡
   ================================================ */
@media only screen and (max-width: 767px) {

    /* ---------- 1. 分页容器：自适应宽度 + 水平居中 + 换行不溢出 ---------- */
    .pagination-container {
        flex-wrap: wrap !important;              /* 按钮超宽自动换行，不产生横向滚动 */
        justify-content: center !important;      /* 水平居中 */
        overflow-x: visible !important;          /* 彻底关闭横向滚动 */
        -webkit-overflow-scrolling: auto;
        gap: 6px !important;                     /* 按钮间距适度压缩 */
        width: 100% !important;
        max-width: 100% !important;
        margin: 28px auto 36px !important;       /* 上下留白，与列表/页脚拉开距离 */
        padding: 0 16px !important;              /* 屏幕安全边距 */
        box-sizing: border-box;
        font-size: 13px !important;
    }
    .pagination-container::-webkit-scrollbar {
        display: none !important;
    }

    /* ---------- 2. 记录信息：独立一行、居中、字号缩小 ---------- */
    .pagination-info {
        flex: 0 0 100% !important;               /* 独占一行，置于按钮上方 */
        width: 100% !important;
        text-align: center !important;
        margin: 0 0 12px !important;
        white-space: nowrap;
        font-size: 13px !important;
        letter-spacing: 0 !important;
    }
    .pagination-info b {
        font-size: 13px !important;
    }

    /* ---------- 3. 分页按钮：缩小宽高/字号、圆角放大 ---------- */
    .page-box,
    .page-select-box,
    .page-input-box,
    .page-confirm-box {
        height: 38px !important;
        min-height: 38px;
        border-radius: 9px !important;           /* 圆角适度放大，适配触控 */
        box-sizing: border-box;
    }
    .page-box {
        width: 38px !important;
        min-width: 0;
        font-size: 14px !important;
    }
    .page-confirm-box {
        padding: 0 12px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }
    .page-select-box {
        padding: 0 10px !important;
        font-size: 13px !important;
    }
    .page-input-box {
        width: 46px !important;
        font-size: 14px !important;
    }
    .page-label {
        font-size: 13px !important;
        white-space: nowrap;
    }
    /* 当前激活页码：保留原有主题绿色背景 */
    .page-box.active {
        background-color: var(--primary) !important;
        color: #fff !important;
        border-color: var(--primary) !important;
    }

    /* ---------- 4. 全局防横向溢出兜底 ---------- */
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }
}