/* 捐款頁專用樣式。原本內聯在 donate.html 的 <style> 區塊（約 585 行），
   拆成獨立檔案後可享 /css/* 的長效快取，HTML 本身維持 no-store。 */

.donate-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
  background-image:
    linear-gradient(135deg, rgba(92, 16, 16, 0.82), rgba(26, 26, 46, 0.58)),
    url("/images/site/child-aid.webp?v=20260806-perf1");
  background-size: cover;
  background-position: center;
}

.donate-hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 68px 0 76px;
}

.donate-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: 18px;
  border: 1px solid rgba(232, 213, 163, 0.65);
  border-radius: 30px;
  background: rgba(200, 169, 110, 0.18);
  color: #f1dcaa;
  font-size: 0.9rem;
  font-weight: 700;
}

.donate-hero h1 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.12;
  font-weight: 900;
}

.donate-hero p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.08rem;
  line-height: 1.9;
}

.donate-main {
  margin-top: -54px;
  padding-bottom: 72px;
  position: relative;
  z-index: 2;
}

.donate-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.donate-panel,
.impact-panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(250,247,241,0.96)),
    #fff;
  border: 1px solid #ece3d5;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(54, 22, 15, 0.10);
  transition: transform 0.3s cubic-bezier(.22,1,.36,1), box-shadow 0.3s cubic-bezier(.22,1,.36,1), border-color 0.3s ease;
}

.donate-panel::before,
.impact-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,0.8), transparent 45%);
}

.donate-panel > *,
.impact-panel > * { position: relative; z-index: 1; }

@media (hover:hover) {
  .donate-panel:hover,
  .impact-panel:hover {
    transform: translateY(-3px);
    border-color: rgba(139, 26, 26, 0.24);
    box-shadow: 0 22px 48px rgba(54, 22, 15, 0.14);
  }
}

.donate-panel {
  padding: 28px;
}

.impact-panel {
  padding: 24px;
}

.section-label {
  margin: 0 0 8px;
  color: #8b1a1a;
  font-size: 0.86rem;
  font-weight: 800;
}

.donate-panel h2,
.impact-panel h2 {
  margin: 0 0 18px;
  color: #1a1a2e;
  font-size: 1.45rem;
  line-height: 1.35;
}

.amount-select {
  width: 100%;
  min-height: 58px;
  border: 1.5px solid #e3d7c5;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.amount-select:hover { border-color: rgba(139, 26, 26, 0.48); box-shadow: 0 10px 20px rgba(54, 22, 15, 0.07); }
.amount-select:focus-visible { outline: none; border-color: #8b1a1a; box-shadow: 0 0 0 4px rgba(139, 26, 26, 0.12); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.donate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.donate-group {
  margin-bottom: 16px;
}

.donate-group label {
  display: block;
  margin-bottom: 7px;
  color: #3d3d46;
  font-size: 0.92rem;
  font-weight: 700;
}

.donate-group input,
.donate-group select {
  width: 100%;
  height: 44px;
  border: 1px solid #ddd5c7;
  border-radius: 8px;
  padding: 0 12px;
  color: #1a1a2e;
  background: #fff;
  font: inherit;
}

.donate-group input:focus,
.donate-group select:focus {
  outline: 2px solid rgba(139, 26, 26, 0.18);
  border-color: #8b1a1a;
}

.donate-group:focus-within label { color: #8b1a1a; }

.donate-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

.donate-actions .btn {
  min-width: 160px;
  justify-content: center;
}

.donate-msg {
  min-height: 24px;
  margin-top: 12px;
  color: #8b1a1a;
  font-weight: 700;
  line-height: 1.6;
}

.secure-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f8f4ec;
  color: #5b5144;
  font-size: 0.9rem;
  line-height: 1.7;
  border: 1px solid rgba(200, 169, 110, 0.24);
}

.secure-note i {
  margin-top: 4px;
  color: #8b1a1a;
}

.payment-method-fieldset {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.payment-method-legend {
  margin: 0 0 12px;
  padding: 0;
  color: #8b1a1a;
  font-size: 1rem;
  font-weight: 900;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.payment-method {
  position: relative;
  display: grid;
  min-height: 148px;
  align-content: start;
  gap: 10px;
  padding: 18px 16px;
  border: 1px solid #e5dccf;
  border-radius: 12px;
  background: #fff;
  color: #2e3039;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.payment-method input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.payment-method-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f5e8d1;
  color: #8b1a1a;
  font-size: 1.2rem;
}

.payment-method strong {
  color: #8b1a1a;
  font-size: 1.02rem;
  line-height: 1.35;
}

.payment-method small {
  color: #77706a;
  font-size: 0.8rem;
  line-height: 1.5;
}

.payment-method:hover {
  border-color: rgba(139, 26, 26, 0.55);
  box-shadow: 0 10px 22px rgba(80, 28, 20, 0.08);
  transform: translateY(-2px);
}

.payment-method.is-active {
  border-color: #8b1a1a;
  background: linear-gradient(145deg, #fffdf8, #faefdc);
  box-shadow: 0 0 0 3px rgba(139, 26, 26, 0.09);
}

.payment-method:focus-within {
  outline: 3px solid rgba(139, 26, 26, 0.16);
  outline-offset: 2px;
}

.payment-channel {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid #e7d5ba;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffdf9, #f8f1e6);
}

.payment-channel[hidden],
.manual-contact-note[hidden],
.manual-proof-group[hidden],
.proof-preview-wrap[hidden] {
  display: none;
}

.payment-channel-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.payment-channel-heading .payment-method-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  font-size: 1rem;
}

.payment-channel-heading h3 {
  margin: 0 0 4px;
  color: #6f1515;
  font-size: 1.1rem;
}

.payment-channel-heading p,
.payment-channel-note,
.manual-contact-note {
  margin: 0;
  color: #655d55;
  font-size: 0.9rem;
  line-height: 1.7;
}

.payment-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.payment-detail-list > div {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(210, 189, 151, 0.48);
}

.payment-detail-list > div.wide { grid-column: 1 / -1; }

.payment-detail-list dt {
  margin-bottom: 5px;
  color: #82786b;
  font-size: 0.78rem;
  font-weight: 800;
}

.payment-detail-list dd {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  color: #33282a;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.copy-value-btn {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid #dcc8a7;
  border-radius: 50%;
  background: #fff;
  color: #8b1a1a;
  cursor: pointer;
}

.copy-value-btn:hover { background: #8b1a1a; color: #fff; }
.copy-value-btn:focus-visible { outline: 3px solid rgba(139, 26, 26, 0.18); outline-offset: 2px; }

.manual-proof-group { margin-top: 16px; }

.proof-upload {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #c9c9c9;
  border-radius: 8px;
  background: #f1f2f3;
  color: #3f4348;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.proof-upload-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #555b61;
}

.proof-upload strong { color: inherit; font-size: 0.88rem; }
.proof-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.proof-upload:hover { border-color: #aeb2b6; background: #e7e9eb; }
.proof-upload:focus-within { outline: 3px solid rgba(139, 26, 26, 0.14); outline-offset: 2px; }
.proof-upload-hint { display: block; margin-top: 7px; color: #77706a; font-size: 0.78rem; line-height: 1.5; }

.payment-brand-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.payment-brand-logo {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1ded8;
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  font-family: Arial, sans-serif;
  font-weight: 900;
  line-height: 1;
}

.payment-brand-logo.visa { color: #1a1f71; font-size: 0.78rem; font-style: italic; letter-spacing: -0.04em; }
.payment-brand-logo.mastercard::before,
.payment-brand-logo.mastercard::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; }
.payment-brand-logo.mastercard::before { left: 12px; background: #eb001b; }
.payment-brand-logo.mastercard::after { right: 12px; background: #f79e1b; opacity: 0.9; }
.payment-brand-logo.unionpay { width: 66px; padding: 4px; object-fit: contain; }
.payment-brand-logo.amex { width: 30px; padding: 0; border: 0; border-radius: 4px; object-fit: cover; }

.proof-preview-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.proof-preview-wrap img {
  width: 62px;
  height: 62px;
  border-radius: 8px;
  object-fit: cover;
  background: #efe8dc;
}

.proof-preview-wrap strong,
.proof-preview-wrap span { display: block; }
.proof-preview-wrap strong { color: #3b3231; font-size: 0.88rem; }
.proof-preview-wrap span { margin-top: 3px; color: #6e655d; font-size: 0.8rem; }

.manual-contact-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid #c8a96e;
  background: rgba(255, 255, 255, 0.62);
}

.manual-contact-note i { margin-top: 4px; color: #8b1a1a; }

.impact-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.impact-list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  color: #56565f;
  line-height: 1.65;
}

.impact-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f3e7d2;
  color: #8b1a1a;
}

.impact-list strong {
  display: block;
  color: #1a1a2e;
}

.page-footer-gap {
  margin-top: 36px;
}

@media (max-width: 920px) {
  .donate-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .donate-hero-content {
    padding: 52px 0 82px;
  }

  .donate-main {
    margin-top: -42px;
  }

  .donate-panel,
  .impact-panel {
    padding: 20px;
  }

  .donate-grid {
    grid-template-columns: 1fr 1fr;
  }

  .donate-actions .btn {
    width: 100%;
  }

  .payment-methods,
  .payment-detail-list {
    grid-template-columns: 1fr;
  }

  .payment-method {
    min-height: auto;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .payment-method small { grid-column: 2; }

  .payment-detail-list > div.wide { grid-column: auto; }

}
