/* ============================================================
   联系我们公共组件 —— 全站 3D 页面唯一来源（首页标准）
   ------------------------------------------------------------
   • 来源：css/ui.css 首页 .hero / .hero-rail / .hero-contacts /
     .hc-* / .call-modal，逐字复制，仅把 var(--line) 写成固定值。
   • 所有 3D 页面（园区 / 生产车间 / 产品展厅 / 未来新页）统一引入
     本文件 + js/contact-card.js，不再各自维护联系面板样式与拨号逻辑。
   • 改样式只改这里；各页名字不同通过 JS 配置传入，不复制 CSS。
   ============================================================ */

/* 中央联系面板 */
.hero {
  position: fixed;
  z-index: 15;
  left: 26px;
  bottom: 84px;
  text-align: left;
  pointer-events: none;
  box-sizing: border-box;
  width: min(92vw, 520px);
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(12, 20, 36, 0.62);
  border: 1px solid rgba(120, 160, 210, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  transition: opacity 0.4s, transform 0.4s;
}
.hero.hidden { opacity: 0; transform: translateY(20px); }
/* 收起按钮：固定在卡片右上，独立于联系人行 */
.hero-collapse {
  position: absolute; top: 10px; right: 12px; z-index: 3;
  width: 44px; height: 44px; min-width: 44px;
  display: grid; place-items: center;
  font-size: 15px; line-height: 1; color: #f0c674;
  background: rgba(20, 30, 50, 0.85);
  border: 1px solid rgba(217, 164, 65, 0.5);
  border-radius: 10px; cursor: pointer;
  pointer-events: auto;
  transition: background .2s, transform .2s, border-color .2s;
}
.hero-collapse:hover { background: rgba(217, 164, 65, 0.22); border-color: #f0c674; transform: scale(1.06); }
.hero-collapse:active { transform: scale(.96); }

/* 收起后的左侧窄标签（⚡ + 竖排名字 + 箭头） */
.hero-rail {
  position: fixed; z-index: 16;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 46px; min-height: 168px;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 0;
  color: #f0c674; cursor: pointer;
  background: rgba(12, 20, 36, 0.92);
  border: 1px solid rgba(217, 164, 65, 0.45);
  border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: 4px 0 24px rgba(0,0,0,.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: width .25s, background .2s;
}
.hero-rail.show { display: flex; }
.hero-rail:hover { background: rgba(30, 42, 66, 0.96); width: 52px; }
.hero-rail .hr-logo { font-size: 20px; }
.hero-rail .hr-text {
  writing-mode: vertical-rl; text-orientation: upright;
  font-size: 12px; line-height: 1.5; font-weight: 700; letter-spacing: 2px;
  white-space: nowrap;
}
.hero-rail .hr-arrow { font-size: 14px; opacity: .7; }
[dir="rtl"] .hero-collapse { right: auto; left: 12px; }
[dir="rtl"] .hero-rail {
  left: auto; right: 0; border-left: 1px solid rgba(217,164,65,.45); border-right: none;
  border-radius: 12px 0 0 12px; box-shadow: -4px 0 24px rgba(0,0,0,.4);
}
[dir="rtl"] .hero-rail:hover { width: 52px; }

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 4px;
  color: #ffd98a;
  border: 1px solid rgba(217, 164, 65, 0.6);
  border-radius: 999px;
  padding: 6px 18px;
  margin-bottom: 18px;
  background: rgba(20, 28, 40, 0.7);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero h1 {
  margin: 0;
  font-size: clamp(22px, 2.8vw, 34px);
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 6px 24px rgba(0, 0, 0, 0.85);
}
.hero h1 em {
  font-style: normal;
  color: #ffd98a;
  -webkit-text-fill-color: #ffd98a;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 6px 20px rgba(0, 0, 0, 0.8);
}
.hero p {
  display: block;
  margin: 12px 0 0;
  color: #dce8f5;
  font-size: clamp(12px, 1.2vw, 14px);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* 一键拨号联系人：hero 整体 pointer-events:none，这里单独开启点击 */
.hero-contacts {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  pointer-events: auto;
}
.hero-contact {
  box-sizing: border-box;
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "icon name call"
    "icon phone phone";
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(217, 164, 65, 0.55);
  background: linear-gradient(180deg, rgba(255, 217, 138, 0.14), rgba(20, 28, 40, 0.75));
  color: #fff;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.hero-contact:hover, .hero-contact:focus-visible {
  background: linear-gradient(180deg, rgba(255, 217, 138, 0.28), rgba(20, 28, 40, 0.85));
  border-color: #ffd98a;
  transform: translateY(-2px);
  outline: none;
}
.hero-contact:active { transform: translateY(0); }
.hc-icon { grid-area: icon; font-size: 17px; line-height: 1; align-self: center; }
.hc-name {
  grid-area: name;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.hc-phone {
  grid-area: phone;
  font-size: clamp(13px, 1.25vw, 16px);
  font-weight: 800;
  color: #ffd98a;
  letter-spacing: 0.6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
  text-align: left;
}
.hc-call {
  grid-area: call;
  justify-self: end;
  font-size: 10px;
  font-weight: 700;
  color: #101820;
  background: #ffd98a;
  border-radius: 999px;
  padding: 4px 9px;
  white-space: nowrap;
}
@media (max-width: 400px) {
  .hero-contacts { flex-direction: column; }
  .hero-contact { width: 100%; }
}
[dir="rtl"] .hc-phone { text-align: right; }
[dir="rtl"] .hc-call { justify-self: start; }

/* ===== 一键拨号确认框：点是才拨号 ===== */
.call-modal {
  position: fixed; inset: 0; z-index: 20000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.call-modal[hidden] { display: none; }
.call-modal-mask {
  position: absolute; inset: 0;
  background: rgba(4, 9, 18, 0.68);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.call-modal-box {
  position: relative;
  width: min(92vw, 340px);
  padding: 24px 22px 20px;
  border-radius: 18px;
  text-align: center;
  background: linear-gradient(160deg, rgba(20,32,52,0.98), rgba(10,17,30,0.98));
  border: 1px solid rgba(255, 217, 138, 0.5);
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
  animation: callPop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes callPop {
  from { opacity: 0; transform: translateY(12px) scale(0.94); }
  to   { opacity: 1; transform: none; }
}
.call-modal-icon { font-size: 30px; line-height: 1; margin-bottom: 10px; }
.call-modal-title {
  font-size: 20px; font-weight: 900; color: #ffd98a; letter-spacing: 2px;
  text-shadow: 0 2px 6px rgba(0,0,0,0.7);
}
.call-modal-who { margin-top: 12px; font-size: 16px; font-weight: 700; color: #fff; }
.call-modal-phone {
  margin-top: 6px; font-size: 22px; font-weight: 900; color: #fff;
  letter-spacing: 1px; font-variant-numeric: tabular-nums;
}
.call-modal-actions { display: flex; gap: 12px; margin-top: 22px; }
.call-btn {
  flex: 1; padding: 11px 0; border-radius: 10px; border: 1px solid transparent;
  font-size: 15px; font-weight: 800; font-family: inherit; cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}
.call-btn:active { transform: scale(0.97); }
.call-btn.no { background: rgba(255,255,255,0.12); color: #dce8f5; border-color: rgba(255,255,255,0.25); }
.call-btn.no:hover { background: rgba(255,255,255,0.2); }
.call-btn.yes { background: #ffd98a; color: #101820; }
.call-btn.yes:hover { filter: brightness(1.08); }
