.references-gallery {
	padding: 51px 0 56px;
	background: #dedee0;
}

.references-gallery__container {
	padding-inline: 16px;
}

.references-filter {
	position: relative;
	z-index: 3;
	margin-bottom: 24px;
}

.references-filter__toggle {
	display: flex;
	width: 100%;
	height: 50px;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 8px 18px;
	border: 1px solid var(--gray-600);
	background: transparent;
	cursor: pointer;
}

.references-filter__menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	display: grid;
	width: 100%;
	border: 1px solid var(--gray-400);
	background: var(--gray-white);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.references-filter__menu[hidden] {
	display: none;
}

.references-filter__option {
	display: block;
	color: inherit;
	text-decoration: none;
	padding: 11px 18px;
	border: 0;
	border-bottom: 1px solid var(--gray-200);
	background: transparent;
	text-align: left;
	cursor: pointer;
}

.references-filter__option:last-child {
	border-bottom: 0;
}

.references-filter__option:hover,
.references-filter__option:focus-visible,
.references-filter__option.is-active {
	color: var(--gray-white);
	background: var(--gray-900);
}

.references-gallery__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
}

.references-gallery__item,
.references-gallery__item picture,
.references-gallery__item img {
	display: block;
	width: 100%;
}

.references-gallery__item picture {
	position: absolute;
	inset: 0;
	height: 100%;
}

.references-gallery__item[hidden] {
	display: none;
}

.references-gallery__item {
	position: relative;
	height: calc(64.516vw - 20.645px);
	aspect-ratio: 1.55 / 1;
	overflow: hidden;
	background: var(--gray-200);
}

.references-gallery__item img {
	height: 100%;
	object-fit: cover;
	transition: transform 200ms ease;
}

.references-gallery__more {
	display: flex;
	min-width: 126px;
	height: 42px;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 24px auto 0;
	padding: 6px 20px;
	border: 1px solid var(--gray-600);
	background: transparent;
	cursor: pointer;
}

.references-gallery__more[hidden] {
	display: none;
}

.references-gallery__empty {
	margin: 0;
	text-align: center;
}

@media (hover: hover) {
	.references-gallery__item:hover img {
		transform: scale(1.025);
	}
}

@media (min-width: 768px) {
	.references-gallery {
		padding: 51px 0 100px;
	}

	.references-gallery__container {
		max-width: 1392px;
		padding-inline: 20px;
	}

	.references-filter {
		width: 216px;
		margin-bottom: 48px;
	}

	.references-gallery__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
	}

	.references-gallery__item {
		height: calc(22.222vw - 19.556px);
		aspect-ratio: 1.5 / 1;
	}

	.references-gallery__more {
		margin-top: 48px;
	}
}

@media (min-width: 1440px) {
	.references-gallery__container {
		padding-inline: 0;
	}

	.references-gallery__item {
		height: 298.667px;
	}
}

/* Photo grid inside a Referenzen category (tab panel), Materialien-style page. */
.references-gallery--panel,
.references-gallery.references-gallery--panel {
	padding: 0;
	background: transparent;
}

.materials-listing--referenzen .materials-tabs {
	margin-bottom: 24px;
}

@media (min-width: 768px) {
	.references-gallery.references-gallery--panel {
		padding: 0;
	}

	.materials-listing--referenzen .materials-tabs {
		margin-bottom: 32px;
	}
}
