/**
 * 聯絡我們頁 contact.html
 * 須搭配 layout.css；body：wayto-has-shared-nav contact-page
 */

.contact-page {
  font-family: "Noto Sans TC", system-ui, sans-serif;
  color: var(--text, #1e293b);
  background: #fff;
  line-height: 1.65;
  font-size: 15px;
}

.contact-page .container {
  max-width: var(--layout-max, 1320px);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px) {
  .contact-page .container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

.contact-page a {
  color: inherit;
}

/* ── Hero ── */
.contact-hero {
  position: relative;
  min-height: clamp(420px, 52vw, 560px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #e8ecf4;
}

.contact-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #f4f6f9;
}

.contact-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 圖檔左側為留白漸層、右側為接待區與品牌牆 */
  object-position: left center;
  display: block;
}

.contact-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* 底圖已含左側淡白，僅補極淡遮罩以利字色穩定 */
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.18) 26%,
    rgba(255, 255, 255, 0.06) 45%,
    rgba(255, 255, 255, 0) 72%
  );
}

.contact-hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 48px;
  padding-bottom: 56px;
}

.contact-hero-copy {
  max-width: 40rem;
}

.contact-hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: #0f172a;
}

.contact-hero-copy p {
  margin: 0;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.8;
  color: #475569;
  max-width: 36rem;
}

/* ── 你想聊什麼 ── */
.contact-topics {
  padding: 72px 0 56px;
  background: #fff;
}

.contact-topics-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 0;
}

.contact-topics-head h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.contact-topics-lead {
  margin: 0 0 40px;
  font-size: 15px;
  color: #64748b;
  line-height: 1.7;
}

.contact-topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 8px;
  align-items: stretch;
}

.contact-topic-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  padding: 26px 16px 24px;
  border-radius: 14px;
  border: 2px solid #e8ecf1;
  background: #fafbfc;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.contact-topic-card:hover {
  border-color: #bfdbfe;
  background: #fff;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.06);
}

.contact-topic-card.is-selected {
  border-color: var(--blue, #2563eb);
  background: #fff;
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.12);
}

.contact-topic-card-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: transparent;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.contact-topic-card.is-selected .contact-topic-card-check {
  border-color: var(--blue, #2563eb);
  background: var(--blue, #2563eb);
  color: #fff;
}

.contact-topic-icon {
  width: 100%;
  max-width: 168px;
  height: 152px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-topic-icon img {
  width: 132px;
  height: 132px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

@media (min-width: 1025px) {
  .contact-topic-icon {
    max-width: 200px;
    height: 176px;
    margin-bottom: 18px;
  }

  .contact-topic-icon img {
    width: 156px;
    height: 156px;
  }

  .contact-topic-card {
    min-height: 320px;
  }
}

.contact-topic-card h3 {
  margin: 0 0 10px;
  width: 100%;
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.contact-topic-card .contact-topic-lines {
  flex: 1;
  width: 100%;
  max-width: 17rem;
  margin: 0 auto;
  font-size: 13px;
  line-height: 1.65;
  color: #64748b;
  min-height: 2.8em;
}

@media (max-width: 1024px) {
  .contact-topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .contact-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .contact-topic-card {
    min-height: 0;
    padding: 18px 10px 16px;
    border-radius: 12px;
  }

  .contact-topic-card-check {
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    font-size: 11px;
  }

  .contact-topic-icon {
    height: 92px;
    margin-bottom: 10px;
  }

  .contact-topic-icon img {
    width: 82px;
    height: 82px;
  }

  .contact-topic-card h3 {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .contact-topic-card .contact-topic-lines {
    min-height: 0;
    font-size: 12px;
    line-height: 1.55;
  }
}

/* ── 表單 + 側欄 ── */
.contact-split {
  padding: 64px 0 72px;
  background: linear-gradient(180deg, #f4f7fc 0%, #eef2f9 100%);
  scroll-margin-top: 88px;
}

.contact-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px 56px;
  align-items: start;
}

.contact-form-card {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px 36px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
}

.contact-form-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
}

.contact-form-lead {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.55;
  color: #64748b;
}

.contact-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-field--full {
  grid-column: 1 / -1;
}

.contact-field label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.contact-field input,
.contact-field textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  font: inherit;
  font-size: 15px;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--blue, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.contact-form-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  font-size: 12px;
  line-height: 1.65;
  color: #64748b;
}

.contact-form-note svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--blue, #2563eb);
}

.contact-form-actions {
  margin-top: 22px;
}

.contact-btn-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--navy, #1a2b5e);
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.contact-btn-submit:hover {
  background: var(--blue, #2563eb);
}

.contact-btn-submit:active {
  transform: translateY(1px);
}

.contact-form-done {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 14px;
}

.contact-form-done.is-visible {
  display: block;
}

/* 側欄 */
.contact-aside h2 {
  margin: 0 0 22px;
  font-size: clamp(22px, 2.2vw, 26px);
  font-weight: 800;
  color: #0f172a;
}

.contact-aside-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-aside-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-aside-ico {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-sizing: border-box;
}

.contact-aside-ico img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.contact-aside-item h3 {
  margin: 0 0 6px;
  font-size: clamp(16px, 1.35vw, 18px);
  font-weight: 700;
  color: #0f172a;
}

.contact-aside-item p {
  margin: 0;
  font-size: clamp(14px, 1.15vw, 15px);
  line-height: 1.65;
  color: #64748b;
}

@media (max-width: 900px) {
  .contact-split-grid {
    grid-template-columns: 1fr;
  }

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

/* ── 首頁式數據：值得信賴的專業團隊（無 icon） ── */
.contact-page-team.team {
  background: #fff;
  padding: 64px 0 72px;
  border-top: 1px solid var(--border, #e2e8f0);
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.contact-page-team .section-title {
  text-align: center;
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 700;
  color: var(--navy, #1a2b5e);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.contact-page-team .stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--border, #e2e8f0);
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.contact-page-team .stat-item {
  text-align: center;
  padding: 40px 20px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-right: 1px solid var(--border, #e2e8f0);
}

.contact-page-team .stat-item:last-child {
  border-right: none;
}

.contact-page-team .stat-num {
  font-size: clamp(40px, 4.5vw, 52px);
  font-weight: 900;
  color: var(--navy, #1a2b5e);
  line-height: 1.05;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.contact-page-team .stat-num sup {
  font-size: 0.45em;
  vertical-align: super;
  font-weight: 800;
}

.contact-page-team .stat-num--word {
  font-size: clamp(32px, 3.6vw, 44px);
  letter-spacing: -0.03em;
}

.contact-page-team .stat-kicker {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy, #1a2b5e);
  margin-bottom: 6px;
}

.contact-page-team .stat-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.55;
  max-width: 200px;
}

@media (max-width: 1100px) {
  .contact-page-team .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-page-team .stat-item {
    padding: 28px 20px;
  }

  .contact-page-team .stat-item:nth-child(2n) {
    border-right: none;
  }

  .contact-page-team .stat-item:nth-child(3),
  .contact-page-team .stat-item:nth-child(4) {
    border-top: 1px solid var(--border, #e2e8f0);
  }
}

@media (max-width: 720px) {
  .contact-page-team {
    padding: 48px 0 56px;
  }

  .contact-page-team .section-title {
    font-size: 22px;
  }

  .contact-page-team .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .contact-page-team .stat-item {
    border-bottom: 1px solid var(--border, #e2e8f0) !important;
    padding: 24px 14px;
    justify-content: center;
  }

  .contact-page-team .stat-item:nth-child(2n) {
    border-right: none !important;
  }

  .contact-page-team .stat-item:nth-last-child(-n + 2) {
    border-bottom: none !important;
  }

  .contact-page-team .stat-num {
    font-size: 34px;
  }

  .contact-page-team .stat-num--word {
    font-size: 28px;
  }

  .contact-page-team .stat-kicker {
    font-size: 14px;
  }
}

/* ── 聯絡 + 地圖 ── */
.contact-map-block {
  padding: 72px 0 80px;
  background: #fff;
}

.contact-map-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px 48px;
  align-items: stretch;
}

.contact-map-info h2 {
  margin: 0 0 24px;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.contact-map-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-map-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.65;
  color: #475569;
}

.contact-map-list svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  color: var(--blue, #2563eb);
}

.contact-map-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  min-height: 300px;
  background: #e8ecf1;
}

.contact-map-frame iframe {
  display: block;
  width: 100%;
  height: 300px;
  min-height: 300px;
  border: 0;
}

@media (max-width: 900px) {
  .contact-map-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 底部 CTA ── */
.contact-page-cta.contact-page-cta{padding-top:30px;padding-bottom:50px} /* CTA 高度統一 cases 30/50；覆寫 mobile media */
.contact-page-cta {
  position: relative;
  padding: 30px 0 50px;
  overflow: hidden;
  color: var(--navy, #1a2b5e);
  /* 底圖等高於區塊全高、靠左；右側由漸層補滿（圖過寬時由 overflow 裁切） */
  background-color: #f2efe8;
  background-image:
    url("../uploads/contact-page-cta-bg.png"),
    linear-gradient(
      90deg,
      #e6e2da 0%,
      #ebe7e0 22%,
      #f0ebe4 48%,
      #f5f1eb 78%,
      #faf8f3 100%
    );
  background-size:
    auto 100%,
    100% 100%;
  background-position:
    left bottom,
    0 0;
  background-repeat: no-repeat, no-repeat;
}

.contact-page-cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
}

.contact-page-cta-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--navy, #1a2b5e);
}

.contact-page-cta-copy p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: rgba(30, 41, 59, 0.88);
  max-width: 28rem;
}

.contact-page-cta-copy p + p {
  margin-top: 0.35em;
}

.contact-page-cta .contact-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  background: var(--navy, #1a2b5e);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.contact-page-cta .contact-cta-btn:hover {
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22);
}

@media (max-width: 720px) {
  .contact-page-cta {
    padding: 48px 0 56px;
  }

  .contact-page-cta-inner {
    flex-direction: column;
    align-items: stretch;
  }
}
