/* ============================================
   号卡办理平台 前台样式（仿 tianyinhao.com 风格）
   主色：#0066bf（深蓝） 主题色：#f04494（粉红）
   ============================================ */
:root {
  --header-bg: #0066bf;
  --theme-color: #f04494;
  --main-max-width: 1200px;
  --main-radius: 10px;
  --body-bg: #f5f7fb;
  --text-main: #1a2433;
  --text-muted: #8896a6;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif; background: var(--body-bg); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ---------- 头部导航 ---------- */
.header { position: sticky; top: 0; z-index: 999; background: var(--header-bg); color: #f1f1f1; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.nav-inner { max-width: var(--main-max-width); margin: 0 auto; padding: 0 16px; display: flex; align-items: center; height: 60px; gap: 12px; position: relative; }
.navbar-logo { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; color: #fff; white-space: nowrap; }
.logo-badge { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(135deg, #fff, #dce8ff); color: var(--header-bg); display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; font-weight: 800; flex-shrink: 0; }
.navbar-nav { display: flex; align-items: center; gap: 0; margin-left: 10px; flex: 1; }
.navbar-nav > a { display: inline-block; padding: 16px 9px; font-size: .95rem; color: #f1f1f1; border-bottom: 3px solid transparent; white-space: nowrap; }
.navbar-nav > a:hover, .navbar-nav > a.active { color: #fff; border-bottom-color: #ffd25e; }
.nav-right { display: flex; gap: 10px; margin-left: auto; }
.nav-hall { font-size: .95rem; color: #fff; padding: 6px 12px; border-radius: 6px; background: rgba(255,255,255,.12); white-space: nowrap; border: none; cursor: pointer; font-family: inherit; line-height: 1.5; }
.nav-hall:hover { background: rgba(255,255,255,.22); }
.jb-red { background: #f04438; color: #fff; font-size: .7rem; font-weight: 600; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.jb-purple { background: #8b5cf6; color: #fff; font-size: .7rem; font-weight: 600; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.nav-toggle { display: none; }
.mobile-only { display: none; }

/* ---------- 移动端适配（<900px） ---------- */
@media (max-width: 900px) {
  .nav-inner { height: 56px; }
  .navbar-logo { font-size: 1.05rem; }
  .nav-toggle { display: inline-flex; margin-left: auto; width: 40px; height: 40px; align-items: center; justify-content: center; background: transparent; border: none; color: #fff; font-size: 1.25rem; cursor: pointer; border-radius: 8px; }
  .nav-toggle:hover { background: rgba(255,255,255,.15); }
  .desktop-only { display: none; }
  .navbar-nav { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--header-bg); flex-direction: column; align-items: stretch; padding: 6px 0 12px; margin: 0; box-shadow: 0 8px 16px rgba(0,0,0,.18); }
  .navbar-nav.open { display: flex; }
  .navbar-nav > a { padding: 13px 22px; border-bottom: 1px solid rgba(255,255,255,.12); display: block; }
  .nav-right.mobile-only { display: flex; flex-direction: row; gap: 10px; padding: 12px 22px 4px; margin: 0; }
  .nav-right.mobile-only .nav-hall { flex: 1; text-align: center; }
  .mobile-only { display: flex; }
}

/* ---------- 轮播 + 营业厅 ---------- */
.slider-wrap { background: var(--header-bg); }
.slider { max-width: var(--main-max-width); margin: 0 auto; padding: 20px 16px 0; color: #fff; position: relative; }
.slide { display: none; border-radius: 12px; overflow: hidden; }
.slide.active { display: block; }
.slide-img { display: block; width: 100%; height: 340px; object-fit: cover; }
.slider-dots { display: flex; justify-content: center; gap: 8px; padding: 12px 0 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; }
.dot.active { background: #fff; }
.hall-bar { max-width: var(--main-max-width); margin: 0 auto; padding: 0 16px 26px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.hall-item { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 12px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; color: #fff; }
.hall-item:hover { background: rgba(255,255,255,.2); }
.hall-icon { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: #fff; flex-shrink: 0; }
.hall-icon.c1 { background: #2f7df6; }
.hall-icon.c2 { background: #34c759; }
.hall-icon.c3 { background: #f5a623; }
.hall-icon.c4 { background: #f04494; }
.hall-name { font-weight: 700; font-size: 1rem; }
.hall-desc { font-size: .8rem; opacity: .85; margin-top: 2px; }
.jb-blue { background: #2f7df6; color: #fff; font-size: .68rem; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }
.jb-yellow { background: #f5a623; color: #fff; font-size: .68rem; padding: 1px 6px; border-radius: 4px; margin-left: 4px; }

/* ---------- 布局 ---------- */
.container { max-width: var(--main-max-width); margin: 0 auto; padding: 0 16px; }
.layout { display: flex; gap: 20px; padding: 20px 0 40px; }
.main-col { flex: 1; min-width: 0; }
.side-col { width: 300px; flex-shrink: 0; }
@media (max-width: 900px) { .layout { flex-direction: column; } .side-col { width: 100%; } }

/* ---------- Tab ---------- */
.home-tab { display: flex; gap: 4px; background: #fff; border-radius: var(--main-radius); padding: 10px 12px; margin-top: 18px; box-shadow: 0 2px 8px rgba(20,60,120,.06); overflow-x: auto; }
.tab-item { padding: 8px 18px; border-radius: 8px; color: #3a5a8c; font-size: .95rem; white-space: nowrap; }
.tab-item:hover { background: #f0f6ff; }
.tab-item.active { background: var(--theme-color); color: #fff; }

/* ---------- 文章卡片 ---------- */
.post-item { display: flex; gap: 16px; background: #fff; border-radius: var(--main-radius); padding: 16px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(20,60,120,.06); }
.post-thumb { flex-shrink: 0; width: 150px; height: 110px; border-radius: 8px; overflow: hidden; background: #e8f0ff; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #2f7df6; font-weight: 700; font-size: .85rem; text-align: center; padding: 6px; }
.post-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-title { font-size: 1.08rem; line-height: 1.4; }
.post-title a { color: #1a2433; font-weight: 700; }
.post-title a:hover { color: var(--theme-color); }
.post-excerpt { color: var(--text-muted); font-size: .88rem; margin: 6px 0; }
.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tag-cat { background: #eef3ff; color: #2b5fd0; font-size: .78rem; padding: 2px 10px; border-radius: 6px; }
.tag-item { background: #f5f7fb; color: #6b7a90; font-size: .78rem; padding: 2px 10px; border-radius: 6px; }
.post-meta { margin-top: auto; display: flex; align-items: center; gap: 14px; color: #9aa8bd; font-size: .8rem; }
.post-meta .meta-right { margin-left: auto; }

/* ---------- 侧栏 ---------- */
.widget { background: #fff; border-radius: var(--main-radius); padding: 16px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(20,60,120,.06); }
.widget-title { font-weight: 700; color: #1a2433; padding-bottom: 10px; border-bottom: 2px solid #f0f4fa; display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.widget-title .more { color: var(--theme-color); font-size: .82rem; font-weight: 400; }
.widget-list { display: flex; flex-direction: column; }
.widget-item { padding: 8px 0; border-bottom: 1px dashed #eef2f8; color: #3a5a8c; font-size: .9rem; }
.widget-item:hover { color: var(--theme-color); }
.widget-item:last-child { border-bottom: none; }

.widget-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-link { display: inline-block; cursor: pointer; transition: all .2s; }
.tag-link:hover { background: #eef3ff; color: #2b5fd0; }
/* 标签云字号档：lg 大 / md 中 / sm 小 */
.tag-cloud.lg { font-size: 1.02rem; font-weight: 700; }
.tag-cloud.md { font-size: .92rem; font-weight: 500; }
.tag-cloud.sm { font-size: .8rem; }

/* 置顶标签 */
.top-badge { display: inline-block; background: #f04438; color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 4px; margin-right: 6px; vertical-align: 2px; }

/* ---------- 详情页 ---------- */
.breadcrumb { padding: 14px 0; color: #6b7a90; font-size: .88rem; }
.breadcrumb a:hover { color: var(--theme-color); }
.cat-head h1 { font-size: 1.3rem; color: #1a2433; margin-bottom: 16px; }
.article-box { background: #fff; border-radius: var(--main-radius); padding: 26px 28px; box-shadow: 0 2px 8px rgba(20,60,120,.06); }
.article-title { font-size: 1.5rem; line-height: 1.4; margin-bottom: 12px; }
.article-meta { display: flex; gap: 18px; color: #9aa8bd; font-size: .85rem; padding-bottom: 14px; border-bottom: 1px solid #f0f4fa; margin-bottom: 18px; flex-wrap: wrap; }
.article-cover { width: 100%; height: auto; object-fit: contain; border-radius: 8px; margin-bottom: 18px; display: block; }
.article-content { font-size: 1rem; color: #2b3a4d; }
.article-content img { max-width: 100%; height: auto; object-fit: contain; display: block; margin: 10px auto; }
.article-content h2 { font-size: 1.2rem; color: var(--header-bg); margin: 20px 0 10px; }
.article-content h3 { font-size: 1.05rem; color: #1a2433; margin: 16px 0 8px; }
.article-content p { margin: 10px 0; }
.article-content li { margin-left: 20px; margin-bottom: 4px; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid #f0f4fa; }

/* ---------- 页脚 ---------- */
.footer { background: #0a2c52; color: #cfe0ff; }
.footer-inner { max-width: var(--main-max-width); margin: 0 auto; padding: 34px 16px; display: flex; gap: 40px; flex-wrap: wrap; }
.footer-logo { display: flex; align-items: center; gap: 8px; font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer p { font-size: .88rem; opacity: .85; margin: 6px 0; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-links a:hover { color: #fff; }
.footer-copy { margin-left: auto; text-align: right; }
.footer-copy .icp { font-size: .8rem; opacity: .7; }

/* ---------- 返回顶部 ---------- */
.backtop { position: fixed; right: 22px; bottom: 28px; width: 42px; height: 42px; border-radius: 50%; background: var(--header-bg); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; box-shadow: 0 4px 12px rgba(0,102,191,.35); z-index: 90; }
.backtop:hover { background: var(--theme-color); }

.empty, .empty-sm { text-align: center; color: #9aa8bd; padding: 40px 0; }
.empty-sm { padding: 12px 0; }

/* ============================================
   移动端全面适配（平板/手机，<900px）
   ============================================ */
@media (max-width: 900px) {
  /* 轮播图高度压缩 */
  .slide-img { height: 190px; }
  .slider { padding-top: 12px; }

  /* 营业厅：2 列排布 */
  .hall-bar { grid-template-columns: repeat(2, 1fr); gap: 10px; padding-bottom: 20px; }
  .hall-item { padding: 10px 12px; }
  .hall-icon { width: 38px; height: 38px; font-size: 1.05rem; }

  /* Tab 标签横向滑动，不换行压缩 */
  .home-tab { margin-top: 12px; -webkit-overflow-scrolling: touch; }
  .tab-item { padding: 7px 14px; font-size: .9rem; }

  /* 文章卡片：缩略图略小，标题/摘要不溢出 */
  .post-item { gap: 12px; padding: 12px; }
  .post-thumb { width: 108px; height: 88px; }
  .post-title { font-size: .98rem; }
  .post-excerpt { font-size: .82rem; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .post-meta { gap: 8px; font-size: .75rem; flex-wrap: wrap; }

  /* 详情页内边距压缩 */
  .article-box { padding: 18px 16px; }
  .article-title { font-size: 1.25rem; }
  .breadcrumb { font-size: .8rem; }

  /* 页脚堆叠 */
  .footer-inner { flex-direction: column; gap: 18px; padding: 26px 16px; }
  .footer-copy { margin-left: 0; text-align: left; }

  /* 返回顶部按钮略小 */
  .backtop { right: 14px; bottom: 20px; width: 38px; height: 38px; }
}

/* 极窄屏（<480px）：缩略图更小 */
@media (max-width: 480px) {
  .post-thumb { width: 92px; height: 78px; }
  .hall-bar { grid-template-columns: 1fr 1fr; }
  .hall-name { font-size: .92rem; }
}

/* ============================================
   分页导航
   ============================================ */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 26px 0 6px; }
.pagination .page-num, .pagination .page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 8px; background: #fff; border: 1px solid #e4e9f2; color: #3a5a8c; font-size: .9rem; transition: all .2s; }
.pagination a.page-num:hover, .pagination a.page-link:hover { border-color: var(--header-bg); color: var(--header-bg); }
.pagination .page-num.current { background: var(--header-bg); border-color: var(--header-bg); color: #fff; font-weight: 700; cursor: default; }

@media (max-width: 480px) {
  .pagination { gap: 6px; }
  .pagination .page-num, .pagination .page-link { min-width: 34px; height: 34px; padding: 0 10px; font-size: .85rem; }
}

/* ============================================
   立即办理按钮（详情页）
   ============================================ */
.apply-bar { display: flex; align-items: center; justify-content: center; padding: 16px 0 6px; }
.apply-btn { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #ff4d4f, #ff7a45); color: #fff; font-size: 1.2rem; font-weight: 700; padding: 14px 60px; border-radius: 10px; box-shadow: 0 4px 14px rgba(255,77,79,.35); transition: all .2s; letter-spacing: 3px; cursor: pointer; border: none; }
.apply-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,77,79,.5); }
.apply-btn:active { transform: translateY(0); }

@media (max-width: 480px) {
  .apply-btn { width: 100%; padding: 15px 0; font-size: 1.15rem; }
}


/* 详情页底部悬浮办理条（网页端限宽居中，手机端通栏） */
.apply-bar-fixed { position: fixed; left: 0; right: 0; bottom: 0; z-index: 999; display: flex; justify-content: center; padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid #e6ecf5; box-shadow: 0 -4px 18px rgba(20,60,120,.10); }
.apply-bar-fixed .apply-btn { width: 100%; max-width: 560px; }
@media (max-width: 480px) {
  .apply-bar-fixed { padding: 8px 12px; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .apply-bar-fixed .apply-btn { max-width: none; }
}

.page-ellipsis { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 38px; padding: 0 8px; color: #999; font-size: .95rem; }
@media (max-width: 480px) {
  .page-ellipsis { min-width: 28px; height: 34px; }
}
