/* ============================================================
   MenpaiCloud 全局样式
   移动端优先，兼容 Chrome / Safari / 微信浏览器
   ============================================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --primary: #1a73e8;
  --primary-dark: #1558b0;
  --primary-light: #e8f0fe;
  --accent: #34a853;
  --text: #202124;
  --text-secondary: #5f6368;
  --border: #dadce0;
  --bg: #f8f9fa;
  --white: #ffffff;
  --shadow: 0 1px 6px rgba(60,64,67,.15);
  --shadow-md: 0 2px 12px rgba(60,64,67,.2);
  --radius: 8px;
  --radius-lg: 12px;
  --nav-h: 56px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---------- 导航栏 ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: var(--shadow);
  height: var(--nav-h);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}
.nav-brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
}
.nav-brand span {
  white-space: nowrap;
  font-size: .9rem;
}
/* 汉堡按钮 */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
/* 导航菜单 */
.nav-menu {
  display: none;
  position: absolute;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-md);
  padding: 8px 0;
}
.nav-menu.open { display: block; }
.nav-menu a {
  display: block;
  padding: 12px 24px;
  color: var(--text);
  font-size: .95rem;
  border-bottom: 1px solid var(--border);
}
.nav-menu a:last-child { border-bottom: none; }
.nav-menu a:hover, .nav-menu a.active {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}
/* 桌面端展开 */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-menu {
    display: flex !important;
    position: static;
    box-shadow: none;
    padding: 0;
    gap: 4px;
  }
  .nav-menu a {
    padding: 8px 14px;
    border-radius: var(--radius);
    border-bottom: none;
    font-size: .9rem;
    white-space: nowrap;
  }
}

/* ---------- 主内容区 ---------- */
main { flex: 1; }

/* ---------- 通用容器 ---------- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Hero / 页面头部 ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 56px 24px 48px;
}
.hero h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.hero p  { font-size: 1rem; opacity: .9; max-width: 480px; margin: 0 auto; }

/* ---------- 区块 ---------- */
.section { padding: 40px 0; }
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.section-subtitle {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}
.divider { height: 3px; width: 40px; background: var(--primary); border-radius: 2px; margin-bottom: 24px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 600px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .2s, transform .1s;
  text-align: center;
  min-width: 120px;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); text-decoration: none; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

/* ---------- 信息列表（键值对） ---------- */
.info-list { list-style: none; }
.info-list li {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
  gap: 12px;
}
.info-list li:last-child { border-bottom: none; }
.info-list .label {
  flex: 0 0 90px;
  color: var(--text-secondary);
  font-weight: 500;
}
.info-list .value { color: var(--text); flex: 1; }

/* ---------- 定价卡片 ---------- */
.pricing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px 24px;
  text-align: center;
  border-top: 4px solid var(--primary);
}
.pricing-card.featured { border-top-color: var(--accent); }
.pricing-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.pricing-period { font-size: .85rem; color: var(--text-secondary); margin-bottom: 20px; }
.pricing-features { text-align: left; margin-bottom: 24px; }
.pricing-features li {
  padding: 6px 0;
  font-size: .92rem;
  border-bottom: 1px solid var(--border);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

/* ---------- 价目表 ---------- */
.price-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.price-table th, .price-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.price-table th { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.price-table tr:hover td { background: var(--bg); }
.price-table .price-col { text-align: right; font-weight: 600; color: var(--primary); white-space: nowrap; }

/* ---------- 特性卡片 ---------- */
.feature-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px 20px;
}
.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.feature-title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-desc { font-size: .88rem; color: var(--text-secondary); line-height: 1.7; }

/* ---------- 联系信息 ---------- */
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.contact-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}
.contact-label { font-size: .8rem; color: var(--text-secondary); margin-bottom: 2px; }
.contact-value { font-size: 1rem; font-weight: 600; color: var(--text); }

/* ---------- 二维码区域 ---------- */
/* [新增] 实际扫码图片样式 */
.qr-img {
  max-width: 200px;
  width: 100%;
  display: block;
  margin: 0 auto 16px;
  border-radius: 8px;
}
.qr-section {
  background: var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  margin: 24px 0;
}
.qr-placeholder {
  width: 140px;
  height: 140px;
  background: var(--white);
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: var(--text-secondary);
}
.qr-desc { font-size: .9rem; color: var(--text-secondary); }

/* ---------- 查询结果页 ---------- */
.result-loading, .result-error, .result-empty {
  text-align: center;
  padding: 60px 24px;
}
.result-loading .spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result-error { color: #d93025; }
.result-error .err-icon { font-size: 3rem; margin-bottom: 12px; }
.result-empty .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.map-frame {
  width: 100%;
  height: 300px;
  border: none;
  border-radius: var(--radius);
  display: block;
}
.culture-frame {
  width: 100%;
  height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: block;
}

/* ---------- 扫码页 ---------- */
.scanner-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px;
  text-align: center;
}
#reader {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  background: #000;
}
.scanner-tip { font-size: .85rem; color: var(--text-secondary); margin-top: 12px; }

/* ---------- 标签徽章 ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
}
.badge-green { background: #e6f4ea; color: #137333; }

/* ---------- 业务列表 ---------- */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 16px;
}
@media (min-width: 600px) {
  .biz-grid { grid-template-columns: repeat(3, 1fr); }
}
.biz-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: .85rem;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--primary);
}

/* ---------- 页脚 ---------- */
footer {
  background: #fff;
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 20px 16px;
  font-size: .8rem;
  color: var(--text-secondary);
}
footer a { color: var(--text-secondary); }
footer a:hover { color: var(--primary); }

/* ---------- 工具类 ---------- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.w-full { width: 100%; }

/* ============================================================
   区域选择弹窗（index.html）
   ============================================================ */
.region-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;    /* 从底部弹出，移动端友好 */
  justify-content: center;
}
.region-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
}
.region-modal-sheet {
  position: relative;
  z-index: 201;
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  animation: slideUp .25s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.region-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.region-modal-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}
.region-modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
}
.region-modal-close:hover { background: var(--bg); }
.region-modal-body { padding: 8px 0 12px; }

/* 区域选项卡片 */
.region-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text);
  transition: background .15s;
}
.region-item:hover { background: var(--bg); text-decoration: none; }
.region-item:active { background: var(--primary-light); }
.region-item-icon {
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.region-item-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.region-item-desc {
  font-size: .78rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.region-item-arrow {
  margin-left: auto;
  font-size: 1.3rem;
  color: var(--border);
}
