/* =====================================================================
   捐款頁畫面優化（只使用既有配色，不引入新顏色）
   既有色票：頁面底 #ffe2f9｜行動色 #F15B43（hover #CB4B36）｜標題/選取 #364F75｜
            切換藍 #0D6EFD｜內文 #383838｜欄位底 #F8F8F8｜邊線 #DEDEDE｜頁尾 #393939
   載入順序：必須在 style.css 之後。
   ===================================================================== */
:root {
  --bto-pink: #ffe2f9;
  --bto-coral: #F15B43;
  --bto-coral-dark: #CB4B36;
  --bto-navy: #364F75;
  --bto-blue: #0D6EFD;
  --bto-text: #383838;
  --bto-field: #F8F8F8;
  --bto-line: #DEDEDE;
  --bto-footer: #393939;
  --bto-error: #E64D4D;
  --bto-radius: 18px;
}

body.home,
body.home button,
body.home input,
body.home select,
body.home textarea {
  font-family: Montserrat, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
}

/* ---------- 頁首 ---------- */
/* 既有樣式在頁首下方留了 95px（手機 55px）的空白粉紅帶，改由標題區自己控制間距 */
.inner-banner-wrap { padding-bottom: 0 !important; box-shadow: 0 2px 14px rgba(54, 79, 117, .10); position: relative; z-index: 2; }
.inner-baner-container { padding: 26px 0 22px; }
.inner-banner-wrap img { max-height: 64px; width: auto; }

/* ---------- 標題區 ---------- */
.donate-hero { text-align: center; padding: 44px 0 30px; }
.donate-hero h1 { margin: 0; font-size: 34px; letter-spacing: .12em; color: var(--bto-navy); font-weight: 700; }
.donate-hero h1::after { content: ""; display: block; width: 56px; height: 4px; border-radius: 4px; background: var(--bto-coral); margin: 14px auto 0; }

/* ---------- 卡片 ---------- */
.donate-section { padding-top: 12px; padding-bottom: 80px; }
.donate-form .form-inner {
  border-radius: var(--bto-radius);
  box-shadow: 0 6px 22px rgba(54, 79, 117, .08);
  padding: 36px 40px;
  margin-bottom: 28px;
}
.donate-form { counter-reset: step; }
.donate-form .step-card h3 {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 24px; font-size: 22px; font-weight: 700; color: var(--bto-navy);
}
.donate-form .step-card h3::before {
  counter-increment: step; content: counter(step);
  flex: 0 0 34px; height: 34px; border-radius: 50%;
  background: var(--bto-navy); color: #fff; font-size: 17px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- 介紹文字（內容由資料庫的 HTML 提供，只能用樣式整理層次） ---------- */
.donate-form .intro-card { border-top: 6px solid var(--bto-coral); padding-top: 32px; }
.donate-form .intro-card h3 { display: block; margin: 0 0 18px; line-height: 1.5; }
.donate-form .intro-card h3::before { display: none; }
.donate-form .intro-card p { margin: 0 0 6px; line-height: 1.9; color: #555; }
/* 四大服務項目的標題（黑色粗體 text-huge） */
.donate-form .intro-card p > span.text-huge[style*="hsl(0,0%,0%)"] { color: var(--bto-navy) !important; }
.donate-form .intro-card p:has(> span.text-huge[style*="hsl(0,0%,0%)"]) {
  margin-top: 20px; padding: 6px 0 6px 14px; border-left: 5px solid var(--bto-coral);
  background: linear-gradient(90deg, #fff4f1, rgba(255, 244, 241, 0) 80%);
}
/* 訴求段落（藍色）→ 提示框 */
.donate-form .intro-card p:has(> span[style*="hsl(240"]) {
  margin: 22px 0 12px; padding: 16px 20px; border-radius: 12px;
  background: #eef2ff; border: 1px solid #d5ddff;
}
/* 備註（紅色小字）→ 柔和提醒 */
.donate-form .intro-card p:has(> span.text-big[style*="hsl(0,75%"]) {
  margin-top: 8px; padding: 12px 16px; border-radius: 10px;
  background: #fff4f1; border: 1px dashed #f3b3a7;
}

/* ---------- 捐款方式 ---------- */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.method-card {
  text-align: left; cursor: pointer; background: #fff; color: var(--bto-text);
  border: 2px solid var(--bto-line); border-radius: 14px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 4px; transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.method-card:hover { border-color: var(--bto-blue); }
.method-card .method-title { font-size: 20px; font-weight: 700; color: var(--bto-navy); }
.method-card .method-desc { font-size: 15px; color: #666; }
.method-card.is-active {
  border-color: var(--bto-blue); background: #f1f6ff; box-shadow: 0 0 0 4px rgba(13, 110, 253, .12);
}
.method-card.is-active .method-title::after { content: "  ✓"; color: var(--bto-blue); }

/* ---------- 金額 ---------- */
.amount-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.amount-chip {
  min-width: 112px; padding: 12px 20px; border-radius: 999px; cursor: pointer;
  font-size: 19px; font-weight: 700; background: #fff; color: var(--bto-navy);
  border: 2px solid var(--bto-line); transition: all .2s;
}
.amount-chip:hover { border-color: var(--bto-navy); }
.amount-chip.is-active { background: var(--bto-navy); border-color: var(--bto-navy); color: #fff; }
.input-prefix { display: flex; align-items: stretch; max-width: 360px; }
.input-prefix > span {
  display: inline-flex; align-items: center; padding: 0 16px; font-weight: 700; color: var(--bto-navy);
  background: #eceff5; border: 2px solid transparent; border-right: 0; border-radius: 14px 0 0 14px;
}
.input-prefix input { border-radius: 0 14px 14px 0 !important; }

/* ---------- 欄位（輸入框與下拉選單統一樣式） ---------- */
.field { margin-bottom: 26px; }
.field-label { display: block; margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--bto-navy); }
.field-label .req { color: var(--bto-coral); margin-left: 3px; }
.field-label .opt { color: #888; font-weight: 400; font-size: 14px; margin-left: 6px; }
.field-hint { margin: 6px 0 0; font-size: 14px; color: #777; }
.field-error { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: var(--bto-error); }
.donate-form .field input:not([type=checkbox]),
.donate-form .field select,
.donate-form .field textarea {
  width: 100%; height: 54px; padding: 0 18px; font-size: 17px; color: var(--bto-text);
  background: var(--bto-field); border: 2px solid transparent; border-radius: 14px; outline: 0;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.donate-form .field textarea { height: auto; min-height: 140px; padding: 14px 18px; line-height: 1.7; resize: vertical; }
.donate-form .field select {
  -webkit-appearance: none; appearance: none; padding-right: 46px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'><path d='M1 1l6 6 6-6' fill='none' stroke='%23364F75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 18px center;
}
.donate-form .field input:not([type=checkbox]):focus,
.donate-form .field select:focus,
.donate-form .field textarea:focus {
  background: #fff; border-color: var(--bto-navy); box-shadow: 0 0 0 4px rgba(54, 79, 117, .14);
}
.donate-form .field .is-invalid,
.donate-form .field input.is-invalid:focus { border-color: var(--bto-error); background: #fff8f8; }

/* ---------- 同意與送出 ---------- */
.submit-area { max-width: 720px; margin: 8px auto 0; text-align: center; }
.consent-wrap {
  position: relative; display: flex; align-items: flex-start; gap: 14px; text-align: left; cursor: pointer;
  background: #fff; border: 2px solid var(--bto-line); border-radius: 14px; padding: 16px 20px; margin: 0 0 14px;
  font-size: 15px; line-height: 1.8; color: var(--bto-text); font-weight: 400;
}
.consent-wrap.is-invalid { border-color: var(--bto-error); background: #fff8f8; }
/* 主題 CSS 會把所有 checkbox 設成 opacity:0（自訂勾選樣式），所以必須自己畫出勾選框 */
.consent-wrap input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; left: 24px; top: 24px; margin: 0; }
.consent-mark {
  flex: 0 0 26px; width: 26px; height: 26px; margin-top: 2px; border-radius: 7px; background: #fff;
  border: 2px solid var(--bto-navy); display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.consent-mark::after {
  content: ""; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); margin-top: -2px; transition: transform .15s;
}
.consent-wrap input:checked + .consent-mark { background: var(--bto-navy); }
.consent-wrap input:checked + .consent-mark::after { transform: rotate(45deg) scale(1); }
.consent-wrap input:focus-visible + .consent-mark { box-shadow: 0 0 0 4px rgba(54, 79, 117, .25); }

.submit-btn {
  min-width: 260px; padding: 16px 40px; border-radius: 999px; cursor: pointer;
  font-size: 20px; font-weight: 700; letter-spacing: .08em; line-height: 1.2;
  box-shadow: 0 8px 20px rgba(241, 91, 67, .35); transition: background-color .2s, transform .1s, box-shadow .2s;
}
.submit-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(241, 91, 67, .45); }
.submit-btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.submit-note { margin: 14px 0 0; font-size: 14px; color: #777; }

/* ---------- 頁尾 ---------- */
.site-footer .top-footer { padding: 44px 0 36px; }
.site-footer .contact-data h3 { margin: 0 0 14px; font-size: 22px; color: var(--bto-pink) !important; }
.site-footer .contact-data p { line-height: 2; font-size: 16px; }
.site-footer .contact-data a { color: var(--bto-pink); text-decoration: underline; text-underline-offset: 4px; }
.site-footer .contact-data a:hover { color: #fff; }
.site-footer .contact-data a img { vertical-align: middle; margin-left: 10px; height: 30px; width: auto; }
.site-footer .bottom-footer { font-size: 14px; }

/* ---------- 手機 ---------- */
@media screen and (max-width: 767px) {
  .donate-hero { padding: 28px 0 22px; }
  .donate-hero h1 { font-size: 28px; }
  .donate-form .form-inner { padding: 24px 20px; margin-bottom: 20px; border-radius: 16px; }
  .donate-form .step-card h3 { font-size: 20px; margin-bottom: 18px; }
  .method-grid { grid-template-columns: 1fr; gap: 12px; }
  .amount-chips { gap: 10px; }
  .amount-chip { flex: 1 1 calc(50% - 10px); min-width: 0; }
  .input-prefix { max-width: none; }
  .submit-btn { width: 100%; min-width: 0; }
  .consent-wrap { padding: 14px 16px; }
  .site-footer .contact-data { margin-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
