/* =========================================================
   Ashtanga Yoga Ramat Gan — עיצוב האתר
   סגנון מינימליסטי (לבן, ממורכז, מרווח) בפלטה חמה מתוך תמונת השאלה:
   טרקוטה, אור נרות, עץ חם ושמנת.
   ========================================================= */

:root {
  --terracotta: #7a2a1c;     /* כותרות, כפתורים */
  --terracotta-deep: #5e1f14;
  --candle: #a87532;         /* קישורים וקישוטים (כהה מספיק לקריאה על לבן) */
  --candle-soft: #dcbf95;
  --candle-faint: #f4ead9;
  --cream: #f7f0e6;          /* תחתית העמוד, רקעים עדינים */
  --wood: #2e1c14;
  --text: #5e544c;           /* טקסט רץ — אפור חם */
  --ink: #3b2c24;
  --muted: #8d8279;
  --line: #ebe2d5;
  --white: #ffffff;

  --heading: "Heebo", Arial, sans-serif;
  --body: "Varela Round", "Assistant", Arial, sans-serif;
  --latin: "Cormorant Garamond", Georgia, serif;

  /* שמות ישנים שעדיין מופיעים בעמודים — מפנים לצבעים החדשים */
  --navy: var(--terracotta);
  --navy-deep: var(--wood);
  --gold: var(--candle);
  --gold-soft: var(--candle-soft);
  --gold-faint: var(--candle-faint);
  --paper: var(--white);
  --paper-warm: var(--cream);

  --wrap: 1040px;
  --narrow: 620px;
  --bar: 176px;            /* גובה הסרגל העליון */
}
@media (max-width: 600px) { :root { --bar: 128px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--candle); text-decoration: none; }
a:hover { color: var(--terracotta); text-decoration: underline; text-underline-offset: 4px; }

h1, h2, h3, h4 {
  font-family: var(--heading);
  font-weight: 300;
  color: var(--terracotta);
  line-height: 1.3;
  margin: 0 0 .6em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); }
h3 { font-size: 1.25rem; font-weight: 400; }
h4 { font-weight: 400; }
p  { margin: 0 0 1.2em; text-wrap: pretty; }
/* טקסט ממורכז: שורות באורך דומה, בלי מילה בודדת בסוף */
.balanced p { text-wrap: balance; }

.wrap   { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.narrow { width: min(var(--narrow), 100% - 40px); margin-inline: auto; }

.latin {
  font-family: var(--latin);
  font-style: italic;
  direction: ltr;
  unicode-bidi: isolate;
}

/* שעות וטווחי שנים — תמיד משמאל לימין (07:00–10:30) */
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- סימוני טיוטה ---------- */
.fill {
  background: #f5e7c9;
  color: var(--muted);
  padding: 0 4px;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.draft {
  text-decoration-line: underline;
  text-decoration-style: dashed;
  text-decoration-color: var(--candle);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.draft-legend {
  position: fixed;
  bottom: 16px;
  inset-inline-start: 16px;
  z-index: 50;
  background: var(--white);
  border: 1px solid var(--candle-soft);
  border-radius: 4px;
  box-shadow: 0 4px 18px rgba(46, 28, 20, .12);
  padding: 10px 14px;
  font-size: .82rem;
  line-height: 1.6;
  max-width: 260px;
}
@media (max-width: 600px) {
  .draft-legend { inset-inline: 8px; bottom: 8px; max-width: none; font-size: .76rem; padding: 6px 10px; }
}
.draft-legend button {
  float: left;
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0 0 6px;
}

/* ---------- סרגל עליון ---------- */
.top-band { display: none; }

/* הסרגל קבוע למעלה, והעמוד מתחיל מתחתיו במרווח קבוע —
   כך שכיווץ הסרגל לא מזיז את העמוד (וזה מה שמונע ריצוד) */
body { padding-top: var(--bar); }
[id] { scroll-margin-top: 104px; }
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: var(--bar);
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: height .25s ease;
}
.brand { display: block; }
/* הלוגו המלא (סמל + כיתוב) */
.brand img { height: calc(var(--bar) - 16px); width: auto; transition: height .25s ease; }
.brand:hover { text-decoration: none; }
/* אחרי גלילה — סרגל נמוך יותר */
body.scrolled .site-header { height: 88px; }
body.scrolled .brand img { height: 76px; }

.nav-toggle {
  position: absolute;
  inset-inline-start: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
  color: var(--wood);
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: currentColor; margin: 6px 0; }

/* מעבר שפה — בצד השני של הסרגל */
.lang-switch {
  position: absolute;
  inset-inline-end: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--heading);
  font-size: .95rem;
  letter-spacing: .06em;
  color: var(--wood);
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 4px 12px;
  line-height: 1.4;
}
.lang-switch:hover { color: var(--terracotta); border-color: var(--terracotta); text-decoration: none; }
.nav .nav-lang { margin-top: 22px; font-size: 1rem; color: var(--muted); }

/* ---------- התאמות לגרסה האנגלית (משמאל לימין) ---------- */
[dir="ltr"] .lineage-figure { float: right; margin: 6px 0 16px 28px; }
[dir="ltr"] .draft-legend button { float: right; padding: 0 6px 0 0; }
@media (max-width: 560px) { [dir="ltr"] .lineage-figure { float: none; margin: 10px auto 24px; } }
[dir="ltr"] body, html[lang="en"] body { letter-spacing: .005em; }

/* תפריט שנפתח על כל המסך */
.nav {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--white);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 72px 20px 40px;
}
.nav.open { display: flex; }
.nav .nav-close {
  position: absolute;
  top: 12px;
  inset-inline-start: 18px;
  background: none;
  border: 0;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  color: var(--wood);
}
.nav .nav-emblem { width: 56px; margin-bottom: 8px; }
.nav .nav-orn { font-family: var(--latin); font-style: italic; font-size: 1.15rem; color: var(--candle); margin-bottom: 24px; direction: ltr; }
.nav ul { list-style: none; margin: 0; padding: 0; text-align: center; }
.nav a {
  display: inline-block;
  font-family: var(--heading);
  font-weight: 300;
  font-size: 1.45rem;
  color: var(--ink);
  padding: 6px 12px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--terracotta); text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--candle-soft); text-underline-offset: 8px; }
body.menu-open { overflow: hidden; }

/* ---------- קישוט ---------- */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--candle);
  margin: 0 auto 22px;
}
.divider svg { width: 28px; height: 16px; }

/* ---------- דף הבית: תמונה על כל המסך ---------- */
.home-hero {
  position: relative;
  height: calc(100vh - var(--bar));
  min-height: 420px;
  overflow: hidden;
  padding: 0;
}
.home-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 55%;
}
.home-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(30, 18, 12, .28);
}
.home-hero-text {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 0 16px;
}
.home-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.25;
  color: #f3e3a6;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.home-hero .hero-mantra {
  margin: 18px 0 0;
  font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  color: #f3e3a6;
  opacity: .92;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .4);
}
/* באנר תמונה ברוחב מלא בתוך עמודים פנימיים.
   בלי תמונה — מוצג כמקום שמור בצבע שמנת */
.banner-slot {
  height: clamp(220px, 32vw, 400px);
  margin: 24px 0 8px;
  background: var(--cream) 50% 50% / cover no-repeat;
  display: grid;
  place-items: center;
}
.banner-slot span { color: var(--candle); font-size: .95rem; letter-spacing: .04em; }
.banner-slot[style*="background-image"] span { display: none; }

/* קולאז' עמוד הסטודיו: תמונת החדר גדולה, ופס של ארבע תמונות קטנות
   שעולה על התחתית שלה בתוך מסגרת לבנה דקה */
.studio-collage { width: min(var(--wrap), 100% - 40px); margin: 8px auto 0; }
.studio-collage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.studio-collage .room { aspect-ratio: 16 / 8; }
.studio-collage .row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  margin-top: calc(-1 * clamp(48px, 9vw, 110px));
  padding: 3px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(46, 28, 20, .18);
}
.studio-collage .row img { aspect-ratio: 1; }
.studio-collage .sign { object-position: 38% 50%; }
.studio-collage .ganesha { object-position: 50% 42%; }
.studio-collage .shelf { object-position: 50% 45%; }
@media (max-width: 600px) {
  .studio-collage { width: 100%; }
  .studio-collage .room { aspect-ratio: 4 / 3; }
  .studio-collage .row { gap: 2px; padding: 2px; margin-top: -36px; }
}

/* התמונה השנייה בדף הבית — המזבח עם תמונת המורה */
.photo-strip {
  height: clamp(260px, 38vw, 440px);
  background: url("../assets/altar.jpg") 55% 32% / cover no-repeat;
}

.list-plain { list-style: none; padding: 0; margin: 1.4em 0 0; }
.list-plain li { margin: .15em 0; }
.list-plain .latin { color: var(--candle); }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  text-align: center;
}
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; gap: 40px; } }

.mantra-text {
  font-family: var(--latin);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
  direction: ltr;
  line-height: 1.8;
}
.mantra-text .om { color: var(--candle); font-style: normal; display: block; margin: 4px 0; }

/* ---------- שבוע ניסיון (דף הבית) ---------- */
.trial-cream { background: var(--cream); text-align: center; padding: 80px 0; }
section + section.trial-cream { padding-top: 80px; }
@media (max-width: 460px) { .trial-cream .others { grid-template-columns: auto; justify-items: center; } }
.trial-cream .narrow { display: flex; flex-direction: column; align-items: center; text-align: center; }
.trial-cream .price-hero {
  font-family: var(--heading);
  font-weight: 300;
  font-size: clamp(3.2rem, 9vw, 5rem);
  line-height: 1;
  color: var(--terracotta);
  margin: 10px 0 4px;
}
.trial-cream .unit { color: var(--muted); margin-bottom: 28px; }
.trial-cream .others {
  margin-top: 30px;
  display: grid;
  grid-template-columns: repeat(2, auto);
  justify-content: center;
  justify-items: start;
  gap: 12px 48px;
  font-size: 1.1rem;
  color: var(--ink);
}
.trial-cream .others strong {
  font-family: var(--heading);
  font-weight: 400;
  font-size: 1.35rem;
  color: var(--terracotta);
  margin-inline-start: 4px;
}

/* ---------- כפתורים ---------- */
.btn {
  display: inline-block;
  padding: 10px 28px;
  border: 1px solid var(--terracotta);
  background: transparent;
  color: var(--terracotta);
  font-family: var(--body);
  font-size: .95rem;
  letter-spacing: .02em;
  border-radius: 0;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--terracotta); color: var(--white); text-decoration: none; }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--terracotta); background: var(--terracotta); color: var(--white); }
.btn.solid { background: var(--terracotta); color: var(--white); }
.btn.solid:hover { background: var(--terracotta-deep); border-color: var(--terracotta-deep); }
.btn-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- כותרת עמוד פנימי ---------- */
.page-head {
  text-align: center;
  padding: 64px 0 24px;
  background: var(--white);
}
.page-head .eyebrow {
  display: block;
  color: var(--candle);
  font-size: .9rem;
  letter-spacing: .08em;
  margin-bottom: 6px;
}
.page-head .eyebrow a { color: inherit; }
.page-head p { color: var(--muted); max-width: 34em; margin: 0 auto; }

/* תפריט משנה — קישורי טקסט עדינים */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  justify-content: center;
  padding: 18px 0 0;
  max-width: 760px;
  margin: 0 auto;
}
.toc a {
  font-size: .95rem;
  color: var(--muted);
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.toc a:hover { color: var(--terracotta); text-decoration: none; border-bottom-color: var(--candle-soft); }
.toc a[aria-current="page"] { color: var(--terracotta); border-bottom-color: var(--terracotta); }

/* ---------- מקטעים ---------- */
section { padding: 56px 0; }
section + section { padding-top: 16px; }
section.alt, section.white { background: var(--white); }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title p { color: var(--muted); max-width: 34em; margin: 0 auto; }
.section-title p + p { margin-top: .9em; }

.grid {
  display: grid;
  gap: 40px 48px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* רשת שבה כרטיס שנשאר לבד בשורה מוצג במרכז */
.grid-center { display: flex; flex-wrap: wrap; justify-content: center; }
.grid-center > * { flex: 1 1 260px; max-width: 330px; }

/* כרטיס — בלי מסגרות, טקסט ממורכז */
.card {
  text-align: center;
  padding: 8px 4px;
}
.card h3 { margin-bottom: .35em; }
.card p:last-child { margin-bottom: 0; }
.card .num {
  font-family: var(--latin);
  color: var(--candle);
  font-size: 1.1rem;
  display: block;
  margin-bottom: 2px;
}
/* רשימות בתוך כרטיס: מיושרות לצד, כל שורה מתחילה באותו מרחק מהתבליט */
.card ul, .card ol { text-align: start; padding-inline-start: 1.2em; }
.card li { padding-inline-start: .2em; }
a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; }
a.card:hover h3 { text-decoration: underline; text-decoration-color: var(--candle-soft); text-underline-offset: 6px; }
a.card .more { color: var(--candle); font-size: .92rem; }

/* מקום לתמונה */
.arch {
  aspect-ratio: 4 / 5;
  width: 100%;
  max-width: 360px;
  justify-self: center;
  background: var(--cream);
  display: grid;
  place-items: center;
  color: var(--candle);
  font-size: .9rem;
  overflow: hidden;
}
.arch img { width: 100%; height: 100%; object-fit: cover; }

.split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split .arch { max-width: 220px; }
}

/* ---------- טקסט ארוך ---------- */
.prose { font-size: 1.05rem; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose blockquote {
  margin: 1.8em 0;
  padding: 0;
  text-align: center;
  font-family: var(--heading);
  font-weight: 300;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--terracotta);
}
.prose blockquote::before, .prose blockquote::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: 0 auto;
  background: var(--candle-soft);
}
.prose blockquote::before { margin-bottom: 22px; }
.prose blockquote::after { margin-top: 22px; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--candle); }

/* ---------- טבלאות ומחירים ---------- */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
th, td { padding: 14px 12px; text-align: center; border-bottom: 1px solid var(--line); }
th { font-family: var(--heading); font-weight: 400; color: var(--terracotta); }
th a { color: inherit; }
td.off { color: var(--muted); }

.price-card .price {
  font-family: var(--heading);
  font-weight: 300;
  font-size: 2.3rem;
  color: var(--terracotta);
  line-height: 1.2;
  margin: 6px 0 2px;
}
.price-card .unit { color: var(--muted); font-size: .95rem; }
/* רשת המחירים — שלושה כרטיסים בשורה, שורה חלקית ממורכזת */
.price-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px 28px; }
.price-grid > .price-card { flex: 0 0 calc((100% - 56px) / 3); }
@media (max-width: 560px) { .price-grid > .price-card { flex-basis: 100%; } }
/* תנאי מנוי — רשימה אנכית מתחת לפרטים */
.terms-list { max-width: var(--narrow); margin: 32px auto 0; padding-inline-start: 1.2em; text-align: start; font-size: .95rem; }
.terms-list li { margin-bottom: .5em; padding-inline-start: .2em; }
.terms-list li::marker { color: var(--candle); }

/* ---------- ימי ירח ---------- */
.moon-intro { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 40px; align-items: start; max-width: 900px; margin: 0 auto 36px; }
.moon-intro .moon-art { width: 100%; height: auto; }
.moon-intro .section-title { margin: 0; }
.moon-intro .section-title p { max-width: none; margin: 0 0 1.2em; }
@media (max-width: 700px) { .moon-intro { grid-template-columns: 1fr; gap: 20px; } .moon-intro .moon-art { max-width: 260px; margin: 0 auto; } }
.moon-next {
  text-align: center;
  padding: 24px 16px;
  max-width: 520px;
  margin: 0 auto 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.moon-next .label { color: var(--candle); font-size: .95rem; }
.moon-next .date { font-family: var(--heading); font-weight: 300; font-size: 1.8rem; color: var(--terracotta); margin: 4px 0 0; }

.moon-icon { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--wood); flex: none; display: inline-block; }
.moon-icon.full { background: var(--candle-soft); border-color: var(--candle); }
.moon-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; max-width: 620px; margin: 0 auto; }
.moon-col h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin: 0 0 6px; padding-bottom: 10px; border-bottom: 1px solid var(--candle-soft); }
.moon-col ul { list-style: none; margin: 0; padding: 0; }
.moon-col li { padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 1rem; }
@media (max-width: 480px) { .moon-cols { gap: 0 20px; } .moon-col li { font-size: .92rem; } }

/* ---------- שאלות ותשובות ---------- */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary {
  cursor: pointer;
  font-family: var(--heading);
  font-weight: 400;
  font-size: 1.12rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--candle); font-family: var(--body); }
details[open] summary::after { content: "–"; }
details > div { padding-top: 10px; font-size: 1.05rem; }

/* ---------- טפסים ---------- */
form { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: .92rem; color: var(--muted); }
input, textarea, select {
  font: inherit;
  font-size: 1rem;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid #d9cdbc;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-bottom-color: var(--terracotta); }
textarea { min-height: 120px; resize: vertical; border: 1px solid #d9cdbc; }
form .btn { justify-self: start; }

.newsletter { text-align: center; background: var(--cream); padding: 56px 0; }
.newsletter form { grid-template-columns: 1fr auto; max-width: 460px; margin: 20px auto 0; align-items: end; }
@media (max-width: 520px) { .newsletter form { grid-template-columns: 1fr; } .newsletter form .btn { justify-self: center; } }

.map { width: 100%; aspect-ratio: 16 / 9; border: 0; filter: sepia(.2) saturate(.85); }

/* ---------- אירוע קרוב ---------- */
.event-card { max-width: 560px; margin: 0 auto; text-align: center; background: var(--cream); padding: 44px 28px 36px; }
.event-date { display: inline-block; color: var(--candle); font-size: .95rem; letter-spacing: .05em; padding: 5px 16px; border-top: 1px solid var(--candle-soft); border-bottom: 1px solid var(--candle-soft); margin-bottom: 26px; }
.event-date .sep { margin: 0 6px; }
.event-title { font-size: clamp(1.8rem, 4.5vw, 2.4rem); font-weight: 300; margin: 0 0 16px; }
.event-sub { color: var(--muted); font-size: 1rem; margin: 0 0 2px; }
.event-topic { font-family: var(--heading); font-weight: 400; color: var(--terracotta); font-size: clamp(1.2rem, 3vw, 1.45rem); line-height: 1.5; margin: 0 0 30px; }
.event-card .divider { margin-bottom: 20px; }
.event-contact { font-size: .95rem; margin: 0; line-height: 1.9; }

/* ---------- מאמרים ---------- */
.prose .article-sign { margin-top: 32px; text-align: start; font-family: var(--heading); font-size: 1.15rem; color: var(--terracotta); }
.prose .article-sign::before { content: "— "; color: var(--candle); }
.article-meta { color: var(--candle); font-size: .92rem; margin-bottom: 4px; display: block; }
.article-card h3 { font-size: 1.3rem; }
.tag { display: inline-block; font-size: .8rem; color: var(--candle); letter-spacing: .06em; margin-bottom: 6px; }

/* ---------- גלריה ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gallery:has(img) { display: flex; flex-wrap: wrap; justify-content: center; }
.gallery img { aspect-ratio: 1; flex: 0 0 calc((100% - 24px) / 3); width: calc((100% - 24px) / 3); height: auto; object-fit: cover; }
@media (max-width: 600px) { .gallery img { flex-basis: calc((100% - 12px) / 2); width: calc((100% - 12px) / 2); } }
.gallery .ph { aspect-ratio: 1; background: var(--cream); display: grid; place-items: center; color: var(--candle); font-size: .9rem; }

/* ---------- הערות שוליים ---------- */
.prose sup a { text-decoration: none; color: var(--candle); font-size: .8em; padding: 0 2px; }
.footnotes { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
.footnotes ol { padding-inline-start: 1.3em; }

/* ---------- דמויות בשושלת ---------- */
.lineage-figure { float: left; width: min(220px, 42%); margin: 6px 28px 16px 0; }
.lineage-figure img { filter: sepia(.15); }
.lineage-figure figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: 8px; }
.clear { clear: both; }
/* תמונה לצד הטקסט בראש מאמר */
.side-figure { float: left; width: min(260px, 44%); margin: 6px 28px 16px 0; }
.side-figure img { display: block; width: 100%; border-radius: 4px; }
[dir="ltr"] .side-figure { float: right; margin: 6px 0 16px 28px; }
@media (max-width: 560px) { .side-figure, [dir="ltr"] .side-figure { float: none; width: 100%; margin: 4px 0 24px; } }
@media (max-width: 560px) { .lineage-figure { float: none; width: 70%; margin: 10px auto 24px; } }

/* ---------- ציר זמן ---------- */
.timeline { position: relative; padding-inline-start: 28px; border-inline-start: 1px solid var(--candle-soft); }
.timeline .era {
  display: inline-block;
  font-family: var(--heading);
  color: var(--terracotta);
  margin: 28px 0 8px;
  font-size: 1.05rem;
}
.timeline .era:first-child { margin-top: 0; }
.tl-item {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.tl-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -33px;
  top: 18px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--candle);
  border: 2px solid var(--white);
}
.tl-year { font-family: var(--latin); color: var(--candle); font-size: 1.15rem; }
.tl-name { color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.tl-country { color: var(--muted); font-size: .88rem; margin-inline-start: 8px; }
.tl-note { grid-column: 2; font-size: .95rem; }
.source-note { font-size: .85rem; color: var(--muted); margin-top: 20px; }

/* ---------- רשימת שמונת האיברים (שתי עמודות) ---------- */
.prose .limbs-list { columns: 2; column-gap: 56px; max-width: 440px; margin: 1.2em 0 1.6em; }
.prose .limbs-list li { break-inside: avoid; }
.prose .limbs-list strong { color: var(--terracotta); font-family: var(--heading); font-weight: 400; font-size: 1.12rem; }

/* ---------- עץ שמונת האיברים ---------- */
.limbs-figure { margin: 12px auto 32px; max-width: 520px; }
.limbs-figure svg { width: 100%; height: auto; display: block; }

/* ---------- איור רחב בתוך מאמר ---------- */
.wide-art { margin: 36px -8% 8px; }
.wide-art img { width: 100%; height: auto; display: block; }
@media (max-width: 700px) { .wide-art { margin: 28px 0 4px; } }

/* ---------- מנטרה במאמר ---------- */
.mantra-block { text-align: center; padding: 28px 16px; margin: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mantra-block .latin { display: block; color: var(--ink); font-size: 1.2rem; line-height: 1.9; }
.mantra-block .om { display: block; color: var(--candle); font-family: var(--latin); font-size: 1.3rem; margin: 6px 0; }
.mantra-block .translation { margin-top: 18px; color: var(--muted); font-size: 1rem; text-align: center; text-wrap: balance; }
.mantra-block .translation + .translation { margin-top: 8px; }

/* ---------- תחתית ---------- */
.site-footer {
  background: var(--cream);
  color: var(--text);
  text-align: center;
  padding: 56px 20px 32px;
  font-size: .95rem;
  line-height: 1.8;
}
.site-footer a { color: var(--terracotta); }
.site-footer .footer-emblem { width: 60px; margin: 0 auto 14px; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin: 18px 0 0; padding: 0; list-style: none; }
.site-footer .footer-links a { color: var(--muted); }
.site-footer .footer-mantra { color: var(--candle); margin-top: 22px; }
.site-footer .footer-bottom { font-size: .8rem; color: var(--muted); margin-top: 8px; }
