/* =========================================================
   בונים משכן חדש — בית הכנסת נס עמים (גרסת נייבי-זהב)
   שחזור נאמן של עיצוב מאי 2026 + מדרגות תרומה צבעוניות
   ========================================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #1c3667;
  --navy-deep: #142a52;
  --navy-card: #24407a;
  --cream: #faf6ee;
  --paper: #fffdf8;
  --ink: #1d2434;
  --muted: #5d6óa7b;
  --muted: #5d677b;
  --gold: #e3a23c;
  --gold-deep: #b97f1e;
  --gold-soft: #fdf3e0;
  --line: #e7e0d2;
  --tier1: #1f6f5b; --tier1-soft: #e2f2ec;
  --tier2: #1d5fa8; --tier2-soft: #e3eefb;
  --tier3: #c9892b; --tier3-soft: #fdf1da;
  --tier4: #a8542e; --tier4-soft: #fae7dd;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Assistant', 'Noto Sans Hebrew', system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
}
img { max-width: 100%; height: auto; display: block; }
.container { width: min(1080px, 92%); margin: 0 auto; }
.center { text-align: center; }

h1, h2, h3 { font-family: 'Frank Ruhl Libre', serif; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); font-weight: 900; color: var(--navy); line-height: 1.25; }

.eyebrow {
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--gold-deep);
  margin-bottom: .5rem;
}
.eyebrow.light { color: var(--gold); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  padding: .75rem 1.9rem;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold); color: var(--navy-deep); box-shadow: 0 8px 22px rgba(227, 162, 60, .4); }
.btn-gold:hover { background: #efb054; }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255,255,255,.7); background: rgba(255,255,255,.07); }
.btn-ghost:hover { background: rgba(255,255,255,.16); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-sm { padding: .45rem 1.2rem; font-size: .92rem; }
.btn-full { width: 100%; }

/* ---------- topbar ---------- */
.topbar {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem clamp(16px, 4vw, 44px);
  background: rgba(20, 42, 82, .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand { display: flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; }
.brand .magen { color: var(--gold); flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.25; }
.brand strong { font-family: 'Frank Ruhl Libre', serif; font-size: 1.02rem; }
.brand small { font-size: .76rem; color: rgba(255,255,255,.75); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 88svh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background: var(--navy-deep);
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 70%; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(200deg, rgba(20,42,82,.55) 12%, rgba(20,42,82,.22) 55%, rgba(20,42,82,.42) 100%); }
.hero-inner { position: relative; width: min(1080px, 92%); margin: 0 auto; padding: 8.5rem 0 6rem; text-align: center; color: #fff; }
.hero h1 {
  font-family: 'Secular One', 'Frank Ruhl Libre', serif;
  font-size: clamp(3rem, 8vw, 5.2rem);
  font-weight: 400;
  color: #fff;
  text-shadow: 0 3px 10px rgba(10, 22, 44, .75), 0 8px 40px rgba(10, 22, 44, .55);
}
.hero-sub {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: clamp(1.3rem, 3.2vw, 1.9rem);
  font-weight: 700;
  color: var(--gold);
  margin-top: .4rem;
  text-shadow: 0 1px 14px rgba(0,0,0,.45);
}
.hero-line { max-width: 44ch; margin: 1rem auto 1.8rem; font-weight: 300; font-size: 1.08rem; text-shadow: 0 1px 10px rgba(0,0,0,.5); }
.hero-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }
.pin-chip {
  position: absolute;
  bottom: 16%;
  inset-inline-start: 18%;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: .85rem;
  font-weight: 700;
  padding: .3rem .9rem;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.pin-line { position: absolute; top: 100%; right: 50%; width: 1.5px; height: 34px; background: var(--gold); }

/* ---------- verse ---------- */
.verse { text-align: center; padding: 4rem 1rem 3.4rem; background: var(--paper); }
.verse-rule { display: block; width: 64px; height: 2px; background: var(--gold); margin: 0 auto 1.4rem; }
.verse-text {
  font-family: 'Frank Ruhl Libre', serif;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  font-weight: 700;
  color: var(--navy);
}
.verse-ref { color: var(--muted); font-size: .9rem; margin-top: .5rem; }

/* ---------- story ---------- */
.story { background: var(--paper); padding: 2.5rem 0 5rem; }
.two-col { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.story h2 { margin-bottom: 1rem; }
.story p + p { margin-top: .85rem; }
.story-close { font-weight: 700; color: var(--gold-deep); margin-top: 1.1rem !important; }
.story-media { display: grid; gap: 22px; align-content: start; }
.media-card { position: relative; margin: 0; }
.media-card img { border-radius: 16px; box-shadow: 0 20px 48px rgba(20, 42, 82, .22); }
.media-card figcaption { margin-top: .6rem; text-align: center; font-size: .88rem; color: var(--muted); }
.map-chip {
  position: absolute;
  left: 14%;
  top: 4%;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: .82rem;
  font-weight: 800;
  padding: .28rem .8rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
  white-space: nowrap;
}
.map-chip-line {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 2px;
  height: 16px;
  background: var(--gold);
}
.map-chip::after {
  content: "";
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: var(--gold);
}
.badge-today { background: var(--tier4); }

/* ---------- מציג מודל תלת-ממדי אינטראקטיבי ---------- */
.viewer-card { user-select: none; }
.plan-viewer {
  --rx: 56deg;
  --rz: 0deg;
  --zoom: 1;
  position: relative;
  height: 430px;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, #eef3f7 0%, #dde7ee 55%, #cfdce6 100%);
  box-shadow: 0 20px 48px rgba(20, 42, 82, .22);
  perspective: 1050px;
  touch-action: none;
  cursor: grab;
}
.plan-viewer.is-dragging { cursor: grabbing; }
.pv-plane {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(86%, 560px);
  transform-style: preserve-3d;
  transform:
    translate(-50%, -46%)
    scale(var(--zoom))
    rotateX(var(--rx))
    rotateZ(var(--rz));
  will-change: transform;
}
.pv-plane img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 2px 0 rgba(255,255,255,.5) inset, 0 30px 60px rgba(20,42,82,.35);
  backface-visibility: hidden;
}
.pv-shadow {
  position: absolute;
  left: 50%;
  top: 78%;
  width: 70%;
  height: 13%;
  transform: translate(-50%, 0);
  background: radial-gradient(50% 50% at 50% 50%, rgba(15, 28, 52, .38), transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
/* סיכת זהב עומדת על המישור, תמיד פונה למצלמה */
.pv-pin {
  position: absolute;
  left: 14.5%;
  top: 56%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: rotateZ(calc(var(--rz) * -1)) rotateX(calc(var(--rx) * -1));
  pointer-events: none;
}
.pv-pin-dot {
  position: absolute;
  left: -7px;
  bottom: -7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
  border: 2.5px solid #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,.4);
}
.pv-pin-pole {
  position: absolute;
  left: -1px;
  bottom: 0;
  width: 2px;
  height: 56px;
  background: linear-gradient(to top, var(--gold), rgba(227,162,60,.25));
}
.pv-pin-label {
  position: absolute;
  bottom: 56px;
  left: 0;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--navy-deep);
  font-size: .8rem;
  font-weight: 800;
  padding: .26rem .75rem;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,.32);
}
.pv-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 42, 82, .78);
  color: #fff;
  font-size: .82rem;
  font-weight: 600;
  padding: .35rem 1rem;
  border-radius: 999px;
  pointer-events: none;
  transition: opacity .5s ease;
  white-space: nowrap;
}
.pv-hint.is-hidden { opacity: 0; }
.pv-reset {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(20, 42, 82, .72);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
}
.pv-reset:hover { background: var(--navy); }
@media (max-width: 880px) {
  .plan-viewer { height: 340px; }
  .pv-plane { width: 92%; }
}
.render-badge {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  background: var(--navy);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}
.place-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 3rem;
}
.place-card { margin: 0; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(20,42,82,.1); }
.place-card img { width: 100%; height: 190px; object-fit: cover; }
.place-card figcaption { padding: 10px 12px; font-size: .85rem; color: var(--muted); }

/* ---------- rabbis ---------- */
.rabbis { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%); padding: 5rem clamp(16px, 5vw, 60px); color: #fff; }
.rabbis h2 { color: #fff; }
.center.light { color: #fff; }
.rabbis-sub { color: rgba(255,255,255,.78); margin-top: .5rem; }
.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
  margin: 2.4rem auto 0;
}
.quote-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  padding: 1.6rem 1.5rem 1.3rem;
  position: relative;
}
.qmark { color: var(--gold); font-size: 1.5rem; line-height: 1; display: block; margin-bottom: .6rem; }
.quote-card p { font-size: 1.02rem; }
.quote-card footer { display: flex; align-items: center; gap: .7rem; margin-top: 1.1rem; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f4c277, var(--gold-deep)); flex: none; }
.quote-card footer strong { display: block; font-size: .98rem; }
.quote-card footer small { color: rgba(255,255,255,.7); }
.letter-strip {
  max-width: 980px;
  margin: 2.6rem auto 0;
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  flex-wrap: wrap;
  justify-content: center;
}
.letter-fig { margin: 0; max-width: 250px; }
.letter-fig img { background: #fff; padding: 8px; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.35); transform: rotate(-1.2deg); }
.letter-fig figcaption { margin-top: .6rem; text-align: center; font-size: .84rem; color: rgba(255,255,255,.75); }
.letter-note {
  max-width: 340px;
  font-size: .95rem;
  color: #fff;
  background: rgba(227,162,60,.14);
  border: 1px dashed var(--gold);
  border-radius: 12px;
  padding: .8rem 1.1rem;
}

/* ---------- donate ---------- */
.donate { background: var(--cream); padding: 5rem clamp(16px, 5vw, 60px) 5.5rem; }
.donate-sub { color: var(--muted); margin-top: .5rem; }
.donate-wrap {
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  gap: 0;
  max-width: 980px;
  margin: 2.4rem auto 0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 26px 64px rgba(20, 42, 82, .2);
}
.summary-panel {
  background: linear-gradient(165deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 2.2rem 1.9rem;
  display: flex;
  flex-direction: column;
}
.badge-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border: 1.5px solid var(--gold);
  border-radius: 14px;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.summary-panel h3 { font-size: 1.18rem; font-weight: 700; }
.raised { font-family: 'Frank Ruhl Libre', serif; font-size: 2.2rem; font-weight: 900; color: var(--gold); margin-top: .8rem; }
.raised span { font-size: 1.3rem; }
.goal { color: rgba(255,255,255,.75); font-size: .95rem; }
.bar { height: 9px; background: rgba(255,255,255,.16); border-radius: 999px; margin-top: .9rem; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #f2bd62); border-radius: 999px; }
.bar-note { font-size: .85rem; color: rgba(255,255,255,.78); margin-top: .45rem; }
.trust-list { list-style: none; margin-top: 1.6rem; display: grid; gap: .65rem; font-size: .94rem; }

.donate-form { background: var(--paper); padding: 2rem 1.9rem 1.7rem; }
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--gold-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.2rem;
}
.tab {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  color: var(--muted);
  padding: .55rem 0;
  border-radius: 999px;
  cursor: pointer;
}
.tab.is-active { background: #fff; color: var(--navy); box-shadow: 0 3px 10px rgba(20,42,82,.12); }

.amounts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.amount {
  font-family: inherit;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #fff;
  padding: .85rem .5rem;
  cursor: pointer;
  text-align: center;
  transition: transform .13s ease, box-shadow .13s ease;
}
.amount span { display: block; font-size: 1.35rem; font-weight: 800; }
.amount small { font-weight: 600; font-size: .85rem; }
.amount:hover { transform: translateY(-2px); }
.amount[data-tier="1"] { border-color: var(--tier1); background: var(--tier1-soft); color: var(--tier1); }
.amount[data-tier="2"] { border-color: var(--tier2); background: var(--tier2-soft); color: var(--tier2); }
.amount[data-tier="3"] { border-color: var(--tier3); background: var(--tier3-soft); color: var(--gold-deep); }
.amount[data-tier="4"] { border-color: var(--tier4); background: var(--tier4-soft); color: var(--tier4); }
.amount.is-active { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20,42,82,.18); color: #fff !important; }
.amount[data-tier="1"].is-active { background: var(--tier1); }
.amount[data-tier="2"].is-active { background: var(--tier2); }
.amount[data-tier="3"].is-active { background: var(--tier3); }
.amount[data-tier="4"].is-active { background: var(--tier4); }

.field { display: block; margin-top: 12px; }
.field input {
  width: 100%;
  font-family: inherit;
  font-size: .98rem;
  padding: .7rem .95rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink);
}
.field input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.donate-form .btn-full { margin-top: 16px; }
.secure-note { font-size: .82rem; color: var(--muted); text-align: center; margin-top: .7rem; }

/* ---------- footer ---------- */
.footer {
  background: var(--navy-deep);
  color: #fff;
  padding: 2.4rem clamp(16px, 5vw, 60px) 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.4rem;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: .7rem; }
.footer-brand .magen { color: var(--gold); }
.footer-brand strong { font-family: 'Frank Ruhl Libre', serif; display: block; }
.footer-brand small { color: rgba(255,255,255,.7); }
.footer-links { display: flex; gap: 1.4rem; }
.footer-links a { color: var(--gold); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { text-decoration: underline; }
.footer-line { width: 100%; text-align: center; font-size: .82rem; color: rgba(255,255,255,.55); border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.1rem; }

/* ---------- sticky CTA ---------- */
.sticky-cta {
  position: fixed;
  bottom: 18px;
  inset-inline-end: 18px;
  z-index: 70;
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 800;
  font-size: .95rem;
  padding: .65rem 1.4rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
}
.sticky-cta:hover { background: #efb054; }

/* ---------- mobile ---------- */
@media (max-width: 880px) {
  .two-col { grid-template-columns: 1fr; }
  .quote-grid { grid-template-columns: 1fr; }
  .donate-wrap { grid-template-columns: 1fr; }
  .place-row { grid-template-columns: 1fr; }
  .place-card img { height: 210px; }
  .pin-chip { inset-inline-start: 8%; bottom: 10%; }
  .hero-inner { padding: 7.5rem 0 5rem; }
  .brand small { display: none; }
  .field-row { grid-template-columns: 1fr; }
  .footer { flex-direction: column; text-align: center; }
}
