/* =========================================================
   ליאל איטח ז"ל — אתר הנצחה
   style.css — מערכת עיצוב ורכיבים משותפים
   ---------------------------------------------------------
   כל הצבעים, הגופנים והמרווחים מוגדרים כמשתנים ב-:root
   כך שניתן להחליף Theme בקלות.
   התאמות למסכים שונים נמצאות ב-responsive.css
   ========================================================= */

:root {
  /* --- צבעים עיקריים --- */
  --primary: #1f3b57;          /* כחול עמוק — כותרות, כפתורים */
  --primary-soft: #2f5677;
  --primary-deep: #172e45;
  --secondary: #8fb6d3;        /* כחול שמיים */
  --secondary-light: #e7f0f7;
  --accent: #c49a57;           /* זהב / חול — קישוט בלבד */
  --accent-text: #8a6424;      /* זהב כהה — לטקסט (ניגודיות תקינה) */
  --accent-light: #f3e7d3;
  --background: #fbf8f2;       /* Off White חמים */
  --surface: #ffffff;
  --sand: #f3ebdf;
  --sand-deep: #e6d8c2;
  --text: #22303c;
  --text-muted: #56626e;
  --text-on-dark: #f7f3ec;
  --border: #e5ddd0;
  --danger: #a23b2a;
  --success: #2e6b4f;

  /* --- טיפוגרפיה --- */
  --font-body: "Heebo", "Assistant", "Arial Hebrew", Arial, sans-serif;
  --font-display: "Frank Ruhl Libre", "David Libre", "Times New Roman", serif;
  --fs-base: 1.125rem;         /* 18px */
  --fs-small: 1rem;
  --fs-lead: clamp(1.2rem, 1.1rem + 0.45vw, 1.4rem);
  --fs-h1: clamp(2.6rem, 1.6rem + 4vw, 5rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.2vw, 3.1rem);
  --fs-h3: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);
  --lh: 1.75;

  /* --- מרווחים וצורה --- */
  --container: 1240px;
  --container-narrow: 820px;
  --gutter: 24px;
  --section-space: clamp(72px, 5rem + 4vw, 136px);
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 10px rgba(31, 59, 87, 0.06);
  --shadow: 0 14px 40px rgba(31, 59, 87, 0.10);
  --shadow-lg: 0 28px 70px rgba(31, 59, 87, 0.16);
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset בסיסי ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh);
  color: var(--text);
  background: var(--background);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-underline-offset: 0.2em; }
a:hover { color: var(--primary-soft); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--primary);
}
h1 { font-size: var(--fs-h1); font-weight: 500; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

::selection { background: var(--accent-light); color: var(--primary-deep); }

/* ---------- נגישות ---------- */
.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 1000;
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- פריסה ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-space); position: relative; }
.section-tight { padding-block: calc(var(--section-space) * 0.6); }
.bg-sand { background: var(--sand); }
.bg-sky { background: var(--secondary-light); }
.bg-surface { background: var(--surface); }

.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--text-muted); font-size: var(--fs-lead); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--accent-text);
}
.eyebrow::before {
  content: "";
  width: 34px; height: 1px;
  background: currentColor;
}
.section-head.center .eyebrow::after {
  content: "";
  width: 34px; height: 1px;
  background: currentColor;
}

.lead { font-size: var(--fs-lead); color: var(--text-muted); line-height: 1.7; }

/* ---------- כפתורים ---------- */
.btn {
  --btn-bg: var(--primary);
  --btn-color: #fff;
  --btn-border: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 28px;
  border: 1.5px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease),
              border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--btn-color); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-primary:hover { --btn-bg: var(--primary-soft); --btn-border: var(--primary-soft); }
.btn-outline { --btn-bg: transparent; --btn-color: var(--primary); }
.btn-outline:hover { --btn-bg: var(--primary); --btn-color: #fff; }
.btn-light { --btn-bg: rgba(255,255,255,.96); --btn-color: var(--primary); --btn-border: rgba(255,255,255,.96); }
.btn-ghost-light { --btn-bg: rgba(255,255,255,.08); --btn-color: #fff; --btn-border: rgba(255,255,255,.7); backdrop-filter: blur(4px); }
.btn-ghost-light:hover { --btn-bg: #fff; --btn-color: var(--primary); }
.btn-candle {
  --btn-bg: linear-gradient(135deg, #d9b273, #b98a45);
  --btn-color: #fff;
  --btn-border: transparent;
  background: var(--btn-bg);
  color: #2a1d08;
  --btn-color: #2a1d08;
}
.btn-candle:hover { box-shadow: 0 10px 30px rgba(196,154,87,.45); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 2px;
}
.text-link:hover { color: var(--accent-text); }
.text-link svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.text-link:hover svg { transform: translateX(-4px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(251, 248, 242, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background-color .3s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px rgba(31,59,87,.06);
  background: rgba(251, 248, 242, 0.95);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--primary);
  flex-shrink: 0;
}
.brand-mark {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent-text);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; }
.brand-sub { font-size: 0.85rem; color: var(--text-muted); letter-spacing: 0.06em; direction: ltr; text-align: right; }

.site-nav { display: flex; align-items: center; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0; padding: 0;
  list-style: none;
}
.nav-list a {
  position: relative;
  display: block;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, background-color .2s;
}
.nav-list a:hover { color: var(--primary); background: rgba(143, 182, 211, .18); }
.nav-list a[aria-current="page"] { color: var(--primary); font-weight: 500; }
.nav-list a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.nav-list .nav-cta a {
  margin-inline-start: 10px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #d9b273, #b98a45);
  color: #2a1d08;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-list .nav-cta a:hover { box-shadow: 0 8px 22px rgba(196,154,87,.4); color: #2a1d08; }
.nav-list .nav-cta a[aria-current="page"]::after { display: none; }
.nav-cta svg { width: 18px; height: 18px; }

.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--primary);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero — עמוד הבית
   ========================================================= */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: -4% 0 0 0;
  z-index: -2;
  will-change: transform;
}
/* מצגת Hero — התמונות מוערמות זו על זו ומתחלפות ב-crossfade */
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, center);   /* נקבע לכל תמונה בנפרד ב-HTML */
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.6s var(--ease), transform 9s ease-out;
}
.hero-slide.is-active { opacity: 1; transform: scale(1); }

.hero-controls {
  position: absolute;
  bottom: 28px;
  left: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-dots { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hero-dot {
  display: block;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
}
.hero-dot::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 10px; height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  transition: width .4s var(--ease), margin .4s var(--ease), background-color .3s;
}
.hero-dot:hover::before { background: rgba(255,255,255,.85); }
.hero-dot[aria-current="true"]::before { width: 24px; margin-left: -12px; background: #e9c98f; }
.hero-pause {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  background: rgba(23,46,69,.35);
  color: #fff;
  backdrop-filter: blur(4px);
}
.hero-pause:hover { background: rgba(23,46,69,.6); }
.hero-pause svg { width: 16px; height: 16px; }
.hero::after {
  /* Overlay עדין: כהה יותר בצד הטקסט (שמאל במסך רחב) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to right, rgba(20, 38, 58, .74) 0%, rgba(20, 38, 58, .45) 38%, rgba(20, 38, 58, .08) 66%, transparent 80%),
    linear-gradient(to top, rgba(20, 38, 58, .45), transparent 40%);
}
.hero-inner { display: flex; justify-content: flex-end; }
.hero-content {
  max-width: 600px;
  padding-block: 80px;
  animation: heroIn 1.4s var(--ease) both;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 1rem;
  letter-spacing: .08em;
  color: #f3e1bf;
}
.hero-kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.hero h1 {
  color: #fff;
  margin-bottom: 0.15em;
  text-shadow: 0 2px 30px rgba(0,0,0,.25);
}
.hero-dates {
  font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem);
  font-weight: 300;
  letter-spacing: .12em;
  direction: ltr;
  text-align: right;
  color: rgba(255,255,255,.92);
  margin-bottom: 28px;
}
.hero-quote {
  margin: 0 0 36px;
  padding-inline-start: 20px;
  border-inline-start: 2px solid var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.45;
  color: #fff;
}
.hero-scroll {
  position: absolute;
  bottom: 26px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  width: 28px; height: 44px;
  border: 1.5px solid rgba(255,255,255,.7);
  border-radius: 20px;
}
.hero-scroll::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: #fff;
  animation: scrollDot 2.2s ease-in-out infinite;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}
@keyframes scrollDot {
  0%, 100% { transform: translateY(0); opacity: 1; }
  60% { transform: translateY(14px); opacity: 0; }
}

/* =========================================================
   Page Hero — עמודים פנימיים
   ========================================================= */
.page-hero {
  position: relative;
  padding-block: clamp(64px, 8vw, 120px) clamp(48px, 6vw, 88px);
  background:
    radial-gradient(ellipse 70% 90% at 85% 0%, rgba(143,182,211,.28), transparent 70%),
    linear-gradient(180deg, #f4f1ea 0%, var(--background) 100%);
  overflow: hidden;
}
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 4.2rem); margin-bottom: .3em; }
.page-hero p { max-width: 680px; font-size: var(--fs-lead); color: var(--text-muted); }
.breadcrumbs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: .95rem;
  color: var(--text-muted);
}
.breadcrumbs li + li::before { content: "/"; margin-inline-end: 8px; color: var(--sand-deep); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }

/* =========================================================
   Media — תמונות
   ========================================================= */
.media-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--sand);
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.media-frame:hover img { transform: scale(1.03); }

.media-offset { position: relative; }
.media-offset::before {
  content: "";
  position: absolute;
  inset: 28px -28px -28px 28px;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  opacity: .55;
  z-index: -1;
}

.figure-caption {
  margin-top: 12px;
  font-size: .95rem;
  color: var(--text-muted);
}

/* Placeholder לתמונה חסרה — מסומן בבירור */
.img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-height: 220px;
  padding: 24px;
  text-align: center;
  color: var(--accent-text);
  background:
    repeating-linear-gradient(135deg, rgba(196,154,87,.08) 0 14px, transparent 14px 28px),
    var(--accent-light);
  font-size: 1rem;
}
.img-placeholder svg { width: 40px; height: 40px; opacity: .8; }
.img-placeholder small { font-size: .9rem; color: var(--text-muted); }

/* =========================================================
   Split — טקסט + תמונה
   ========================================================= */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
}
.split-media { aspect-ratio: 4 / 5; }
.split-media img { object-position: center 30%; }

.intro-quote {
  margin: 30px 0;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + .6vw, 1.6rem);
  color: var(--primary);
  line-height: 1.5;
}

/* =========================================================
   Values — ערכים
   ========================================================= */
.values-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.value {
  padding: clamp(28px, 3vw, 42px) clamp(22px, 2.4vw, 34px);
  background: var(--surface);
  transition: background-color .35s var(--ease);
}
.value:hover { background: #fffdf9; }
.value-icon {
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--secondary-light);
  color: var(--primary);
  transition: transform .4s var(--ease), background-color .3s;
}
.value:hover .value-icon { transform: translateY(-4px); background: var(--accent-light); color: var(--accent-text); }
.value-icon svg { width: 26px; height: 26px; }
.value h3 { margin-bottom: 8px; font-size: 1.45rem; }
.value p { margin: 0; color: var(--text-muted); font-size: 1.02rem; line-height: 1.65; }

/* =========================================================
   Quote — ציטוט מרכזי
   ========================================================= */
.big-quote {
  position: relative;
  text-align: center;
  max-width: 960px;
  margin-inline: auto;
}
.big-quote-mark {
  display: block;
  margin: 0 auto 8px;
  font-family: var(--font-display);
  font-size: 7rem;
  line-height: .6;
  height: 60px;
  color: var(--accent);
}
.big-quote blockquote { margin: 0; }
.big-quote blockquote p {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem);
  line-height: 1.25;
  color: var(--primary);
  margin: 0;
}
.big-quote figcaption { margin-top: 22px; color: var(--text-muted); font-size: 1.05rem; }
.sayings {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.sayings li {
  padding: 10px 22px;
  border: 1px solid var(--sand-deep);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--primary);
}

/* =========================================================
   Cards — פרויקטים
   ========================================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--sand);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-media .img-placeholder { min-height: 0; }
.card-tag {
  position: absolute;
  top: 14px;
  inset-inline-start: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  font-size: .88rem;
  font-weight: 500;
  color: var(--primary);
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 26px 26px 28px; }
.card-date { font-size: .95rem; color: var(--accent-text); margin-bottom: 6px; }
.card h3 { font-size: 1.5rem; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 1.02rem; line-height: 1.65; }
.card-motto {
  margin: 4px 0 14px;
  padding: 10px 14px;
  border-inline-start: 2px solid var(--accent);
  background: var(--accent-light);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--primary);
}
.card-footer { margin-top: auto; padding-top: 12px; }
.card-footer .text-link { background: none; border-top: 0; border-inline: 0; cursor: pointer; font-size: 1.02rem; }

/* =========================================================
   Gallery preview — עמוד הבית
   ========================================================= */
.gallery-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 14px;
}
.gallery-preview a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--sand);
}
.gallery-preview a:nth-child(1) { grid-row: span 2; }
.gallery-preview a:nth-child(4) { grid-row: span 2; }
.gallery-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 1s var(--ease), filter .4s;
}
.gallery-preview a:hover img { transform: scale(1.05); }

/* =========================================================
   Candle CTA — עמוד הבית
   ========================================================= */
.candle-cta {
  position: relative;
  overflow: hidden;
  color: var(--text-on-dark);
  background:
    radial-gradient(600px 360px at 50% 30%, rgba(233, 180, 98, .28), transparent 70%),
    linear-gradient(180deg, #274a6b 0%, #1f3b57 60%, #1b344d 100%);
  text-align: center;
}
.candle-cta h2 { color: #fff; }
.candle-cta p { color: rgba(247,243,236,.88); max-width: 560px; margin-inline: auto; font-size: var(--fs-lead); }
.candle-cta .btn { margin-top: 30px; }

/* =========================================================
   נר מונפש (CSS בלבד)
   ========================================================= */
.candle {
  --candle-w: 46px;
  position: relative;
  width: var(--candle-w);
  height: 150px;
  margin: 0 auto 30px;
}
.candle-body {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 92px;
  border-radius: 8px 8px 6px 6px;
  background: linear-gradient(90deg, #efe4d0 0%, #fffaf1 45%, #e3d4ba 100%);
  box-shadow: inset 0 -10px 16px rgba(0,0,0,.06);
}
.candle-body::before {
  content: "";
  position: absolute;
  top: -5px; left: 0;
  width: 100%; height: 10px;
  border-radius: 50%;
  background: #f7eedd;
}
.candle-wick {
  position: absolute;
  bottom: 92px;
  left: 50%;
  width: 3px; height: 12px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: #3a2f25;
}
.candle-flame {
  position: absolute;
  bottom: 100px;
  left: 50%;
  width: 20px; height: 40px;
  margin-left: -10px;
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  background: radial-gradient(ellipse at 50% 80%, #fff7d6 0%, #ffd27a 35%, #f5a23a 70%, rgba(245,162,58,0) 100%);
  transform-origin: 50% 100%;
  animation: flicker 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 196, 102, .9));
}
.candle-glow {
  position: absolute;
  bottom: 70px;
  left: 50%;
  width: 180px; height: 180px;
  margin-left: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 206, 120, .45) 0%, rgba(255, 206, 120, 0) 65%);
  animation: glow 3s ease-in-out infinite;
  pointer-events: none;
}
.candle.is-unlit .candle-flame,
.candle.is-unlit .candle-glow { opacity: 0; animation: none; }
.candle.is-lighting .candle-flame { animation: ignite 1.2s var(--ease) both, flicker 3s 1.2s ease-in-out infinite; }
.candle.is-lighting .candle-glow { animation: igniteGlow 1.6s var(--ease) both, glow 3s 1.6s ease-in-out infinite; }

@keyframes flicker {
  0%, 100% { transform: scale(1) rotate(-1deg); }
  25% { transform: scale(1.04, .96) rotate(1.5deg); }
  50% { transform: scale(.97, 1.04) rotate(-.5deg); }
  75% { transform: scale(1.02, .98) rotate(1deg); }
}
@keyframes glow {
  0%, 100% { opacity: .85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes ignite {
  from { opacity: 0; transform: scale(.1); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes igniteGlow {
  from { opacity: 0; transform: scale(.4); }
  to   { opacity: .85; transform: scale(1); }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  position: relative;
  padding-block: 72px 28px;
  background: var(--primary-deep);
  color: rgba(247,243,236,.86);
  font-size: 1.02rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent), var(--secondary));
  opacity: .8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
.footer-name { font-family: var(--font-display); font-size: 1.9rem; color: #fff; margin: 0 0 4px; }
.footer-dates { direction: ltr; text-align: right; letter-spacing: .1em; color: var(--secondary); margin: 0 0 22px; }
.footer-motto { font-family: var(--font-display); font-size: 1.3rem; color: #f3e1bf; line-height: 1.5; margin: 0; }
.footer-title { font-family: var(--font-body); font-size: 1rem; font-weight: 500; letter-spacing: .06em; color: #fff; margin: 0 0 16px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: rgba(247,243,236,.86); text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.social-links { display: flex; gap: 10px; list-style: none; margin: 0; padding: 0; }
.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  transition: background-color .25s, border-color .25s;
}
.social-links a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); color: #fff; }
.social-links svg { width: 20px; height: 20px; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: .95rem;
  color: rgba(247,243,236,.7);
}

/* =========================================================
   אודות ליאל — פרקים
   ========================================================= */
.story-hero {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.story-hero-media { aspect-ratio: 4 / 5; max-width: 480px; justify-self: end; width: 100%; }
.story-hero-media img { object-position: center 25%; }
.story-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 1.02rem;
}
.story-facts strong { color: var(--primary); font-weight: 500; }

.chapter-nav {
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: rgba(251,248,242,.94);
  backdrop-filter: blur(10px);
  border-block: 1px solid var(--border);
}
.chapter-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.chapter-nav ul::-webkit-scrollbar { display: none; }
.chapter-nav a {
  display: block;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  font-size: 1rem;
  transition: background-color .2s, color .2s;
}
.chapter-nav a:hover,
.chapter-nav a.is-active { background: var(--secondary-light); color: var(--primary); }

.chapter-label {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent-text);
}
.chapter .split { align-items: start; }
.chapter .split-text { padding-top: 12px; }
.chapter-reverse .split-media-col { order: 2; }

.photo-stack { position: relative; padding-bottom: 60px; }
.photo-stack .media-frame:first-child { aspect-ratio: 4 / 5; width: 82%; }
.photo-stack .media-frame:nth-child(2) {
  position: absolute;
  bottom: 0;
  inset-inline-end: 0;
  width: 46%;
  aspect-ratio: 1;
  border: 6px solid var(--background);
}
.bg-sand .photo-stack .media-frame:nth-child(2) { border-color: var(--sand); }
.bg-sky .photo-stack .media-frame:nth-child(2) { border-color: var(--secondary-light); }

/* ציטוטים של אנשים */
.quote-card {
  position: relative;
  margin: 0;
  padding: 34px 34px 30px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.quote-card::before {
  content: "\201D";
  position: absolute;
  top: 6px;
  inset-inline-start: 24px;
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--accent);
  opacity: .5;
}
.quote-card blockquote { margin: 0; }
.quote-card blockquote p {
  padding-top: 18px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.6;
  color: var(--primary);
}
.quote-card figcaption { margin-top: 14px; font-size: 1rem; color: var(--text-muted); }
.quote-card figcaption strong { color: var(--text); font-weight: 500; }

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

/* ציטוט עם רקע תמונה (הטיול) */
.trip-quote {
  position: relative;
  margin: 0;
  padding: clamp(56px, 8vw, 120px) clamp(24px, 6vw, 80px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  text-align: center;
}
.trip-quote img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  z-index: -2;
}
.trip-quote::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(20,38,58,.72), rgba(20,38,58,.35));
}
.trip-quote blockquote { margin: 0; }
.trip-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.2rem + 2.2vw, 3rem);
  line-height: 1.35;
  margin: 0;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.trip-quote figcaption { margin-top: 18px; color: rgba(255,255,255,.88); }

.trip-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 260px;
  gap: 14px;
  margin-top: 28px;
}
.trip-mosaic .media-frame { border-radius: var(--radius); box-shadow: none; }
.trip-mosaic .media-frame:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.trip-mosaic img { object-position: center 35%; }

/* מילים מרכזיות — "האדם שהיה" */
.words-band {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.words-band li {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 3vw, 3.8rem);
  line-height: 1.3;
  color: var(--primary);
}
.words-band li:nth-child(even) { color: var(--accent-text); }

/* כרטיס מידע קטן (צבא / שאיפות) */
.info-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent-text);
  font-weight: 500;
}
.info-pill svg { width: 22px; height: 22px; }

/* =========================================================
   7 באוקטובר
   ========================================================= */
.oct7 {
  background:
    radial-gradient(700px 400px at 90% 0%, rgba(143,182,211,.18), transparent 70%),
    linear-gradient(180deg, #213f5d 0%, #1b344d 100%);
  color: var(--text-on-dark);
}
.oct7 h2 { color: #fff; }
.oct7 .eyebrow { color: #e7cf9f; }
.oct7-lead { font-size: var(--fs-lead); color: rgba(247,243,236,.9); }
.timeline {
  position: relative;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 8px; bottom: 8px;
  inset-inline-start: 11px;
  width: 1px;
  background: linear-gradient(180deg, rgba(231,207,159,.8), rgba(231,207,159,.15));
}
.timeline li {
  position: relative;
  padding-inline-start: 52px;
  padding-bottom: 34px;
  font-size: 1.12rem;
  line-height: 1.8;
  color: rgba(247,243,236,.92);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  top: 10px;
  inset-inline-start: 5px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #1f3b57;
  border: 2px solid #e7cf9f;
}
.message-bubble {
  display: block;
  max-width: 520px;
  margin: 14px 0 4px;
  padding: 16px 20px 12px;
  border-radius: 18px 4px 18px 18px;
  background: #f7f3ec;
  color: var(--primary-deep);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.5;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}
.message-bubble time {
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--text-muted);
  text-align: left;
}
.timeline-time { color: #e7cf9f; font-weight: 500; }
.oct7-closing {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,.14);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.2rem);
  color: #fff;
  text-align: center;
}

/* =========================================================
   פרטים לזכרו + מצבה
   ========================================================= */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
}
.details-card {
  padding: clamp(28px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.details-card h2 { font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem); }
.details-list { margin: 0; display: grid; gap: 0; }
.details-list > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.details-list > div:last-child { border-bottom: 0; }
.details-list dt { color: var(--text-muted); font-size: 1rem; }
.details-list dd { margin: 0; color: var(--text); font-weight: 500; }
.details-list dd span { display: block; font-weight: 400; color: var(--text-muted); }

.epitaph {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 5vw, 64px) clamp(24px, 4vw, 56px);
  border-radius: 200px 200px var(--radius-lg) var(--radius-lg);
  background:
    linear-gradient(180deg, #faf6ef 0%, #efe6d6 100%);
  border: 1px solid var(--sand-deep);
  text-align: center;
}
.epitaph h2 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 500; letter-spacing: .08em; color: var(--accent-text); margin-bottom: 24px; }
.epitaph-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem);
  line-height: 2;
  color: var(--primary);
}
.forever {
  padding-block: clamp(56px, 7vw, 100px);
  text-align: center;
}
.forever p {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem);
  color: var(--primary);
}
.forever .ornament { display: block; width: 60px; height: 1px; margin: 22px auto 0; background: var(--accent); }

/* =========================================================
   אודות העמותה
   ========================================================= */
.assoc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.assoc-item {
  padding: 34px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.assoc-item h3 { margin-bottom: 10px; }
.assoc-num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

/* הודעת תוכן חסר — גלויה כדי שיהיה ברור מה עדיין דורש מילוי */
.placeholder-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius-sm);
  background: rgba(243,231,211,.55);
  color: var(--accent-text);
  font-size: 1rem;
  line-height: 1.6;
}
.placeholder-note::before {
  content: "✎";
  font-size: 1.2rem;
  line-height: 1.3;
}

.cta-band {
  display: grid;
  grid-template-columns: 1.3fr auto;
  gap: 32px;
  align-items: center;
  padding: clamp(32px, 5vw, 64px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(500px 260px at 0% 100%, rgba(196,154,87,.25), transparent 70%),
    linear-gradient(135deg, #274a6b, #1f3b57);
  color: var(--text-on-dark);
}
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { margin: 0; color: rgba(247,243,236,.88); font-size: var(--fs-lead); }

/* =========================================================
   פרויקטים — מודאל פרטים
   ========================================================= */
.modal {
  width: min(880px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: auto;
}
.modal::backdrop { background: rgba(23, 46, 69, .6); backdrop-filter: blur(4px); }
.modal[open] { animation: modalIn .4s var(--ease); }
.modal-media { aspect-ratio: 16 / 8; background: var(--sand); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: clamp(24px, 4vw, 44px); }
.modal-close {
  position: sticky;
  top: 12px;
  float: left;
  margin: 12px;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.modal-close svg { width: 22px; height: 22px; }
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.modal-gallery img { aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* =========================================================
   גלריה
   ========================================================= */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
}
.filter-btn {
  min-height: 44px;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: background-color .2s, color .2s, border-color .2s;
}
.filter-btn:hover { border-color: var(--secondary); color: var(--primary); }
.filter-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-count { opacity: .65; font-size: .9em; margin-inline-start: 4px; }

.masonry {
  column-count: 4;
  column-gap: 16px;
}
.masonry-item {
  display: block;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand);
  break-inside: avoid;
  cursor: zoom-in;
  position: relative;
}
.masonry-item img { width: 100%; height: auto; transition: transform .9s var(--ease); }
.masonry-item:hover img { transform: scale(1.04); }
.masonry-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20,38,58,.25), transparent 40%);
  opacity: 0;
  transition: opacity .3s;
}
.masonry-item:hover::after,
.masonry-item:focus-visible::after { opacity: 1; }
.masonry-item.is-hidden { display: none; }
.gallery-empty { text-align: center; color: var(--text-muted); }

/* Lightbox — מבוסס <dialog> (שכבה עליונה, Esc ופוקוס מובנים) */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  align-items: center;
  justify-content: center;
  background: rgba(14, 26, 38, .95);
  color: #fff;
  overflow: hidden;
}
.lightbox[open] { display: flex; animation: fadeIn .3s ease; }
.lightbox::backdrop { background: transparent; }
.lightbox-figure {
  margin: 0;
  max-width: min(92vw, 1400px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  user-select: none;
}
.lightbox-caption { margin-top: 14px; font-size: 1rem; color: rgba(255,255,255,.85); text-align: center; }
.lightbox-btn {
  position: absolute;
  width: 54px; height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: #fff;
  transition: background-color .2s;
}
.lightbox-btn:hover { background: rgba(255,255,255,.2); }
.lightbox-btn svg { width: 24px; height: 24px; }
.lightbox-close { top: 20px; left: 20px; }
.lightbox-prev { right: 24px; top: 50%; transform: translateY(-50%); }  /* RTL: "הקודם" מימין */
.lightbox-next { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-counter { position: absolute; top: 30px; right: 30px; font-size: .95rem; color: rgba(255,255,255,.75); direction: ltr; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =========================================================
   טפסים
   ========================================================= */
.form-card {
  padding: clamp(26px, 4vw, 48px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 500; font-size: 1.02rem; color: var(--text); }
.form-field .req { color: var(--danger); margin-inline-start: 2px; }
.form-field .hint { font-size: .95rem; color: var(--text-muted); }
.form-control {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fffdfa;
  font-size: 1.05rem;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
textarea.form-control { min-height: 150px; resize: vertical; line-height: 1.6; }
.form-control::placeholder { color: #8b949c; }
.form-control:hover { border-color: var(--sand-deep); }
.form-control:focus { outline: none; border-color: var(--primary-soft); box-shadow: 0 0 0 4px rgba(143,182,211,.35); background: #fff; }
.form-control[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(162,59,42,.12); }
.field-error { min-height: 1.2em; margin: 0; font-size: .95rem; color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 28px; }
.form-status {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 1.02rem;
}
.form-status:empty { display: none; }
.form-status.is-success { background: #e7f2ec; color: var(--success); }
.form-status.is-error { background: #f7e6e2; color: var(--danger); }
.char-count { font-size: .92rem; color: var(--text-muted); text-align: left; }
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* =========================================================
   עמוד הדלקת נר
   ========================================================= */
.candle-stage {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.candle-visual {
  position: relative;
  overflow: hidden;
  padding: 60px 30px 40px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(360px 260px at 50% 35%, rgba(233,180,98,.3), transparent 70%),
    linear-gradient(180deg, #274a6b, #1b344d);
  text-align: center;
  color: var(--text-on-dark);
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.candle-visual .candle { transform: scale(1.3); margin-bottom: 60px; }
.candle-visual h2 { color: #fff; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.candle-visual p { color: rgba(247,243,236,.85); margin: 0; }
.candle-thanks {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: #f3e1bf;
}

.candles-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.candle-entry {
  display: flex;
  flex-direction: column;
  padding: 26px 26px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.candle-entry:hover { box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.candle-entry.is-new { animation: newCandle 1.2s var(--ease); border-color: var(--accent); }
.candle-entry-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.candle-emoji {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-light);
  font-size: 1.35rem;
}
.candle-entry h3 { margin: 0; font-family: var(--font-body); font-size: 1.12rem; font-weight: 500; color: var(--text); }
.candle-entry p { margin: 0 0 14px; color: var(--text-muted); font-size: 1.02rem; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.candle-entry time { margin-top: auto; font-size: .92rem; color: #7a848d; }
.candle-entry .badge {
  display: inline-block;
  margin-inline-start: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--secondary-light);
  color: var(--primary);
  font-size: .82rem;
}
.candles-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 28px;
}
.candles-count { font-size: 1.05rem; color: var(--text-muted); }
.candles-count strong { font-family: var(--font-display); font-size: 1.8rem; color: var(--primary); font-weight: 500; }
.load-more-wrap { margin-top: 32px; text-align: center; }
@keyframes newCandle {
  from { opacity: 0; transform: translateY(16px); box-shadow: 0 0 0 rgba(196,154,87,0); }
  50% { box-shadow: 0 0 40px rgba(196,154,87,.35); }
  to { opacity: 1; transform: none; }
}

/* =========================================================
   צור קשר
   ========================================================= */
.contact-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.contact-aside {
  padding: clamp(26px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--sand);
}
.contact-aside h2 { font-size: 1.7rem; }
.contact-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; }
.contact-list a,
.contact-list .contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
}
.contact-list a:hover { border-color: var(--secondary); color: var(--primary); }
.contact-list svg { width: 24px; height: 24px; color: var(--primary); flex-shrink: 0; }
.contact-list small { display: block; color: var(--text-muted); font-size: .92rem; }

/* =========================================================
   Reveal on scroll — פועל רק כשיש JS
   ========================================================= */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   Reduced motion — כיבוד העדפת המשתמש
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
  .hero-media { transform: none !important; }
  .hero-slide { transform: none !important; }
  .hero-event-dot { animation: none !important; }
  .candle-flame, .candle-glow { animation: none !important; }
}

/* =========================================================
   אירועים
   ========================================================= */
.event-feature {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
  padding: clamp(20px, 3vw, 36px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.event-flyer {
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--sand);
  cursor: zoom-in;
  box-shadow: var(--shadow);
}
.event-flyer img { width: 100%; transition: transform .8s var(--ease); }
.event-flyer:hover img { transform: scale(1.02); }
.event-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--secondary-light);
  color: var(--primary);
  font-size: .95rem;
  font-weight: 500;
}
.event-status.is-today { background: var(--accent-light); color: var(--accent-text); }
.event-status.is-today::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(196,154,87,.25);
}
.event-status.is-past { background: #eeece8; color: var(--text-muted); }
.event-title { font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem); margin-bottom: 18px; }
.event-meta { display: grid; gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.event-meta li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.08rem; }
.event-meta svg { width: 24px; height: 24px; margin-top: 3px; color: var(--accent-text); flex-shrink: 0; }
.event-meta span small { display: block; color: var(--text-muted); font-size: .98rem; }
.schedule {
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}
.schedule li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.schedule-time { font-family: var(--font-display); font-size: 1.25rem; color: var(--primary); }
.event-note { font-family: var(--font-display); font-size: 1.35rem; color: var(--accent-text); margin-bottom: 24px; }
.events-list { display: grid; gap: 24px; }
.events-empty {
  padding: 40px;
  text-align: center;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

/* פס "אירוע קרוב" בעמוד הבית */
.event-band {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: clamp(18px, 2.5vw, 28px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.event-band-img { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 3 / 4; background: var(--sand); }
.event-band-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.event-band h3 { margin-bottom: 8px; }
.event-band p { margin: 0; color: var(--text-muted); }

/* =========================================================
   תרומות
   ========================================================= */
.donate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 36px); }
.donate-card {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 44px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.donate-icon {
  width: 60px; height: 60px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent-text);
}
.donate-icon svg { width: 28px; height: 28px; }
.donate-card h2 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); }
.donate-card > p { color: var(--text-muted); }
.bank-details { margin: 8px 0 24px; }
.bank-details > div {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}
.bank-details dt { color: var(--text-muted); font-size: 1rem; }
.bank-details dd { margin: 0; font-weight: 500; }
.bank-details dd.is-missing { color: var(--accent-text); font-weight: 400; font-style: italic; }
.copy-btn {
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--background);
  font-size: .92rem;
  color: var(--primary);
}
.copy-btn:hover { border-color: var(--secondary); }
.copy-btn:disabled { opacity: .45; cursor: not-allowed; }
.donate-card .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.donate-card .card-footer { margin-top: auto; padding-top: 16px; }
.secure-note { display: flex; gap: 10px; align-items: center; margin-top: 14px; font-size: .95rem; color: var(--text-muted); }
.secure-note svg { width: 18px; height: 18px; flex-shrink: 0; }

/* הודעת אירוע קרוב בתוך ה-Hero */
.hero-event {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  padding: 10px 18px;
  border: 1px solid rgba(243,225,191,.55);
  border-radius: 999px;
  background: rgba(23,46,69,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 1rem;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color .25s, border-color .25s;
}
.hero-event:hover { background: rgba(23,46,69,.7); border-color: #f3e1bf; color: #fff; }
.hero-event strong { color: #f3e1bf; font-weight: 500; }
.hero-event svg { width: 18px; height: 18px; flex-shrink: 0; }
.hero-event-dot {
  width: 9px; height: 9px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #e9b765;
  box-shadow: 0 0 0 4px rgba(233,183,101,.3);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(233,183,101,.3); }
  50% { box-shadow: 0 0 0 8px rgba(233,183,101,.08); }
}

/* הדפסה — הצגת כל התוכן ללא אנימציות */
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .site-header, .chapter-nav, .hero-scroll { position: static; }
}

/* =========================================================
   תרומות — כפתורי סכום
   ========================================================= */
.donate-main-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.donate-main-head .donate-icon { margin: 0; flex-shrink: 0; }
.donate-main-head h2 { margin-bottom: 4px; }
.donate-main-head p { margin: 0; color: var(--text-muted); }

.amount-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.amount-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 112px;
  height: 100%;
  padding: 18px 12px;
  border: 1.5px solid var(--sand-deep);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--primary);
  text-align: center;
  text-decoration: none;
  transition: transform .25s var(--ease), border-color .25s, background-color .25s, box-shadow .25s;
}
.amount-btn:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: #fffaf1;
  box-shadow: 0 12px 28px rgba(196,154,87,.22);
  color: var(--primary);
}
.amount-value { font-family: var(--font-display); font-size: clamp(1.8rem, 1.4rem + 1vw, 2.3rem); line-height: 1.1; direction: ltr; }
.amount-label { font-size: .95rem; color: var(--text-muted); }
.amount-open .amount-btn { background: linear-gradient(135deg, #f7ecd9, #efdcb9); border-color: #e2c795; }
.amount-open .amount-value { font-size: clamp(1.35rem, 1.15rem + .6vw, 1.6rem); direction: rtl; }

.standing-order {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #274a6b, #1f3b57);
  color: #fff;
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.standing-order:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: #fff; }
.standing-order .donate-icon { margin: 0; width: 52px; height: 52px; flex-shrink: 0; background: rgba(255,255,255,.12); color: #f3e1bf; }
.standing-order strong { display: block; font-family: var(--font-display); font-size: 1.4rem; font-weight: 500; }
.standing-order small { display: block; color: rgba(247,243,236,.8); font-size: 1rem; }
.standing-order > svg { width: 24px; height: 24px; margin-inline-start: auto; flex-shrink: 0; }
.donate-main .secure-note { margin-top: 18px; }
.org-details > div { grid-template-columns: 120px 1fr; }

/* אודות העמותה — כרטיס מטרה */
.purpose-card {
  padding: clamp(28px, 4vw, 52px);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(196,154,87,.16), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
