/* ============================================================
   pagination.css —— 公共组件：分页器 样式
   ------------------------------------------------------------
   对应公共组件 HTML 片段：components/pagination.html
   需要分页的列表页（产品 / 新闻 / 项目等）引入本文件即可，
   无需重复复制样式；页面中只需放组件标记。
   选中：#EA5404 实心圆白字；未选中：白底 #D9D9D9 描边 #333 字
   页码补零 1 → 01（::before 实现，不动结构）
   ============================================================ */

/* ---------- 分页器 ---------- */
.second__pagination {
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.16rem;
}

/* 对应目标站 <span class='pages'>：保留结构，页面中隐藏不占位 */
.second__pagination > span:first-child {
    display: none;
}

.second__pagination a,
.second__pagination [data-page] {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: 1px solid #D9D9D9;
    border-radius: 50%;
    background: #FFF;
    color: #333;
    font-family: Montserrat, sans-serif;
    font-size: 0.16rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
}

/* 页码补零（纯 CSS，不动 HTML） */
.second__pagination [data-page]::before {
    content: "0";
}

/* 当前页：橙色实心圆 + 白字 */
.second__pagination [data-page][aria-current] {
    background: #EA5404;
    border-color: #EA5404;
    color: #FFF;
}

/* 悬浮：未选中项描边与文字变橙 */
.second__pagination a:hover,
.second__pagination [data-page]:not([aria-current]):hover {
    background: #FFF;
    border-color: #EA5404;
    color: #EA5404;
}

/* 前/后箭头：沿用 ‹ › 字符，稍大居中 */
.second__pagination a[rel="prev"],
.second__pagination a[rel="next"] {
    font-size: 0.2rem;
    line-height: 1;
}

.second__pagination [aria-disabled="true"] {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ============================================================
   wp-pagenavi 结构（目标站同步结构）
   <div class="second__pagination"><div class="wp-pagenavi">
     <span class="pages">第 1 页，共 3 页</span>
     <span class="current">1</span>
     <a class="page larger">2</a>…
     <a class="nextpostslink">»</a>
   </div></div>
   ============================================================ */

/* 内层容器：居中排布，页码间留 12px */
.second__pagination .wp-pagenavi {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.16rem; /* 12px */
}

/* 对应目标站 <span class='pages'>：保留结构，页面中隐藏不占位 */
.second__pagination .pages {
    display: none;
}

/* 页码按钮（.current / .page larger / .nextpostslink）与旧结构按钮样式一致 */
.second__pagination .wp-pagenavi a,
.second__pagination .wp-pagenavi .current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0.5rem;
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: 1px solid #D9D9D9;
    border-radius: 50%;
    background: #FFF;
    color: #333;
    font-family: Montserrat, sans-serif;
    font-size: 0.16rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
}

.second__pagination .wp-pagenavi a:hover {
    background: #FFF;
    border-color: #EA5404;
    color: #EA5404;
}

/* 当前页：橙色实心圆 */
.second__pagination .wp-pagenavi .current {
    background: #EA5404;
    border-color: #EA5404;
    color: #FFF;
    cursor: default;
}

/* ---------- H5 适配（750 设计稿基准） ---------- */
html[data-mode="h5"] .second__pagination {
    margin-top: 0.4rem;
    flex-wrap: wrap;
    gap: 0.16rem;
}

/* 移动端加大点击热区与字号 */
html[data-mode="h5"] .second__pagination a,
html[data-mode="h5"] .second__pagination [data-page] {
    min-width: 0.72rem;
    width: 0.72rem;
    height: 0.72rem;
    padding: 0;
    border-radius: 50%;
    font-size: 0.26rem;
}

html[data-mode="h5"] .second__pagination .wp-pagenavi {
    gap: 0.16rem;
}

html[data-mode="h5"] .second__pagination .wp-pagenavi a,
html[data-mode="h5"] .second__pagination .wp-pagenavi .current {
    min-width: 0.72rem;
    height: 0.72rem;
    padding: 0;
    font-size: 0.26rem;
}
