/* ==========================================================================
   אבי"ה — Lightbox (תצוגת תמונה מוגדלת)
   וניל JS מעל <dialog> נייטיב. פלטה קשיחה בהשראת chrome.css / משתני האתר.
   מונחים לוגיים (inset-inline-*) לתמיכת RTL.
   ========================================================================== */

/* התמונות הלחיצות מקבלות סימון "אפשר להגדיל" */
.slideshow .slide-img,
.content img{ cursor:zoom-in; }

/* ---- ה-dialog עצמו: מסך מלא על רקע teal כהה ---- */
.lb{
  position:fixed; inset:0;
  width:100%; height:100%; max-width:100%; max-height:100%;
  margin:0; padding:0; border:0;
  background:rgba(7,34,37,.94); color:#FAF6EC;
  overflow:hidden;
}
.lb::backdrop{ background:rgba(7,34,37,.94); }
.lb[open]{ display:flex; flex-direction:column; }

/* ---- במת התמונה ---- */
.lb-stage{
  position:relative; flex:1 1 auto; min-height:0;
  display:flex; align-items:center; justify-content:center;
  padding:clamp(56px,9vh,80px) clamp(56px,10vw,104px) 8px;
}
.lb-img{
  max-width:100%; max-height:100%; width:auto; height:auto;
  object-fit:contain; border-radius:6px;
  box-shadow:0 10px 44px rgba(0,0,0,.5);
}

/* ---- כיתוב + מונה ---- */
.lb-foot{
  flex:0 0 auto;
  padding:clamp(12px,2vh,20px) clamp(20px,4vw,56px) clamp(20px,3vh,34px);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  text-align:center;
}
.lb-caption{
  font-family:'Heebo',sans-serif;
  font-size:clamp(.95rem,1.6vw,1.15rem); line-height:1.5;
  color:#F2EAD8; max-width:70ch;
}
.lb-counter{
  font-family:'IBM Plex Mono',monospace; letter-spacing:.06em;
  font-size:.8rem; color:#F2C14E;
}

/* ---- כפתורים (סגירה + ניווט), יעד מגע ≥44px ---- */
.lb-btn{
  position:absolute; z-index:2; border:0; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  width:52px; height:52px; min-width:44px; min-height:44px;
  background:rgba(7,34,37,.55); color:#FAF6EC; border-radius:50%;
  line-height:1; transition:background .2s, color .2s, transform .2s;
}
.lb-btn:hover{ background:rgba(7,34,37,.9); color:#F2C14E; }
.lb-close{
  top:clamp(12px,2.5vh,20px); inset-inline-end:clamp(12px,3vw,24px);
  font-size:1.4rem;
}
.lb-nav{ top:50%; transform:translateY(-50%); font-size:2rem; }
.lb-nav:hover{ transform:translateY(-50%) scale(1.05); }
/* RTL: "הקודמת" (‹) בצד ההתחלה = ימין; "הבאה" (›) בצד הסוף = שמאל */
.lb-prev{ inset-inline-start:clamp(8px,2vw,20px); }
.lb-next{ inset-inline-end:clamp(8px,2vw,20px); }

/* קבוצה של תמונה בודדת — אין צורך בחצים */
.lb.is-single .lb-nav{ display:none; }

@media (max-width:767px){
  .lb-stage{ padding:clamp(56px,8vh,68px) 6px 6px; }
  .lb-nav{ width:44px; height:44px; font-size:1.7rem; background:rgba(7,34,37,.42); }
  .lb-prev{ inset-inline-start:4px; }
  .lb-next{ inset-inline-end:4px; }
}

/* אנימציה רק כשאין העדפת reduced-motion */
@media (prefers-reduced-motion:no-preference){
  .lb[open]{ animation:lb-fade .2s ease; }
  .lb[open] .lb-img{ animation:lb-zoom .2s ease; }
}
@keyframes lb-fade{ from{ opacity:0 } to{ opacity:1 } }
@keyframes lb-zoom{ from{ opacity:0; transform:scale(.97) } to{ opacity:1; transform:none } }
