/* ============================================================
   גלריית עמוד - פסיפס (CSS Grid masonry) + lightbox - added 2026-06-22
   ============================================================ */
.nzm-page-gallery {
	padding: clamp(40px, 6vw, 90px) 0;
}
.nzm-page-gallery__container {
	width: min(1600px, 94vw);
	margin-inline: auto;
}
.nzm-page-gallery__title {
	text-align: center;
	font-size: clamp(26px, 3vw, 42px);
	font-weight: 500;
	line-height: 1.2;
	color: #0b0b0b;
	margin: 0 0 clamp(20px, 3vw, 40px);
}

/* פסיפס: Grid masonry - ממלא תמיד את כל הרוחב; הגבהים נקבעים ב-JS לפי יחס התמונה */
.nzm-page-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 8px;
	gap: 18px;
}
@media (max-width: 1024px) { .nzm-page-gallery__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (max-width: 560px)  { .nzm-page-gallery__grid { grid-template-columns: 1fr; } }

.nzm-page-gallery__item {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	border-radius: 12px;
	overflow: hidden;
	grid-row-end: span 34; /* fallback לפני שה-JS מחשב גובה מדויק */
}
.nzm-page-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.5s ease;
}
.nzm-page-gallery__item:hover .nzm-page-gallery__img,
.nzm-page-gallery__item:focus-visible .nzm-page-gallery__img {
	transform: scale(1.05);
}

/* ---- Lightbox ---- */
.nzm-glb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(8, 8, 8, 0.93);
}
.nzm-glb.is-open { display: flex; }
.nzm-glb__img {
	max-width: 90vw;
	max-height: 86vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
	user-select: none;
}
.nzm-glb__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 54px;
	height: 54px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}
.nzm-glb__btn:hover { background: rgba(255, 255, 255, 0.26); }
.nzm-glb__btn--right { right: 24px; }
.nzm-glb__btn--left { left: 24px; }
.nzm-glb__close {
	position: absolute;
	top: 22px;
	left: 22px;
	width: 46px;
	height: 46px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}
.nzm-glb__close:hover { background: rgba(255, 255, 255, 0.26); }
.nzm-glb__count {
	position: absolute;
	bottom: 22px;
	left: 0;
	right: 0;
	text-align: center;
	color: #fff;
	font-size: 15px;
	opacity: 0.85;
	letter-spacing: 1px;
}
@media (max-width: 640px) {
	.nzm-glb__btn { width: 44px; height: 44px; }
	.nzm-glb__btn--right { right: 10px; }
	.nzm-glb__btn--left { left: 10px; }
	.nzm-glb__img { max-width: 94vw; max-height: 80vh; }
}
body.nzm-glb-lock { overflow: hidden; }
