@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&display=swap');

/* ═══════════════════════════════════
   CARDS WRAPPER — no background, no padding
   the Divi section handles all of that
   ═══════════════════════════════════ */
.faa-impact-cards-only {
  width: 100%;
  font-family: 'Montserrat', sans-serif;
}

/* ═══════════════════════════════════
   GRID
   ═══════════════════════════════════ */
.faa-impact-grid {
  display: grid;
  gap: 24px;
  width: 100%;
}
.faa-cols-1 { grid-template-columns: 1fr; }
.faa-cols-2 { grid-template-columns: repeat(2, 1fr); }
.faa-cols-3 { grid-template-columns: repeat(3, 1fr); }
.faa-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ═══════════════════════════════════
   CARD — white, modern, clean
   ═══════════════════════════════════ */
.faa-impact-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 28px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.06),
    0 8px 24px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.8);

  /* entrance animation */
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    box-shadow 0.25s ease;
}

.faa-impact-card.faa-visible {
  opacity: 1;
  transform: translateY(0);
}

.faa-impact-card:hover {
  box-shadow:
    0 4px 12px rgba(0,0,0,0.08),
    0 20px 48px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

/* ── Icon ── */
.faa-impact-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 4px;
}

.faa-impact-icon-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ── Number ── */
.faa-impact-number {
  font-size: clamp(44px, 5.5vw, 72px);
  font-weight: 900;
  color: #1a5c52;
  line-height: 1;
  letter-spacing: -0.02em;
  /* Inherits color from parent section via CSS var if set */
  color: var(--faa-number-color, #1a5c52);
}

/* ── Label ── */
.faa-impact-label {
  font-size: clamp(14px, 1.8vw, 20px);
  font-weight: 700;
  color: #333;
  line-height: 1.3;
  color: var(--faa-label-color, #333333);
}

/* ═══════════════════════════════════
   DONATION BUTTON
   ═══════════════════════════════════ */
.faa-impact-btn-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 36px;
}

.faa-impact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 56px;
  background: transparent;
  color: inherit;
  border: 2.5px solid currentColor;
  border-radius: 60px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(14px, 1.6vw, 17px);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.01em;
}

.faa-impact-btn:hover {
  background: currentColor;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}

/* When hovered, the text inside needs to flip to white
   We do this with a nested span trick */
.faa-impact-btn:hover { color: #fff; }

/* ═══════════════════════════════════
   DONATION POPUP
   ═══════════════════════════════════ */
.faa-impact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.faa-impact-overlay.faa-open {
  opacity: 1;
  pointer-events: all;
}

.faa-impact-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%) scale(0.96);
  z-index: 999999;
  width: min(680px, 94vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
  overflow: hidden;
}
.faa-impact-popup.faa-open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  pointer-events: all;
}

.faa-impact-popup-box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.faa-impact-popup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  flex-shrink: 0;
}
.faa-impact-popup-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}
.faa-impact-popup-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.07);
  font-size: 15px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.faa-impact-popup-close:hover { background: rgba(0, 0, 0, 0.14); }

.faa-impact-popup-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
}
.faa-impact-popup-body iframe {
  width: 100% !important;
  border: none;
  display: block;
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media (max-width: 768px) {
  .faa-cols-3,
  .faa-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .faa-impact-card { padding: 28px 18px; }
}
@media (max-width: 480px) {
  .faa-cols-2,
  .faa-cols-3,
  .faa-cols-4 { grid-template-columns: 1fr; }
}
