/* ============================================================
   Lightbox cho ảnh trong bài viết / gallery dự án
   Tiền tố .ghl-lb
   ============================================================ */

/* Con trỏ phóng to cho ảnh có thể mở lightbox */
.ghl-lb-trigger { cursor: zoom-in; }

.ghl-lb {
	position: fixed;
	inset: 0;
	z-index: 100000; /* trên cả #wpadminbar */
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 4vw, 48px);
	background: rgba(10, 24, 21, .92);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}
.ghl-lb.is-open { opacity: 1; visibility: visible; }

.ghl-lb__stage {
	position: relative;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}
.ghl-lb__img {
	display: block;
	max-width: 100%;
	max-height: 82vh;
	width: auto;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
	background: #0f2f2b;
	transition: opacity .2s ease;
}
.ghl-lb.is-loading .ghl-lb__img { opacity: .3; }

.ghl-lb__caption {
	max-width: 80ch;
	margin: 0;
	color: #f3e9cf;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.ghl-lb .ghl-lb__btn {
	position: absolute;
	z-index: 2;
	box-sizing: border-box;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 48px;
	min-width: 48px;
	max-width: 48px;
	height: 48px;
	min-height: 48px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: rgba(243, 233, 207, .12);
	color: #f3e9cf;
	font-size: 0;
	line-height: 0;
	box-shadow: none;
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}
.ghl-lb .ghl-lb__btn:hover { background: rgba(212, 175, 90, .9); color: #123833; }
.ghl-lb .ghl-lb__icon {
	display: block;
	width: 22px;
	height: 22px;
	top: auto; /* huỷ '.button i{top:-1.5px}' của Flatsome nếu áp vào */
}
.ghl-lb__btn:focus-visible { outline: 2px solid #d4af5a; outline-offset: 2px; }

.ghl-lb__close { top: clamp(8px, 2vw, 20px); right: clamp(8px, 2vw, 20px); }
.ghl-lb__nav { top: 50%; transform: translateY(-50%); }
.ghl-lb__nav:hover { transform: translateY(-50%) scale(1.05); }
.ghl-lb__prev { left: clamp(4px, 2vw, 20px); }
.ghl-lb__next { right: clamp(4px, 2vw, 20px); }

.ghl-lb__count {
	position: absolute;
	top: clamp(8px, 2vw, 20px);
	left: clamp(8px, 2vw, 20px);
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(10, 24, 21, .6);
	color: #f3e9cf;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .5px;
}

/* Khi chỉ có 1 ảnh thì ẩn nút điều hướng + bộ đếm */
.ghl-lb--single .ghl-lb__nav,
.ghl-lb--single .ghl-lb__count { display: none; }

@media (prefers-reduced-motion: reduce) {
	.ghl-lb,
	.ghl-lb__img,
	.ghl-lb__btn { transition: none; }
}
