/* ==========================================================================
   Save A Farm - Donate Page Redesign
   Preserves all backend variable names, IDs, validation, and automations
   while matching the reference design system, colors, and typography.
   ========================================================================== */

:root {
  --saf-orange: #a44b26;
  --saf-orange-hover: #8c3f1f;
  --saf-orange-light: rgba(164, 75, 38, 0.08);
  --saf-brown: #42261a;
  --saf-input-bg: #f3eae2;
  --saf-input-border: #e5d9cd;
  --saf-bg-warm: #faf5ef;
  --saf-text-dark: #18181b;
  --saf-text-muted: #52525b;
  --saf-text-light: #71717a;
  --saf-border-light: #e4e4e7;
  --saf-font: 'Plus Jakarta Sans', 'Inter', 'Aeonik Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}

body.donate-redesign {
  background-color: var(--saf-bg-warm);
  font-family: var(--saf-font);
  color: var(--saf-text-dark);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   Header navigation
   -------------------------------------------------------------------------- */
.donate-redesign .header.w-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: transparent;
  padding-top: 30px;
  padding-bottom: 20px;
}

.donate-redesign .header_btn {
  background-color: var(--saf-orange);
  color: #ffffff;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 8px;
  padding: 10px 22px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.donate-redesign .header_btn:hover {
  background-color: var(--saf-orange-hover);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.donate-hero {
  position: relative;
  min-height: 620px;
  padding: 130px 0 70px 0;
  display: flex;
  align-items: center;
  background-image: url('/images/donate-hero-bg.jpg');
  background-size: cover;
  background-position: center top;
  overflow: hidden;
}

.donate-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14, 18, 22, 0.68) 0%, rgba(14, 18, 22, 0.90) 100%);
  pointer-events: none;
  z-index: 1;
}

.donate-hero .site-container {
  position: relative;
  z-index: 2;
  width: 1280px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.donate-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

/* Hero Left Column */
.hero-left {
  color: #ffffff;
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.hero-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  display: inline-block;
}

.hero-main-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.hero-body-text {
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
  margin: 0;
  max-width: 580px;
  font-weight: 400;
}

/* Hero Right Column: Glass Card */
.hero-glass-card {
  background: rgba(30, 33, 42, 0.62);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 26px 24px;
  box-shadow: 0 24px 48px -8px rgba(0, 0, 0, 0.55);
  box-sizing: border-box;
}

.card-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.metric-col {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  box-sizing: border-box;
}

.metric-header-tag {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #df8d66;
  margin-bottom: 6px;
}

.metric-main-value {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.metric-footer-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 4px;
}

.card-progress-wrapper {
  margin-bottom: 22px;
}

.progress-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

.progress-info-percent {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.progress-track-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  overflow: hidden;
}

.progress-track-fill {
  height: 100%;
  background: linear-gradient(90deg, #d67849 0%, #ffbc97 100%);
  border-radius: 999px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-quick-pills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.quick-pill-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  background: #ffffff;
  color: var(--saf-orange);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.quick-pill-btn:hover {
  background: #fdfaf7;
  color: var(--saf-orange-hover);
  transform: translateY(-1px);
}

.quick-pill-btn.active {
  background: var(--saf-orange) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(164, 75, 38, 0.45);
}

/* --------------------------------------------------------------------------
   Section: The Story Behind The Ask (Reference styling)
   -------------------------------------------------------------------------- */
.story-behind-section {
  padding: 70px 24px 20px 24px;
  background-color: var(--saf-bg-warm);
  text-align: center;
}

.sec-overline {
  color: var(--saf-orange);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
  display: block;
}

.story-title {
  font-size: 42px;
  font-weight: 800;
  color: #18181b;
  line-height: 1.2;
  margin: 0 auto 16px auto;
  letter-spacing: -0.02em;
  font-family: Aeonik Pro, var(--saf-font);
  max-width: 820px;
}

.story-title .highlight-orange,
.highlight-orange {
  color: var(--saf-orange);
}

.story-body {
  font-size: 16.5px;
  color: var(--saf-text-muted);
  font-family: var(--saf-font);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 40px auto;
}

/* --------------------------------------------------------------------------
   Section: Take Action
   -------------------------------------------------------------------------- */
.take-action-section {
  padding: 20px 24px 30px 24px;
  background-color: var(--saf-bg-warm);
  text-align: center;
}

.take-action-title {
  font-size: 40px;
  font-weight: 800;
  color: var(--saf-orange);
  line-height: 1.2;
  margin: 0 auto 14px auto;
  letter-spacing: -0.02em;
  font-family: Aeonik Pro, var(--saf-font);
}

.take-action-body {
  font-size: 16px;
  color: var(--saf-text-muted);
  font-family: var(--saf-font);
  line-height: 1.55;
  max-width: 640px;
  margin: 0 auto 30px auto;
}

/* --------------------------------------------------------------------------
   Section: Donation Card Container & Form
   -------------------------------------------------------------------------- */
.action-section {
  padding: 10px 24px 80px 24px;
  background-color: var(--saf-bg-warm);
}

.action-container {
  max-width: 820px;
  margin: 0 auto;
}

.donation-card-box {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 44px 44px;
  box-shadow: 0 16px 48px -12px rgba(66, 38, 26, 0.07);
  box-sizing: border-box;
}

.card-main-heading {
  font-size: 24px;
  font-weight: 800;
  color: #18181b;
  margin: 0 0 6px 0;
  font-family: Aeonik Pro, var(--saf-font);
}

.card-sub-heading {
  font-size: 13.5px;
  color: var(--saf-text-muted);
  margin: 0 0 24px 0;
  line-height: 1.5;
}

/* 9 Preset Impact Amount Cards */
.flex-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.donation-item-container {
  display: flex;
  width: 100%;
}

.donation-item-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 14px;
  min-height: 74px;
  background: #ffffff;
  border: 1.5px solid var(--saf-border-light);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s ease;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}

.donation-item-btn:hover {
  border-color: var(--saf-orange);
  background: #fffcf9;
}

.donation-item-btn.selected {
  background: var(--saf-orange) !important;
  border-color: var(--saf-orange) !important;
  box-shadow: 0 4px 14px rgba(164, 75, 38, 0.32);
}

.donation-item-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--saf-text-muted);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.donation-item-price {
  font-size: 20px;
  font-weight: 800;
  color: #18181b;
  line-height: 1;
}

.donation-item-btn.selected .donation-item-label {
  color: rgba(255, 255, 255, 0.92) !important;
}

.donation-item-btn.selected .donation-item-price {
  color: #ffffff !important;
}

/* Custom / Other Amount Input */
.other-amount-wrapper {
  margin-bottom: 24px;
}

.other-amount-label {
  font-size: 13px;
  font-weight: 700;
  color: #27272a;
  margin-bottom: 8px;
  display: block;
}

.frame-24 {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid var(--saf-orange);
  border-radius: 10px;
  padding: 0 16px;
  height: 52px;
  box-sizing: border-box;
  box-shadow: 0 0 0 3px rgba(164, 75, 38, 0.08);
}

.prefix_dollar {
  font-size: 20px;
  font-weight: 700;
  color: #18181b;
  margin-right: 8px;
  user-select: none;
}

.donation-input.amountInput {
  border: none;
  outline: none;
  width: 100%;
  font-size: 20px;
  font-weight: 700;
  color: #18181b;
  background: transparent;
  font-family: inherit;
}

/* --------------------------------------------------------------------------
   Monthly Installments Segmented Pills
   -------------------------------------------------------------------------- */
.installments-segmented-wrapper {
  margin-bottom: 26px;
}

.installments-segment-label {
  font-size: 13px;
  font-weight: 700;
  color: #27272a;
  margin-bottom: 8px;
  display: block;
}

.installments-segment-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.segment-pill-btn {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1.5px solid var(--saf-border-light);
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: #3f3f46;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.segment-pill-btn:hover {
  border-color: #a1a1aa;
}

.segment-pill-btn.active {
  background: var(--saf-orange);
  border-color: var(--saf-orange);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(164, 75, 38, 0.28);
}

.installments {
  display: none;
  margin-top: 14px;
  padding: 16px;
  background: var(--saf-input-bg);
  border: 1px solid var(--saf-input-border);
  border-radius: 10px;
  font-size: 14px;
  color: #44403c;
  line-height: 1.7;
}

.installments input.months {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid #d6d3d1;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  background: #ffffff;
}

/* --------------------------------------------------------------------------
   Form Fields (Warm cream background matching system)
   -------------------------------------------------------------------------- */
.section-subtitle {
  font-size: 15px;
  font-weight: 800;
  color: #18181b;
  margin: 32px 0 16px 0;
  display: block;
  padding-top: 18px;
  border-top: 1px solid #f4f4f5;
  font-family: Aeonik Pro, var(--saf-font);
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #27272a;
}

.order_details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.input-button {
  width: 100%;
  height: 48px;
  background: var(--saf-input-bg) !important;
  border: 1px solid var(--saf-input-border) !important;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
  color: #18181b;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.input-button:focus {
  border-color: var(--saf-orange) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(164, 75, 38, 0.12);
}

.input-button::placeholder {
  color: #a49a90;
}

.form-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid-3col {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
}

.anonymous-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--saf-text-muted);
  cursor: pointer;
  user-select: none;
  margin-top: 2px;
}

.anonymous-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--saf-orange);
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Payment Details
   -------------------------------------------------------------------------- */
.tabs-nav {
  margin-bottom: 18px;
}

.tabs-nav ul {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tabs-nav ul li {
  flex: 1;
}

.tabs-nav ul li a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--saf-input-bg);
  border: 1.5px solid transparent;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #52525b;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tabs-nav ul li.active a {
  background: #ffffff;
  border-color: var(--saf-orange);
  color: var(--saf-orange);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.tabs-content .payment_option {
  display: none;
}

.tabs-content .payment_option:first-child {
  display: block;
}

.form_row {
  margin-bottom: 12px;
}

.form_row.half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Tefillos Textarea */
.extra_info textarea.input-button {
  height: 70px;
  padding: 10px 14px;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   Action Buttons (Share & DONATE NOW)
   -------------------------------------------------------------------------- */
.form-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 26px;
}

.btn-share {
  height: 52px;
  background: #ffffff;
  border: 1.5px solid #d4d4d8;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #27272a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-share:hover {
  background: #f4f4f5;
  border-color: #a1a1aa;
}

.button-4d.submitBtn {
  height: 52px;
  background: var(--saf-orange);
  border: none;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(164, 75, 38, 0.35);
  font-family: inherit;
  width: 100%;
}

.button-4d.submitBtn:hover {
  background: var(--saf-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(164, 75, 38, 0.45);
}

.loaded_wrapper {
  display: none;
}

.lds-ring,
.lds-ring div {
  box-sizing: border-box;
  color: white;
}

.lds-ring {
  display: inline-block;
  position: relative;
  width: 24px;
  height: 24px;
}

.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2.5px solid currentColor;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: currentColor transparent transparent transparent;
}

.lds-ring div:nth-child(1) { animation-delay: -0.45s; }
.lds-ring div:nth-child(2) { animation-delay: -0.3s; }
.lds-ring div:nth-child(3) { animation-delay: -0.15s; }

@keyframes lds-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Security Trust Line */
.security-trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--saf-text-light);
  margin-top: 18px;
  text-align: center;
}

.security-trust-row svg {
  width: 15px;
  height: 15px;
  fill: #16a34a;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Amen Blessing Section
   -------------------------------------------------------------------------- */
.bottom {
  padding: 50px 24px 70px 24px;
  background-color: var(--saf-bg-warm);
  text-align: center;
}

.bottom-message-content {
  color: #3f3f46;
  font-family: Aeonik Pro, var(--saf-font);
  font-size: 17px;
  line-height: 1.7;
  max-width: 680px;
  margin: 0 auto;
}

/* Validation error labels */
label.error {
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  display: block;
}

/* --------------------------------------------------------------------------
   Footer Enhancement (Ensures visibility and system styling)
   -------------------------------------------------------------------------- */
.footer {
  background-color: var(--saf-brown) !important;
  color: #ffffff !important;
  padding-top: 90px !important;
  padding-bottom: 50px !important;
  display: block !important;
  position: relative !important;
  z-index: 10 !important;
}

.footer .site-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.footer_media-wrap {
  display: flex !important;
  gap: 12px !important;
  align-items: center !important;
  margin-top: 20px !important;
}

.footer_social-media {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.12) !important;
  transition: all 0.2s ease !important;
}

.footer_social-media:hover {
  background: var(--saf-orange) !important;
  transform: translateY(-2px) !important;
}

.footer_social-media img {
  width: 15px !important;
  height: 15px !important;
}

.footer_link {
  color: rgba(255, 255, 255, 0.88) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  transition: color 0.2s ease !important;
}

.footer_link:hover {
  color: #ffffff !important;
}

.footer_contact-list .link {
  color: rgba(255, 255, 255, 0.88) !important;
  text-decoration: none !important;
}

.footer_contact-list .link:hover {
  text-decoration: underline !important;
}

.footer_btm {
  border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding-top: 24px !important;
  margin-top: 40px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

.footer_btm-row {
  display: flex !important;
  gap: 20px !important;
}

.footer_lega-link {
  color: rgba(255, 255, 255, 0.6) !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: color 0.2s ease !important;
}

.footer_lega-link.hide {
  display: inline-block !important;
}

.footer_lega-link:hover {
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media screen and (max-width: 991px) {
  .donate-hero {
    padding: 120px 0 60px 0;
  }

  .donate-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-main-title {
    font-size: 38px;
  }

  .story-title {
    font-size: 34px;
  }

  .take-action-title {
    font-size: 32px;
  }

  .donation-card-box {
    padding: 32px 24px;
  }

  .flex-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-actions-row {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 640px) {
  .donate-hero {
    padding: 100px 0 50px 0;
  }

  .hero-main-title {
    font-size: 30px;
  }

  .hero-glass-card {
    padding: 22px 18px;
  }

  .metric-main-value {
    font-size: 21px;
  }

  .card-quick-pills {
    grid-template-columns: repeat(2, 1fr);
  }

  .story-title {
    font-size: 28px;
  }

  .take-action-title {
    font-size: 26px;
  }

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

  .form-grid-2col,
  .form-grid-3col,
  .form_row.half {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .footer_btm {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
