/* ==========================================================
   聯絡我們（contact.php）
   參照 reference/contact.html + reference/css/contact.css
========================================================== */

.contact-page {
  position: relative;
}

/* ---------------- 內容白底面板 ---------------- */
.contact-page__panel {
  position: relative;
  z-index: 2;
  background: #fff;
  border-radius: 65px 65px 0 0;
  padding: 48px 56px 10rem;
  margin: -60px auto 0;
}

.contact-page__lead {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 900px;
  margin: 0 0 20px;
}

/* 後台編輯器輸出的區塊（block_content / text） */
.contact-page__lead p {
  margin: 0 0 20px;
}

.contact-page__lead img {
  max-width: 100%;
  height: auto;
}

/* ---------------- 表單 ---------------- */
.contact-form {
  margin-top: 3rem;
}

.contact-form__heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-soft);
  padding-bottom: 12px;
  margin: 44px 0 24px;
  border-bottom: 1.5px solid var(--ink-soft);
}

.contact-form__heading:first-of-type {
  margin-top: 8px;
}

.contact-form__row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.contact-form__row--textarea {
  align-items: flex-start;
}

.contact-form__row label {
  font-size: 16px;
  color: var(--ink-soft);
}

.contact-form__row input[type="text"],
.contact-form__row input[type="email"],
.contact-form__row input[type="tel"],
.contact-form__row select,
.contact-form__row textarea {
  width: 100%;
  border: 1px solid #4d4a49;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 14px;
  color: #4d4a49;
  background: #fff;
}

.contact-form__row select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8"><path d="M1 1l5 5 5-5" stroke="%234d4a49" stroke-width="1.5" fill="none"/></svg>') no-repeat right 14px center;
}

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

/* validator 的錯誤訊息（form-group 內） */
.contact-form__field {
  width: 100%;
}

.contact-form__field .help-block {
  margin: 4px 0 0;
  font-size: 13px;
  color: #d9534f;
}

.contact-form__field .help-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------------- 上傳檔案 ---------------- */
.contact-form__upload {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 8px;
}

.contact-form__upload input[type="text"] {
  flex: 1;
}

.contact-form__upload-btn {
  width: 43px;
  height: 33px;
  flex: 0 0 auto;
  border: 1px solid #4d4a49;
  border-left: none;
  border-radius: 0 6px 6px 0;
  display: flex;
  align-items: center;
  justify-content: end;
  cursor: pointer;
  color: var(--ink-soft);
  margin-left: -11px;
  padding-right: 13px;
  background-color: #fff;
  position: relative;
  margin-bottom: 0;
}

.contact-form__upload-btn::before {
  content: '';
  display: block;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translate(0, -50%);
  width: 1px;
  height: 20px;
  background-color: #4d4a49;
}

.contact-form__upload-btn i {
  font-size: 14px;
  line-height: 1;
}

.contact-form__upload-note {
  font-size: 13px;
  color: #8a8a8a;
  margin: 0;
}

/* ---------------- 同意事項 ---------------- */
.contact-form__checks {
  margin: 28px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-form__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  color: #6b6b6b;
  cursor: pointer;
}

.contact-form__check input {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
  border: 1.5px solid #8a8a8a;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
}

.contact-form__check input:checked {
  border-color: var(--ink-soft);
}

.contact-form__check input:checked::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--ink-soft);
}

.contact-form__check a {
  color: var(--ink-soft);
  text-decoration: underline;
}

/* ---------------- 驗證碼 ---------------- */
.contact-form__captcha-box {
  display: flex;
  justify-content: end;
}

.contact-form__captcha {
  display: inline-flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.contact-form__captcha-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft);
}

.contact-form__captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.contact-form__captcha-row input {
  width: 110px;
  border: 1px solid #4d4a49;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 15px;
  letter-spacing: 4px;
  text-align: center;
}

/* verify.php 產生的驗證碼圖片 */
.contact-form__captcha-code {
  width: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f4f4;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 6px;
  color: var(--ink-soft);
  user-select: none;
}

.contact-form__captcha-code img {
  display: block;
  max-width: 100%;
  height: auto;
}

.contact-form__captcha-refresh {
  border: none;
  background: none;
  font-size: 12px;
  color: #8a8a8a;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  justify-content: flex-end;
  padding: 0;
}

.contact-form__captcha .help-block {
  margin: 0;
  font-size: 13px;
  color: #d9534f;
}

.contact-form__captcha .help-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------------- 送出 ---------------- */
.contact-form__submit {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.contact-form__submit .btn-outline-more {
  background-color: #fff;
  padding: 3px 40px;
}

/* ---------------- 聯絡資訊 ---------------- */
.contact-page__locations {
  background: #e3e4ea;
  border-radius: 60px;
  margin-top: -5rem;
  padding: 4rem 56px;
  z-index: 32;
  position: relative;
}

.contact-location {
  margin-bottom: 28px;
}

.contact-location:last-child {
  margin-bottom: 0;
}

.contact-location h2,
.contact-location h3 {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink-soft);
  padding-bottom: 10px;
  margin: 0 0 10px;
  border-bottom: 1px solid #cfcfcf;
}

.contact-location p {
  font-size: 16px;
  color: #6b6b6b;
  margin: 0 0 4px;
  line-height: 1.85;
}

.contact-location p strong {
  color: var(--ink-soft);
}

.contact-location img {
  max-width: 100%;
  height: auto;
}

/* 社群 icon */
.contact-page__social {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
}

.contact-page__social img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* ---------------- RWD ---------------- */
@media (max-width: 991px) {
  .contact-page__panel {
    padding: 32px 0.5rem 9rem;
    margin-top: -40px;
    border-radius: 30px;
  }

  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact-form__captcha {
    align-items: baseline;
  }

  .contact-form__captcha-box {
    display: flex;
    justify-content: flex-start;
  }

  .contact-page__locations {
    border-radius: 30px;
    padding: 48px 22px;
    margin-top: -6rem;
  }

  .contact-form__submit {
    flex-direction: column;
  }

  .contact-form__submit .btn-outline-more {
    color: #4d4a49;
    width: 100%;
    justify-content: center;
    padding: 8px 40px;
  }
}
