@keyframes overlay {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

.controls {
	margin-bottom: 1.5rem;
	display: flex;
	flex-flow: row nowrap;
	justify-content: space-between;
	align-items: flex-start;
}

.filterContainer {
	display: flex;
	flex-flow: row wrap;
	align-items: flex-start;
	gap: .75rem;
}

.filterItem {
	border: solid 2px black;
	padding: 11px 15px 9px;
	background-color: white;
	display: block;
	text-transform: uppercase;
	transition: 0.5s;
}

.filterItem:hover {
	color: white;
	background-color: black;
	transition: 0.5s;
	cursor: pointer;
}

.active {
	color: white;
	background-color: black;
}

.zoomContainer {
	display: flex;
	flex-flow: row wrap;
	align-items: flex-start;
	gap: .75rem;
}

.zoomItem {
	display: block;
	width: 48px;
	text-align: center;
}

.worksContainer {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: .75rem;
	row-gap: 9px;
}

.zoomIn {
	grid-template-columns: repeat(1, 1fr);
}
.zoomOut {
	grid-template-columns: repeat(5, 1fr);
}

.worksItem {
	width: 100%;
}

.worksCaption {
	margin-top: 9px;
	padding-right: 1.5rem;
	font-size: 0.75rem;
	letter-spacing: 0.2px;
}

.overlayWrapper {
	position: relative;
	background-color: black;
}

.placeholder > img, .placeholder > source {
    opacity: 0;
	transition: 0.5s;
}

.placeholder > img.loaded, .placeholder > source.loaded {
    opacity: 1;
	transition: 0.5s;
}

.overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: black;
	mix-blend-mode: multiply;
}

.scrollToTop {
	position: fixed;
	z-index: 5;
	left: 6rem;
	bottom: -50vh;
	border: solid 2px black;
	padding: 11px 15px 9px;
	background-color: white;
	cursor: pointer;
	transition: 0.5s;
}

.scrollToTop:hover {
	color: white;
	background-color: black;
	transition: 0.5s;
}

@media (prefers-reduced-motion: no-preference) {
	.in-view {
		animation: overlay 0.3s ease-in-out 0.2s both;
	}
  
	.not-in-view {
		opacity: 1;
	}
}

/* ----------------------------------------------------------------------------------------------------
RESPONSIVE BEHAVIOR
---------------------------------------------------------------------------------------------------- */

@media (max-width: 1400px) {
	.zoomOut {
		grid-template-columns: repeat(4, 1fr);
	}
}

@media (max-width: 1200px) {
	.scrollToTop {
		left: 3rem;
	}
}

@media (max-width: 1050px) {
	.scrollToTop {
		left: 1.5rem;
	}
}

@media (max-width: 900px) {
	.worksContainer {
		grid-template-columns: repeat(2, 1fr);
	}
	.zoomIn {
		grid-template-columns: repeat(1, 1fr);
	}
	.zoomOut {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.filterContainer,
	.zoomContainer {
		flex-direction: column;
	}
}

@media (max-width: 450px) {
	.zoomItem {
		width: 45px;
	}
}