/* The work below, CSSBox, is released under the Creative Commons
	 Attribution-ShareAlike 4.0 license and is available on
	 https://github.com/TheLastProject/CSSBox. You are not required to add
	 additional credit to your website, just leave the above text in this file */
.gallery div.cssbox {
	display: inline-block;
}
.gallery span.cssbox_full {
	z-index: 999;
	position: fixed;
	height: 100%;
	width: 100%;
	background-color: rgba(0,0,0,0.8);
	top: 0;
	left: 0;
	opacity: 0;
	pointer-events: none;
	cursor: default;
	transition: opacity 0.5s linear;
}
.gallery span.cssbox_full img {
	position: fixed;
	background-color: white;
	margin: 0;
	padding: 0;
	max-height: 90%;
	max-width: 90%;
	top: 50%;
	left: 50%;
	margin-right: -50%;
	transform: translate(-50%, -50%);
	box-shadow: 0 0 20px black;
}
.gallery a.cssbox_close,
.gallery a.cssbox_prev,
.gallery a.cssbox_next {
	z-index: 999;
	position: fixed;
	text-decoration: none;
	visibility: hidden;
	color: #fff;
	text-shadow: 0px 0px 5px #000;
	font-size: 36px;
}
.gallery a.cssbox_close:hover,
.gallery a.cssbox_prev:hover,
.gallery a.cssbox_next:hover {
	color: #000;
	text-shadow: 0px 0px 5px #fff;
}
.gallery a.cssbox_close {
	top: 1%;
	right: 1%
}
.gallery.lightbox a.cssbox_close {
	width: 50px;
	height: 50px;
	text-align: right;
}
.gallery a.cssbox_close::after {
	content: '\00d7';
}
.gallery a.cssbox_prev,
.gallery a.cssbox_next {
	top: 50%;
	transform: translate(0%, -50%);
}
.gallery a.cssbox_prev {
	left: 5%;
}
.gallery a.cssbox_next {
	right: 5%;
}
.gallery a:target ~ a.cssbox_close,
.gallery a:target ~ a.cssbox_prev,
.gallery a:target ~ a.cssbox_next {
	visibility: visible;
}
.gallery a:target > img.cssbox_thumb + span.cssbox_full {
	visibility: visible;
	opacity: 1;
	pointer-events: initial;
}
.gallery a:target > .wrap + span.cssbox_full {
	visibility: visible;
	opacity: 1;
	pointer-events: initial;
}
/* This is the end of CSSBox */

#content .gallery {
	display: flex;
	flex-wrap: wrap;
	margin-right: -5px;
	margin-left: -5px;
}
#content .gallery .cssbox > a { margin: 0 5px; }
#content .gallery img.cssbox_thumb {
	width: 96px;
	height: 96px;
	object-fit: cover;
	transition: all .2s ease;
}
#content .gallery.lightbox img.cssbox_thumb {
	width: initial;
	height: initial;
	object-fit: contain;
}
#content .gallery img.cssbox_thumb:hover { transform: scale(1.04); }
#content .gallery.lightbox img.cssbox_thumb:hover { transform: scale(1.01); }
#content .gallery .cssbox_full h1 {
	position: fixed;
	top: 10px;
	left: 0;
	width: 100%;
	margin: 0 10px;
	padding: 0;
	text-align: center;
	color: white;
}
#content .gallery .cssbox_full figcaption {
	visibility: hidden;
	position: fixed;
	bottom: 20px;
	left: 0;
	width: 100%;
	margin: 0;
	padding: 0;
	background-color: rgba(0,0,0,0.8);
	text-align: center;
	font-style: normal;
}
#content .gallery .cssbox_full:hover figcaption {
	visibility: visible;
}
#content .gallery .cssbox_full figcaption p {
	margin: 0;
	color: white;
}
#content figcaption {
	padding: 0 10px 10px 10px;
}
#content figure.lightbox div.cssbox,
#content figure.lightbox div.cssbox a:first-child,
#content figure.lightbox div.cssbox a div.wrap {
	display: contents;
}
#content figure:not(.textflow).left.w100 figcaption,
#content figure:not(.textflow).left.w100 img   { grid-column: 1 / span 8; }
#content figure:not(.textflow).left.w75 figcaption,
#content figure:not(.textflow).left.w75 img    { grid-column: 1 / span 6; }
#content figure:not(.textflow).left.w50 figcaption,
#content figure:not(.textflow).left.w50 img    { grid-column: 1 / span 4; }
#content figure:not(.textflow).left.w25 figcaption,
#content figure:not(.textflow).left.w25 img    { grid-column: 1 / span 2; }
#content figure:not(.textflow).left.w12½ figcaption,
#content figure:not(.textflow).left.w12½ img   { grid-column: 1 / span 1; }
#content figure:not(.textflow).center.w100 figcaption,
#content figure:not(.textflow).center.w100 img { grid-column: 1 / span 8; justify-self: center; }
#content figure:not(.textflow).center.w75 figcaption,
#content figure:not(.textflow).center.w75 img  { grid-column: 2 / span 6; }
#content figure:not(.textflow).center.w50 figcaption,
#content figure:not(.textflow).center.w50 img  { grid-column: 3 / span 4; }
#content figure:not(.textflow).center.w25 figcaption,
#content figure:not(.textflow).center.w25 img  { grid-column: 4 / span 2; }
#content figure:not(.textflow).center.w12½ figcaption,
#content figure:not(.textflow).center.w12½ img { grid-column: 4 / span 1; }
#content figure:not(.textflow).right.w100 figcaption,
#content figure:not(.textflow).right.w100 img  { grid-column: 1 / span 8; justify-self: end; }
#content figure:not(.textflow).right.w75 figcaption,
#content figure:not(.textflow).right.w75 img   { grid-column: 3 / span 6; }
#content figure:not(.textflow).right.w50 figcaption,
#content figure:not(.textflow).right.w50 img   { grid-column: 5 / span 4; }
#content figure:not(.textflow).right.w25 figcaption,
#content figure:not(.textflow).right.w25 img   { grid-column: 7 / span 2; }
#content figure:not(.textflow).right.w12½ figcaption,
#content figure:not(.textflow).right.w12½ img  { grid-column: 8 / span 1; }
