
/* Shared gallery layout */
.convexum-gallery-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 20px auto;
	max-width: 1200px;
}

/* Index page thumbnails */
.convexum-gallery-thumb {
	position: relative;
	overflow: hidden;
	text-decoration: none;
	border-radius: 6px;
	flex: 1 1 220px;
	max-width: 300px;
}

.thumb-container {
	position: relative;
}

.thumb-container img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	border: 2px solid #ccc;
	transition: transform 0.3s, border-color 0.3s;
}

.thumb-container:hover img {
	transform: scale(1.05);
	border-color: #980101;
}

.thumb-caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.6);
	color: #eee;
	padding: 8px;
	text-align: center;
	font-weight: bold;
	font-size: 1.1em;
	text-transform: capitalize;
}

/* Gallery images on show.php */
.gallery-img {
	width: 240px;
	height: 180px;
	object-fit: cover;
	border-radius: 4px;
	cursor: pointer;
	border: 2px solid #ccc;
	transition: transform 0.3s, border-color 0.3s;
}

.gallery-img:hover {
	transform: scale(1.05);
	border-color: #980101;
}

/* Lightbox */
#lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.95);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 9999;
}

#lightbox.hidden {
	display: none;
}

#lightbox img {
	max-width: 90%;
	max-height: 90%;
	border-radius: 8px;
	box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

body.noscroll {
  overflow: hidden;
  height: 100vh;
  touch-action: none;
}

/* Next/previous navigation */

.nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(152, 1, 1, 0.6);
	color: #fff;
	font-size: 2em;
	border: none;
	padding: 0.4em 0.8em;
	cursor: pointer;
	border-radius: 50%;
	user-select: none;
	z-index: 9999;
	/* Keep the nav arrows visually above the left/right zones even though they should be invisible */

}

.nav-btn:hover {
	background: rgba(152, 1, 1, 0.8);
}

#prevBtn {
	left: 20px;
}

#nextBtn {
	right: 20px;
}

/* v1.5 — Expand click areas for prev/next */
#lightboxLeftZone,
#lightboxRightZone {
	position: fixed;
	top: 0;
	bottom: 0;
	width: 33.33%;
	/* one-third each */
	z-index: 9998;
	cursor: pointer;
	background: transparent;
	/* invisible */
}

#lightboxLeftZone {
	left: 0;
}

#lightboxRightZone {
	right: 0;
}


/* Close button */
.close-btn {
	position: fixed;
	top: 0px;
	/*fix at right, using MARGIN instead to indent it, as it makes the clickable area bigger/easier*/
	right: 0px;
	/*fix at right, using MARGIN instead to indent it, as it makes the clickable area bigger/easier*/
	background: rgba(152, 1, 1, 0.7);
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	margin: 50px 50px 70px 70px;
	cursor: pointer;
	z-index: 10001;
	transition: background 0.2s;
}

.close-btn:hover,
.close-btn:focus {
	background: rgba(152, 1, 1, 0.9);
}



/* Responsiveness */
@media (max-width: 600px) {
	.gallery-img {
		width: 46%;
		height: 140px;
	}

	.convexum-gallery-thumb {
		flex: 1 1 45%;
		max-width: 45%;
	}
}

/* v1.1 — Lightbox caption + swipe hint */

#lightboxContent {
	text-align: center;
	color: #eee;
}

#lightboxCaption {
	margin-top: 10px;
	font-size: 1rem;
	font-style: italic;
	color: #ccc;
	display: none;
	/* hidden by default — toggle to `block` to show filenames */
}

/* v1.3 — Swipe hint fade-in animation */

/* Lightbox image fade-in animation */
@keyframes fadeInImage {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

#lightbox {
	animation: fadeInImage 1.25s ease;
}

@keyframes fadeInHint {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

	to {
		opacity: 0.85;
		transform: translateY(0);
	}
}

#swipeHint {
	display: none;
	position: fixed;
	/* fixed to viewport */
	bottom: 40px;
	/* distance from bottom */
	left: 50%;
	transform: translateX(-50%);
	text-align: center;
	font-size: 2rem;
	color: #bbb;
	opacity: 0.85;
	animation: fadeInHint 0.6s ease forwards;
	z-index: 10000;
	/* sits above everything */
}

/* The fade-in only runs when JS sets display:inline-block */