/* Gallery enhancement — maisnk.go.th
   การ์ดกริดรูปสวยขึ้น + lightbox overlay (vanilla) */

/* ---- การ์ดรูปในอัลบั้ม ---- */
.portfolio-item .item {
	margin-bottom: 18px;
}
.portfolio-item .item > a {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
	background: #eef1f6;
}
.portfolio-item .item > a img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
	transition: transform .35s ease, filter .35s ease;
}
.portfolio-item .item > a:hover img {
	transform: scale(1.08);
	filter: brightness(.92);
}
.portfolio-item .item > a:after {
	content: "\f00e"; /* fa-search-plus (FA4.7) */
	font-family: FontAwesome;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(.6);
	color: #fff;
	font-size: 26px;
	opacity: 0;
	transition: .3s ease;
	text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}
.portfolio-item .item > a:hover:after {
	opacity: 1;
	transform: translate(-50%, -50%) scale(1);
}

/* ---- Lightbox overlay ---- */
.glb-overlay {
	display: none;
	position: fixed;
	z-index: 99999;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, .92);
}
.glb-stage {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 50px 60px;
}
.glb-img {
	max-width: 100%;
	max-height: 100%;
	box-shadow: 0 6px 30px rgba(0, 0, 0, .6);
	border-radius: 4px;
	animation: glbFade .3s ease;
}
@keyframes glbFade {
	from { opacity: 0; transform: scale(.96); }
	to   { opacity: 1; transform: scale(1); }
}
.glb-close {
	position: absolute;
	top: 14px; right: 24px;
	color: #fff;
	font-size: 42px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	opacity: .85;
	transition: .2s;
}
.glb-close:hover { opacity: 1; transform: rotate(90deg); }
.glb-play {
	position: absolute;
	top: 20px; right: 78px;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	opacity: .8;
	transition: .2s;
	user-select: none;
}
.glb-play:hover { opacity: 1; }
.glb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	color: #fff;
	font-size: 40px;
	cursor: pointer;
	padding: 10px 18px;
	user-select: none;
	opacity: .7;
	transition: .2s;
	z-index: 2;
}
.glb-nav:hover { opacity: 1; background: rgba(255, 255, 255, .12); border-radius: 6px; }
.glb-prev { left: 10px; }
.glb-next { right: 10px; }
.glb-counter {
	position: absolute;
	bottom: 18px;
	left: 0; right: 0;
	text-align: center;
	color: #fff;
	font-size: 15px;
	opacity: .85;
}

@media (max-width: 768px) {
	.portfolio-item .item > a img { height: 130px; }
	.glb-stage { padding: 40px 10px; }
	.glb-nav { font-size: 30px; padding: 8px 10px; }
	.glb-close { font-size: 34px; right: 16px; }
}
