/* Donate banner shown in articles instead of the embedded appeal page (SiteController::getHtmlString).
 * The banner is one image; the motion is layered on top:
 *   slow zoom of the picture, a light sweep every few seconds, and a pulsing glow on the DONATE button.
 * Visitors who ask their device for reduced motion get the still banner. */
.donate-banner {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 6px;
  margin: 12px 0;
  line-height: 0;
}
.donate-banner img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  transform-origin: 70% 81%;          /* zoom centred on the DONATE button, so its glow stays aligned */
  animation: donate-zoom 9s ease-in-out infinite alternate;
}
/* light sweep */
.donate-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.35) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-18deg);
  animation: donate-sweep 5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
/* glow over the DONATE button (its place in the image: 61.7-78.3% across, 74.8-87.1% down) */
.donate-banner::after {
  content: "";
  position: absolute;
  left: 61.7%;
  top: 74.8%;
  width: 16.6%;
  height: 12.3%;
  border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(255, 40, 40, .7);
  animation: donate-pulse 1.8s ease-out infinite;
  pointer-events: none;
  z-index: 2;
}
.donate-banner:hover img,
.donate-banner:focus img { animation-play-state: paused; }

@keyframes donate-zoom  { from { transform: scale(1); } to { transform: scale(1.05); } }
@keyframes donate-sweep { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes donate-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 40, 40, .7); }
  70%  { box-shadow: 0 0 0 14px rgba(255, 40, 40, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 40, 40, 0); }
}

/* Donate button at the top of every page (in place of Subscribe): heartbeat with a red glow, and a light sweep
 * across the glossy button. The link carries the header size class (.date_bar), so it clips the sweep to the
 * button's rounded shape. */
.donate_top {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 4.8% / 20%;            /* the picture's own corner: 20% of its height */
  cursor: pointer;
  transform-origin: 50% 50%;
  animation: donate-beat 2.4s ease-in-out infinite;
}
.donate_top img { display: block; width: 100%; height: auto; border: 0; }
.donate_top::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 35%;
  height: 100%;
  background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-20deg);
  animation: donate-shine 3.6s ease-in-out infinite;
  pointer-events: none;
}
.donate_top:hover, .donate_top:focus { animation-play-state: paused; filter: brightness(1.08) drop-shadow(0 0 6px rgba(230, 20, 30, .6)); }
@keyframes donate-beat {
  0%, 40%, 100% { transform: scale(1);    filter: drop-shadow(0 0 0 rgba(230, 20, 30, 0)); }
  10%           { transform: scale(1.06); filter: drop-shadow(0 0 8px rgba(230, 20, 30, .65)); }
  20%           { transform: scale(1.01); filter: drop-shadow(0 0 3px rgba(230, 20, 30, .3)); }
  30%           { transform: scale(1.04); filter: drop-shadow(0 0 7px rgba(230, 20, 30, .55)); }
}
@keyframes donate-shine { 0%, 45% { left: -60%; } 85%, 100% { left: 130%; } }

@media (prefers-reduced-motion: reduce) {
  .donate-banner img, .donate-banner::before, .donate-banner::after, .donate_top, .donate_top::after { animation: none; }
  .donate-banner::before, .donate_top::after { display: none; }
}
