/* ===== 磨匠机械 · 联系我们样式（contact.html） ===== */

/* ---------- 头部：复用全站，96px 高、18px 字号 ---------- */
header { height: 96px; }
header nav { gap: clamp(16px, 1.6vw, 30px); }
header nav a,
header nav .nano-trigger { font-size: 18px; }
header nav a.is-current,
header nav .nano-trigger.is-current { color: #b02926; }
header nav a.is-current::after,
header nav .nano-trigger.is-current::after { transform: scaleX(1); }

/* ---------- 顶部 banner ---------- */
.ct-banner {
  position: relative;
  height: 26vw;
  min-height: 240px;
  max-height: 520px;
  overflow: hidden;
}
.ct-banner img { width: 100%; height: 100%; object-fit: cover; }
/* 工厂图偏亮，压暗色遮罩保证白字清晰 */
.ct-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(15, 17, 22, .54), rgba(15, 17, 22, .54));
}
.ct-banner-info {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}
.ct-banner-info h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 46px);
  font-weight: 700;
  line-height: 1.2;
}
.ct-banner-info .banner-sub {
  font-size: clamp(14px, 1.05vw, 18px);
  letter-spacing: 8px;
  opacity: .92;
  font-family: Arial, sans-serif;
}

/* 文字逐字掉落动画（与产品/新闻中心一致） */
.drop-char {
  display: inline-block;
  opacity: 0;
  margin: 0 1px;
  animation: bannerDrop .6s ease forwards;
}
.banner-sub .drop-char { margin: 0; }
.banner-sub .drop-char.is-space,
.banner-title .drop-char.is-space { margin: 0; }
@keyframes bannerDrop {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .drop-char { animation: none; opacity: 1; }
}

/* ---------- 面包屑（沿用全站风格） ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: #888; }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; color: #888; }
.crumbs a:hover { color: #b02926; }
.crumbs svg { width: 16px; height: 16px; }
.crumbs .sep { color: #bbb; }
.crumbs .current { color: #555; }

/* ---------- Tab 切换栏 ---------- */
.ct-tabbar { background: #fff; border-bottom: 1px solid #e7e8ec; }
.ct-tabbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.ct-tabs { display: flex; align-self: stretch; margin-left: 0; gap: 0; }
.ct-tabs a {
  display: flex;
  align-items: center;
  padding: 22px 44px;
  font-size: 16px;
  color: #666;
  background: #fff;
  border: 1px solid transparent;
  border-right-color: #e7e8ec;
  transition: background .25s, color .25s;
}
.ct-tabs a:first-child { border-left-color: #e7e8ec; }
.ct-tabs a:hover { color: #b02926; }
.ct-tabs a.is-active {
  background: #b02926;
  color: #fff;
  border-color: #b02926;
}
.ct-tabs a.is-active:hover { color: #fff; }

/* ---------- 面板通用 ---------- */
.ct-panel { padding: 52px 0 64px; background: #f4f5fa; }
.ct-section-title {
  margin: 0 0 38px;
  text-align: center;
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 700;
  color: #222;
}
.ct-section-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin: 14px auto 0;
  background: #b02926;
  border-radius: 2px;
}

/* ---------- 联系方式两栏 ---------- */
.ct-contact-layout {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 28px;
  align-items: stretch;
}

/* 左：信息卡（浅灰蓝底） */
.ct-info-card {
  background: #e8ebf2;
  border-radius: 6px;
  padding: 50px 40px 40px 48px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ct-company-name {
  margin: 0 0 26px;
  padding-bottom: 22px;
  font-size: 36px;
  font-weight: 400;
  color: #222;
  border-bottom: 1px solid #dfe3ec;
}
.ct-hotline { margin-bottom: 28px; }
.ct-hotline-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 16px;
  color: #777;
}
.ct-hotline-label svg { width: 18px; height: 18px; }
.ct-hotline-num {
  display: block;
  margin-top: 8px;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 800;
  color: #b02926;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  letter-spacing: 1px;
}
.ct-info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.ct-info-list li { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.ct-info-list svg { width: 20px; height: 20px; flex-shrink: 0; color: #b02926; }
.ct-k { color: #888; flex-shrink: 0; min-width: 64px; }
.ct-v { color: #333; word-break: break-all; }
a.ct-v:hover { color: #b02926; }

/* 右：地图卡 */
.ct-map-card {
  background: #fff;
  border: 1px solid #e7e8ec;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ct-map { position: relative; width: 100%; flex: 1; min-height: 420px; overflow: hidden; }
.ct-map-fallback { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.ct-map > .amap-container { position: absolute; inset: 0; z-index: 1; background: transparent; }
.ct-map .amap-info-content { padding: 14px 20px; border-radius: 2px; box-shadow: 0 3px 16px rgba(0,0,0,.12); }
.ct-map .amap-info-close { right: 8px !important; }
.ct-map-controls { position: absolute; top: 18px; right: 18px; z-index: 210; display: grid; gap: 8px; }
.ct-map-controls button { width: 36px; height: 36px; padding: 0; border: 1px solid #ddd; border-radius: 50%; background: #fff; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,.16); font: 400 25px/32px Arial,sans-serif; cursor: pointer; }
.ct-map-controls button:hover { color: #b02926; border-color: #b02926; }
.ct-map-controls button:focus-visible { outline: 2px solid #b02926; outline-offset: 2px; }
.ct-map-fallback-only .ct-map-controls { display: none; }
.ct-map-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  font-size: 15px;
  color: #b02926;
  border-top: 1px solid #eef0f3;
  transition: background .2s;
}
.ct-map-link:hover { background: #faf3f3; }

/* ---------- 销售经理（信息卡内列表） ---------- */
.ct-sales-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid #dfe3ec;
  display: grid;
  gap: 18px;
}
.ct-sales-list li { display: flex; align-items: center; gap: 12px; font-size: 17px; }
.ct-sales-list svg { width: 20px; height: 20px; flex-shrink: 0; color: #b02926; }
.ct-sales-name { font-weight: 700; color: #222; margin-right: 14px; white-space: nowrap; }
.ct-sales-phone {
  color: #b02926;
  font-weight: 700;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  letter-spacing: .5px;
  white-space: nowrap;
}
.ct-sales-phone:hover { color: #97191d; }

/* ---------- 在线留言 ---------- */
.ct-message-card {
  background: #fff;
  border-radius: 6px;
  padding: 48px 50px;
  box-shadow: 0 8px 30px rgba(24, 28, 38, .05);
}
.ct-message-card .ct-section-title { margin-bottom: 14px; }
.ct-section-sub {
  margin: 0 0 36px;
  text-align: center;
  font-size: 15px;
  color: #999;
}
.ct-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 26px;
}
.ct-cell { display: flex; flex-direction: column; }
.ct-cell-full { grid-column: 1 / -1; }
.ct-cell label { margin-bottom: 10px; font-size: 15px; color: #444; }
.ct-cell input,
.ct-cell textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #d8dae0;
  border-radius: 3px;
  font-size: 14px;
  color: #333;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.ct-cell textarea { resize: vertical; min-height: 120px; }
.ct-cell input::placeholder,
.ct-cell textarea::placeholder { color: #b6b8bf; }
.ct-cell input:focus,
.ct-cell textarea:focus {
  outline: none;
  border-color: #b02926;
  box-shadow: 0 0 0 3px rgba(176, 41, 38, .1);
}
.ct-cell input.is-error,
.ct-cell textarea.is-error {
  border-color: #d23b3f;
  background: #fdf3f3;
}

/* 表单提示 */
.ct-form-msg { margin: 22px 0 0; font-size: 14px; text-align: center; min-height: 20px; }
.ct-form-msg.is-error { color: #d23b3f; }
.ct-form-msg.is-success { color: #2e9e5b; }

/* 提交按钮：红色描边整宽，hover 实心 */
.ct-submit {
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  font-size: 16px;
  letter-spacing: 2px;
  color: #b02926;
  background: #fff;
  border: 1.5px solid #b02926;
  border-radius: 3px;
  transition: background .25s, color .25s;
}
.ct-submit:hover { background: #b02926; color: #fff; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  header { height: 64px; }
  .ct-banner { min-height: 200px; }
  .ct-tabbar-inner { flex-direction: column; align-items: stretch; gap: 14px; padding-top: 14px; padding-bottom: 14px; }
  .ct-tabs { display: none; }
  .ct-panel { padding: 38px 0 46px; }
  .ct-contact-layout { grid-template-columns: 1fr; gap: 22px; }
  .ct-info-card { padding: 30px 26px; }
  .ct-sales-list { margin-top: 20px; padding-top: 20px; gap: 16px; }
  .ct-message-card { padding: 32px 24px; }
}

@media (max-width: 600px) {
  .ct-banner { min-height: 170px; }
  .ct-banner-info h1 { font-size: 26px; }
  .ct-banner-info .banner-sub { letter-spacing: 5px; font-size: 13px; }
  .ct-section-title { margin-bottom: 28px; }
  .ct-company-name { font-size: 19px; }
  .ct-form-grid { grid-template-columns: 1fr; gap: 18px; }
  .ct-cell-full { grid-column: auto; }
  .ct-message-card { padding: 28px 18px; }
  .ct-info-list li { font-size: 14px; }
  .ct-sales-list li { font-size: 14px; gap: 10px; }
  .ct-sales-name { margin-right: 10px; }
}
