/* Masonry photo gallery ([jp_gallery]) ------------------------- */

.jp-gallery__grid {
	column-count: 4;
	column-gap: 14px;
}

@media (max-width: 1100px) {
	.jp-gallery__grid { column-count: 3; }
}

@media (max-width: 780px) {
	.jp-gallery__grid { column-count: 2; }
}

@media (max-width: 480px) {
	.jp-gallery__grid { column-count: 2; column-gap: 10px; }
}

.jp-gallery__item {
	break-inside: avoid;
	margin: 0 0 14px;
	padding: 0;
	/* keeps a column from splitting an image across the gap in WebKit */
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
}

.jp-gallery__item.is-hidden {
	display: none;
}

.jp-gallery__open {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	border-radius: 8px;
	overflow: hidden;
	line-height: 0;
}

.jp-gallery__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.jp-gallery__open:hover .jp-gallery__img,
.jp-gallery__open:focus-visible .jp-gallery__img {
	transform: scale(1.03);
	box-shadow: 0 10px 30px rgba(16, 37, 44, 0.35);
}

.jp-gallery__open:focus-visible {
	outline: 3px solid #E6BA54;
	outline-offset: 3px;
}

/* Load more ---------------------------------------------------- */

.jp-gallery__actions {
	text-align: center;
	margin-top: 26px;
}

.jp-gallery__more {
	display: inline-block;
	padding: 12px 28px;
	border: 0;
	border-radius: 10px;
	color: #fff;
	font-weight: 700;
	font-size: 16px;
	cursor: pointer;
	background: linear-gradient(90deg, #007934 0%, #3dae2b 100%);
	transition: background 0.3s ease, transform 0.15s ease;
}

.jp-gallery__more:hover {
	background: linear-gradient(90deg, #3dae2b 0%, #007934 100%);
}

.jp-gallery__more:active {
	transform: translateY(1px);
}

.jp-gallery__count {
	font-weight: 400;
	opacity: 0.85;
}

/* Lightbox ----------------------------------------------------- */

.jp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(16, 37, 44, 0.94);
	padding: 4vh 4vw;
}

.jp-lightbox[hidden] {
	display: none;
}

.jp-lightbox__img {
	max-width: 100%;
	max-height: 92vh;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.jp-lightbox button {
	position: absolute;
	border: 0;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	font-size: 26px;
	line-height: 1;
	transition: background 0.2s ease;
}

.jp-lightbox button:hover {
	background: rgba(255, 255, 255, 0.28);
}

.jp-lightbox__close { top: 18px; right: 18px; }
.jp-lightbox__prev  { left: 18px;  top: 50%; transform: translateY(-50%); }
.jp-lightbox__next  { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
	.jp-lightbox__prev { left: 8px; }
	.jp-lightbox__next { right: 8px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	.jp-gallery__img,
	.jp-gallery__more {
		transition: none;
	}
	.jp-gallery__open:hover .jp-gallery__img {
		transform: none;
	}
}
