/* 只针对 Contact 页面内容 */

/* 中间内容容器：左右布局 */
.contact-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 40px 20px;
  margin-left: 60px;
  min-height: 100vh;
  gap: 40px;
  position: relative;
}

/* 左边区域 */
.left-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-card {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px 30px;
  width: 200px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.contact-card h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #003366;
}

.contact-info {
  max-width: 600px;
  text-align: left;
}

.info-row {
  display: flex;
  align-items: flex-start;
  margin: 8px 0;
}

.label {
  font-weight: bold;
  color: #003366;
  min-width: 140px;
}

.value {
  flex: 1;
  word-wrap: break-word;
  line-height: 1.6;
}

/* 分割横线 */
.divider {
  border: none;
  border-top: 4px solid orange;
  margin-top: 200px;
  margin-bottom: 20px;
  width: 100vw;
  position: relative;
  left: -60px;
}

/* 右边大格子 */
.right-section {
  flex: 0 0 700px;
  align-self: flex-start;
}

.big-box {
  background: #fdf3e7;
  border: 3px solid #ffa500;
  border-radius: 12px;
  padding: 30px;
  min-height: 250px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.big-box h2 {
  margin-top: 0;
  color: black;
}

.big-box iframe {
  border: 0;
  width: 100%;
  height: 300px;
  border-radius: 8px;
}

/* 横线下面的大标题和说明 */
.contact-extra {
  margin: -250px auto 0 auto;
  text-align: center;
  padding: 10px 20px;
  max-width: 900px;
}

.contact-extra h1 {
  font-size: 2.5rem;
  color: #003366;
  margin-bottom: 15px;
}

.contact-extra p {
  font-size: 1.2rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto 20px auto;
  color: #333;
}

/* 表单区域 */
.contact-form {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* 左右两列 */
.form-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.form-group label {
  font-weight: bold;
  color: #003366;
  margin-bottom: 8px;
}

/* input, textarea, select 样式 */
.form-group input,
.form-group textarea,
.form-group select {
  width: 250px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  box-sizing: border-box;
}

/* Company Address 特殊 */
#address {
  width: 350px;
  resize: none;   /* 不能调整大小 */
  height: 220px;  /* 固定高度 */
}

/* ✅ Service 下拉框宽度改为 250px（和 Phone Number 对齐） */
#service {
  width: 250px;
}

/* Subject 和 Message 占整行 */
.full-width {
  max-width: 740px;
  margin: 20px auto;
}

.full-width input,
.full-width textarea {
  width: 100%;
}

#message {
  height: 200px;
  resize: none;
}

/* Submit 按钮样式 */
.submit-btn {
  display: inline-block;
  background: #003366;
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 鼠标悬停效果 */
.submit-btn:hover {
  background: #ffa500;
  color: #003366;
}

/* 点击时的缩放动画 */
.submit-btn:active {
  transform: scale(0.95);
}

/* ✅ 按钮容器，让按钮独立一行并居中 */
.form-submit {
  width: 100%;
  text-align: center;
  margin: 20px 0;
}

/* ===================== 手机端调整 ===================== */
@media (max-width: 768px) {
  /* 将左右两列改为上下排列，地图在 Head Office 下方 */
  .contact-container {
    flex-direction: column;
    align-items: center;
    margin-left: 0;
    padding: 80px 20px 20px 20px; /* ✅ 防止被顶部遮挡 */
  }

  /* ✅ 修复 Head Office 卡片显示 */
  .left-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;  /* 居中 Head Office */
    justify-content: center;
    text-align: center;
    margin-top: 10px;
  }

  .contact-card {
    width: 90%;
    max-width: 350px;
    margin: 0 auto 20px auto;
    text-align: center;
  }

  .contact-info {
    width: 100%;
    text-align: left;
    padding: 0 10px;
  }

  /* Big-box（地图）自适应宽高 */
  .big-box {
    width: 100%;
    min-height: 200px;
    max-height: 350px;
    padding: 15px;
    box-sizing: border-box;
    margin-top: 20px;
    position: relative;
  }

  .big-box iframe {
    width: 100%;
    height: 100%;
  }

  /* 表单适应屏幕宽度 */
  .contact-form {
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    width: 100%;
    max-width: 350px;
    font-size: 0.9rem;
  }

  #address,
  #service {
    width: 100%;
  }

  .full-width {
    max-width: 100%;
  }

  /* ✅ 修复 divider 在手机端顶太高的问题 */
  .divider {
    margin-top: 40px;
    width: 100%;
    left: 0;
  }

  /* ✅ 修复地图与 Contact Us 距离太远 */
  .contact-extra {
    margin: 0 auto 20px auto; /* ✅ 完全移除负 margin，贴近地图 */
    padding-top: 10px;
    position: relative;
    z-index: auto;
  }

  /* 调整文字大小 */
  .contact-extra h1 {
    font-size: 1.8rem;
  }

  .contact-extra p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .contact-card h2 {
    font-size: 1.2rem;
  }

  .contact-info, .label, .value {
    font-size: 0.9rem;
  }

  .submit-btn {
    font-size: 0.9rem;
    padding: 10px 20px;
  }
}
