/* ============================================================
   contact.css —— 联系我们页专属（contact.html）
   依赖：common.css（导航/页脚/侧边栏/变量）
   ============================================================ */


/* ============ 地图 + 联系卡片区域 ============ */
.contact-info {
  background: #f5f9ff;
  padding: 0 0 80px;
}
/* 通栏地图（Leaflet 容器）：z-index 圈住地图内部图层，避免盖过下方联系卡片 */
.contact-map {
  width: 100%;
  height: 430px;
  background: #e8f0f8;
  position: relative;
  z-index: 1;
}

/* 联系卡片：4 列网格 */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: -60px;
  position: relative;
  z-index: 2;
}
.contact-card {
  position: relative;
  background: #fff;
  border-radius: 0;
  box-shadow: 3px 5px 18px rgba(34, 23, 20, 0.08);
  padding: 50px 20px 40px;
  text-align: center;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 3px 8px 24px rgba(34, 23, 20, 0.12);
}
.contact-card:hover,
.contact-card:focus-within {
  background: var(--c-primary);
  color: #f4f4f4;
}
.contact-card:hover .contact-card__label,
.contact-card:hover .contact-card__value,
.contact-card:focus-within .contact-card__label,
.contact-card:focus-within .contact-card__value {
  color: #f4f4f4;
}

/* 卡片装饰圆环（c_bg.png） */
.contact-card__deco {
  position: absolute;
  width: 140px;
  height: 140px;
  opacity: 0.55;
  pointer-events: none;
}
/* 白底卡片上圆环置浅灰 */
.contact-card__deco {
  opacity: 0.12;
  filter: grayscale(1);
}
.contact-card:hover .contact-card__deco,
.contact-card:focus-within .contact-card__deco {
  opacity: 0.55;
  filter: none;
}
/* 第 1 张：左上 */
.contact-card:nth-child(1) .contact-card__deco {
  top: -30px;
  left: -30px;
}
/* 第 2 张：左下 */
.contact-card:nth-child(2) .contact-card__deco {
  bottom: -30px;
  left: -30px;
}
/* 第 3 张：右上 */
.contact-card:nth-child(3) .contact-card__deco {
  top: -30px;
  right: -30px;
}
/* 第 4 张：右下 */
.contact-card:nth-child(4) .contact-card__deco {
  bottom: -30px;
  right: -30px;
}

.contact-card__icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 16px;
}
.contact-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: filter .3s;
}
.contact-card:hover .contact-card__icon img,
.contact-card:focus-within .contact-card__icon img {
  filter: brightness(0) invert(1);
}
.contact-card__label {
  font-size: 18px;
  font-weight: 700;
  color: #464646;
  margin-bottom: 14px;
}
.contact-card__value {
  font-size: 15px;
  color: #464646;
  line-height: 1.7;
}
.contact-card__qr {
  width: 85px;
  height: 88px;
  margin: 0 auto;
  display: block;
}

/* ============ 留言表单区域 ============ */
.contact-form-section {
  padding: 80px 0 100px;
  background: #fff;
}
.contact-form__heading {
  font-size: 24px;
  font-weight: 700;
  color: #464646;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 50px;
}
.contact-form {
  max-width: 1400px;
  margin: 0 auto;
}
.contact-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}
.contact-form__row--full {
  grid-template-columns: 1fr;
}
.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  height: 48px;
  padding: 0 40px;
  border: none;
  border-radius: 10px;
  background: #f5f7ff;
  font-size: 15px;
  color: #333;
  outline: none;
  transition: box-shadow 0.2s;
}
.contact-form__field input::placeholder,
.contact-form__field textarea::placeholder {
  color: #5C6584;
}
/* 必填项红星：叠在输入框左 padding 区，输入内容后随占位符一起隐藏 */
.contact-form__field {
  position: relative;
}
.contact-form__star {
  position: absolute;
  left: 26px;
  top: 50%;
  transform: translateY(-50%);
  color: #b60005;
  font-size: 15px;
  line-height: 1;
  pointer-events: none;
}
.contact-form__field--textarea .contact-form__star { top: 26px; }
.contact-form__field input:not(:placeholder-shown) + .contact-form__star,
.contact-form__field textarea:not(:placeholder-shown) + .contact-form__star {
  opacity: 0;
}
.contact-form__field input:focus,
.contact-form__field textarea:focus {
  box-shadow: 0 0 0 2px var(--c-primary);
}
.contact-form__field--textarea textarea {
  height: 150px;
  padding: 18px 40px;
  resize: vertical;
}
.contact-form__action {
  text-align: center;
  margin-top: 40px;
}
/* 与产品详情页提交按钮同款：蓝底胶囊 + hover 深蓝光晕扩散 */
.contact-form__submit {
  display: inline-block;
  min-width: 150px;
  height: 46px;
  padding: 0 40px;
  border: none;
  border-radius: 28px;
  background: var(--c-primary);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  transition: all .25s;
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.contact-form__submit::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 66, 152, 0.55) 0%, rgba(0, 66, 152, 0) 70%);
  transition: width .5s ease, height .5s ease;
  z-index: -1;
}
.contact-form__submit:hover::before {
  width: 260px;
  height: 260px;
}


/* ============================================================
   移动端适配（≤768px）—— 联系我们页专属
   ============================================================ */
@media (max-width: 768px) {
  .contact-info { padding-bottom: 44px; }
  .contact-map { height: 260px; }

  /* 联系卡片 4 列改单列 */
  .contact-cards { grid-template-columns: 1fr; gap: 14px; margin-top: -30px; }
  .contact-card { padding: 28px 16px 26px; }
  .contact-card__icon { width: 40px; height: 40px; margin-bottom: 12px; }
  .contact-card__label { font-size: 17px; margin-bottom: 10px; }
  .contact-card__value { font-size: 14px; }

  /* 留言表单 */
  .contact-form-section { padding: 40px 0 56px; }
  .contact-form__heading { font-size: 22px; margin-bottom: 28px; }
  .contact-form__row { grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
  .contact-form__field input,
  .contact-form__field textarea {
    height: 48px;
    padding: 0 20px;
    font-size: 15px;
  }
  .contact-form__field--textarea textarea {
    height: 140px;
    padding: 14px 20px;
  }
  .contact-form__star { left: 8px; font-size: 15px; }
  .contact-form__field--textarea .contact-form__star { top: 23px; }
  .contact-form__action { margin-top: 28px; }
  .contact-form__submit { height: 46px; font-size: 15px; }
}
