/* ============================================
   联系我们页 — 页面专属样式
   （通用样式在 static/css/style.css，本文件只放本页特有规则）
   主题色: #ff6600
   ============================================ */

/* ---------- 顶部总联系方式 ---------- */
.contact-hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.contact-hero-item {
  padding: 26px 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  text-align: left;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.contact-hero-item:nth-child(1) {
  animation-delay: 0.08s;
}
.contact-hero-item:nth-child(2) {
  animation-delay: 0.14s;
}

.contact-label {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-sub);
}

.contact-value {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--theme-text);
  text-decoration: none;
  word-break: break-all;
  transition: opacity 0.25s ease;
}

.contact-value:hover,
.contact-value:focus-visible {
  opacity: 0.75;
  outline: none;
}

.contact-note {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.6;
}

/* ---------- 三大板块 ---------- */
/* 每个板块一张卡片：标题栏 + 若干联系人条目 */
.contact-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.contact-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.contact-section:nth-child(1) {
  animation-delay: 0.18s;
}
.contact-section:nth-child(2) {
  animation-delay: 0.24s;
}
.contact-section:nth-child(3) {
  animation-delay: 0.3s;
}

/* 板块标题栏：主题色左竖条 + 分隔线 */
.contact-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  padding: 18px 24px;
  background: linear-gradient(
    90deg,
    rgba(255, 102, 0, 0.07) 0%,
    rgba(255, 102, 0, 0) 60%
  );
  border-bottom: 1px solid var(--card-border);
  border-left: 3px solid var(--theme);
}

.contact-section-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-main);
}

.contact-section-desc {
  font-size: 12.5px;
  color: var(--text-sub);
}

/* 联系人条目：桌面 2 列，窄屏 1 列 */
.contact-section-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 6px 24px 22px;
}

.contact-person {
  padding: 16px 0;
  border-bottom: 1px dashed var(--card-border);
}

.contact-section-body > .contact-person:nth-last-child(-n + 2) {
  border-bottom: none;
}

/* 右列条目在桌面加左侧内边距，形成分栏感 */
.contact-section-body > .contact-person:nth-child(even) {
  padding-left: 28px;
}

.contact-section-body > .contact-person:nth-child(odd) {
  padding-right: 28px;
}

.contact-person-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.contact-person-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.contact-person-role {
  padding: 1px 7px;
  font-size: 11.5px;
  color: var(--theme-text);
  background: rgba(255, 102, 0, 0.09);
  border-radius: 4px;
}

/* 联系方式行 */
.contact-lines {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
}

.contact-line-key {
  flex: 0 0 3.6em;
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
}

.contact-line-val {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: 0.3px;
  word-break: break-word;
  text-decoration: none;
}

/* ---------- 可点击复制的文本（.js-copy） ----------
   外观与普通文本一致，仅以虚线下划线 + 悬停色暗示可点击，
   不再渲染独立的按钮元素，版面更干净 */
.js-copy {
  display: inline;
  padding: 0;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: inherit;
  color: var(--theme-text);
  background: none;
  border: 0;
  border-bottom: 1px dashed rgba(255, 102, 0, 0.45);
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  word-break: break-word;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.js-copy:hover,
.js-copy:focus-visible {
  color: #fff;
  background: var(--theme);
  border-bottom-color: var(--theme);
  outline: none;
}

/* 复制成功：短暂变为绿色 */
.js-copy.is-copied {
  color: #fff;
  background: #22a06b;
  border-bottom-color: #22a06b;
}

/* 复制失败 */
.js-copy.is-copy-failed {
  color: #fff;
  background: #d64545;
  border-bottom-color: #d64545;
}

a.contact-line-val {
  color: var(--theme-text);
  transition: opacity 0.25s ease;
}

a.contact-line-val:hover,
a.contact-line-val:focus-visible {
  opacity: 0.75;
  outline: none;
}

/* 「微信同号」等补充说明 */
.contact-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sub);
  white-space: nowrap;
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .contact-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .contact-hero-item {
    padding: 22px 20px;
  }

  .contact-value {
    font-size: 18px;
  }

  .contact-section-body {
    grid-template-columns: 1fr;
    padding: 4px 20px 18px;
  }

  /* 单列时取消分栏内边距与末项去线规则 */
  .contact-section-body > .contact-person:nth-child(even),
  .contact-section-body > .contact-person:nth-child(odd) {
    padding-left: 0;
    padding-right: 0;
  }

  .contact-section-body > .contact-person:last-child {
    border-bottom: none;
  }

  .contact-section-body > .contact-person:nth-last-child(2) {
    border-bottom: 1px dashed var(--card-border);
  }

  .contact-section-head {
    padding: 16px 20px;
  }
}

@media (max-width: 360px) {
  .contact-line {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .contact-line-key {
    flex: none;
  }
}
