.af-donations {
  --af-teal: #105565;
  --af-teal-dark: #0a3f4d;
  --af-teal-soft: #e6f3f5;
  --af-lime: #d3d946;
  --af-lime-dark: #777b00;
  --af-cream: #fcf8f4;
  --af-ink: #141827;
  --af-gray: #616161;
  --af-white: #fff;
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 760px;
  overflow: hidden;
  color: var(--af-ink);
  background:
    radial-gradient(circle at 8% 18%, rgba(211, 217, 70, .22), transparent 24rem),
    linear-gradient(112deg, rgba(230, 243, 245, .96), rgba(252, 248, 244, .94) 62%),
    var(--af-bg-image) center / cover;
  font-family: "Nunito Sans", Arial, sans-serif;
}

.af-donations,
.af-donations * { box-sizing: border-box; }

.af-donations::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 470px;
  height: 470px;
  left: -270px;
  bottom: -250px;
  border: 78px solid rgba(16, 85, 101, .07);
  border-radius: 50%;
}

.af-secure-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--af-teal);
  font-family: "Quicksand", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.af-secure-note > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  color: var(--af-white);
  background: var(--af-teal);
  border-radius: 50%;
}

.af-card-security {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.af-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  align-items: center;
  gap: clamp(48px, 7vw, 96px);
  width: min(1120px, calc(100% - 48px));
  margin: clamp(42px, 5vw, 70px) auto 0;
  padding-bottom: 70px;
}

.af-campaign-copy { max-width: 610px; }

.af-eyebrow,
.af-card-heading > p {
  margin: 0 0 10px;
  color: var(--af-lime-dark);
  font-family: "Amatic SC", "Quicksand", Arial, sans-serif;
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  text-transform: uppercase;
}

.af-campaign-copy h1 {
  max-width: 650px;
  margin: 0;
  padding: 0;
  color: var(--af-teal-dark);
  font-family: "Quicksand", Arial, sans-serif;
  font-size: clamp(44px, 5.6vw, 72px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .99;
  text-transform: none;
}

.af-lead {
  max-width: 565px;
  margin: 25px 0 0;
  color: #425b60;
  font-size: 17px;
  line-height: 1.72;
}

.af-impact-note {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.af-impact-note p {
  margin: 0;
  color: #53696d;
  font-size: 14px;
  line-height: 1.55;
}

.af-impact-note strong { color: var(--af-teal); }

.af-impact-heart {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  color: var(--af-teal);
  background: var(--af-lime);
  border-radius: 18px 18px 18px 5px;
  box-shadow: 0 10px 24px rgba(16, 85, 101, .14);
  font-size: 20px;
}

.af-donation-card {
  position: relative;
  width: 100%;
  margin: 0;
  padding: clamp(27px, 3vw, 38px);
  background: rgba(255, 255, 255, .97);
  border: 1px solid rgba(16, 85, 101, .12);
  border-radius: 12px 42px 12px 42px;
  box-shadow: 0 28px 70px rgba(16, 85, 101, .17);
}

.af-step-indicator {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: #91a0a3;
  font-family: "Quicksand", Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
}

.af-step-indicator > span:first-child { color: var(--af-teal); }

.af-step-line {
  height: 3px;
  overflow: hidden;
  background: #e5edef;
  border-radius: 5px;
}

.af-step-line i {
  display: block;
  width: 50%;
  height: 100%;
  background: var(--af-lime);
  border-radius: inherit;
  transition: width .25s ease;
}

.af-donations.af-js [data-af-step="2"] { display: none; }
.af-donations.af-js[data-af-current-step="2"] [data-af-step="1"] { display: none; }
.af-donations.af-js[data-af-current-step="2"] [data-af-step="2"] { display: block; }

.af-donations:not(.af-js) [data-af-step="2"] {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid #dce8ea;
}

.af-card-heading > p {
  margin-bottom: 5px;
  font-size: 25px;
}

.af-card-heading h2 {
  margin: 0;
  padding: 0;
  color: var(--af-teal-dark);
  font-family: "Quicksand", Arial, sans-serif;
  font-size: clamp(23px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  text-transform: none;
  outline: none;
}

.af-amount-grid button,
.af-primary-button,
.af-back-button {
  appearance: none;
  box-shadow: none;
  font-family: "Quicksand", Arial, sans-serif;
  text-transform: none;
}

.af-field-label,
.af-custom-field > span:first-child,
.af-donor-fields label > span {
  display: block;
  margin: 0 0 9px;
  color: var(--af-ink);
  font-family: "Quicksand", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.af-field-label { margin-top: 24px; }

.af-amount-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.af-amount-grid button {
  min-height: 48px;
  padding: 8px 12px;
  color: var(--af-teal);
  background: var(--af-white);
  border: 1px solid #cfdfe2;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.af-amount-grid button:hover,
.af-amount-grid button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--af-teal);
}

.af-donations .af-amount-grid button.is-selected {
  color: var(--af-teal-dark);
  background: rgba(211, 217, 70, .35);
  border: 2px solid var(--af-lime-dark);
}

/* Keep theme active/focus styles from turning text blue on blue. */
.af-donations .af-primary-button,
.af-donations .af-primary-button:hover,
.af-donations .af-primary-button:focus {
  color: #fff !important;
  background: #105565 !important;
}
.af-donations .af-primary-button:active,
.af-donations .af-primary-button.active,
.af-donations .af-primary-button.is-active,
.af-donations .af-amount-grid button.is-selected,
.af-donations .af-amount-grid button[aria-pressed="true"] {
  color: #173b43 !important;
  background: #d3d946 !important;
  border-color: #697015;
}
.af-donations .af-primary-button > span { color: inherit !important; }
.af-donations button:focus-visible {
  outline: 3px solid #173b43;
  outline-offset: 3px;
}
@media (min-width: 1025px) {
  section.af-donations { padding-top: 20px; }
}

.af-custom-field {
  display: block;
  margin-top: 18px;
}

.af-input-shell {
  display: flex;
  align-items: center;
  min-height: 50px;
  overflow: hidden;
  color: var(--af-teal);
  background: #fafcfc;
  border: 1px solid #cfdfe2;
  border-radius: 12px;
}

.af-input-shell > span {
  padding-left: 16px;
  font-weight: 700;
}

.af-input-shell input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 12px 10px;
  color: var(--af-ink);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: "Nunito Sans", Arial, sans-serif;
  outline: 0;
}

.af-input-shell:focus-within {
  border-color: var(--af-teal);
  box-shadow: 0 0 0 3px rgba(16, 85, 101, .1);
}

.af-input-shell small {
  padding-right: 16px;
  color: #718287;
  font-size: 11px;
  font-weight: 700;
}

.af-inline-error {
  min-height: 18px;
  margin: 7px 0 0;
  color: #a52b32;
  font-size: 11px;
  line-height: 1.4;
}

.af-form-error {
  margin: 0 0 18px;
  padding: 11px 13px;
  color: #7d1f28;
  background: #fff0f1;
  border-left: 4px solid #b93843;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.af-primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  margin: 6px 0 0;
  padding: 12px 22px;
  color: var(--af-white);
  background: var(--af-teal);
  border: 0;
  border-radius: 30px;
  box-shadow: 0 14px 30px rgba(16, 85, 101, .22);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  transition: transform .18s ease, background .18s ease;
}

.af-primary-button:hover,
.af-primary-button:focus-visible {
  color: var(--af-white);
  background: var(--af-teal-dark);
  transform: translateY(-2px);
}

.af-primary-button > span:last-child { font-size: 22px; line-height: 1; }

.af-back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 15px;
  padding: 0;
  color: var(--af-teal);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.af-selected-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 21px 0;
  padding: 14px 16px;
  color: var(--af-teal);
  background: var(--af-teal-soft);
  border-radius: 12px;
  font-size: 13px;
}

.af-selected-summary strong {
  color: var(--af-teal-dark);
  font-family: "Quicksand", Arial, sans-serif;
  font-size: 17px;
}

.af-donor-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 12px;
}

.af-donor-fields label { display: block; }
.af-donor-fields .af-wide-field { grid-column: 1 / -1; }

.af-donor-fields label > span {
  margin-bottom: 7px;
  font-size: 12px;
}

.af-donor-fields input {
  width: 100%;
  min-height: 49px;
  margin: 0;
  padding: 11px 13px;
  color: var(--af-ink);
  background: #fafcfc;
  border: 1px solid #cfdfe2;
  border-radius: 11px;
  box-shadow: none;
  font-family: "Nunito Sans", Arial, sans-serif;
  outline: 0;
}

.af-donor-fields input:focus {
  border-color: var(--af-teal);
  box-shadow: 0 0 0 3px rgba(16, 85, 101, .1);
}

.af-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  color: #4f6267;
  cursor: pointer;
  font-size: 11.5px;
  line-height: 1.45;
}

.af-check-row.af-optional { margin-top: 10px; }

.af-check-row input {
  width: 17px;
  height: 17px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--af-teal);
}

.af-step[data-af-step="2"] .af-primary-button { margin-top: 22px; }

.af-payment-note {
  margin: 14px 0 0;
  color: #718287;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
}

.af-donation-deco {
  position: absolute;
  z-index: 1;
  width: min(650px, 48vw);
  left: -130px;
  bottom: -150px;
  opacity: .13;
  pointer-events: none;
}

@media (max-width: 850px) {
  .af-hero-grid {
    width: min(100% - 32px, 680px);
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 0;
    padding: 36px 0 48px;
  }

  .af-campaign-copy {
    margin: 0 auto;
    text-align: center;
  }

  .af-lead {
    margin-right: auto;
    margin-left: auto;
  }

  .af-impact-note {
    justify-content: center;
    text-align: left;
  }

  .af-donation-card {
    width: min(100%, 520px);
    margin: 0 auto;
    scroll-margin-top: 24px;
  }
}

@media (max-width: 520px) {
  .af-campaign-copy h1 {
    font-size: clamp(36px, 11vw, 46px);
    line-height: 1.02;
  }

  .af-campaign-copy .af-eyebrow { font-size: 25px; }

  .af-lead {
    font-size: 15.5px;
    line-height: 1.65;
  }

  .af-impact-note { align-items: flex-start; }

  .af-donation-card {
    padding: 24px 20px;
    border-radius: 10px 32px 10px 32px;
  }

  .af-card-security { margin-bottom: 12px; }
  .af-field-label { margin-top: 22px; }
  .af-selected-summary { flex-wrap: wrap; }

  .af-donor-fields { grid-template-columns: 1fr; }
  .af-donor-fields .af-wide-field { grid-column: auto; }
}

@media (max-width: 360px) {
  .af-hero-grid {
    width: calc(100% - 24px);
    padding-top: 28px;
  }

  .af-campaign-copy h1 { font-size: 36px; }
  .af-impact-note { gap: 12px; }

  .af-donation-card {
    padding: 22px 16px;
    border-radius: 10px 26px 10px 26px;
  }

  .af-amount-grid { gap: 8px; }
  .af-amount-grid button { font-size: 14px; }

  .af-primary-button {
    padding-right: 14px;
    padding-left: 14px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .af-donations *,
  .af-donations *::before,
  .af-donations *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* 1.0.3: background carousel confined to the existing left panel. */
.af-campaign-photo {
  position: relative;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  padding: 235px 24px 24px;
  border-radius: 12px 42px 12px 42px;
  background: var(--af-teal-soft);
}
.af-carousel-images, .af-carousel-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.af-carousel-images { z-index: -2; pointer-events: none; height: 300px; bottom: auto; }
.af-carousel-image {
  display: block;
  max-width: none;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0;
  transition: opacity 900ms ease;
}
.af-carousel-image.is-active { opacity: 1; }
.af-campaign-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent 130px, rgba(230,243,245,.7) 205px, #e6f3f5 255px);
}
.af-campaign-photo .af-campaign-text { position: relative; }

.af-carousel-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--af-teal);
  border-radius: 50%;
  color: var(--af-teal-dark);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 6px 18px rgba(10, 63, 77, .18);
  cursor: pointer;
  line-height: 1;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}
.af-carousel-toggle[hidden] { display: none; }
.af-carousel-toggle:hover {
  color: var(--af-white);
  background: var(--af-teal);
  transform: translateY(-1px);
}
.af-carousel-toggle:focus-visible { outline: 3px solid var(--af-teal); outline-offset: 3px; }

.af-carousel-toggle-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 18px;
}

/* Icono de pausa: dos barras verticales. */
.af-carousel-toggle-icon::before,
.af-carousel-toggle-icon::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 5px;
  height: 16px;
  background: currentColor;
  border-radius: 2px;
}
.af-carousel-toggle-icon::before { left: 1px; }
.af-carousel-toggle-icon::after { right: 1px; }

/* Icono de reproducción cuando el carrusel está pausado. */
.af-carousel-toggle.is-paused .af-carousel-toggle-icon::before {
  top: 1px;
  left: 3px;
  width: 0;
  height: 0;
  background: transparent;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid currentColor;
  border-radius: 0;
}
.af-carousel-toggle.is-paused .af-carousel-toggle-icon::after { display: none; }

.af-screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 520px) {
  .af-campaign-photo { padding: 220px 18px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .af-carousel-image { transition: none; }
}

/* 1.0.4: responsive layout scoped to the donation component. */
.af-donations {
  container: af-donation-layout / inline-size;
  min-height: 0;
  max-width: 100%;
  font-size: 16px;
  white-space: normal;
  text-align: left;
}
/* Some editors wrap the shortcode output in code. Neutralize only this wrapper. */
.af-donations > code {
  display: contents;
  font: inherit;
  color: inherit;
  white-space: normal;
  letter-spacing: normal;
  text-transform: none;
  background: transparent;
  border: 0;
  padding: 0;
}
.af-donations .af-hero-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(24px, 4vw, 56px);
  width: min(1120px, calc(100% - 48px));
  margin: 40px auto 0;
  padding-bottom: 48px;
  align-items: start;
}
.af-donations .af-hero-grid > *,
.af-donations .af-campaign-text,
.af-donations .af-donor-fields > *,
.af-donations .af-input-shell { min-width: 0; }
.af-donations .af-campaign-copy,
.af-donations .af-donation-card { width: 100%; max-width: 100%; }
.af-donations .af-campaign-copy h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-size: clamp(36px, 5.5cqi, 64px);
  overflow-wrap: anywhere;
  line-height: 1.06;
}
.af-donations .af-campaign-photo {
  --af-photo-height: clamp(210px, 32cqi, 300px);
  padding: calc(var(--af-photo-height) - 32px) 24px 26px;
}
.af-donations .af-carousel-images { height: var(--af-photo-height); }
.af-donations .af-carousel-image {
  border-radius: 0;
  margin: 0;
  padding: 0;
  object-position: center 25%;
}
.af-donations .af-campaign-photo::after {
  height: var(--af-photo-height);
  bottom: auto;
  background: linear-gradient(to bottom, transparent 58%, #e6f3f5 100%);
}
.af-donations .af-carousel-toggle { z-index: 2; }
.af-donations .af-lead { margin-top: 18px; }
.af-donations .af-impact-note { margin-top: 22px; }
.af-donations .af-card-heading h2,
.af-donations .af-impact-note p,
.af-donations .af-check-row span,
.af-donations .af-payment-note { overflow-wrap: anywhere; }
.af-donations .af-donor-fields input,
.af-donations .af-input-shell input { font-size: 16px; line-height: 1.4; }
.af-donations .af-primary-button { white-space: normal; }
.af-donations .af-primary-button > span:first-child { min-width: 0; }
.af-donations .af-back-button { min-height: 44px; }
.af-donations .af-check-row { padding-block: 6px; font-size: 13px; }
.af-donations .af-check-row input { width: 20px; height: 20px; }
.af-donations .af-donation-card { scroll-margin-top: 100px; }
.af-donations .af-amount-grid button { min-width: 0; }
/* Viewport fallback for browsers without container queries. */
@media (max-width: 960px) {
  .af-donations .af-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    width: min(640px, calc(100% - 32px));
    gap: 24px;
    margin: 24px auto 0;
    padding-bottom: 32px;
  }
  .af-donations .af-campaign-copy { text-align: left; margin: 0; }
  .af-donations .af-impact-note { justify-content: flex-start; }
  .af-donations .af-donation-card { margin: 0; }
}
@container af-donation-layout (max-width: 960px) {
  .af-donations .af-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    width: min(640px, calc(100% - 32px));
    gap: 24px;
    margin: 24px auto 0;
    padding-bottom: 32px;
  }
  .af-donations .af-campaign-copy { text-align: left; margin: 0; }
  .af-donations .af-impact-note { justify-content: flex-start; }
  .af-donations .af-donation-card { margin: 0; }
}
@media (max-width: 520px) {
  .af-donations .af-hero-grid { width: calc(100% - 24px); margin-top: 16px; gap: 20px; }
  .af-donations .af-campaign-photo { padding-inline: 18px; }
  .af-donations .af-campaign-copy h1 { font-size: clamp(30px, 9vw, 42px); }
  .af-donations .af-campaign-copy .af-eyebrow { font-size: 25px; line-height: 1.15; }
  .af-donations .af-donation-card { padding: 24px 18px; }
  .af-donations .af-donor-fields { grid-template-columns: minmax(0, 1fr); }
  .af-donations .af-donor-fields .af-wide-field { grid-column: auto; }
  .af-donations .af-impact-heart { width: 40px; height: 40px; }
  .af-donations .af-impact-note { gap: 12px; }
  .af-donations .af-carousel-toggle { top: 10px; right: 10px; }
}
@container af-donation-layout (max-width: 520px) {
  .af-donations .af-hero-grid { width: calc(100% - 24px); margin-top: 16px; gap: 20px; }
  .af-donations .af-campaign-photo { padding-inline: 18px; }
  .af-donations .af-campaign-copy h1 { font-size: clamp(30px, 9cqi, 42px); }
  .af-donations .af-campaign-copy .af-eyebrow { font-size: 25px; line-height: 1.15; }
  .af-donations .af-donation-card { padding: 24px 18px; }
  .af-donations .af-donor-fields { grid-template-columns: minmax(0, 1fr); }
  .af-donations .af-donor-fields .af-wide-field { grid-column: auto; }
  .af-donations .af-impact-heart { width: 40px; height: 40px; }
  .af-donations .af-impact-note { gap: 12px; }
  .af-donations .af-carousel-toggle { top: 10px; right: 10px; }
}
