body {
	font-family: Arial, sans-serif;
	background-color: #d3d9e5;
	margin: 0;
	padding: 0;
}

h1 {
	text-align: center;
	margin-top: 20px;
	color: #333;
}

h3 {
	text-align: center;
	padding: 20px;
	color: #555;
}

.gallery {
	text-align: center;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 15px;
	padding: 20px;
	max-width: 1200px;
	margin: auto auto;
	align-items: center;
}


.gallery .thumb-container {
	height: 112px;
	border-radius: 10px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
	transition: transform 0.3s, box-shadow 0.3s;
	transform: scale(1.0);
	cursor: pointer;
	border: 3px solid #ccc;
	overflow: hidden;
}

.gallery .thumb-overlay {
	width: 100%;
	height: 33%;
	position: absolute;
	bottom: 0;
}

.gallery .thumb-container.has_photographer .thumb-overlay {
	background: linear-gradient(to bottom, rgba(200, 200, 200, 0), rgb(0, 187, 255));
}

.gallery .thumb-container.has_comments {
	border: 3px groove rgba(0,127,255,0.75);
}

.gallery .thumb-container:hover {
	transform: scale(1.05);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.9);
}

.gallery img {
	width: 100%;
	height: 112px;
	object-fit: cover;
}

.overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.8);
	display: none;
	justify-content: center;
	align-items: center;
	opacity: 0;
	transition: opacity 0.3s;
}

.overlay.show {
	opacity: 1;
}

.overlay .img-container {
	position: relative;
	display: inline-flex;
	top: -5%;
	max-width: 90%;
	max-height: 90%;
	width: auto;
	height: 100%;
	overflow: hidden;
	border-radius: 10px;
}

.overlay img {
	position: relative;
	border-radius: 10px;
	display: flex;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: scale-down;
}

.overlay .comment-btn {
	position: absolute;
	top: 10px;
	right: 10px;
	padding: 5px 10px;
	background-color: rgba(0,63,127,0.6);
	color: rgba(255,255,255,0.85);
	border: none;
	border-radius: 100%;
	cursor: pointer;
}

.close {
	position: absolute;
	top: 20px;
	right: 20px;
	font-size: 30px;
	color: white;
	text-decoration: none;
	cursor: default;
	background: rgb(255,64,64);
	display: block;
	width: 40px;
	height: 40px;
	text-align: center;
	border-radius: 8px;
}

.close:hover {
	background: rgb(255, 128, 128);
}

.download-container {
text-align: center;
position: absolute;
bottom: 3%;
}

.download-btn {
background-color: DodgerBlue;
color: white;
padding: 12px 30px;
text-decoration: none;
font-size: 20px;
border: none;
border-radius: 5px;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 10px;
transition: background-color 0.3s;
}

.download-btn:hover {
background-color: RoyalBlue;
}


.no-scroll {
	overflow: hidden;
	height: 100%;
}

.comment-container {
	position: absolute;
	background: rgba(255,255,255,0.85);
	color: rgb(0,32,64);
	width: 100%;
	height: 100%;
	border: none;
	border-radius: 10px;
	opacity: 0;
	transition: opacity 0.3s;
}

.comment-container.show {
	opacity: 1;
}

.comment-container div {
	padding: 42px 16px;
}

.photographer {
	position: absolute;
	bottom: 10px;
	left: 10px;
	padding: 10px 40px;
	background-color: rgba(0,63,127,0.6);
	color: rgba(255,255,255,0.85);
	border-radius: 5px;
	font-size: 14px;
	font-style: italic;
}

@keyframes nextImgAnimation {
	0% { transform: scale(0.5); opacity: 0; }
	25% { transform: scale(0.75); opacity: 0; }
	50% { transform: scale(0.9); opacity: 0.6; }
	100% { transform: scale(1); opacity: 1; }
}

.overlay.swipe-next .img-container {
	animation: nextImgAnimation 0.3s ease;
}

/* Custom styling for the gallery selector */
.selector-container {
	text-align: center;
	margin-bottom: 20px;
}

#gallery_selector {
	display: inline-block;
	padding: 10px 15px;
	font-size: 16px;
	border: 1px solid #ccc;
	border-radius: 5px;
	background-color: #fff;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#loading_icon {
	width: 12vw;
	/*height: 64px;*/
	/*
	border: 4px solid #ccc;
	border-top: 4px solid #333;
	border-radius: 50%;
	*/
	animation: spin 1s cubic-bezier(.54,.23,.27,.67) infinite;
	/*display: inline-block;*/
	vertical-align: middle;
	margin-left: 10px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}