/* ============================================
   area.diaocey.cn 站群全局样式
   适用范围：guangling / gaoyou / yizheng 三站
   ============================================ */

:root {
  --primary: #1e3a5f;   /* 深蓝-主色（header/footer/nav 悬停） */
  --accent: #e11d48;    /* 红-强调（city-tag/标题线/电话） */
  --radius: 8px;
  --bg: #f8fafc;        /* 页面底 */
  --card: #fff;         /* 卡片底 */
  --border: #e2e8f0;
  --text: #334155;
  --muted: #64748b;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

/* ===== Container ===== */
.container {
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== Header ===== */
.site-header {
  background: var(--primary);
  color: #fff;
  padding: 24px 0;
  text-align: center;
}
.site-header h1 { font-size: 1.4rem; font-weight: 700; }
.site-header p { font-size: .85rem; opacity: .8; margin-top: 4px; }

/* ===== Nav（改 flex-wrap 版，五链接不挤） ===== */
.site-nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.site-nav .container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.site-nav a {
  color: var(--primary);
  font-size: .9rem;
  font-weight: 450;
  white-space: nowrap;
  padding: 2px 0;
  transition: color .2s;
}
.site-nav a:hover { color: var(--accent); }

/* ===== Section ===== */
.section { padding: 40px 0; }
.section-title {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 24px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

/* ===== Entity Info（设备表 grid 那套） ===== */
.entity-info {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.entity-media img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 4/3;
}
/* 设备表图片正式类名 */
.entity-media__img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
/* 设备表占位符 */
.entity-media .placeholder {
  background: #f1f5f9;
  border-radius: var(--radius);
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .85rem;
  overflow: hidden;
}
.entity-media .placeholder:has(img) {
  background: none;
  padding: 0;
  min-height: unset;
}

/* ===== Entity Card（文字卡片通用） ===== */
.entity-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.entity-card p { margin-bottom: 8px; font-size: .9rem; }
.entity-card p:last-child { margin-bottom: 0; }
.entity-card strong { color: var(--primary); }

/* ===== 案例页专属：.img-placeholder（跟 .entity-media__img 并存，用途不同） ===== */
/* 设备表 → 用 .entity-media__img（grid 里）
   案例页 → 用 .img-placeholder（max-width:600px 居中那套，独立） */
.img-placeholder {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
}
.img-placeholder img {
  width: 100%;
  height: auto;
  display: block;
}

/* 案例页：city-tag / case-title / desc-box / highlight / subtitle */
.city-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 6px;
}
.case-section { margin-bottom: 36px; }
.case-title {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}
.case-title::before { content: "📍"; margin-right: 8px; }
.desc-box {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
  line-height: 1.8;
  color: var(--muted);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.desc-box strong { color: var(--primary); }
.highlight { color: var(--accent); font-weight: 600; }
.subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  margin: 4px 0 16px;
}

/* ===== FAQ ===== */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.faq-section > h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .75rem;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: .85rem 1rem;
  background: var(--bg);
  font-weight: 600;
  font-size: .95rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "▸ "; color: var(--primary); }
.faq-item[open] summary::before { content: "▾ "; }
.faq-item .faq-a {
  padding: 0 1rem 1rem;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--muted);
}
.faq-answer h3 {
  font-size: .95rem;
  margin: .75rem 0 .35rem;
  color: var(--primary);
}
.faq-answer ul,
.faq-answer ol {
  padding-left: 1.25rem;
  margin: .35rem 0;
}
.faq-answer li { margin-bottom: .4rem; }

/* ===== Footer ===== */
.site-footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 24px 0;
  font-size: .8rem;
  line-height: 1.8;
}
.site-footer a { color: #93c5fd; text-decoration: none; }

.footer-inner { } /* 本体（如需加背景/边框在这层加） */
.footer-inner a {
  color: rgba(255,255,255,.8);
  margin: 0 12px;
}
.footer-inner a:hover {
  color: #c9bf30;
}

/* ===== Back to Top ===== */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  transition: background .2s;
}
#backToTop:hover { background: var(--accent); }

/* ===== 电话链接高亮 ===== */
a[href^="tel:"] {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  padding: 2px 5px;
  border: 1px solid var(--accent);
  border-radius: 4px;
}
@media (max-width: 768px) {
  a[href^="tel:"] {
    display: inline-block;
    padding: 8px 12px;
    margin-top: 5px;
  }
}

/* ===== 设备区块链接 hover（biz 站设备表用） ===== */
.entity-link {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: var(--radius);
  transition: all .2s ease;
}
.entity-link:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
@media (max-width: 768px) {
  .entity-link { padding: 8px 0; }
}

/* ===== 响应式：640（设备表 grid 切单栏） ===== */
@media (max-width: 640px) {
  .entity-info {
    grid-template-columns: 1fr;
  }
  .entity-media {
    order: -1;
  }
  .entity-media .placeholder {
    min-height: 140px;
  }
}

/* ===== 响应式：768（全局通用覆写） ===== */
@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }

  /* header */
  .site-header .container h1 { font-size: 22px; }
  .site-header .container p { font-size: 13px; }

  /* 设备表图 */
  .entity-media img,
  .entity-media__img {
    aspect-ratio: 3/2;
    max-height: 220px;
    object-fit: cover;
  }
  .entity-media .placeholder {
    min-height: 180px;
  }
  .entity-card p {
    font-size: .85rem;
    margin-bottom: 6px;
  }

  /* 案例图（.img-placeholder 独立控） */
  .img-placeholder {
    max-width: 100%;
    border-radius: 6px;
  }
  .img-placeholder img {
    border-radius: 6px;
  }

  /* 案例标题 / desc */
  .case-title { font-size: 16px; }
  .desc-box { padding: 12px; font-size: 14px; }

  /* FAQ tap 区 */
  .faq-item summary { padding: 10px 12px; font-size: 15px; }
  .faq-item .faq-a { padding: 0 12px 10px; font-size: 14px; }

  /* 服务范围 / 价格 */
  .entity-card { padding: 14px !important; }
  .entity-card ul { margin-left: 14px !important; font-size: 14px; }

  /* 底部电话栏（各站页内 .contact-bar 用） */
  .contact-bar {
    font-size: 16px;
    padding: 10px 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }

  #backToTop { right: 16px; bottom: 80px; }
}