/* =========================================================
   LIGHTBOX GALLERY — file terpisah (tidak menyentuh site.css)
   ========================================================= */

/* --- Item gallery yang bisa diklik --- */
.gallery-item { cursor: pointer; position: relative; }
.gallery-item:focus-visible { outline: 3px solid #19b6d8; outline-offset: 3px; }

.gallery-zoom {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #071d29;
	display: grid;
	place-items: center;
	opacity: 0;
	transform: scale(0.8);
	transition: opacity .3s ease, transform .3s ease;
	backdrop-filter: blur(6px);
	pointer-events: none;
	z-index: 2;
}
.gallery-item:hover .gallery-zoom,
.gallery-item:focus-visible .gallery-zoom {
	opacity: 1;
	transform: scale(1);
}

.gallery-placeholder {
	width: 100%;
	height: 100%;
	min-height: 220px;
	background: linear-gradient(145deg, #0b5368, #19b6d8);
}

/* --- Overlay Lightbox --- */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(4, 16, 24, 0.94);
	backdrop-filter: blur(12px);
	display: grid;
	grid-template-rows: auto 1fr auto auto;
	opacity: 0;
	visibility: hidden;
	transition: opacity .35s ease, visibility .35s ease;
}
.lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.lb-stage {
	display: grid;
	place-items: center;
	padding: 20px 90px;
	overflow: hidden;
	position: relative;
}
.lb-image {
	max-width: 100%;
	max-height: 100%;
	border-radius: 14px;
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
	opacity: 0;
	transform: scale(0.94);
	transition: opacity .4s ease, transform .4s ease;
	user-select: none;
	-webkit-user-drag: none;
}
.lightbox.is-ready .lb-image {
	opacity: 1;
	transform: scale(1);
}

.lb-footer {
	padding: 0 24px 12px;
	text-align: center;
	color: #fff;
}
.lb-counter {
	display: inline-block;
	font-size: .72rem;
	font-weight: 800;
	letter-spacing: .15em;
	color: #7fe5fb;
	margin-bottom: 6px;
}
.lb-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: #fff;
	margin: 0;
	letter-spacing: -0.01em;
}

/* --- Thumbnail strip --- */
.lb-thumbs {
	display: flex;
	gap: 8px;
	justify-content: center;
	padding: 14px 24px 24px;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
.lb-thumbs::-webkit-scrollbar { height: 6px; }
.lb-thumbs::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.25);
	border-radius: 999px;
}
.lb-thumb {
	flex-shrink: 0;
	width: 68px;
	height: 48px;
	border-radius: 8px;
	overflow: hidden;
	border: 2px solid transparent;
	padding: 0;
	cursor: pointer;
	background: none;
	opacity: 0.55;
	transition: opacity .2s ease, border-color .2s ease, transform .2s ease;
}
.lb-thumb:hover { opacity: 1; transform: translateY(-2px); }
.lb-thumb.is-active {
	opacity: 1;
	border-color: #19b6d8;
}
.lb-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --- Nav arrows --- */
.lb-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(5, 28, 40, 0.55);
	backdrop-filter: blur(10px);
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: background .25s ease, transform .25s ease, border-color .25s ease;
}
.lb-nav:hover {
	background: rgba(25, 182, 216, 0.9);
	border-color: transparent;
	color: #05212b;
	transform: translateY(-50%) scale(1.06);
}
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

/* --- Close button --- */
.lb-close {
	position: absolute;
	top: 20px;
	right: 20px;
	z-index: 3;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.25);
	background: rgba(5, 28, 40, 0.55);
	backdrop-filter: blur(10px);
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: background .25s ease, transform .25s ease;
}
.lb-close:hover {
	background: #e74c3c;
	border-color: transparent;
	transform: rotate(90deg);
}

body.lb-open { overflow: hidden; }

/* --- Responsive --- */
@media (max-width: 900px) {
	.lb-stage { padding: 20px 60px; }
	.lb-nav { width: 44px; height: 44px; }
	.lb-prev { left: 12px; }
	.lb-next { right: 12px; }
	.lb-close { top: 14px; right: 14px; width: 40px; height: 40px; }
}
@media (max-width: 620px) {
	.lb-stage { padding: 56px 12px 12px; }
	.lb-nav {
		top: auto;
		bottom: 92px;
		transform: none;
		width: 42px;
		height: 42px;
	}
	.lb-nav:hover { transform: scale(1.06); }
	.lb-prev { left: calc(50% - 52px); }
	.lb-next { right: calc(50% - 52px); }
	.lb-title { font-size: 0.95rem; }
	.lb-thumbs { padding: 10px 12px 16px; }
	.lb-thumb { width: 56px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
	.lightbox, .lb-image, .gallery-zoom { transition: none !important; }
}