.catdex-gallery {
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
	padding: 40px;
	background-position: right top;
	background-repeat: repeat-y;
	width: 100%;
}

.catdex-title {
	width: 100%;
}
.catdex-title img {
	width: 400px;
}

.catdex-photo {
	--rotation: 0deg;
	--vertical-offset: 0px;
	
	display: inline-block;
	cursor: pointer;
	
	transform: rotate(var(--rotation));
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding-top: var(--vertical-offset);
	width: 300px;
	height: 367px;
	position: relative;
}
.catdex-filler {
	display: inline-block;
	flex: 1;
}

.catdex-photo img {
	width: 99%;
	height: auto;
	display: block;
}

.catdex-photo div.shown {
	display: inline-block;
	padding: 15px;
	position: absolute;
	inset: 0;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	color: #ffffff;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	background: rgba(0, 0, 0, 0.8);
}

.catdex-photo div.hidden {
	display: none;
}

.catdex-label {
	font-weight: bold;
	color: #87cefa;
}

@keyframes jiggle {
	0%   { transform: rotate(var(--rotation)); }
	33%  { transform: rotate(calc(var(--rotation) + 2deg)); }
	67%  { transform: rotate(calc(var(--rotation) - 2deg)); }
	100% { transform: rotate(var(--rotation)); }
}

.catdex-photo:hover {
	z-index: 10;
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
	animation: jiggle 0.3s ease-in-out alternate;
}