/* Photo Fetcher — Pinterest-style masonry grid.
   Images keep their natural/original aspect ratio (no forced cropping).
   4 columns on desktop, 2 columns on mobile — fully theme-independent. */

.pfg-grid {
	column-count: 4;
	column-gap: 12px;
	margin: 20px 0;
	width: 100%;
}

.pfg-grid .pfg-item {
	display: inline-block;
	width: 100%;
	margin: 0 0 12px;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	border-radius: 6px;
	overflow: hidden;
	background: #f0f0f0;
	position: relative;
	cursor: zoom-in;
}

.pfg-grid .pfg-item img {
	width: 100%;
	height: auto;
	display: block;
	border: 0;
	margin: 0;
	padding: 0;
	max-width: 100%;
}

/* Small "expand" icon shown in the corner of each photo so visitors know
   it can be clicked to view full-screen. */
.pfg-zoom-icon {
	position: absolute;
	bottom: 8px;
	right: 8px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.85;
	transition: opacity 0.15s ease, transform 0.15s ease;
	pointer-events: none;
}

.pfg-grid .pfg-item:hover .pfg-zoom-icon {
	opacity: 1;
	transform: scale(1.1);
}

/* Full-screen lightbox */
.pfg-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 999999;
	padding: 40px;
}

.pfg-lightbox-overlay.pfg-lightbox-active {
	display: flex;
}

.pfg-lightbox-img {
	max-width: 90vw;
	max-height: 85vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.pfg-lightbox-close,
.pfg-lightbox-prev,
.pfg-lightbox-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease;
}

.pfg-lightbox-close:hover,
.pfg-lightbox-prev:hover,
.pfg-lightbox-next:hover {
	background: rgba(255, 255, 255, 0.25);
}

.pfg-lightbox-close {
	top: 20px;
	right: 20px;
	width: 44px;
	height: 44px;
	font-size: 24px;
	line-height: 1;
}

.pfg-lightbox-prev,
.pfg-lightbox-next {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	font-size: 20px;
}

.pfg-lightbox-prev {
	left: 20px;
}

.pfg-lightbox-next {
	right: 20px;
}

.pfg-lightbox-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 13px;
	background: rgba(255, 255, 255, 0.12);
	padding: 4px 14px;
	border-radius: 12px;
}

@media (max-width: 600px) {
	.pfg-lightbox-prev,
	.pfg-lightbox-next {
		width: 40px;
		height: 40px;
		font-size: 16px;
	}
	.pfg-lightbox-close {
		width: 36px;
		height: 36px;
		font-size: 20px;
	}
	.pfg-lightbox-overlay {
		padding: 10px;
	}
}

@media (max-width: 782px) {
	.pfg-grid {
		column-count: 2;
		column-gap: 8px;
	}
	.pfg-grid .pfg-item {
		margin-bottom: 8px;
	}
}
