:root {
  --purple-dark: #2D0E55;
  --purple-mid: #5B2090;
  --purple-light: #8B46C8;
  --purple-glow: rgba(91,32,144,0.15);
  --gold: #C9A84C;
  --gold-light: #E2C06A;
  --gold-pale: rgba(201,168,76,0.12);
  --cream: #F8F4EF;
  --white: #FFFFFF;
  --text-dark: #1A1025;
  --text-muted: #7B7490;
  --success: #10B981;
  --border: #EAE6F0;
  --card-shadow: 0 4px 24px rgba(45,14,85,0.08);
  --card-shadow-hover: 0 12px 40px rgba(45,14,85,0.16);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Heebo', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  direction: rtl;
  font-size: 16px;
  line-height: 1.6;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ===== TOP NAV ===== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--purple-dark);
  border-bottom: 2px solid rgba(201,168,76,0.3);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.top-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}

.top-nav-logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-nav-logo {
  height: 32px;
  width: auto;
  background: var(--white);
  border-radius: 6px;
  padding: 3px 5px;
  display: block;
  line-height: 0;
  object-fit: contain;
}

.top-nav-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -0.5px;
}

.top-nav-cta {
  font-family: 'Heebo', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 9px 28px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--purple-dark);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(201,168,76,0.35);
  min-height: 40px;
}
.top-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.5);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  background: linear-gradient(150deg, var(--purple-dark) 0%, #4A1880 50%, var(--purple-mid) 100%);
  padding: 64px 20px 100px;
  text-align: center;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 60px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(201,168,76,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139,70,200,0.2) 0%, transparent 50%),
    radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: auto, auto, 28px 28px;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  animation: fadeInDown 0.7s ease both;
}

.hero-logo-wrap {
  display: inline-block;
  background: var(--white);
  border-radius: 14px;
  padding: 6px 10px;
  margin-bottom: 24px;
  box-shadow: 0 6px 32px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.15);
  line-height: 0;
}

.hero-logo {
  height: 64px;
  width: auto;
  display: block;
  object-fit: contain;
}

.hero-title {
  font-size: clamp(48px, 10vw, 76px);
  font-weight: 800;
  color: var(--gold);
  letter-spacing: -1px;
  line-height: 1.05;
  margin-bottom: 14px;
  text-shadow: 0 2px 20px rgba(201,168,76,0.25);
}

.hero-subtitle {
  font-size: clamp(15px, 3vw, 18px);
  color: rgba(255,255,255,0.85);
  font-weight: 400;
  margin-bottom: 8px;
}

.hero-text {
  font-size: clamp(14px, 2.5vw, 15px);
  color: rgba(248,244,239,0.65);
  font-weight: 300;
  margin-bottom: 36px;
}

.hero-cta {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--purple-dark);
  font-family: 'Heebo', sans-serif;
  font-size: 18px;
  font-weight: 800;
  padding: 15px 48px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 6px 28px rgba(201,168,76,0.45);
  letter-spacing: 0.3px;
}
.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(201,168,76,0.55);
}

/* ===== MATCHING BADGE ===== */
.matching-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #FF6B35, #F7931E);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 50px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(255,107,53,0.45);
  animation: pulse 2s infinite;
}
.matching-icon { font-size: 18px; }
@keyframes pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(255,107,53,0.45); }
  50% { box-shadow: 0 4px 32px rgba(255,107,53,0.75); }
}

/* ===== MOBILE FLOATING CTA ===== */
.mobile-float-cta {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--purple-dark);
  font-family: 'Heebo', sans-serif;
  font-size: 17px;
  font-weight: 800;
  padding: 15px 44px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(201,168,76,0.55);
  align-items: center;
  gap: 8px;
  transition: transform 0.3s, opacity 0.3s;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .mobile-float-cta { display: flex; }
  .mobile-float-cta.hidden { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(80px); }
}

/* ===== HERO ACTIONS ===== */
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.hero-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.4);
  color: var(--white);
  font-family: 'Heebo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  min-height: 52px;
  backdrop-filter: blur(8px);
}
.hero-video-btn:hover { background: rgba(255,255,255,0.25); border-color: rgba(255,255,255,0.7); }

/* ===== SHARE BAR ===== */
.share-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.share-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  min-height: 40px;
}
.share-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,0.15); }

.share-whatsapp { background: #25D366; color: #fff; }
.share-facebook { background: #1877F2; color: #fff; }
.share-copy { background: var(--purple-glow); color: var(--purple-mid); border: 1.5px solid var(--border); }

/* ===== VIDEO MODAL ===== */
.video-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 102;
  width: min(860px, 96vw);
  aspect-ratio: 16/9;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  background: #000;
}
.video-modal.active { display: block; animation: popIn 0.3s ease; }
.video-modal iframe { width: 100%; height: 100%; border: none; display: block; }
.video-modal .popup-close { top: 10px; left: 10px; }

/* ===== LIVE NOTIFICATION ===== */
.live-notif {
  position: fixed;
  bottom: 28px;
  left: 28px;
  background: var(--white);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(45,14,85,0.18);
  border: 1.5px solid var(--border);
  z-index: 998;
  max-width: 280px;
  animation: slideInLeft 0.4s cubic-bezier(0.34,1.56,0.64,1);
  direction: rtl;
}
@keyframes slideInLeft {
  from { opacity:0; transform: translateX(-60px); }
  to   { opacity:1; transform: translateX(0); }
}
.live-notif-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
}
.live-notif-name { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.live-notif-amount { font-size: 15px; font-weight: 800; color: var(--gold); margin-top: 2px; }

/* ===== COUNTDOWN ===== */
.hero-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 28px;
  direction: ltr;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  padding: 10px 18px;
  min-width: 68px;
  backdrop-filter: blur(8px);
}

.countdown-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}

.countdown-label {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.countdown-sep {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  align-self: flex-start;
  margin-top: 8px;
  line-height: 1;
  padding: 0 2px;
}

/* ===== CONFETTI CANVAS ===== */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* ===== PROGRESS ===== */
.progress-section { padding: 0 0 16px; }

.progress-card {
  background: var(--white);
  border-radius: 20px;
  padding: 32px 36px;
  box-shadow: 0 -4px 0 0 var(--gold), var(--card-shadow);
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 20px;
  gap: 12px;
}

.progress-stat { display: flex; flex-direction: column; }
.progress-stat.text-left { text-align: left; align-items: flex-end; }

.progress-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.progress-amount {
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 800;
  color: var(--purple-dark);
}

.progress-bar-wrap {
  background: var(--purple-glow);
  border-radius: 100px;
  height: 18px;
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid rgba(91,32,144,0.1);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 100px;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.progress-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  animation: shimmer 2.5s infinite;
}

@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }

.progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-pct { font-size: 16px; font-weight: 800; color: var(--purple-mid); }
.progress-donors { font-size: 14px; color: var(--text-muted); }

/* ===== SECTION TITLES ===== */
.section-title {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  color: var(--purple-dark);
  text-align: center;
  margin-bottom: 28px;
}
.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  margin: 10px auto 0;
  border-radius: 2px;
}

/* ===== DONATE SECTION ===== */
.donate-section { padding: 44px 0 24px; }

.amount-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}

.btn-amount {
  font-family: 'Heebo', sans-serif;
  font-size: 17px;
  font-weight: 700;
  padding: 13px 28px;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  color: var(--purple-mid);
  cursor: pointer;
  transition: all 0.2s;
  min-height: 52px;
  white-space: nowrap;
  box-shadow: var(--card-shadow);
}
.btn-amount:hover, .btn-amount.active {
  background: var(--purple-mid);
  color: var(--white);
  border-color: var(--purple-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91,32,144,0.28);
}
.btn-amount.custom-btn { border-style: dashed; border-color: var(--purple-light); }

.custom-amount-wrap { margin-top: 16px; animation: fadeIn 0.3s ease; }
.custom-amount-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  margin: 0 auto;
  background: var(--white);
  border: 2px solid var(--purple-light);
  border-radius: 50px;
  padding: 6px 6px 6px 16px;
  box-shadow: var(--card-shadow);
}
.custom-amount-inner input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Heebo', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  background: transparent;
  text-align: right;
  min-width: 0;
}
.currency-symbol { font-size: 18px; font-weight: 700; color: var(--text-muted); }
.btn-donate-custom {
  font-family: 'Heebo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 10px 24px;
  background: var(--purple-mid);
  color: var(--white);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 48px;
}
.btn-donate-custom:hover { background: var(--purple-dark); }

/* ===== ITEMS ===== */
.items-section { padding: 40px 0 50px; }

.items-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.item-card {
  flex: 0 1 calc(33.333% - 14px);
  min-width: 210px;
  max-width: 300px;
  background: var(--white);
  border-radius: 22px;
  padding: 26px 18px 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s ease both;
  border: 1.5px solid var(--border);
}
.item-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(201,168,76,0.4);
}

/* Circular ring */
.item-ring-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 14px;
}

.item-ring {
  width: 100px;
  height: 100px;
  transform: rotate(-90deg);
  position: absolute;
  inset: 0;
}

.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.ring-fill {
  fill: none;
  stroke: url(#ringGradient);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4,0,0.2,1);
}

.item-icon-inner {
  position: absolute;
  inset: 10px;
  background: var(--gold-pale);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-icon-inner svg {
  width: 38px;
  height: 38px;
}

.item-ring-pct {
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--purple-dark);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

.item-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.item-price {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.item-remaining {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 3px 10px;
  background: var(--purple-glow);
  border-radius: 100px;
  display: inline-block;
  font-weight: 500;
}

.btn-item-donate {
  font-family: 'Heebo', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 11px 0;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  color: var(--purple-dark);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  min-height: 46px;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(201,168,76,0.35);
}
.btn-item-donate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(201,168,76,0.5);
}

.item-sold-overlay {
  position: absolute;
  inset: 0;
  background: rgba(248,244,239,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 22px;
  backdrop-filter: blur(2px);
}
.item-sold-text { font-size: 15px; font-weight: 700; color: var(--success); }
.item-sold-donor { font-size: 13px; color: var(--text-muted); }

/* ===== WALL ===== */
.wall-section { padding: 40px 0 64px; }

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
  overflow-x: auto;
}
.tab {
  font-family: 'Heebo', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 28px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  min-height: 48px;
}
.tab.active { color: var(--purple-mid); border-bottom-color: var(--purple-mid); font-weight: 700; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

.donors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.donor-card {
  background: var(--white);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--card-shadow);
  animation: fadeInUp 0.4s ease both;
  border: 1.5px solid var(--border);
  transition: border-color 0.2s;
}
.donor-card:hover { border-color: var(--purple-light); }

.donor-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  flex-shrink: 0;
}
.donor-info { flex: 1; min-width: 0; }
.donor-name { font-size: 14px; font-weight: 700; color: var(--text-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donor-amount { font-size: 15px; font-weight: 800; color: var(--gold); }
.donor-comment { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donor-time { font-size: 11px; color: var(--text-muted); flex-shrink: 0; }

.load-more-wrap { text-align: center; margin-top: 24px; }
.btn-load-more {
  font-family: 'Heebo', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 40px;
  background: transparent;
  border: 2px solid var(--border);
  color: var(--purple-mid);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 48px;
}
.btn-load-more:hover { background: var(--purple-mid); color: var(--white); border-color: var(--purple-mid); }

/* AMBASSADORS */
.ambassadors-list { display: flex; flex-direction: column; gap: 14px; }
.ambassador-card {
  background: var(--white);
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: var(--card-shadow);
  border: 1.5px solid var(--border);
  animation: fadeInUp 0.4s ease both;
}
.ambassador-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; flex-wrap: wrap; }
.ambassador-name { font-size: 17px; font-weight: 700; color: var(--text-dark); }
.ambassador-stats { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.ambassador-bar-wrap { background: var(--purple-glow); border-radius: 100px; height: 10px; overflow: hidden; margin-bottom: 0; }
.ambassador-bar { height: 100%; background: linear-gradient(90deg, var(--purple-mid), var(--purple-light)); border-radius: 100px; transition: width 0.6s ease; }
.btn-donate-amb {
  font-family: 'Heebo', sans-serif;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 22px;
  background: var(--purple-mid);
  color: var(--white);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  min-height: 44px;
}
.btn-donate-amb:hover { background: var(--purple-dark); }

/* UPDATES */
.updates-list { display: flex; flex-direction: column; gap: 16px; }
.update-card {
  background: var(--white);
  border-radius: 14px;
  padding: 20px 24px 20px 20px;
  border-right: 4px solid var(--gold);
  box-shadow: var(--card-shadow);
  animation: fadeInUp 0.4s ease both;
}
.update-date { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; font-weight: 500; }
.update-title { font-size: 16px; font-weight: 700; color: var(--purple-dark); margin-bottom: 8px; }
.update-content { font-size: 15px; color: var(--text-dark); line-height: 1.7; white-space: pre-wrap; }

/* ===== POPUP ===== */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,5,30,0.75);
  z-index: 100;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}
.overlay.active { display: block; }

.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 101;
  background: var(--white);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15,5,30,0.45);
  width: min(560px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  flex-direction: column;
  animation: popIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.popup.active { display: flex; }

.popup-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.2);
  color: var(--white);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}
.popup-close:hover { background: rgba(255,255,255,0.35); }

.popup-header {
  padding: 28px 24px 22px;
  background: linear-gradient(150deg, var(--purple-dark) 0%, var(--purple-mid) 100%);
  text-align: center;
  position: relative;
}

.popup-logo {
  height: 64px;
  width: auto;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

.popup-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 2px;
}

.popup-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0;
}

.popup-amount-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 22px;
  background: var(--gold-pale);
  border: 1.5px solid rgba(201,168,76,0.5);
  border-radius: 50px;
  color: var(--gold-light);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.popup-item-name {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: 6px;
  min-height: 0;
}

.popup-body { flex: 1; overflow: auto; background: #fafafa; }

#nedarim-iframe {
  width: 100%;
  height: 480px;
  border: none;
  display: block;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--purple-dark);
  color: rgba(255,255,255,0.7);
  padding: 44px 20px;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer-logo { height: 52px; filter: brightness(0) invert(1) opacity(0.6); }
.footer-info p { margin-bottom: 5px; font-size: 14px; }
.footer-secure { font-size: 12px; color: rgba(255,255,255,0.35); margin-top: 4px; }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--purple-dark);
  color: var(--white);
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  z-index: 999;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 300px;
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }

/* ===== SPINNER ===== */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--purple-mid);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes fadeInDown { from{opacity:0;transform:translateY(-24px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
@keyframes popIn { from{opacity:0;transform:translate(-50%,-50%) scale(0.88)} to{opacity:1;transform:translate(-50%,-50%) scale(1)} }
@keyframes spin { to{transform:rotate(360deg)} }

.fade-in { animation: fadeIn 0.6s ease both; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .donors-grid { grid-template-columns: 1fr; }
  .item-card { flex: 0 1 calc(50% - 10px); min-width: 150px; }
  .progress-card { padding: 20px 18px; margin-top: -36px; border-radius: 16px; }
  .hero { padding: 52px 16px 90px; }
  .hero::after { height: 50px; }
  .btn-amount { font-size: 16px; padding: 12px 20px; }
  .amount-buttons { gap: 8px; }
  .top-nav-inner { padding: 0 16px; }
  .top-nav-name { font-size: 17px; }
}

@media (max-width: 640px) {
  /* Share bar: hide label, shrink buttons */
  .share-label { display: none; }
  .share-bar { gap: 8px; padding: 10px 12px; }
  .share-btn { font-size: 13px; padding: 8px 14px; min-height: 38px; }

  /* Extra bottom padding so float CTA doesn't cover content */
  .wall-section { padding-bottom: 100px; }
  .footer { padding-bottom: 100px; }

  /* Live notification: move to top-left on mobile to avoid float CTA */
  .live-notif {
    bottom: auto;
    top: 68px;
    left: 12px;
    right: 12px;
    max-width: none;
  }
  @keyframes slideInLeft {
    from { opacity:0; transform: translateY(-20px); }
    to   { opacity:1; transform: translateY(0); }
  }

  /* Toast: move up so it doesn't clash with float CTA */
  .toast { bottom: 90px; right: 16px; }
}

@media (max-width: 480px) {
  /* Top nav: shrink CTA button */
  .top-nav-cta { padding: 8px 18px; font-size: 14px; }
  .top-nav-name { font-size: 16px; }

  /* Hero: tighten */
  .hero-cta { font-size: 16px; padding: 13px 36px; }
  .hero-video-btn { font-size: 14px; padding: 11px 20px; }

  /* Items */
  .item-card { flex: 0 1 calc(50% - 10px); min-width: 140px; padding: 18px 10px 14px; }
  .item-ring-wrap { width: 84px; height: 84px; }
  .item-ring { width: 84px; height: 84px; }
  .item-icon-inner { inset: 8px; }
  .item-icon-inner svg { width: 30px; height: 30px; }
  .item-name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .item-price { font-size: 18px; }
  .item-remaining { font-size: 11px; }
  .btn-item-donate { font-size: 13px; padding: 9px 0; }

  /* Tabs */
  .tabs { gap: 0; }
  .tab { padding: 12px 16px; font-size: 14px; }
  .donor-card { padding: 12px 14px; }
  .ambassador-header { flex-direction: column; align-items: flex-start; }

  /* Popup slides up from bottom on mobile */
  .popup { border-radius: 20px 20px 0 0; top: auto; bottom: 0; transform: translate(-50%, 0); left: 50%; max-height: 95vh; width: 100%; animation: slideUp 0.3s ease; }
  @keyframes slideUp { from{opacity:0;transform:translate(-50%, 60px)} to{opacity:1;transform:translate(-50%, 0)} }

  /* Countdown: smaller on tiny screens */
  .countdown-unit { min-width: 54px; padding: 7px 10px; }
  .countdown-num { font-size: 24px; }
  .countdown-label { font-size: 10px; }
  .countdown-sep { font-size: 22px; }

  /* Matching badge */
  .matching-badge { font-size: 13px; padding: 8px 16px; }

  /* Progress amounts */
  .progress-amount { font-size: clamp(20px, 5vw, 28px); }

  /* Amount buttons: two per row on very small screens */
  .btn-amount { font-size: 15px; padding: 11px 16px; flex: 1 1 calc(50% - 8px); max-width: 160px; }
}
