/* ============================================================
   聯絡/付款 共用表單（.contact-/.field/.radio/.check/.btn-submit 等）
   來源 style.css 行 2972-3296, 3369-3631（純搬移，內容未改）
   ============================================================ */

/* ============================================================
   11 CONTACT
   ============================================================ */
.contact-section {
  background: var(--c-bg-section);
  color: var(--c-on-dark);
  padding: clamp(80px, 10vw, 170px) 0 clamp(80px, 10vw, 230px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  /* 為 mix-blend-mode 建立 stacking context */
}

.contact-bg {
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

/* 底部波紋圖片 (Figma: imgSvg21, mix-blend-screen) */
.contact-section::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -19%;
  height: 60%;
  background: url('../../img/contact_img.svg') no-repeat center bottom / 100%
    auto;
  mix-blend-mode: screen;
  opacity: 0.85;
  pointer-events: none;
  z-index: 4;
}

@media (max-width: 1365px) {
  .contact-section::before {
    bottom: 0;
    height: 10%;
    background-position: center top;
    background-size: cover;
  }
}

/* 上下雙端漸淡：頂端 var(--c-bg-section)（與上方 .faq-news-section 同色）、底端 var(--c-on-dark)（與下方 .site-footer 同色），中段透明 */
.contact-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--c-bg-section) 0%, transparent 260px),
    linear-gradient(to top, var(--c-on-dark) 0%, transparent 260px);
  pointer-events: none;
  z-index: 3;
}

/* 整頁面區塊 */
.contact-page-section {
  background: linear-gradient(
    to bottom right,
    var(--c-yellow) 0%,
    var(--c-text-2) 24%,
    var(--c-text-2) 35%,
    var(--c-text-2) 70%
  );
  color: var(--c-on-dark);
  padding: clamp(80px, 10vw, 170px) 0 calc(8.8541vw - 0px);
  /* padding: clamp(80px, 10vw, 170px) 0 clamp(80px, 10vw, 170px); */
  position: relative;
  isolation: isolate;
  /* 為 mix-blend-mode 建立 stacking context */
}

@media (max-width: 991px) {
  .contact-page-section {
    padding: clamp(80px, 10vw, 170px) 0 12.3839vw;
  }
}

@media (max-width: 767px) {
  .contact-page-section {
    padding: clamp(80px, 10vw, 170px) 0 100px;
  }
}


/* 底部波紋圖片 (Figma: imgSvg21, mix-blend-screen)*/
.contact-page-section::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -19%;
  height: 60%;
  background: url('../../img/contact_img.svg') no-repeat center bottom / 100%
    auto;
  mix-blend-mode: screen;
  opacity: 0.85;
  pointer-events: none;
  z-index: 4;
}

@media (max-width: 1365px) {
  .contact-page-section::before {
    bottom: 0;
    height: 10%;
    background-position: center top;
    background-size: cover;
  }
}

/* 下雙端漸淡：底端 var(--c-on-dark)（與下方 .site-footer 同色），中段透明 */
.contact-page-section::after {
  content: '';
  position: absolute;
  /* inset: 0; */
  bottom: 0;
  left: 0;
  /* background: linear-gradient(to top, var(--c-on-dark) 0%, transparent 260px); */
  background-image: url(../../img/foot_contact_bottom_bg.png);
  background-repeat: no-repeat;
  background-position: bottom center;
  background-size: cover;
  width: 100%;
  height: 22.7604vw;
  pointer-events: none;
  z-index: 3;
}

#contact-form-foot-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 22.7604vw;
  z-index: 2;
  background: #fff;
}

/* ------------------------------------------------------------
   羽化變體（用於上方為淺色區塊的頁面：精選案例、最新消息、首頁等；
   不影響聯絡我們頁面）
   沿用原本對角漸層背景，並於頂端疊一層羽化漸淡：
   由上方區塊的淺色漸淡至透明，讓本區塊與上方版面交界處柔順銜接（羽化效果）。
   羽化層為背景層、位於所有內容之下，不會遮住表單。
   羽化色以 --feather-from / --feather-to 變數控制，預設對應 --c-bg-page（#fafafa，
   精選案例、最新消息頁上方區塊色）；上方區塊為其他底色時，覆寫此兩變數即可。
   ------------------------------------------------------------ */
.contact-page-section--feather {
  /* --feather-from: var(--c-bg-page);
  --feather-to: rgba(250, 250, 250, 0);
  background:
    linear-gradient(to bottom, var(--feather-from) 0%, var(--feather-to) 220px),
    linear-gradient(
        to bottom right,
        var(--c-yellow) 0%,
        var(--c-text-2) 24%,
        var(--c-text-2) 35%,
        var(--c-text-2) 70%
      ); */
      background: none;
      padding-top: 120px;
}

#foot_contact_bg {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  transform: translateY(-15.625vw);
}

#foot_contact_bg2 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 30.375vw);
  background-color: #191919;
}

/* 上方區塊為 --c-bg-section（#ececec，首頁 .faq-news-section）時的羽化色 */
.contact-page-section--feather.contact-page-section--on-section {
  /* --feather-from: var(--c-bg-section);
  --feather-to: rgba(236, 236, 236, 0); */
}

/* ------------------------------------------------------------
   影像羽化變體（案例內容頁：上方 .cases-section 為白底＋橘色波紋背景圖）
   單色頂帶無法與背景圖相符，故改以「負外距上移 + 頂端遮罩」：
   讓本區塊頂端漸進透明，使上方區塊的實際畫面（白底與橘色波紋、
   及其下方 body 底色 --c-bg-page）穿透並柔順融入本區塊深色漸層，
   達成與背景圖相符的羽化。
   上移量（max 120px）小於 .cases-section 的 padding-bottom（min 100px），
   只吃進其底部留白，不會蓋住「回上一頁」按鈕等內容。
   背景沿用基底 .contact-page-section 的對角漸層（不另疊單色頂帶）。
   ------------------------------------------------------------ */

/* 圖片未補時 ::before 仍會嘗試載入，給個 fallback 隱藏 (透過下方 [data-img-missing] 或讓 url 失敗也只是空白) */

/* 確保表單與文字浮在背景圖上 */
.contact-section > .container {
  position: relative;
  z-index: 2;
}

.contact-section .section-h1,
.contact-section .section-eyebrow,
.contact-section .section-lead {
  color: var(--c-on-dark);
}

.contact-section .section-eyebrow {
  color: var(--c-brand);
}

/* 左 / 右兩欄 grid (取代 Bootstrap .row > .col-lg-5/.col-lg-7) */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
}

.contact-info {
  flex: 0 1 420px;
  min-width: 280px;
  padding-bottom: 25px;
}

@media (max-width: 575px) {
  .contact-info {
    margin-top: 20px;
  }
}

/* Contact Us 標題：兩行 96px Montserrat Medium + 橘子 icon */
.contact-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: clamp(48px, 7vw, 68px);
  line-height: 1;
  color: var(--c-on-dark);
  margin: 0;
}

.contact-title-line {
  display: block;
}

/* 第二行「Us」旁邊的橘子 icon */
.contact-title-icon {
  display: inline-block;
  width: 88px;
  /* Figma 87.85px */
  height: 71px;
  /* Figma 70.82px */
  vertical-align: -0.15em;
  margin-left: 5px;
  margin-bottom: 14px;
  object-fit: contain;
}

@media (max-width: 575px) {
  .contact-title-icon {
    display: inline-block;
    width: 88px;
    height: 48px;
    vertical-align: baseline;
    margin-left: -10px;
    margin-bottom: 0;
    object-fit: contain;
  }
}

.contact-title-icon[src=''],
.contact-title-icon:not([src]) {
  display: none;
  /* 未補圖時隱藏，避免破圖框 */
}

/* 副標 (聯絡橘野…) 32px Inter Regular */
.contact-subtitle {
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-weight: 400;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.5;
  color: var(--c-on-dark);
  margin: 8px 0;
}

/* 描述兩行 20px */
.contact-desc {
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-weight: 400;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--c-on-dark);
  margin: 8px 0;
}

.contact-form-wrap {
  flex: 0 0 auto;
  width: 967px;
  max-width: 100%;
  /* 小於 967 的視窗安全 fallback */
  min-width: 0;
}

.contact-form {
  position: relative;
  /* Figma: transparent + 白邊玻璃感 */
  border-radius: 28px;
  border-top-left-radius: 0px;
  /* top-left 切角，配合 form-corner 箭頭 */
  /* border: 1px solid var(--c-on-dark); */
  padding: clamp(2rem, 4vw, 3.5rem);
  /* padding-top: 8.5rem; */
  box-shadow: 11.237px 6.742px 18.729px 0px rgba(0, 0, 0, 0.25);
  /* Figma 規格 */
  /* 微微透出底色 (僅在 mix-blend 層之上) */
  /* backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); */

  background: rgba(20, 20, 20, 0.28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  /* border: 1px solid rgba(255, 255, 255, 0.18); */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.25),
    0 24px 80px rgba(0,0,0,.45);
}

/* 表單內的欄位 grid (取代 Bootstrap .row > .col-md-6 / .col-12) */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 80px;
}

.field-cell {
  min-width: 0;
}

/* 撐滿整列 */
.field-cell--full {
  grid-column: 1 / -1;
}

/* 性別 radio 那種需要對齊欄位底端、水平排列 */
.field-cell--inline {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  padding-bottom: 0.5rem;
}

/* 送出列：左 reCAPTCHA、右按鈕，自動 wrap */
.submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* 響應式：≤768px 表單變單欄 */
@media (max-width: 767.98px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-cell--inline {
    padding-bottom: 0;
  }
}

.form-corner {
  position: absolute;
  top: 30px;
  right: 3.5rem;
  width: 90px;
  height: 90px;
  border-bottom: 1px solid var(--c-bg-white);
  border-left: 1px solid var(--c-bg-white);
  border-top-right-radius: 40px;
  background: linear-gradient(
    135deg,
    transparent calc(50% - 1px),
    rgba(255, 255, 255, 0.65) calc(50% - 1px),
    rgba(255, 255, 255, 0.65) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
  pointer-events: none;
}

/* 欄位：底線式 (暗底白字) */
.field {
  position: relative;
}

/* (舊 .field label 已不使用，label 已改成 .field-placeholder 浮在 input 上) */

.field input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--c-on-dark);
  padding: 8px 0;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: var(--fs-base);
  color: var(--c-on-dark);
  outline: none;
  transition: border-color 0.25s;
}

.field input:focus {
  border-bottom-color: var(--c-accent);
}

/* 真實 placeholder 隱藏（用 " " 單空白以觸發 :placeholder-shown） */
.field input::placeholder {
  color: transparent;
}

/* 浮動 label：空值時顯示（在底線正上方），輸入或 focus 時淡出 */
.field-placeholder {
  position: absolute;
  left: 0;
  top: 8px;
  /* 對齊 input padding-top */
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: var(--fs-base);
  color: var(--c-on-dark);
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.field input:not(:placeholder-shown) ~ .field-placeholder,
.field input:focus ~ .field-placeholder {
  opacity: 0;
}

/* Select 下拉樣式：與 .field input 同款底線 + 右側下拉箭頭（對齊 Figma 1301:37640） */
.field--select {
  position: relative;
}

.field--select select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--c-on-dark);
  padding: 8px 32px 8px 0;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: var(--fs-base);
  color: var(--c-on-dark);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: border-color 0.25s;
}

.field--select select:focus {
  border-bottom-color: var(--c-accent);
}

/* 下拉箭頭（CSS 三角形：兩條白邊旋轉 45 度） */
.field--select::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--c-on-dark);
  border-bottom: 2px solid var(--c-on-dark);
  transform: translateY(-75%) rotate(45deg);
  pointer-events: none;
  transition: border-color 0.25s;
}

.field--select:focus-within::after {
  border-color: var(--c-accent);
}

/* 下拉選項面板使用深色底（保持夜間模式可讀） */
.field--select select option {
  background: var(--c-text-2);
  color: var(--c-on-dark);
}

.field-label {
  display: block;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: var(--fs-base);
  color: var(--c-on-dark);
  margin-bottom: 16px;
}

.req {
  color: var(--c-brand);
  /* Figma 規格的亮橘 */
  margin-left: 2px;
}

/* Radio — 圓形橘點 (暗底白字) */
.radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: var(--fs-base);
  color: var(--c-on-dark);
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.radio input {
  display: none;
}

.radio span {
  width: 18px;
  height: 18px;
  border-radius: var(--r-full);
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}

.radio input:checked + span {
  border-color: var(--c-brand);
}

.radio input:checked + span::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: var(--r-full);
  background: var(--c-brand);
}

/* Checkbox — 方形填滿 (暗底白字) */
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: var(--fs-base);
  color: var(--c-on-dark);
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.check input {
  display: none;
}

.check span {
  width: 16px;
  height: 16px;
  border: 1px solid var(--c-on-dark);
  background: transparent;
  display: inline-flex;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.check input:checked + span {
  background: var(--c-brand);
  border-color: var(--c-brand);
}

/* Textarea (暗底白字 + 白虛線框) */
.form-textarea {
  width: 100%;
  background: transparent;
  border: 1px dashed var(--c-on-dark);
  border-radius: 0;
  padding: 16px 20px;
  font-size: var(--fs-sm);
  color: var(--c-on-dark);
  outline: none;
  transition: border-color 0.25s;
  resize: none;
  /* 禁止使用者拖拉改變大小 */
  height: 195px;
}

.form-textarea:focus {
  border-color: var(--c-accent);
}

.form-textarea::placeholder {
  color: var(--c-placeholder);
}

/* 標語 */
.form-tagline {
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: var(--fs-base);
  color: var(--c-on-dark);
  text-align: left;
  margin: 8px 0 0;
  letter-spacing: 0;
}

/* reCAPTCHA mock */
.recaptcha-mock {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: var(--c-bg-page);
  border: 1px solid var(--c-input-border);
  border-radius: 4px;
  color: var(--c-text);
  font-size: var(--fs-xs);
  box-shadow: var(--sh-input);
  min-height: 64px;
}

.recaptcha-mock input[type='checkbox'] {
  width: 22px;
  height: 22px;
  accent-color: var(--c-brand);
  cursor: pointer;
}

.recaptcha-mock label {
  margin: 0;
  font-size: var(--fs-xs);
  cursor: pointer;
}

.recaptcha-logo {
  margin-left: 20px;
  text-align: center;
  line-height: 1.1;
}

.recaptcha-logo small {
  display: block;
  font-size: 10px;
  color: var(--c-placeholder);
  font-weight: 600;
}

.recaptcha-logo span {
  font-size: 8px;
  color: var(--c-placeholder);
}

/* 送出按鈕：Figma 規格 — 265×65, 漸層 (橘色從右下→深色到左上, -11deg) */
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 365px;
  height: 65px;
  padding: 0 32px;
  border: 1px solid #ffffff;
  border-radius: 81px;
  background: none;

  /* background: rgba(50, 50, 50, 0.08);
  backdrop-filter: blur(5px);
  border: 1px solid var(--c-bg-white); */
  color: var(--c-on-dark);
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: var(--fs-md);
  font-weight: 400;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.25s;
}

.btn-submit:hover {
  transform: translateY(-2px);
  background: linear-gradient(90deg, var(--c-brand) 22%, #EA9604 100%);
  box-shadow: 0 8px 24px rgba(243, 152, 0, .25);
}

/* 送出按鈕右側 icon (Figma: 25×31px) */
.btn-submit .submit-icon {
  width: 25px;
  height: 31px;
  object-fit: contain;
  flex-shrink: 0;
}

/* 未補圖時隱藏，避免破圖框 */
.btn-submit .submit-icon[src=''],
.btn-submit .submit-icon:not([src]) {
  display: none;
}

/* RWD（原 4020-4023）*/
@media (max-width: 575.98px) {
  .btn-submit {
    max-width: 100%;
  }
}

/* 送出按鈕：Figma 規格 — 265×65, 漸層 (橘色從右下→深色到左上, -11deg) */
.btn-submit2 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 365px;
  height: 65px;
  padding: 0 32px;
  border: none;
  border-radius: 81px;
  background: linear-gradient(-12deg, var(--c-brand) 0%, #222222 25%, #222222 100%);

  color: var(--c-on-dark);
  font-family: 'Inter', 'Noto Sans TC', sans-serif;
  font-size: var(--fs-md);
  font-weight: 400;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  transition: all 0.25s;
}

.btn-submit2:hover {
  transform: translateY(-2px);
}

/* 送出按鈕右側 icon (Figma: 25×31px) */
.btn-submit2 .submit-icon {
  width: 25px;
  height: 31px;
  object-fit: contain;
  flex-shrink: 0;
}

/* 未補圖時隱藏，避免破圖框 */
.btn-submit2 .submit-icon[src=''],
.btn-submit2 .submit-icon:not([src]) {
  display: none;
}

/* RWD（原 4020-4023）*/
@media (max-width: 575.98px) {
  .btn-submit2 {
    max-width: 100%;
  }
}