/* פס התמונות של כל סוויטה (מחליקים באצבע) ותצוגת התמונה המלאה */

.gallery { margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.gallery__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.9rem; }
.gallery__label { color: var(--on, var(--ink-soft)); font-size: 1rem; }
.gallery__arrows { display: none; gap: 0.5rem; flex: none; }
.gallery__arrow {
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  line-height: 1; cursor: pointer;
}
.gallery__arrow:hover { background: var(--night); color: var(--cream); border-color: var(--night); }

.gallery__strip {
  list-style: none; margin: 0;
  display: flex; gap: 0.75rem;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding-block: 0.25rem 1rem;
  padding-inline: max(clamp(1.25rem, 5vw, 4rem), calc((100vw - 76rem) / 2 + 4rem));
  scroll-padding-inline: max(clamp(1.25rem, 5vw, 4rem), calc((100vw - 76rem) / 2 + 4rem));
  scrollbar-width: thin; scrollbar-color: var(--oak) transparent;
  -webkit-overflow-scrolling: touch;
}
.gallery__strip li { flex: none; width: min(74vw, 21rem); scroll-snap-align: start; }
.gallery__item {
  display: block; width: 100%; padding: 0; border: 0; background: var(--sand);
  border-radius: 12px; overflow: hidden; cursor: zoom-in;
}
.gallery__item img {
  width: 100%; height: auto; aspect-ratio: 1000 / 650; object-fit: cover;
  transition: transform 400ms cubic-bezier(0.23, 1, 0.32, 1);
}
.gallery__item:hover img { transform: scale(1.04); }

@media (min-width: 861px) and (hover: hover) {
  .gallery__arrows { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery__strip { scroll-behavior: auto; }
  .gallery__item img { transition: none; }
}

/* ---------------------------------------------------- תצוגה מלאה */
.lightbox {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgb(10 14 24 / 0.96); color: var(--cream);
}
.lightbox::backdrop { background: rgb(10 14 24 / 0.6); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox__figure { display: grid; gap: 0.75rem; justify-items: center; width: 100%; padding: 4.5rem 1rem 1.5rem; touch-action: pan-y; }
.lightbox__img { max-width: min(100%, 1000px); max-height: calc(100dvh - 9rem); width: auto; height: auto; border-radius: 10px; object-fit: contain; }
.lightbox__caption { text-align: center; font-size: 1rem; color: #e9e1d2; max-width: 40ch; }
.lightbox__count { display: inline-block; margin-inline-start: 0.5rem; opacity: 0.75; font-variant-numeric: tabular-nums; }
.lightbox__close, .lightbox__nav {
  position: absolute; width: 3rem; height: 3rem; border-radius: 50%;
  border: 1.5px solid rgb(246 240 230 / 0.6); background: rgb(10 14 24 / 0.55); color: var(--cream);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.lightbox__close { top: calc(0.9rem + env(safe-area-inset-top)); inset-inline-end: 0.9rem; font-size: 1.8rem; }
.lightbox__nav { top: 50%; translate: 0 -50%; }
.lightbox__nav--prev { inset-inline-start: 0.75rem; }
.lightbox__nav--next { inset-inline-end: 0.75rem; }
@media (max-width: 600px) {
  .lightbox__nav { top: auto; bottom: calc(1rem + env(safe-area-inset-bottom)); translate: none; }
  .lightbox__figure { padding-bottom: 5rem; }
  .lightbox__img { max-height: calc(100dvh - 12rem); }
}

/* אייקונים בכפתורים העגולים */
.gallery__arrow, .lightbox__close, .lightbox__nav { display: inline-grid; place-items: center; }
.lightbox__close .icon { width: 1.4rem; height: 1.4rem; }

/* במחשב: הפס נשאר בתוך רוחב התוכן, מיושר לתמונה הגדולה משני הצדדים,
   והתמונות נעלמות ברכות בקצוות במקום להיחתך */
@media (min-width: 861px) {
  .gallery__strip {
    max-width: 76rem; margin-inline: auto;
    padding-inline: clamp(1.25rem, 5vw, 4rem);
    scroll-padding-inline: clamp(1.25rem, 5vw, 4rem);
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 clamp(1.25rem, 5vw, 4rem), #000 calc(100% - clamp(1.25rem, 5vw, 4rem)), transparent 100%);
    mask-image: linear-gradient(to left, transparent 0, #000 clamp(1.25rem, 5vw, 4rem), #000 calc(100% - clamp(1.25rem, 5vw, 4rem)), transparent 100%);
  }
  .gallery__strip li { width: calc((min(100vw, 76rem) - 2 * clamp(1.25rem, 5vw, 4rem) - 2 * 0.75rem) / 3); }
}

/* התמונה הראשונה בפס זהה לתמונה הגדולה של הסוויטה, אז לא מציגים אותה פעמיים.
   היא עדיין נפתחת בתצוגה המלאה כתמונה 1. */
.gallery__strip li:first-child { display: none; }
