/* ========================================
   Contact 页面专用样式
   全局导航 / 页脚样式见 css/styles.css
   ======================================== */

.contact-page {
  --contact-panel-width: 1400px;
  padding-top: var(--header-height);
  background: var(--color-white);
}

.contact-hero {
  --contact-banner-height: 480px;
  --contact-panel-height: 680px;
  --contact-panel-overlap: calc(var(--contact-panel-height) / 2);
  position: relative;
  padding-bottom: 100px;
}

.contact-banner {
  width: 100%;
  height: var(--contact-banner-height);
  background: linear-gradient(to right, #005dc7 0%, #004195 100%);
}

.contact-banner-title-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  box-sizing: border-box;
  height: calc(var(--contact-banner-height) - var(--contact-panel-overlap));
  padding: 52px 24px;
  pointer-events: none;
}

.contact-panel-align {
  width: var(--contact-panel-width);
  max-width: 100%;
  margin: 0 auto;
  pointer-events: auto;
}

.contact-banner-title {
  margin: 0;
  font-size: 30px;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  text-align: left;
}

/* ========== Contact panel ========== */
.contact-panel-wrap {
  display: flex;
  justify-content: center;
  margin-top: calc(-1 * var(--contact-panel-overlap));
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.contact-panel {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  align-items: stretch;
  width: var(--contact-panel-width);
  min-height: var(--contact-panel-height);
  max-width: 100%;
  background: #eeeef3;
}

.contact-panel-info {
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  padding: 48px 64px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  align-self: center;
  flex-wrap: nowrap;
  gap: 32px;
  min-width: 0;
}

.contact-info-label {
  margin: 0;
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 400;
  color: #555;
  line-height: 1.5;
  white-space: nowrap;
}

.contact-info-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 400;
  color: #015fcb;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.contact-info-email:hover {
  opacity: 0.8;
}

.contact-info-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: #015fcb;
}

.contact-panel-divider {
  width: 1px;
  background: #999;
}

.contact-panel-form {
  box-sizing: border-box;
  padding: 48px 64px 40px;
  overflow: visible;
}

.contact-form-title {
  margin: 0 0 14px;
  font-size: 30px;
  font-weight: 400;
  color: #555;
  line-height: 1.25;
}

.contact-form-accent {
  width: 60px;
  height: 2px;
  margin-bottom: 20px;
  background: #0982e5;
}

.contact-form-intro {
  margin: 0 0 28px;
  font-size: 16px;
  font-weight: 400;
  color: #777;
  line-height: 1.6;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 20px;
  margin-bottom: 20px;
}

.contact-field {
  min-width: 0;
}

.contact-input,
.contact-textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #222;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s ease;
}

.contact-input::placeholder,
.contact-textarea::placeholder {
  color: #999;
}

.contact-input:focus,
.contact-textarea:focus {
  border-color: #015fcb;
}

.contact-input.is-invalid,
.contact-textarea.is-invalid {
  border-color: #d93025;
}

.contact-message-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 400;
  color: #444;
  line-height: 1.4;
}

.contact-required {
  margin-left: 2px;
  color: #d93025;
}

.contact-textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-field-error {
  min-height: 18px;
  margin: 6px 0 0;
  font-size: 12px;
  color: #d93025;
  line-height: 1.4;
}

.contact-submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 164px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #015fcb;
  font-size: 16px;
  font-weight: 400;
  font-family: inherit;
  color: #fff;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.contact-submit:hover {
  background: #014aa3;
}

.contact-submit:disabled {
  background: #7aa8dc;
  cursor: not-allowed;
}

/* ========== Contact modal ========== */
body.contact-modal-open {
  overflow: hidden;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.contact-modal[hidden] {
  display: none;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.contact-modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 32px 28px 24px;
  background: #fff;
  border: 1px solid #d0d4dc;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  text-align: center;
}

.contact-modal-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 400;
  color: #222;
  line-height: 1.3;
}

.contact-modal-message {
  margin: 0 0 24px;
  font-size: 15px;
  line-height: 1.6;
  color: #555;
}

.contact-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 36px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: #015fcb;
  font-size: 15px;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.contact-modal-btn:hover {
  background: #014aa3;
}

/* ========== 地图板块 ========== */
.contact-page .about-location {
  background: #fff;
}

.contact-page .about-location-panel {
  width: var(--contact-panel-width);
  max-width: 100%;
  margin: 0 auto;
}

@media (max-width: 1100px) {
  .contact-panel {
    grid-template-columns: 1fr;
    height: auto;
  }

  .contact-panel-divider {
    width: 100%;
    height: 1px;
  }

  .contact-panel-info {
    grid-template-rows: auto;
    gap: 28px;
    padding: 40px 32px 32px;
  }

  .contact-info-item {
    align-self: auto;
    flex-wrap: wrap;
    gap: 12px 20px;
  }

  .contact-panel-form {
    padding: 32px;
  }
}

@media (max-width: 768px) {
  .contact-hero {
    --contact-banner-height: 320px;
    --contact-panel-height: auto;
    --contact-panel-overlap: 180px;
    padding-bottom: 72px;
  }

  .contact-banner-title-wrap {
    padding: 32px 24px;
  }

  .contact-banner-title {
    font-size: 24px;
  }

  .contact-panel-info,
  .contact-panel-form {
    padding: 28px 20px;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }

  .contact-form-title {
    font-size: 26px;
  }
}
