/* ============================================================
   中国POS办理资讯网 - 主样式表
   设计原则：移动优先 · SEO友好 · 统一导航 · 极速加载
   ============================================================ */

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #333; line-height: 1.7; background: #fff;
}
a { color: #e63329; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
/* 隐藏无 src 或空 src 的图片（防止空标签占位） */
img[src=""], img:not([src]) { display: none !important; }
/* 文章内损坏图片 */
.prose img.broken-img { display: none !important; }
ul { list-style: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- 容器 ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ========== 统一导航栏 ========== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff; border-bottom: 1px solid #eee;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.site-header.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.header-inner {
  display: flex; align-items: center; gap: 20px; height: 64px;
}
.site-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-logo img { display: block; }
.logo-text { font-size: 16px; font-weight: 700; color: #1a1a1a; white-space: nowrap; }

/* 主导航 */
.main-nav { flex: 1; display: flex; }
.main-nav ul { display: flex; gap: 2px; }
.main-nav a {
  display: block; padding: 8px 14px; border-radius: 6px;
  color: #333; font-size: 14px; font-weight: 500;
  transition: background .2s, color .2s; white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active,
.main-nav a[aria-current="page"] { background: #fff1f0; color: #e63329; text-decoration: none; }

/* 电话 */
.header-phone {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
  color: #e63329; font-weight: 600; font-size: 14px; white-space: nowrap;
}
.header-phone svg { flex-shrink: 0; }

/* 移动菜单按钮 */
.menu-toggle, .mobile-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; font-size: 22px; color: #333; line-height: 1;
}

/* 兼容旧版 nav 结构 */
.logo img { display: block; }
.header-cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.phone-link { color: #e63329; font-weight: 600; font-size: 14px; white-space: nowrap; }

/* ---------- 按钮 ---------- */
.btn-primary {
  display: inline-block; padding: 10px 22px; border-radius: 6px;
  background: #e63329; color: #fff; font-weight: 600; font-size: 14px;
  border: none; cursor: pointer; transition: background .2s; white-space: nowrap;
}
.btn-primary:hover { background: #c92a20; text-decoration: none; color: #fff; }
.btn-outline {
  display: inline-block; padding: 10px 22px; border-radius: 6px;
  border: 1.5px solid #e63329; color: #e63329; font-weight: 600;
  background: #fff; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-outline:hover { background: #fff1f0; text-decoration: none; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 8px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- 面包屑 ---------- */
.breadcrumb-nav { background: #f9f9f9; border-bottom: 1px solid #eee; }
.breadcrumb { background: #f9f9f9; border-bottom: 1px solid #eee; }
.breadcrumb-nav .container,
.breadcrumb .container { padding: 10px 20px; }
.breadcrumb-nav ol,
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: #666; }
.breadcrumb-nav li::after,
.breadcrumb li::after { content: ' / '; color: #ccc; }
.breadcrumb-nav li:last-child::after,
.breadcrumb li:last-child::after { content: ''; }
.breadcrumb-nav a,
.breadcrumb a { color: #666; }
.breadcrumb-nav a:hover,
.breadcrumb a:hover { color: #e63329; }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, #fff1f0 0%, #fff8f0 100%); padding: 60px 0; }
.hero-inner { display: flex; align-items: center; gap: 48px; }
.hero-text { flex: 1; }
.hero-text h1 { font-size: 40px; font-weight: 700; color: #1a1a1a; line-height: 1.3; margin-bottom: 16px; }
.hero-text .highlight { color: #e63329; }
.hero-sub { font-size: 18px; color: #555; margin-bottom: 28px; }
.hero-sub strong { color: #e63329; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 20px; font-size: 14px; color: #666; flex-wrap: wrap; }
.hero-trust span::before { content: '✓ '; color: #e63329; font-weight: 700; }
.hero-image { flex: 0 0 480px; text-align: center; }
.hero-image img { max-width: 100%; height: auto; }

/* ---------- 通用区块 ---------- */
.section-pad { padding: 64px 0; }
.bg-light { background: #f9f9f9; }
.section-title { font-size: 28px; font-weight: 700; text-align: center; margin-bottom: 8px; color: #1a1a1a; }
.section-sub { text-align: center; color: #666; margin-bottom: 40px; font-size: 15px; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; flex-wrap: wrap; gap: 12px; }
.section-header .section-title { margin-bottom: 0; text-align: left; }
.more-link { color: #e63329; font-size: 14px; font-weight: 500; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }

/* ---------- 特点卡片 ---------- */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }
.feature-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 28px 20px; text-align: center; transition: box-shadow .2s, transform .2s; }
.feature-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); transform: translateY(-2px); }
.feature-icon { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.feature-icon.icon-rate { background: #fff1f0; }
.feature-icon.icon-fast { background: #e6f7ff; }
.feature-icon.icon-free { background: #f6ffed; }
.feature-icon.icon-safe { background: #fff7e6; }
.feature-card h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: #1a1a1a; }
.feature-card p { font-size: 14px; color: #666; line-height: 1.6; }

/* ---------- 申请表单 ---------- */
.lead-form { max-width: 720px; margin: 0 auto; background: #fff; padding: 36px; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.lead-form input, .lead-form select, .lead-form textarea {
  width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 15px; outline: none; transition: border-color .2s; background: #fff;
}
.lead-form input:focus, .lead-form select:focus { border-color: #e63329; }
.form-tip { font-size: 12px; color: #999; text-align: center; margin-top: 12px; }

/* ---------- 文章卡片 ---------- */
.article-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.article-card { border-radius: 12px; overflow: hidden; border: 1px solid #eee; background: #fff; transition: box-shadow .2s; }
.article-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.article-card a { display: block; color: inherit; }
.article-card a:hover { text-decoration: none; }
.article-thumb { height: 180px; overflow: hidden; position: relative; }
.article-thumb::before {
  content: '暂无封面';
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
  color: #bbb; font-size: 14px; letter-spacing: 1px;
}
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; position: relative; z-index: 1; }
.article-card:hover .article-thumb img { transform: scale(1.04); }
.article-thumb-placeholder { display: none; }
.article-info { padding: 16px; }
.article-cat { display: inline-block; font-size: 12px; background: #fff1f0; color: #e63329; padding: 2px 8px; border-radius: 4px; margin-bottom: 6px; }
.article-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: #1a1a1a; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-summary { font-size: 13px; color: #666; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-meta { font-size: 12px; color: #999; display: flex; gap: 12px; }

/* ---------- 文章列表页 ---------- */
.news-list-page h1 { font-size: 24px; font-weight: 700; color: #1a1a1a; margin-bottom: 24px; }
.news-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; }
.article-card-h { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid #eee; }
.article-card-h .article-thumb-link { flex: 0 0 240px; height: 150px; overflow: hidden; border-radius: 8px; position: relative; }
.article-card-h .article-thumb-link::before {
  content: '暂无封面';
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
  color: #bbb; font-size: 13px; letter-spacing: 1px;
}
.article-card-h .article-thumb-link img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.article-card-h .thumb-placeholder { display: none; }
.article-card-h .article-body { flex: 1; min-width: 0; }
.article-meta-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: 13px; color: #999; flex-wrap: wrap; }
.article-card-h h2 { font-size: 18px; margin-bottom: 8px; }
.article-card-h h2 a { color: #1a1a1a; }
.article-card-h h2 a:hover { color: #e63329; text-decoration: none; }
.article-excerpt { font-size: 14px; color: #666; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { font-size: 13px; color: #e63329; font-weight: 500; }

/* 分类标签 */
.cat-badge { display: inline-block; background: #fff1f0; color: #e63329; padding: 3px 10px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.cat-badge:hover { background: #ffe0dc; text-decoration: none; }

/* 分页 */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.page-btn, .page-link {
  display: inline-block; padding: 8px 14px; border: 1px solid #ddd; border-radius: 6px;
  color: #333; font-size: 14px;
}
.page-btn:hover, .page-link:hover { border-color: #e63329; color: #e63329; text-decoration: none; }
.page-btn.active, .page-link.active { background: #e63329; border-color: #e63329; color: #fff; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }

/* ---------- 侧边栏 ---------- */
.news-sidebar { }
.sidebar-widget { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 20px; margin-bottom: 24px; }
.sidebar-widget h3 { font-size: 16px; font-weight: 600; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #e63329; color: #1a1a1a; }
.cat-list li { padding: 6px 0; border-bottom: 1px solid #f5f5f5; }
.cat-list a { color: #333; font-size: 14px; }
.cat-list a:hover, .cat-list a.active { color: #e63329; font-weight: 500; }
.sidebar-apply p { font-size: 14px; color: #666; margin-bottom: 12px; }
.sidebar-phone { text-align: center; margin-top: 10px; font-size: 14px; color: #e63329; font-weight: 600; }

/* ---------- 文章详情 ---------- */
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; padding: 40px 20px; max-width: 1200px; margin: 0 auto; }
.article-content { min-width: 0; }
.article-cover { margin-bottom: 24px; border-radius: 12px; overflow: hidden; }
.article-cover img { width: 100%; max-height: 450px; object-fit: cover; }
.article-header { margin-bottom: 28px; }
.article-header h1 { font-size: 30px; font-weight: 700; color: #1a1a1a; line-height: 1.4; margin-bottom: 14px; }
.article-summary-box { background: #f9f9f9; border-left: 3px solid #e63329; padding: 12px 16px; border-radius: 0 8px 8px 0; margin-top: 14px; }
.article-summary-box p { font-size: 14px; color: #555; }

/* 文章正文 */
.prose { font-size: 16px; line-height: 1.9; color: #333; }
.prose h2 { font-size: 22px; font-weight: 700; margin: 32px 0 14px; color: #1a1a1a; padding-bottom: 8px; border-bottom: 1px solid #eee; }
.prose h3 { font-size: 19px; font-weight: 600; margin: 24px 0 12px; color: #1a1a1a; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: #1a1a1a; font-weight: 600; }
.prose blockquote { border-left: 4px solid #e63329; background: #fff8f7; padding: 16px 20px; margin: 24px 0; border-radius: 0 8px 8px 0; color: #555; }
.prose img { border-radius: 8px; margin: 16px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 14px; }
.prose th { background: #e63329; color: #fff; padding: 10px 14px; text-align: left; }
.prose td { padding: 10px 14px; border: 1px solid #eee; }
.prose tr:nth-child(even) { background: #f9f9f9; }

/* 文章标签 */
.article-tags { margin-top: 24px; padding-top: 20px; border-top: 1px solid #eee; }
.tag-badge { display: inline-block; background: #f5f5f5; color: #666; padding: 4px 10px; border-radius: 4px; font-size: 13px; margin: 2px 4px; transition: background .2s; }
.tag-badge:hover { background: #fff1f0; color: #e63329; text-decoration: none; }

/* 文章底部 CTA */
.article-cta-box { background: #fff1f0; border-radius: 12px; padding: 28px; text-align: center; margin: 36px 0; }
.article-cta-box h3 { font-size: 20px; margin-bottom: 8px; color: #1a1a1a; }
.article-cta-box p { color: #666; margin-bottom: 18px; }
.article-cta-box .btn-primary, .article-cta-box .btn-outline { margin: 4px 8px; }

/* 文章分享 */
.article-share { display: flex; align-items: center; gap: 10px; margin: 20px 0; padding: 16px 0; border-top: 1px solid #eee; }
.share-btn { padding: 6px 16px; border-radius: 20px; border: 1px solid #ddd; background: #fff; font-size: 13px; cursor: pointer; transition: all .2s; }
.share-btn:hover { border-color: #e63329; color: #e63329; }

/* 侧边栏固定 */
.sidebar-sticky { position: sticky; top: 80px; }
.sidebar-form input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; margin-bottom: 10px; font-size: 14px; outline: none; }
.sidebar-form input:focus { border-color: #e63329; }
.related-list li { padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.related-list a { color: #333; }
.related-list a:hover { color: #e63329; text-decoration: none; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 800px; margin: 40px auto 0; }
.faq-item { border: 1px solid #eee; border-radius: 10px; margin-bottom: 12px; overflow: hidden; background: #fff; }
.faq-item summary { padding: 16px 20px; cursor: pointer; font-size: 16px; font-weight: 600; color: #1a1a1a; user-select: none; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: #e63329; }
.faq-item p { padding: 0 20px 16px; color: #555; font-size: 15px; }

/* ---------- 搜索页 ---------- */
.search-page { padding: 40px 0 60px; }
.search-header { margin-bottom: 32px; }
.search-title { font-size: 24px; color: #1a1a1a; margin-bottom: 8px; }
.search-count { color: #666; font-size: 14px; }
.search-box-wrap { display: flex; gap: 12px; margin-bottom: 32px; }
.search-input { flex: 1; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 16px; outline: none; transition: border-color .2s; }
.search-input:focus { border-color: #e63329; }
.search-btn { padding: 12px 24px; background: #e63329; color: #fff; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; white-space: nowrap; }
.search-btn:hover { background: #c92a20; }
.search-result-item { border-bottom: 1px solid #f0f0f0; padding: 20px 0; }
.search-result-item:last-child { border-bottom: none; }
.result-title a { font-size: 18px; color: #1a1a1a; font-weight: 600; }
.result-title a:hover { color: #e63329; }
.result-meta { font-size: 13px; color: #888; margin: 4px 0 8px; }
.result-summary { color: #555; font-size: 14px; line-height: 1.7; }
.keyword-highlight { color: #e63329; font-weight: 600; font-style: normal; }
.no-result { text-align: center; padding: 60px 20px; }
.no-result-icon { font-size: 48px; margin-bottom: 16px; }
.no-result h2 { color: #333; margin-bottom: 12px; font-size: 20px; }
.no-result p { color: #666; margin-bottom: 8px; }
.hot-search { margin-top: 24px; }
.hot-search-title { color: #333; font-size: 14px; margin-bottom: 12px; }
.hot-search-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hot-tag { display: inline-block; padding: 6px 14px; background: #f5f5f5; color: #555; border-radius: 20px; font-size: 13px; transition: all .2s; }
.hot-tag:hover { background: #e63329; color: #fff; text-decoration: none; }

/* ---------- 统一页脚 ---------- */
.site-footer { background: #1a1a1a; color: #ccc; padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer-col img { margin-bottom: 10px; }
.footer-col h3 { color: #fff; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.footer-col p { font-size: 14px; line-height: 1.8; margin-bottom: 4px; }
.footer-col a { color: #aaa; font-size: 14px; }
.footer-col a:hover { color: #e63329; text-decoration: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #333; padding-top: 20px; text-align: center; font-size: 13px; color: #888; }
.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: #e63329; }

/* ========== 移动端响应式 ========== */
@media (max-width: 1024px) {
  .article-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  /* 导航 */
  .header-inner { height: auto; min-height: 56px; padding: 10px 0; flex-wrap: wrap; }
  .site-logo .logo-text { display: none; }
  .site-logo img { width: 120px; height: auto; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 2px solid #e63329; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 99; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .main-nav a { padding: 12px 20px; border-radius: 0; border-bottom: 1px solid #f5f5f5; }
  .menu-toggle, .mobile-menu-btn { display: block; }
  .header-phone span { display: none; }

  /* Hero */
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-text h1 { font-size: 26px; }
  .hero-image { flex: none; width: 100%; }
  .hero-image img { max-width: 300px; margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .hero-trust { justify-content: center; }

  /* Grid */
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .news-layout { grid-template-columns: 1fr; }
  .news-sidebar { margin-top: 32px; }
  .article-layout { grid-template-columns: 1fr; padding: 20px 16px; }
  .article-sidebar { margin-top: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }

  /* 文章详情 */
  .article-card-h { flex-direction: column; }
  .article-card-h .article-thumb-link { flex: none; height: 180px; }
  .article-header h1 { font-size: 22px; }

  /* 搜索 */
  .search-box-wrap { flex-direction: column; }
  .search-btn { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
  .article-grid { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 22px; }
  .hero-sub { font-size: 15px; }
  .section-title { font-size: 22px; }
  .prose { font-size: 15px; }
  .section-pad { padding: 40px 0; }
  .container { padding: 0 14px; }
}
