/* JustGiving CTA polish — scoped to the dedicated donation trigger class. */
.button {
  border-radius: 0.7rem;
  padding: 0.88rem 1.2rem;
  font-weight: 800;
}

.jg-cta {
  border-radius: 0.7rem;
  padding: 0.88rem 1.2rem;
  background: var(--yellow, #f4ef16);
  color: #111515;
  font-weight: 800;
}

.jg-cta:hover,
.jg-cta:focus-visible,
.jg-cta:active {
  background: var(--yellow, #f4ef16);
  color: #111515;
}

.jg-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.16),
    0 10px 24px rgba(243, 237, 40, 0.18);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.jg-cta::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(
    110deg,
    transparent 20%,
    rgba(255, 255, 255, 0.2) 48%,
    transparent 76%
  );
  transform: translateX(-125%);
  transition: transform 420ms ease;
}

.jg-cta:hover,
.jg-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 6px 0 rgba(0, 0, 0, 0.14),
    0 14px 28px rgba(243, 237, 40, 0.26);
}

.jg-cta:hover::before,
.jg-cta:focus-visible::before {
  transform: translateX(125%);
}

.justgiving-particle {
  position: fixed;
  z-index: 9999;
  top: var(--particle-top);
  left: var(--particle-left);
  min-width: 2rem;
  padding: 0.3rem 0.48rem;
  color: #fff;
  font-family: var(--font-display, sans-serif);
  font-size: 0.84rem;
  font-weight: 1000;
  letter-spacing: 0.02em;
  line-height: 1;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  border: 1px solid #fff;
  border-radius: 999px;
  box-shadow:
    0 2px 0 #111415,
    0 5px 12px rgba(17, 20, 21, 0.62);
  transform: translate(-50%, 0);
  animation: justgiving-particle-float 2200ms ease-out var(--particle-delay, 0ms) forwards;
}

.justgiving-particle--yellow {
  background: #f3ed28;
  color: #111415;
  border-color: #111415;
}

.justgiving-particle--white {
  background: #fff;
  color: #111415;
  border-color: #f3ed28;
}

.justgiving-particle--black {
  background: #111415;
  color: #f3ed28;
  border-color: #fff;
}

@keyframes justgiving-particle-float {
  0% {
    opacity: 0;
    transform: translate(-50%, 0) scale(0.8);
  }
  18% {
    opacity: 1;
  }
  65% {
    opacity: 1;
    transform: translate(calc(-50% + var(--particle-x)), -42px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--particle-x)), var(--particle-y)) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .jg-cta,
  .jg-cta,
  .jg-cta::before,
  .jg-cta::before {
    transition: none;
  }

  .justgiving-particle {
    animation: none;
  }
}

.hero-actions .button-primary:first-child {
  min-width: min(100%, 16.5rem);
  padding-inline: 1.35rem;
}

.fundraising-strip .button-dark.jg-cta {
  background: var(--ink, #111415) !important;
  color: var(--yellow, #f3ed28) !important;
  box-shadow:
    0 4px 0 rgba(0, 0, 0, 0.24),
    0 10px 24px rgba(0, 0, 0, 0.35);
}

.fundraising-strip .button-dark.jg-cta:hover,
.fundraising-strip .button-dark.jg-cta:focus-visible,
.fundraising-strip .button-dark.jg-cta:active {
  background: var(--ink, #111415) !important;
  color: var(--yellow, #f3ed28) !important;
}

@media (max-width: 414px) {
  .hero-actions .button-primary:first-child {
    min-width: 0;
    width: min(100%, calc(100vw - 3rem));
    max-width: calc(100vw - 3rem);
    padding-inline: 0.75rem;
    font-size: clamp(0.68rem, 3.1vw, 0.78rem);
  }
}
