/* מדור ״המחשות״ (26.11.2026): סוגיות בחכמת הקבלה שנבנות שלב אחר שלב במודל תלת־ממדי. נשען על style.css ו-theme.css
   של עיצוב 1 (אותם משתנים, כפתורים ומעטפת) ועל שפת הבמה של מדור הספרים: קרקע הדף בהירה ביום וכהה בלילה; הבמה
   עמוקה תמיד, ורק בתוכה יש זהב. תנועה מעטה: הבמה נדלקת לאט, והתמונה מתקרבת מעט במעבר עכבר. */
:root { --hm-gold: linear-gradient(100deg, #b8862b 0%, #e9c46a 14%, #fff7d6 27%, #e9c46a 40%, #b8862b 54%, #f6e3a1 70%, #d9a94a 86%, #b8862b 100%); }

.hm-main { padding: calc(var(--hdr) + .4rem) 0 clamp(3rem, 8vh, 6rem); }
.hm-wrap { width: min(1280px, 100% - 2 * var(--gut)); margin-inline: auto; }
body.hm .nav a[aria-current="page"] { opacity: 1; color: var(--gold1); }

/* ------------------------------------------------------------ הבמה */
.hm-stage {
  --ivory: #f4eeda; --muted: #c9cdea; --gold1: #f6e3a1; --gold2: #e9c46a; --gold3: #b8862b; --foil: var(--hm-gold);
  position: relative; isolation: isolate; overflow: hidden; color: var(--ivory);
  display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.3fr); align-items: center; gap: clamp(1.4rem, 3.4vw, 3.4rem);
  border-radius: clamp(18px, 2.4vw, 34px); background: #0b1340;
  box-shadow: 0 50px 90px -50px rgba(8, 14, 60, .75), 0 0 0 1px rgba(246, 227, 161, .14) inset;
  padding: clamp(1.6rem, 4vw, 3.6rem);
}
.hm-bg {                                /* אור רך מהפינה, כמו בבמת הספרים, וסריג עדין של קווי גובה */
  position: absolute; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(60% 70% at 8% 0%, rgba(120, 150, 255, .30), rgba(120, 150, 255, 0) 70%),
    radial-gradient(55% 60% at 100% 100%, rgba(233, 196, 106, .12), rgba(233, 196, 106, 0) 70%),
    linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(0, 0, 0, .28));
}
.hm-bg::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: repeating-linear-gradient(0deg, rgba(246, 227, 161, .05) 0 1px, transparent 1px 46px);
  -webkit-mask-image: radial-gradient(80% 80% at 70% 50%, #000, transparent 75%); mask-image: radial-gradient(80% 80% at 70% 50%, #000, transparent 75%);
}
.hm-text { position: relative; z-index: 2; min-width: 0; }
.hm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .55rem; font-size: .84rem; color: var(--muted); margin-bottom: clamp(.8rem, 2.4vh, 1.6rem); }
.hm-crumbs a { color: inherit; text-decoration: none; } .hm-crumbs a:hover { color: var(--gold1); }
.hm-crumbs i { font-style: normal; opacity: .6; }
.hm-h1 { margin: 0; font: 900 clamp(3.1rem, 6.6vw, 6rem)/1.02 var(--serif); letter-spacing: -.01em; padding-bottom: .08em; }
.hm-lead { margin: .9rem 0 0; font: 400 clamp(1.08rem, 1.5vw, 1.3rem)/1.6 var(--serif); color: #dfe2f6; max-width: 34rem; text-wrap: pretty; }
.hm-facts { margin: 1.1rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1.3rem; color: var(--muted); font-size: .98rem; }
.hm-facts b { color: var(--ivory); font-weight: 500; }

/* ------------------------------------------------------------ ההמחשה המובלטת (החדשה ביותר) */
.hm-feature {
  position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch;
  border-radius: clamp(14px, 1.8vw, 24px); overflow: hidden; text-decoration: none; color: inherit;
  background: rgba(8, 13, 46, .55); box-shadow: 0 0 0 1px rgba(246, 227, 161, .18) inset, 0 30px 60px -30px rgba(0, 0, 0, .7);
  transition: box-shadow .5s var(--ease), transform .5s var(--ease);
}
.hm-feature:hover { box-shadow: 0 0 0 1px rgba(246, 227, 161, .5) inset, 0 34px 70px -28px rgba(0, 0, 0, .75), 0 0 70px -20px rgba(120, 150, 255, .45); transform: translateY(-2px); }
.hm-feature:focus-visible { outline: 2px solid var(--gold1); outline-offset: 4px; }
.hm-pic { position: relative; overflow: hidden; background: #070c2c; min-height: 100%; }
.hm-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.001); transition: transform 1.2s var(--ease), filter 1.2s var(--ease); filter: saturate(1.02); }
.hm-feature:hover .hm-pic img { transform: scale(1.045); filter: saturate(1.12) brightness(1.04); }
.hm-pic::after {                        /* מעבר רך מהתמונה אל הטקסט */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(270deg, rgba(8, 13, 46, 0) 55%, rgba(8, 13, 46, .55) 100%);
}
.hm-card-text { display: flex; flex-direction: column; justify-content: center; gap: .55rem; padding: clamp(1.2rem, 2.6vw, 2.2rem); }
.hm-kicker { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; color: var(--gold2); }
.hm-card-h { margin: 0; font: 800 clamp(1.7rem, 2.8vw, 2.5rem)/1.1 var(--serif); color: var(--ivory); }
.hm-q { margin: 0; font: 500 clamp(1.02rem, 1.3vw, 1.18rem)/1.45 var(--serif); color: var(--gold1); }
.hm-sum { margin: .2rem 0 0; font-size: .96rem; line-height: 1.65; color: #cfd3ee; text-wrap: pretty; }
.hm-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.hm-meta b { color: var(--ivory); font-weight: 500; }
.hm-go { margin-top: .7rem; align-self: flex-start; }

/* ------------------------------------------------------------ כל ההמחשות (כשיש יותר מאחת) */
.hm-list { margin-top: clamp(2.4rem, 6vh, 4rem); }
.hm-list h2 { font: 800 clamp(1.6rem, 2.6vw, 2.3rem)/1.15 var(--serif); color: var(--ivory); margin: 0 0 1.2rem; }
.hm-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
.hm-tile { display: block; height: 100%; border-radius: 18px; overflow: hidden; text-decoration: none; color: inherit; background: #0b1340; color: #f4eeda;
  box-shadow: 0 0 0 1px rgba(246, 227, 161, .14) inset, 0 24px 50px -30px rgba(8, 14, 60, .7); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.hm-tile:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px rgba(246, 227, 161, .45) inset, 0 30px 60px -28px rgba(8, 14, 60, .8); }
.hm-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; }
.hm-tile div { padding: 1rem 1.15rem 1.2rem; }
.hm-tile h3 { margin: 0; font: 800 1.35rem/1.2 var(--serif); }
.hm-tile p { margin: .35rem 0 0; font-size: .92rem; color: #c9cdea; }

.hm-note { margin: clamp(1.6rem, 4vh, 2.4rem) auto 0; max-width: 46rem; text-align: center; color: var(--muted); font: 400 1rem/1.7 var(--serif); }

/* ------------------------------------------------------------ כניסה עדינה */
.hm-reveal.pre { opacity: 0; transform: translateY(14px); }
.hm-reveal.in { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.hm-stage .hm-h1, .hm-stage .hm-lead, .hm-stage .hm-facts, .hm-stage .hm-feature { animation: hm-rise 1s var(--ease) both; }
.hm-stage .hm-lead { animation-delay: .08s; } .hm-stage .hm-facts { animation-delay: .16s; } .hm-stage .hm-feature { animation-delay: .22s; }
@keyframes hm-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ מסכים צרים */
@media (max-width: 1040px) {
  .hm-stage { grid-template-columns: 1fr; }
  .hm-lead { max-width: 40rem; }
}
@media (max-width: 640px) {
  .hm-feature { grid-template-columns: 1fr; }
  .hm-pic { aspect-ratio: 1 / 1; min-height: 0; }
  .hm-pic::after { background: linear-gradient(0deg, rgba(8, 13, 46, .5) 0%, rgba(8, 13, 46, 0) 40%); }
}
@media (prefers-reduced-motion: reduce) {
  .hm-stage .hm-h1, .hm-stage .hm-lead, .hm-stage .hm-facts, .hm-stage .hm-feature { animation: none; }
  .hm-feature, .hm-tile, .hm-pic img { transition: none; }
  .hm-feature:hover, .hm-tile:hover { transform: none; }
  .hm-feature:hover .hm-pic img { transform: none; }
}
