/* =========================================================================
 * contact.css — 联系我们栏目（category_contact.html）
 *
 * 设计目标：还原原站 secowarwick.cn catid=5 的全球办事处可切换地图页
 *   - 世界底图 Seco-map.png（1200×557）上绝对定位热点按钮（百分比坐标）—— 唯一切换入口
 *   - 当前选中办事处信息区（单块，随热点切换刷新；后台定向维护改造后：
 *     左=缩略图(image)，右=单一富文本 content，排版由 UEditor 编辑器负责）
 *   - 高德地图容器 #container（原站活跃实现，zoom 8；加载失败时 .is-degraded 隐藏）
 *   - 布局顺序：世界底图+热点 → 信息区 → 高德地图（最底部）
 *
 * 复用 inner.css 设计令牌（--red / --text / --section-pad 等），保持全站一致。
 * cache-buster：引用时须带 ?v=20260804c，改样式请递增尾字母（c→d→e）。
 * ========================================================================= */

/* ---------- 英雄横幅（与 media / press 同一视觉语言） ---------- */
.contact-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  background: #222 url(/static/cms/images/media/media_center.jpg) center / cover no-repeat;
}
.contact-hero .container {
  width: 100%;
}
/* 用 #et-main-area 提权，压过 inner.css 的 #et-main-area h1（30px/黑）规则 */
#et-main-area .contact-hero__title {
  color: #fff;
  font-size: 52px;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  position: relative;
}
/* 标题前的红色平行四边形斜杠（加宽加高，并用 z-index 分层让标题文字压住块的右半） */
#et-main-area .contact-hero__slash {
  display: inline-block;
  width: 0.9em;
  height: 1.3em;
  background: var(--red);
  transform: skewX(-18deg);
  margin-right: 0.25em;
  vertical-align: -0.12em;
  position: relative;
  z-index: 1;
}
#et-main-area .contact-hero__title-text {
  position: relative;
  z-index: 2;
  margin-left: -0.62em;
}

/* ---------- 面包屑 + 页面大标题（白底，位于 banner 下方） ---------- */
.contact-titlebar {
  background: #fff;
  padding: 28px 0 24px;
}
.contact-breadcrumb {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  padding: 0 15px 10px;
}
.contact-breadcrumb a {
  color: #333;
  text-decoration: none;
}
.contact-breadcrumb a:hover {
  color: var(--red);
}
.contact-breadcrumb .sep {
  color: #999;
  margin: 0 8px;
}
.contact-breadcrumb .cur {
  color: #555;
}
.contact-page-title {
  padding: 0 15px;
}
#et-main-area .contact-page-title h1 {
  position: relative;
  display: inline-block;
  font-size: 30px;
  font-weight: 600;
  color: #222;
  margin: 0;
  padding-bottom: 14px;
  line-height: 1.2;
}
#et-main-area .contact-page-title h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 3px;
  background: var(--red);
}

/* ---------- 栏目介绍 ---------- */
.contact-intro {
  background: #fff;
  padding: 0 0 8px;
}
.contact-intro__text {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-2, #666);
  margin: 0;
  padding: 0 15px;
}

/* ---------- 主体区 ---------- */
.contact-body {
  background: #fff;
  padding: 20px 0 var(--section-pad, 54px);
  overflow-x: hidden; /* 兜底：地图通屏(100vw)时避免横向滚动条 */
}

/* ============ 世界底图 + 热点（唯一切换入口） ============ */
.contact-map-wrap {
  position: relative;
  padding: 0 15px;
}

/* 底图容器：保持 1200×557 比例 */
.contact-dotted-map {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 26px;
  line-height: 0;
}
.contact-dotted-map__img {
  display: block;
  width: 100%;
  height: auto;
}

/* 热区按钮：透明覆盖在底图名称文字上（点击名称切换办事处）。
   定位沿用 map_x/map_y（后台维护的名称文字中心锚点），中心对齐。 */
.contact-hotspot {
  position: absolute;
  width: 10%;            /* 兜底尺寸：未匹配专属热区的办事处 */
  height: 6%;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  transform: translate(-50%, -50%);
  z-index: 2;
  transition: background .18s ease;
}
/* 各办事处名称区域宽度（百分比随底图等比缩放；宽度按图上文字实际长度配置，
   避免相邻名称热区互相重叠，如顶部 Germany 与总部两条） */
.contact-hotspot[data-loc="loc-107"] { width: 8%; }    /* RETECH */
.contact-hotspot[data-loc="loc-106"] { width: 15%; }   /* SECO/WARWICK USA */
.contact-hotspot[data-loc="loc-104"] { width: 17%; }   /* SECO/WARWICK Germany */
.contact-hotspot[data-loc="loc-103"] { width: 13.5%; } /* SECO/WARWICK（总部） */
.contact-hotspot[data-loc="loc-102"] { width: 19%; }   /* SECO/WARWICK Services */
.contact-hotspot[data-loc="loc-100"] { width: 17%; }   /* SECO/WARWICK China（天津） */
.contact-hotspot[data-loc="loc-101"] { width: 15%; }   /* SECO/WARWICK India */

/* 悬停/选中反馈：轻微底色提示可点区域与当前选中办事处 */
.contact-hotspot:hover { background: rgba(220, 41, 30, 0.08); }
.contact-hotspot.is-active { background: rgba(220, 41, 30, 0.15); }

/* ============ 当前选中办事处信息区（单块，随热点切换刷新） ============ */
.contact-office-info {
  position: relative;
  padding: 0 15px 30px;
}

/* 信息卡：单块常显（不再依赖 is-active 多卡切换） */
.contact-card {
  display: flex;
  position: relative;
  align-items: flex-start;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 26px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  animation: contact-fade .28s ease;
}
@keyframes contact-fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 总部角标 */
.contact-card__badge {
  position: absolute;
  top: 0;
  right: 22px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--red, #dc291e);
  border-radius: 0 0 4px 4px;
  letter-spacing: .5px;
}

/* 左列图片 */
.contact-card__side {
  flex: 0 0 340px;
  width: 340px;
  margin-right: 30px;
}
.contact-card__img {
  display: block;
  width: 340px;
  height: 227px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #eee;
}
.contact-card__img--empty {
  background: #f0f0f0 url(/static/cms/images/placeholder-logo.png) center / 120px auto no-repeat;
}

/* 右列信息（后台定向维护改造：单一富文本 content，排版由 UEditor 负责） */
.contact-card__main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
#et-main-area .contact-card__name {
  color: var(--red, #dc291e);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 14px;
  line-height: 1.4;
}

/* content 富文本容器：迁移 HTML 结构为
   <p class="office-intro">…</p><ul class="office-meta"><li><strong>标签：</strong><span>/<a>值</a></li>…</ul> */
.contact-card__content {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text, #333);
  flex: 1 1 auto;
}

/* 卡片右下角：平行四边形「REQUEST FOR QUOTE」按钮 */
.contact-quote-btn {
  align-self: flex-start;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: var(--red, #dc291e);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  border: none;
  transform: skewX(-12deg);
  transition: background .2s ease;
}
.contact-quote-btn:hover {
  background: #b71c12;
}
.contact-quote-btn span {
  display: inline-block;
  transform: skewX(12deg); /* 反向倾斜，文字回正 */
}
.contact-card__content p {
  margin: 0 0 12px;
}
.contact-card__content p:last-child {
  margin-bottom: 0;
}
.contact-card__content .office-intro {
  font-size: 15px;
  line-height: 1.9;
  color: var(--text, #333);
  margin: 0 0 14px;
}
.contact-card__content .office-meta {
  list-style: none;
  margin: 0;
  padding: 14px 0 0;
  border-top: 1px solid #e6e6e6;
}
.contact-card__content .office-meta li {
  display: flex;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text, #333);
  margin: 0 0 6px;
}
.contact-card__content .office-meta li:last-child {
  margin-bottom: 0;
}
.contact-card__content .office-meta li::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  background: var(--red, #dc291e);
  transform: translateY(-1px);
}
.contact-card__content .office-meta strong {
  flex: 0 0 78px;
  font-weight: 600;
  color: #222;
  font-size: 13px;
}
.contact-card__content .office-meta strong::after {
  content: ":";
  margin-left: 2px;
}
.contact-card__content .office-meta span,
.contact-card__content .office-meta a {
  word-break: break-all;
}
.contact-card__content .office-meta a {
  color: var(--text, #333);
  text-decoration: none;
}
.contact-card__content .office-meta a:hover {
  color: var(--red, #dc291e);
  text-decoration: underline;
}
.contact-card__content-empty {
  color: var(--text-meta, #999);
  font-size: 14px;
}

/* ============ 高德地图（最底部） ============ */
/* 与底图同宽；加载失败时 JS 加 .is-degraded 隐藏 */
.contact-amap {
  width: 100vw;
  max-width: 100vw;
  margin: 0 auto 14px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  position: relative;
  z-index: 1;
}
.contact-amap.is-degraded {
  display: none;
}
.contact-map-degraded {
  max-width: 1200px;
  margin: 0 auto 14px;
  padding: 14px 18px;
  font-size: 14px;
  color: #8a6d3b;
  background: #fcf8e3;
  border: 1px solid #faebcc;
  border-radius: 4px;
}

/* ---------- 空状态 ---------- */
.contact-empty {
  padding: 40px 15px;
  font-size: 15px;
  color: var(--text-meta, #999);
  text-align: center;
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  #et-main-area .contact-hero__title {
    font-size: 40px;
  }
  .contact-hero {
    min-height: 240px;
  }
  .contact-card__side {
    flex-basis: 260px;
    width: 260px;
  }
  .contact-card__img {
    width: 260px;
    height: 173px;
  }
}

@media (max-width: 767px) {
  /* 窄屏信息卡上下堆叠 */
  .contact-card {
    display: flex;
    padding: 18px;
    flex-direction: column;
  }
  .contact-card__side {
    width: 100%;
    max-width: 340px;
    margin: 0 auto 18px;
  }
  .contact-card__img {
    width: 100%;
    height: auto;
  }
  .contact-card__main {
    width: 100%;
  }
  #et-main-area .contact-hero__title {
    font-size: 30px;
  }
  .contact-hero {
    min-height: 180px;
  }
  #et-main-area .contact-page-title h1 {
    font-size: 24px;
  }
  .contact-card__content .office-meta li {
    flex-wrap: wrap;
  }
  .contact-card__content .office-meta strong {
    flex-basis: 62px;
  }
}
