/* ==========================================================================
   FUNNEL CRO & VISUAL ENHANCEMENTS — NO BABY BLISTERS
   Optimized for High Emotional Engagement, Trust, and Mobile Conversions
   ========================================================================== */

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

:root {
  --primary-brand: #2ECC71;
  --primary-dark: #27ae60;
  --primary-light: #e8f8f0;
  --accent-gold: #f39c12;
  --accent-gold-bg: #fef9e7;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-soft: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(46, 204, 113, 0.16);
  --radius-md: 12px;
  --radius-lg: 18px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-main);
  background-color: #f8fafc;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------------------
   1. FIXED METER & PROGRESS BAR (Responsive & Modern)
   -------------------------------------------------------------------------- */
.donation-meter {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  margin-bottom: 24px !important;
}

.donation-meter .progress {
  height: 14px;
  background-color: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
}

.donation-meter .progress .meter {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2ECC71 0%, #1abc9c 100%) !important;
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.4);
  transition: width 1s ease-in-out;
}

.donation-meter .description {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 12px;
}

.donation-meter .description > div {
  text-align: center;
  flex: 1 1 0;
  min-width: 90px;
}

.donation-meter .description p.bold {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #0f172a;
  margin: 0 !important;
}

.donation-meter .description p:not(.bold) {
  font-size: 0.8rem !important;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 2px 0 0 0 !important;
}

/* --------------------------------------------------------------------------
   2. URGENCY & 2X MATCHING GIFT BANNER
   -------------------------------------------------------------------------- */
.matching-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  border-left: 5px solid #f59e0b;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15);
}

.matching-banner::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.matching-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.matching-badge {
  background: #f59e0b;
  color: #000;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.matching-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fef08a;
}

.matching-desc {
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.45;
  margin: 0;
}

.matching-desc strong {
  color: #ffffff;
  text-decoration: underline decoration-amber-400;
}

/* --------------------------------------------------------------------------
   3. STORY CONTENT & EMOTIONAL COPYWRITING
   -------------------------------------------------------------------------- */
.enhanced-story {
  font-family: 'Inter', sans-serif;
  color: var(--text-main);
  line-height: 1.7;
}

.enhanced-title {
  font-family: 'Outfit', serif;
  font-size: 2.1rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  color: #0f172a !important;
  margin: 10px 0 18px 0 !important;
  letter-spacing: -0.5px;
}

.story-lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: #334155;
  background: #f1f5f9;
  border-left: 4px solid var(--primary-brand);
  padding: 16px 20px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 24px;
  line-height: 1.6;
}

.hero-media-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
  background: #000;
}

.hero-media-card img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-media-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
  color: #ffffff;
  padding: 24px 18px 12px;
  font-size: 0.88rem;
  font-weight: 500;
}

/* Story Chapters / Emotional Blocks */
.story-chapter {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
}

.chapter-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.28rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  margin-bottom: 12px;
}

.chapter-title .chapter-icon {
  font-size: 1.4rem;
}

.story-text {
  font-size: 1.02rem;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 14px;
}

.story-text strong {
  color: #0f172a;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   4. IMPACT CARDS (Where every dollar goes)
   -------------------------------------------------------------------------- */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0;
}

.impact-card {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  transition: all 0.25s ease;
  position: relative;
  cursor: pointer;
}

.impact-card:hover {
  border-color: var(--primary-brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  background: #ffffff;
}

.impact-card.featured {
  border-color: var(--primary-brand);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(46, 204, 113, 0.15);
}

.impact-card-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--primary-brand);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.impact-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.impact-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.impact-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* --------------------------------------------------------------------------
   5. PHOTO GALLERY (Clean 2-Column Responsive Grid)
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #000;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4 / 3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   6. TRUST & VERIFICATION SEALS (Below Widget)
   -------------------------------------------------------------------------- */
.trust-badges-container,
.trust-badge-row {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin: 16px 0;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.trust-badge-row .trust-badge-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 12px;
}

.trust-badge-row .trust-badge-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.trust-badge-row .trust-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.trust-badge-row .trust-badge-text strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.trust-badge-row .trust-badge-text span {
  font-size: 0.74rem;
  color: #64748b;
  line-height: 1.3;
}

.trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}

.trust-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.trust-badge-icon {
  font-size: 1.5rem;
  color: var(--primary-brand);
}

.trust-badge-text {
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.25;
}

.trust-subtext {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 12px;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

/* --------------------------------------------------------------------------
   7. STICKY MOBILE DONATION BAR
   -------------------------------------------------------------------------- */
.sticky-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  padding: 10px 16px;
  z-index: 9999;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sticky-mobile-bar.is-visible {
  transform: translateY(0);
}

.sticky-info,
.sticky-bar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sticky-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-brand);
  flex-shrink: 0;
}

.sticky-text {
  min-width: 0;
}

.sticky-title,
.sticky-bar-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.sticky-sub,
.sticky-bar-sub {
  font-size: 0.72rem;
  color: #e11d48;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.sticky-btn,
.sticky-bar-btn {
  background: var(--primary-brand);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(46, 204, 113, 0.4);
  animation: pulse-donate 2s infinite;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

@keyframes pulse-donate {
  0% { transform: scale(1); box-shadow: 0 4px 14px rgba(46, 204, 113, 0.4); }
  50% { transform: scale(1.03); box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6); }
  100% { transform: scale(1); box-shadow: 0 4px 14px rgba(46, 204, 113, 0.4); }
}

@media (max-width: 768px) {
  .sticky-mobile-bar {
    display: flex;
  }
  
  /* Add padding to page bottom so sticky bar does not overlap content */
  body {
    padding-bottom: 70px;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .enhanced-title {
    font-size: 1.65rem !important;
  }
}

/* --------------------------------------------------------------------------
   8. REAL-TIME DONATION TOAST (Social Proof)
   -------------------------------------------------------------------------- */
.donor-toast {
  position: fixed;
  bottom: 84px;
  left: 18px;
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9998;
  max-width: 320px;
  transform: translateX(-150%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  opacity: 0;
}

.donor-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.donor-toast-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.donor-toast-content {
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.35;
}

.donor-toast-content strong {
  color: #0f172a;
}

.donor-toast-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.donor-toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

@media (max-width: 768px) {
  .donor-toast {
    bottom: 74px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* ==========================================================================
   EXPRESS 1-CLICK PAY (APPLE PAY / GOOGLE PAY) & CLEAN CARD LAYOUT
   ========================================================================== */
#payment_types,
#paypal-panel,
#ach-panel,
#eur-bank-panel,
.payment-method.paypal,
.payment-method.venmo,
.payment-method.mercadopago,
.payment-method.bank {
  display: none !important;
}

.express-checkout-box {
  padding: 20px 40px 6px 40px;
  box-sizing: border-box;
  width: 100%;
}

.express-pay-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  background-color: #000000;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
  margin: 0 auto;
  user-select: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
}

.express-pay-btn:hover {
  background-color: #1a1a1a;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.express-pay-btn:active {
  background-color: #000000;
  transform: translateY(1px);
}

.express-apple-btn svg {
  height: 28px;
  width: auto;
  pointer-events: none;
}

.express-google-btn svg {
  height: 26px;
  width: auto;
  pointer-events: none;
}

.express-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 6px 0;
}

.express-divider::before,
.express-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.express-divider span {
  padding: 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.9px;
  color: #8c9ba5;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#credit-card-v3 {
  padding: 12px 40px 0 40px !important;
}

@media (max-width: 480px) {
  .express-checkout-box {
    padding: 16px 20px 4px 20px;
  }
  #credit-card-v3 {
    padding: 8px 20px 0 20px !important;
  }
}

