/* ==========================================================================
   移动端适配层 - 在主题 theme.css 之后加载，无需 !important 即可覆盖
   全站共用（证书查询系统四套主题通用）：导航 / 查询 / 详情 / 列表 / 页脚
   断点：860px（平板竖屏）、600px（手机）、400px（小屏手机）
   ========================================================================== */

/* ===== 顶部导航：汉堡开关（默认隐藏，仅窄屏出现） ===== */
.t-nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  margin-left: auto;
  width: 40px; height: 36px;
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 17px; line-height: 1;
  opacity: .85;
  -webkit-tap-highlight-color: transparent;
}
.t-nav-toggle:active { opacity: 1; }

@media (max-width: 860px) {
  .t-nav-toggle { display: inline-flex; }

  .t-header-inner { flex-wrap: wrap; padding: 12px 16px !important; gap: 10px; }

  /* 导航收起为纵向抽屉 */
  .t-nav {
    display: none;
    width: 100%;
    margin-left: 0 !important;
    flex-direction: column;
    gap: 0;
  }
  .t-nav.open { display: flex; }
  .t-nav a {
    padding: 12px 2px !important;
    border-radius: 0 !important;
    border-bottom: 1px solid rgba(128, 128, 128, .22);
    font-size: 15px;
  }
  .t-nav a:last-child { border-bottom: none; }
  .t-nav a.on::after { display: none !important; }

  /* 品牌区收敛 */
  .t-brand { font-size: 17px !important; letter-spacing: 1px !important; gap: 9px; }
  .t-brand .seal { width: 38px !important; height: 38px !important; font-size: 19px !important; }
  .t-brand small { font-size: 11px !important; }
}

/* ===== 通用容器与排版 ===== */
@media (max-width: 860px) {
  .t-wrap { padding: 18px 14px !important; }
  .t-h2 { font-size: 18px !important; }
  .t-h2 .more { float: none; display: block; margin-top: 6px; }
  .t-grid-2 { grid-template-columns: 1fr !important; }
  .t-banner { padding: 34px 16px !important; }
  .t-banner h1 { font-size: 24px !important; letter-spacing: 1px !important; }
  .t-banner p { font-size: 14px !important; }
  .t-banner .stat-row { flex-wrap: wrap; gap: 10px 18px !important; padding: 10px 14px !important; justify-content: center; }
  .t-search { margin: -18px 12px 0 !important; padding: 14px !important; }
  .t-search form { gap: 10px; }
  .t-search input[type=text] { min-width: 0 !important; width: 100%; flex: 1 1 100%; }
  .t-search select { flex: 1 1 100%; }
  .t-search button { width: 100%; padding: 11px 0 !important; }
}

/* ===== 查询结果：三列改单列 ===== */
@media (max-width: 860px) {
  .t-result {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
    padding: 14px 0 !important;
    font-size: 15px !important;
  }
  .t-result a.btn { justify-self: start; margin-top: 4px; padding: 6px 14px !important; }
}

/* ===== 详情页 / 证书卡片 ===== */
@media (max-width: 860px) {
  .t-detail { padding: 18px 14px !important; }
  .t-detail h1 { font-size: 20px !important; }
  .t-detail .meta { font-size: 12px !important; }
  .t-detail .cert-card { padding: 16px !important; }
  .t-detail .cert-row { flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 0 !important; }
  .t-detail .cert-row span { width: auto !important; font-size: 13px; }
  .t-detail .cert-row b { font-size: 15px; word-break: break-all; }
  .t-content { padding: 16px 14px !important; line-height: 1.8 !important; }
}

/* ===== 类型选项卡 ===== */
@media (max-width: 860px) {
  .t-type-tabs { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; margin-bottom: 16px !important; }
  .t-type-tab { padding: 11px 8px !important; }
  .t-type-tab b { font-size: 14px !important; }
}

/* ===== 表格：超宽时横向滚动，避免撑破页面 ===== */
@media (max-width: 860px) {
  table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  th, td { white-space: nowrap; }
}

/* ===== 页脚 ===== */
@media (max-width: 860px) {
  .t-footer { padding: 22px 14px !important; font-size: 12.5px !important; margin-top: 28px !important; }
  .t-footer a { margin: 0 4px !important; display: inline-block; }
}

/* ===== 小屏手机进一步收敛 ===== */
@media (max-width: 400px) {
  .t-banner h1 { font-size: 21px !important; }
  .t-brand { font-size: 16px !important; }
  .t-brand .seal { width: 34px !important; height: 34px !important; font-size: 17px !important; }
  .t-type-tabs { grid-template-columns: 1fr !important; }
  .t-wrap { padding: 16px 12px !important; }
}

/* ===== 横竖向通用：禁止横向溢出 ===== */
html, body { overflow-x: hidden; }
img, table, pre, code { max-width: 100%; }
