/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Card hover micro-interactions */
.projects-masonry__item,
.gallery-masonry__item,
.team-item,
.donors-slider__item {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.projects-masonry__item:hover,
.gallery-masonry__item:hover,
.team-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Contact form validation feedback */
.form__field.field-invalid {
  border-color: #e5405e !important;
  box-shadow: 0 0 0 1px #e5405e;
}

/* Copy-to-clipboard confirmation */
.btn-copy--done {
  background-color: #2ec774 !important;
  border-color: #2ec774 !important;
  transition: background-color 0.2s ease;
}

/* Prevent the mobile nav drawer from overflowing viewports narrower than 320px */
.aside-dropdown__inner {
  max-width: 100%;
}

/* Dark overlay on hero slider images so the title/subtitle stay readable
   over busy photos. z-index pins it above the background image and below
   the text, regardless of source order. */
.promo-slider__item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(0, 0, 0, 0.6) 100%);
  z-index: 1;
  pointer-events: none;
}
.promo-slider__item > .container {
  position: relative;
  z-index: 2;
}

/* Same treatment for the single-image hero (.promo-primary) used on every
   other page - inner page banners need the same readability fix. */
.promo-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 45%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
  pointer-events: none;
}
.promo-primary > .container,
.promo-primary > .promo-primary__description {
  position: relative;
  z-index: 2;
}

/* Trim the gap before the Highlights slider further than the theme's
   default section padding allows - keep a small, deliberate gap instead
   of none. */
.testimonials--tight-bottom {
  padding-bottom: 30px !important;
}

/* Upcoming events countdown */
.events-countdown {
  text-align: center;
  background: #343877;
  border-radius: 12px;
  padding: 30px 20px;
  margin-bottom: 10px;
}
.events-countdown__label {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.events-countdown__timer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}
.events-countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  min-width: 90px;
  padding: 14px 10px;
}
.events-countdown__value {
  color: #efc940;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.events-countdown__unit {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}
.events-countdown__note {
  color: #fff;
  opacity: 0.85;
  font-size: 14px;
  margin: 20px 0 0;
}

/* "Closed" status badge on Upcoming Events cards */
.event-item__status {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: #e5405e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 4px;
}

/* The theme hides the "vertical"/"horizontal" campaign card photos below an
   unusually high 1367px breakpoint (most laptop/desktop screens are
   narrower than that), leaving the text panel to fill 100% of the card and
   making the photo look missing. Reveal it from a normal tablet width up. */
@media only screen and (min-width: 768px) {
  .projects-masonry__item--vertical .projects-masonry__img,
  .projects-masonry__item--horizontal .projects-masonry__img {
    display: block !important;
  }
  .projects-masonry__item--vertical .projects-masonry__text {
    height: 50% !important;
  }
  .projects-masonry__item--horizontal .projects-masonry__text {
    width: 50% !important;
  }
}

/* Hero banners: the theme's generic .img--bg rule anchors photos to the
   top, so on wide, short banners the lower part of the picture (often
   people's faces) gets cropped away. Centre hero photos instead. */
.promo-primary .img--bg,
.promo-slider__item .img--bg {
  -o-object-position: center center;
  object-position: center center;
  font-family: "object-fit: cover; object-position: center center";
}

/* Team cards: the whole card is a link to the member's profile. */
a.team-item__link {
  display: block;
  color: inherit;
  text-decoration: none;
}
a.team-item__link:hover,
a.team-item__link:focus {
  color: inherit;
  text-decoration: none;
}

/* Staff login link in the footer copyright line (blog dashboard). */
.footer-copyright__sep {
  margin: 0 10px;
  opacity: 0.5;
}
.footer-login {
  color: inherit;
  opacity: 0.8;
  text-decoration: none;
  white-space: nowrap;
}
.footer-login:hover,
.footer-login:focus {
  color: #efc940;
  opacity: 1;
  text-decoration: none;
}
