/* =========================================================
   Galeri - Modern Style (ala kartu Next.js)
   ========================================================= */

.glr-wrapper {
	--glr-primary: #00A2E7;
	--glr-primary-dark: #0078AD;
	--glr-bg: #f7fafc;
	--glr-text: #0f172a;
	--glr-muted: #64748b;
	--glr-border: #e5eaf0;
	--glr-cols: 4;

	max-width: 1200px;
	margin: 40px auto;
	padding: 0 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--glr-text);
	box-sizing: border-box;
}

.glr-wrapper *,
.glr-wrapper *::before,
.glr-wrapper *::after {
	box-sizing: border-box;
}

.glr-grid {
	display: grid;
	grid-template-columns: repeat(var(--glr-cols), 1fr);
	gap: 22px;
}

@media (max-width: 992px) {
	.glr-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 720px) {
	.glr-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}
}

@media (max-width: 440px) {
	.glr-grid {
		grid-template-columns: 1fr 1fr;
		gap: 10px;
	}
}

/* Filter tag */
.glr-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
}

.glr-filter-btn {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid var(--glr-border);
	background: #fff;
	color: var(--glr-muted);
	font-size: 13.5px;
	font-weight: 600;
	padding: 9px 18px;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.glr-filter-btn:hover {
	border-color: var(--glr-primary);
	color: var(--glr-primary-dark);
	transform: translateY(-1px);
}

.glr-filter-btn.is-active {
	background: var(--glr-primary);
	border-color: var(--glr-primary);
	color: #fff;
	box-shadow: 0 6px 16px rgba(0, 162, 231, 0.3);
}

/* Kartu foto */
.glr-item {
	margin: 0;
	background: #fff;
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid var(--glr-border);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
	cursor: pointer;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
	outline: none;
}

.glr-item:hover,
.glr-item:focus-visible {
	transform: translateY(-6px);
	box-shadow: 0 20px 40px -12px rgba(0, 162, 231, 0.28);
	border-color: rgba(0, 162, 231, 0.35);
}

.glr-item.glr-hidden {
	display: none;
}

.glr-img-box {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--glr-bg);
}

.glr-img-box img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.glr-item:hover .glr-img-box img,
.glr-item:focus-visible .glr-img-box img {
	transform: scale(1.08);
}

.glr-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 162, 231, 0) 40%, rgba(0, 30, 45, 0.55) 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.glr-item:hover .glr-overlay,
.glr-item:focus-visible .glr-overlay {
	opacity: 1;
}

.glr-zoom-icon {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--glr-primary-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	transform: scale(0.8);
	transition: transform 0.3s ease;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.glr-item:hover .glr-zoom-icon,
.glr-item:focus-visible .glr-zoom-icon {
	transform: scale(1);
}

.glr-caption {
	padding: 14px 16px;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--glr-text);
	line-height: 1.4;
	border-top: 1px solid var(--glr-border);
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.glr-caption-title {
	color: var(--glr-text);
}

.glr-caption-tags {
	font-size: 12px;
	font-weight: 600;
	color: var(--glr-primary-dark);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* =========================================================
   Lightbox
   ========================================================= */

.glr-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(6, 15, 24, 0.92);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	padding: 24px;
}

.glr-lightbox.glr-open {
	display: flex;
	animation: glrFade 0.25s ease;
}

@keyframes glrFade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.glr-lightbox-content {
	max-width: min(92vw, 1100px);
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.glr-lightbox-content img {
	max-width: 100%;
	max-height: 74vh;
	border-radius: 14px;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
	object-fit: contain;
	animation: glrZoomIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes glrZoomIn {
	from { opacity: 0; transform: scale(0.92); }
	to { opacity: 1; transform: scale(1); }
}

.glr-lightbox-caption {
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	max-width: 700px;
	padding: 8px 18px;
	border-radius: 999px;
	background: rgba(0, 162, 231, 0.18);
	border: 1px solid rgba(0, 162, 231, 0.4);
}

.glr-close,
.glr-nav {
	position: fixed;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.glr-close:hover,
.glr-nav:hover {
	background: var(--glr-primary);
	border-color: var(--glr-primary);
}

.glr-close {
	top: 22px;
	right: 24px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
}

.glr-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	border-radius: 50%;
	font-size: 30px;
	line-height: 1;
}

.glr-nav:hover {
	transform: translateY(-50%) scale(1.06);
}

.glr-prev {
	left: 20px;
}

.glr-next {
	right: 20px;
}

@media (max-width: 600px) {
	.glr-close {
		top: 12px;
		right: 12px;
		width: 38px;
		height: 38px;
		font-size: 22px;
	}
	.glr-nav {
		width: 42px;
		height: 42px;
		font-size: 24px;
	}
	.glr-prev {
		left: 8px;
	}
	.glr-next {
		right: 8px;
	}
}
