@import url('/fonts/cormorant-figtree.css');

/* ==========================================================================
   508 Ministry /give/ Active Partner Churches Section - Luminous Sunlit Vibe
   Strictly scoped to #active-church-needs.m508-ac-wrap
   Self-hosted Cormorant + Figtree fonts only (SIL OFL 1.1). Zero external CDN.
   ========================================================================== */

@keyframes m508AcGoldShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes m508AcLivePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.58);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes m508AcPlayingPulse {
  0% {
    box-shadow: 0 8px 20px -8px rgba(5, 150, 105, 0.55), 0 0 0 0 rgba(16, 185, 129, 0.45);
  }
  70% {
    box-shadow: 0 8px 20px -8px rgba(5, 150, 105, 0.55), 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 8px 20px -8px rgba(5, 150, 105, 0.55), 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

#active-church-needs.m508-ac-wrap {
  position: relative;
  isolation: isolate;
  max-width: 1260px;
  margin: 26px auto 22px;
  padding: 0 clamp(14px, 2.2vw, 24px);
  font-family: 'Figtree', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #1e3350;
  box-sizing: border-box;
}

#active-church-needs.m508-ac-wrap *,
#active-church-needs.m508-ac-wrap *::before,
#active-church-needs.m508-ac-wrap *::after {
  box-sizing: border-box;
}

/* 1. Luminous Sunlit Outer Frame */
#active-church-needs.m508-ac-wrap .m508-ac-panel {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(24px, 3vw, 38px) clamp(20px, 3vw, 38px) clamp(22px, 2.6vw, 32px);
  background:
    radial-gradient(circle at 6% 5%, rgba(191, 219, 254, 0.40) 0%, rgba(255, 255, 255, 0) 40%),
    radial-gradient(circle at 94% 6%, rgba(186, 230, 253, 0.42) 0%, rgba(255, 255, 255, 0) 42%),
    radial-gradient(circle at 86% 94%, rgba(219, 234, 254, 0.36) 0%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(180deg, #FFFFFF 0%, #F2F8FE 55%, #E8F3FC 100%);
  border: 1.5px solid #CFE4FA;
  color: #1e3350;
  box-shadow:
    0 24px 60px -26px rgba(30, 64, 175, 0.16),
    0 0 38px rgba(147, 197, 253, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

/* Subtle Animated Honey-Gold Top Shimmer Bar */
#active-church-needs.m508-ac-wrap .m508-ac-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    #F3C23C 0%,
    #FFF0B3 24%,
    #E5AD24 50%,
    #FFF2BE 76%,
    #F3C23C 100%
  );
  background-size: 240% 100%;
  animation: m508AcGoldShimmer 7s ease-in-out infinite;
  pointer-events: none;
}

/* 2. Header Layout */
#active-church-needs.m508-ac-wrap .m508-ac-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin: 0 0 26px;
  padding: 0 0 22px;
  border-bottom: 1px solid #D6E8FA;
}

#active-church-needs.m508-ac-wrap .m508-ac-head > div {
  min-width: 0;
  flex: 1 1 540px;
}

/* Warm Honey-Gold Pill Eyebrow + Emerald Live Pulse Dot */
#active-church-needs.m508-ac-wrap .m508-ac-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 6px 15px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE694 0%, #F5C23C 100%);
  border: 1px solid rgba(217, 155, 22, 0.36);
  color: #0B2046;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 11.2px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.15;
  text-transform: uppercase;
  box-shadow:
    0 6px 16px -6px rgba(217, 155, 22, 0.50),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#active-church-needs.m508-ac-wrap .m508-ac-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: #10B981;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
  animation: m508AcLivePulse 2.4s ease-out infinite;
}

/* Deep-Navy Cormorant Heading */
#active-church-needs.m508-ac-wrap .m508-ac-title {
  font-family: 'Cormorant', Georgia, serif;
  font-size: clamp(29px, 3.3vw, 42px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: #0B2046;
  margin: 0 0 8px;
}

/* Crisp Slate Figtree Subcopy */
#active-church-needs.m508-ac-wrap .m508-ac-sub {
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 450;
  line-height: 1.6;
  color: #3A516E;
  margin: 0;
  max-width: 710px;
}

/* Sleek Sky-White / Navy Hub CTA Pill */
#active-church-needs.m508-ac-wrap .m508-ac-hub-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFFFFF 0%, #EEF6FF 100%);
  border: 1.5px solid #BBD8FA;
  color: #0E2B57;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow:
    0 8px 20px -10px rgba(30, 64, 175, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

#active-church-needs.m508-ac-wrap .m508-ac-hub-link:hover {
  background: linear-gradient(180deg, #FFFFFF 0%, #E1EFFE 100%);
  border-color: #60A5FA;
  color: #1D4ED8;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -10px rgba(37, 99, 235, 0.30);
}

/* 3. Two-Church Elevated Card Grid */
#active-church-needs.m508-ac-wrap .m508-ac-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

#active-church-needs.m508-ac-wrap .m508-ac-card {
  background: #FFFFFF;
  border: 1.5px solid #D4E6FA;
  border-radius: 22px;
  padding: 12px 12px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 14px 34px -18px rgba(15, 45, 95, 0.16),
    0 2px 8px rgba(59, 130, 246, 0.05);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

#active-church-needs.m508-ac-wrap .m508-ac-card:hover {
  border-color: #93C5FD;
  transform: translateY(-4px);
  box-shadow:
    0 24px 48px -20px rgba(29, 78, 216, 0.22),
    0 0 0 1px rgba(147, 197, 253, 0.42);
}

/* Crisp Rounded 16:9 Screenshot Preview */
#active-church-needs.m508-ac-wrap .m508-ac-media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 15px;
  background: #EAF3FC;
  border: 1px solid #D6E7FA;
  overflow: hidden;
  box-shadow: 0 8px 20px -12px rgba(15, 45, 95, 0.20);
}

#active-church-needs.m508-ac-wrap .m508-ac-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  transition: transform 0.35s ease;
}

#active-church-needs.m508-ac-wrap .m508-ac-card:hover .m508-ac-media img {
  transform: scale(1.018);
}

/* Preserved Badges & City Pills */
#active-church-needs.m508-ac-wrap .m508-ac-badge {
  position: absolute;
  top: 11px;
  left: 11px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.025em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#active-church-needs.m508-ac-wrap .m508-ac-badge.is-verified {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.96) 0%, rgba(29, 78, 216, 0.96) 100%);
  border: 1px solid rgba(191, 219, 254, 0.85);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.38);
}

#active-church-needs.m508-ac-wrap .m508-ac-badge.is-active {
  background: linear-gradient(180deg, #FFE48A 0%, #F3BC30 100%);
  border: 1px solid rgba(255, 255, 255, 0.80);
  color: #0B2046;
  box-shadow: 0 6px 18px rgba(180, 126, 22, 0.36);
}

#active-church-needs.m508-ac-wrap .m508-ac-loc {
  position: absolute;
  bottom: 10px;
  right: 11px;
  z-index: 2;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(11, 32, 70, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.36);
  color: #FFFFFF;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.015em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(11, 32, 70, 0.32);
}

/* 4. Card Content Body */
#active-church-needs.m508-ac-wrap .m508-ac-body {
  padding: 18px 10px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 11px;
}

#active-church-needs.m508-ac-wrap .m508-ac-name {
  font-family: 'Cormorant', Georgia, serif;
  font-size: clamp(24px, 2.2vw, 29px);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: #0B2046;
  margin: 0;
}

#active-church-needs.m508-ac-wrap .m508-ac-meta {
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 13.2px;
  font-weight: 700;
  line-height: 1.4;
  color: #1E4FA8;
  margin: -3px 0 0;
}

#active-church-needs.m508-ac-wrap .m508-ac-card[data-church="rgm-malawi"] .m508-ac-meta {
  color: #9A5D08;
}

#active-church-needs.m508-ac-wrap .m508-ac-desc {
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 14.5px;
  font-weight: 450;
  line-height: 1.6;
  color: #364E6B;
  margin: 0;
}

/* Sky-Tinted Spec Chips */
#active-church-needs.m508-ac-wrap .m508-ac-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}

#active-church-needs.m508-ac-wrap .m508-ac-chip {
  display: inline-flex;
  align-items: center;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 11.8px;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 11px;
  border-radius: 999px;
  background: #F1F7FF;
  border: 1px solid #CFE3FA;
  color: #163A6C;
}

/* 5. Balanced 2x2 Action Buttons Grid */
#active-church-needs.m508-ac-wrap .m508-ac-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: auto;
  padding-top: 10px;
}

#active-church-needs.m508-ac-wrap .m508-ac-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 43px;
  padding: 10px 14px;
  border-radius: 12px;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 13.3px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.16s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

#active-church-needs.m508-ac-wrap .m508-ac-btn:hover {
  transform: translateY(-1.5px);
}

#active-church-needs.m508-ac-wrap .m508-ac-btn:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
}

/* Primary Honey-Gold Sanctuary CTA */
#active-church-needs.m508-ac-wrap .m508-ac-btn-gold {
  background: linear-gradient(180deg, #FFE68F 0%, #F4C036 100%);
  border-color: #E2AB22;
  color: #0B2046;
  box-shadow:
    0 8px 20px -8px rgba(217, 155, 22, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

#active-church-needs.m508-ac-wrap .m508-ac-btn-gold:hover {
  background: linear-gradient(180deg, #FFECA6 0%, #F6C948 100%);
  border-color: #D99B16;
  color: #071734;
  box-shadow:
    0 12px 24px -8px rgba(217, 155, 22, 0.66),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Royal-Blue Play Radio Spot CTA */
#active-church-needs.m508-ac-wrap .m508-ac-btn-radio {
  background: linear-gradient(180deg, #2563EB 0%, #1D4ED8 100%);
  border-color: #1E40AF;
  color: #FFFFFF;
  box-shadow:
    0 8px 20px -8px rgba(37, 99, 235, 0.54),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

#active-church-needs.m508-ac-wrap .m508-ac-btn-radio:hover {
  background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
  border-color: #1D4ED8;
  color: #FFFFFF;
  box-shadow: 0 12px 24px -8px rgba(37, 99, 235, 0.64);
}

#active-church-needs.m508-ac-wrap .m508-ac-btn-radio.is-playing {
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  border-color: #047857;
  color: #FFFFFF;
  animation: m508AcPlayingPulse 2s ease-out infinite;
}

/* Crisp Sky-White Secondary Pills */
#active-church-needs.m508-ac-wrap .m508-ac-btn-ghost {
  background: linear-gradient(180deg, #FFFFFF 0%, #F3F8FF 100%);
  border-color: #C7DFFA;
  color: #12315E;
  box-shadow: 0 2px 8px rgba(15, 45, 95, 0.05);
}

#active-church-needs.m508-ac-wrap .m508-ac-btn-ghost:hover {
  background: linear-gradient(180deg, #FFFFFF 0%, #E6F1FF 100%);
  border-color: #7CB4FA;
  color: #1D4ED8;
  box-shadow: 0 8px 18px -10px rgba(37, 99, 235, 0.28);
}

/* 6. Clean Sunlit Footer Pill Bar */
#active-church-needs.m508-ac-wrap .m508-ac-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin-top: 22px;
  padding: 14px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #D4E6FA;
  font-family: 'Figtree', system-ui, sans-serif;
  font-size: 13.4px;
  font-weight: 500;
  color: #364E6B;
  box-shadow: 0 6px 18px -12px rgba(15, 45, 95, 0.12);
}

#active-church-needs.m508-ac-wrap .m508-ac-foot a {
  color: #1D4ED8;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(29, 78, 216, 0.38);
  text-underline-offset: 3px;
  transition: color 0.16s ease, text-decoration-color 0.16s ease;
}

#active-church-needs.m508-ac-wrap .m508-ac-foot a:hover {
  color: #0B2046;
  text-decoration-color: #D99B16;
}

/* 7. Responsive Rules (Zero Horizontal Overflow) */
@media (max-width: 920px) {
  #active-church-needs.m508-ac-wrap .m508-ac-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  #active-church-needs.m508-ac-wrap {
    margin: 18px auto 16px;
    padding: 0 12px;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-panel {
    border-radius: 22px;
    padding: 20px 15px 18px;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-head {
    margin-bottom: 18px;
    padding-bottom: 16px;
    gap: 12px;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-eyebrow {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    padding: 5px 12px;
    max-width: 100%;
    white-space: normal;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-hub-link {
    width: 100%;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-card {
    border-radius: 18px;
    padding: 10px 10px 0;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-media {
    border-radius: 12px;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-badge {
    top: 8px;
    left: 8px;
    padding: 5px 10px;
    font-size: 10.5px;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-loc {
    bottom: 8px;
    right: 8px;
    padding: 4px 9px;
    font-size: 10.5px;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-body {
    padding: 14px 6px 16px;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-btn-gold,
  #active-church-needs.m508-ac-wrap .m508-ac-btn-radio {
    grid-column: 1 / -1;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-foot {
    padding: 13px 14px;
    font-size: 12.8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #active-church-needs.m508-ac-wrap .m508-ac-panel::before,
  #active-church-needs.m508-ac-wrap .m508-ac-dot,
  #active-church-needs.m508-ac-wrap .m508-ac-btn-radio.is-playing {
    animation: none;
  }

  #active-church-needs.m508-ac-wrap .m508-ac-card,
  #active-church-needs.m508-ac-wrap .m508-ac-media img,
  #active-church-needs.m508-ac-wrap .m508-ac-btn,
  #active-church-needs.m508-ac-wrap .m508-ac-hub-link {
    transition: none;
  }
}
