.pge-projects-grid {
	display: grid;
	grid-template-columns: repeat(var(--pge-columns, 3), minmax(0, 1fr));
	gap: 28px;
}

.pge-project-card,
.pge-project-card h3,
.pge-gallery figure {
	margin: 0;
}

.pge-project-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.pge-project-image {
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.pge-project-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease;
}

.pge-project-card:hover .pge-project-image img { transform: scale(1.03); }
.pge-project-content { padding: 14px 0 0; }
.pge-project-content h3 { font-size: 20px; line-height: 1.25; }
.pge-project-meta { margin-top: 6px; color: #6b7280; font-size: 14px; }
.pge-project-categories { margin-top: 8px; color: #4b5563; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }

.pge-gallery--grid {
	display: grid;
	grid-template-columns: repeat(var(--pge-gallery-columns, 3), minmax(0, 1fr));
	column-gap: var(--pge-gallery-gap-x, 20px);
	row-gap: var(--pge-gallery-gap-y, 20px);
}

.pge-gallery--masonry {
	columns: var(--pge-gallery-columns, 3);
	column-gap: var(--pge-gallery-gap-x, 20px) !important;
}

.pge-gallery-item {
	box-sizing: border-box;
	margin: 0;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	overflow: hidden;
}

.pge-gallery.pge-gallery--masonry > figure.pge-gallery-item {
	display: inline-block;
	vertical-align: top;
	width: 100%;
	margin: 0 0 var(--pge-gallery-gap-y, 20px) !important;
	padding: 0 !important;
}

.pge-gallery-item a,
.pge-gallery-item img {
	display: block;
	width: 100%;
}

.pge-gallery-item img {
	height: auto;
	max-width: 100%;
	object-fit: contain;
}

.pge-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 48px 76px;
	background: rgba(0, 0, 0, .94);
}

.pge-lightbox.is-open { display: flex; }
.pge-lightbox__stage { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; }
.pge-lightbox__image { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 125px); object-fit: contain; transition: opacity .15s ease; }
.pge-lightbox__image.is-loading { opacity: .35; }
.pge-lightbox__caption { min-height: 22px; margin-top: 12px; color: #fff; font-size: 14px; text-align: center; }
.pge-lightbox__counter { position: absolute; top: 20px; left: 24px; color: #fff; font-size: 14px; }
.pge-lightbox__close,
.pge-lightbox__prev,
.pge-lightbox__next {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	color: #fff;
	background: rgba(255, 255, 255, .08);
	cursor: pointer;
	transition: background .2s ease;
}
.pge-lightbox__close:hover,
.pge-lightbox__prev:hover,
.pge-lightbox__next:hover { background: rgba(255, 255, 255, .2); }
.pge-lightbox__close { top: 14px; right: 18px; width: 44px; height: 44px; border-radius: 50%; font-size: 34px; line-height: 1; }
.pge-lightbox__prev,
.pge-lightbox__next { top: 50%; width: 48px; height: 70px; transform: translateY(-50%); border-radius: 5px; font-size: 42px; }
.pge-lightbox__prev { left: 15px; }
.pge-lightbox__next { right: 15px; }
.pge-lightbox-open { overflow: hidden; }

@media (max-width: 767px) {
	.pge-projects-grid,
	.pge-gallery--grid { grid-template-columns: 1fr; }
	.pge-gallery--masonry { columns: 1; }
	.pge-lightbox { padding: 58px 12px 48px; }
	.pge-lightbox__prev,
	.pge-lightbox__next { top: auto; bottom: 12px; width: 48px; height: 48px; transform: none; }
	.pge-lightbox__prev { left: calc(50% - 58px); }
	.pge-lightbox__next { right: calc(50% - 58px); }
	.pge-lightbox__image { max-height: calc(100vh - 150px); }
}

@media (min-width: 768px) and (max-width: 1024px) {
	.pge-gallery--masonry { columns: var(--pge-gallery-tablet-columns, 2); }
}
