#gallery-modal {
	display: none;
	position: fixed;
	z-index: 1;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: black;
	background-color: rgba(0, 0, 0, .5);
}

#gallery-content {
	position: relative;
	box-sizing: border-box;
	display: block;
	margin: auto;
	width: 84%;
	max-width: 1400px;
	margin-top: 10px;
	padding: 10px;
	left: -10px;
}

@media only screen and (max-width: 800px) {
	#gallery-content {
		width: 96%;
		margin-top: 40px;
	}
}

#gallery-content { 
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.2s;
    animation-name: zoom;
    animation-duration: 0.2s;
}

#gallery-display {
	display: block;
	width: 100%;
	height: 100%;
	padding: 10px;
	background-color: #EEE;
	border-radius: 6px;
	margin: 0px;
}

@-webkit-keyframes zoom {
    from {-webkit-transform:scale(0)} 
    to {-webkit-transform:scale(1)}
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

#gallery-close {
	float: right;
	margin-right: -10px;
	
	color: white;
	text-align: right;
	font-size: 40px;
	font-weight: bold;
}

#gallery-close:hover {
	cursor: pointer;
	color: #CCC;
}

.gallery-prev, .gallery-next {
	cursor: pointer;
	position: absolute;
	top: 50%;
	width: auto;
	padding: 16px;
	color: white;
	font-weight: bold;
	font-size: 20px;
	transition: .6s ease;
	border-radius: 0 3px 3px 0;
	background-color: rgba(0, 0, 0, 0.05);
	user-select: none;
	-webkit-user-select: none;
}

.gallery-prev {
	left: 20px;
}

.gallery-next {
	right: 0;
	border-radius: 3px 0 0 3px;
}

.gallery-prev:hover, .gallery-next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.gallery-container .content {
	padding-top: 20px;
	padding-bottom: 20px;
	letter-spacing: 0px;
}

.gallery-container a {
	text-decoration: none;
	margin: 0px;
	padding: 0px;
	box-sizing: border-box;
	width: 19%;
	width: calc(20% - 4px);
	padding: 8px;
	display: inline-block;
}

.gallery-container a img{
	width: 100%;
	margin: 0px;
	padding: 0px;
	border: 2px solid #ddd;
}

.gallery-container a img:hover {
	border-color: var(--link-color);
}

@media only screen and (max-width: 800px) {
	.gallery-container a {
		width: 24%;
		width: calc(25% - 4px);
		padding: 4px;
	}
}

@media only screen and (max-width: 520px) {
	.gallery-container a {
		width: 49%;
		width: calc(50% - 4px);
		padding: 4px;
	}
}