/* ==========================================================================
   新增组件样式（分页 / 404）
   说明：本文件为动态化新增组件的独立样式，不修改原 style.css 中的任何已有规则
   ========================================================================== */

/* ---------- 分页 ---------- */
.site-pagination {
  margin: 40px 0 0;
  text-align: center;
}
.site-pagination .pagination-inner {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.site-pagination .page-btn,
.site-pagination .page-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  transition: all .2s;
}
.site-pagination .page-num {
  min-width: 38px;
  padding: 0;
}
.site-pagination a.page-btn:hover,
.site-pagination a.page-num:hover {
  border-color: #f59e0b;
  color: #f59e0b;
}
.site-pagination .page-num.active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #fff;
  font-weight: 600;
}
.site-pagination .page-btn.disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}
.site-pagination .page-ellipsis {
  padding: 0 2px;
  color: #94a3b8;
}
.site-pagination .pagination-mobile {
  display: none;
  margin-top: 12px;
}
.site-pagination .page-total {
  font-size: 13px;
  color: #64748b;
}

@media (max-width: 768px) {
  .site-pagination .pagination-inner {
    gap: 6px;
  }
  .site-pagination .page-btn,
  .site-pagination .page-num {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }
  .site-pagination .page-numbers {
    display: none;   /* 移动端只保留 上一页 / 下一页 + 页码统计 */
  }
  .site-pagination .pagination-mobile {
    display: block;
  }
}

/* ---------- 404 ---------- */
.error-page {
  padding: 80px 0 100px;
  text-align: center;
}
.error-page .error-code {
  font-size: 120px;
  line-height: 1;
  font-weight: 800;
  color: #f59e0b;
  letter-spacing: 4px;
}
.error-page .error-title {
  margin: 16px 0 10px;
  font-size: 24px;
  color: #1e293b;
}
.error-page .error-desc {
  margin: 0 auto 28px;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.8;
  color: #64748b;
}
.error-page .error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.error-page .error-links {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}
.error-page .error-links a {
  display: inline-block;
  margin: 0 10px;
  font-size: 14px;
  color: #475569;
  text-decoration: none;
}
.error-page .error-links a:hover {
  color: #f59e0b;
}
@media (max-width: 768px) {
  .error-page { padding: 50px 0 60px; }
  .error-page .error-code { font-size: 80px; }
  .error-page .error-title { font-size: 19px; }
}

/* ==========================================================
   资讯详情页正文自适应
   旧站数据（zt_* 表）正文里的图片带固定 width/height，
   这里限制最大宽度，避免撑破正文容器（不改动原 style.css）
   ========================================================== */
.article-content {
  word-break: break-all;
}
.article-body img {
  max-width: 100%;
  height: auto;
}
.article-body table {
  max-width: 100%;
}

.article-body table {
  border: 1px solid #333;
  border-collapse: collapse;
  width: 100%;
}
.article-body  table td {
  border: 1px solid #333;
  padding: 2px 5px;
}

/* ==========================================================
   返回顶部按钮（全局，输出于 front.layouts.app）
   移动端底栏高 54px，故移动端下 bottom 抬高避让
   ========================================================== */
.back-to-top {
  position: fixed;
  right: 32px;
  bottom: 40px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent2) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 6px 18px rgba(26, 86, 219, 0.32);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.9);
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top:hover {
  box-shadow: 0 10px 24px rgba(26, 86, 219, 0.42);
}
.back-to-top:active {
  transform: translateY(0) scale(0.94);
}
.back-to-top:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 3px;
}
.back-to-top svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 768px) {
  .back-to-top {
    right: 14px;
    bottom: 68px;
    width: 42px;
    height: 42px;
    box-shadow: 0 4px 14px rgba(26, 86, 219, 0.3);
  }
  .back-to-top svg {
    width: 18px;
    height: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: opacity .2s linear;
  }
}

@media print {
  .back-to-top {
    display: none !important;
  }
}

/* ==========================================================================
   留言表单：字段错误提示 / 输入框错误态 / 按钮冷却态 / 蜜罐字段
   ========================================================================== */
.field-error {
  margin: 6px 0 0;
  color: var(--danger, #ef4444);
  font-size: 13px;
  line-height: 1.5;
}

.form-group input.input-error,
.form-group textarea.input-error {
  border-color: var(--danger, #ef4444) !important;
}

.form-group input.input-error:focus,
.form-group textarea.input-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

button.is-cooling,
button.is-cooling:hover {
  cursor: not-allowed;
  opacity: .7;
}

/* 蜜罐字段：视觉不可见，且不占布局，对读屏与键盘均隐藏 */
.hp-wrap {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  pointer-events: none;
}
