.mac-gallery {
	width: 100%;
	max-width: 1240px;
	margin-inline: auto;
}

.mac-gallery__filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 0 0 40px;
}

.mac-gallery__filter {
	padding: 9px 18px;
	color: #8a8a8a;
	font: inherit;
	cursor: pointer;
	background: #fff;
	border: 1px solid rgb(74 58 53 / 14%);
	border-radius: 999px;
	transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.mac-gallery__filter:hover,
.mac-gallery__filter:focus-visible {
	color: #4a3a35;
	background: #faf6f4;
	border-color: rgb(74 58 53 / 25%);
}

.mac-gallery__filter.is-active {
	color: #4a3a35;
	background: #f5ece8;
	border-color: rgb(74 58 53 / 24%);
	box-shadow: 0 4px 14px rgb(74 58 53 / 8%);
}

.mac-gallery__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-flow: dense;
	grid-auto-rows: 8px;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	transition: opacity 160ms ease;
}

.mac-gallery__grid.is-loading {
	pointer-events: none;
	opacity: 0.35;
}

.mac-gallery__item,
.mac-gallery__more-item {
	align-self: start;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	border-radius: 10px;
	-webkit-mask-image: -webkit-radial-gradient(white, black);
}

.mac-gallery__item {
	background: transparent;
	transition: transform 200ms ease, box-shadow 200ms ease;
}

.mac-gallery__open {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	overflow: hidden;
	cursor: zoom-in;
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: 0;
	border-radius: inherit;
	transform: translateZ(0);
}

.mac-gallery__open:focus-visible,
.mac-gallery__load-more:focus-visible,
.mac-gallery__filter:focus-visible,
.mac-gallery-lightbox button:focus-visible {
	outline: 2px solid currentcolor;
	outline-offset: 3px;
}

.mac-gallery__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: inherit;
	transition: transform 220ms ease;
}

.mac-gallery__overlay {
	position: absolute;
	inset: 0;
	background: rgb(0 0 0 / 10%);
	opacity: 0;
	transition: opacity 220ms ease;
}

.mac-gallery__more-item {
	min-height: 180px;
	margin-top: 8px;
}

.mac-gallery__more-item[hidden] {
	display: none;
}

.mac-gallery__load-more {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	height: 100%;
	min-height: 180px;
	padding: 24px;
	color: #4a3a35;
	font: inherit;
	cursor: pointer;
	background: #f7f2ef;
	border: 1px solid rgb(74 58 53 / 18%);
	transition: background-color 200ms ease, border-color 200ms ease;
}

.mac-gallery__load-more:hover {
	background: #f1e8e3;
	border-color: rgb(74 58 53 / 35%);
}

.mac-gallery__load-more-icon {
	font: 300 34px/1 sans-serif;
}

.mac-gallery__status {
	margin: 12px 0 0;
}

@media (hover: hover) {
	.mac-gallery__item:hover {
		box-shadow: 0 12px 30px rgb(74 58 53 / 14%);
		transform: translateY(-2px);
	}

	.mac-gallery__open:hover .mac-gallery__image {
		transform: scale(1.018);
	}

	.mac-gallery__open:hover .mac-gallery__overlay {
		opacity: 0.7;
	}
}

@media screen and (max-width: 980px) {
	.mac-gallery__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 18px;
	}
}

@media screen and (max-width: 600px) {
	.mac-gallery__filters {
		justify-content: center;
		gap: 8px;
		margin-bottom: 28px;
		overflow: visible;
	}

	.mac-gallery__filter {
		flex: 0 0 auto;
		padding: 8px 13px;
		font-size: 15px;
	}

	.mac-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.mac-gallery__more-item,
	.mac-gallery__load-more {
		min-height: 130px;
	}

	.mac-gallery__more-item {
		margin-top: 14px;
	}
}

.mac-gallery-lightbox {
	position: fixed;
	inset: 0;
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	padding: 0;
	margin: 0;
	overflow: hidden;
	color: #fff;
	background: #111;
	border: 0;
}

.mac-gallery .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.mac-gallery-lightbox[open] {
	display: grid;
	place-items: center;
}

.mac-gallery-lightbox::backdrop {
	background: #111;
}

.mac-gallery-lightbox__frame {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	touch-action: none;
	user-select: none;
}

.mac-gallery-lightbox__image {
	display: block;
	max-width: min(88vw, 1600px);
	max-height: 88vh;
	object-fit: contain;
	opacity: 1;
	transition: opacity 160ms ease, transform 200ms ease;
	-webkit-user-drag: none;
}

.mac-gallery-lightbox__image.is-changing {
	opacity: 0;
	transform: scale(0.985);
}

.mac-gallery-lightbox__close,
.mac-gallery-lightbox__previous,
.mac-gallery-lightbox__next {
	position: fixed;
	z-index: 2;
	display: grid;
	place-items: center;
	padding: 0;
	color: #fff;
	font-family: sans-serif;
	cursor: pointer;
	background: rgb(255 255 255 / 8%);
	border: 0;
	border-radius: 50%;
	transition: background-color 160ms ease;
}

.mac-gallery-lightbox__close:hover,
.mac-gallery-lightbox__previous:hover,
.mac-gallery-lightbox__next:hover {
	background: rgb(255 255 255 / 18%);
}

.mac-gallery-lightbox__close {
	top: 22px;
	right: 22px;
	width: 44px;
	height: 44px;
	font-size: 32px;
	font-weight: 300;
	line-height: 1;
}

.mac-gallery-lightbox__previous,
.mac-gallery-lightbox__next {
	top: 50%;
	width: 52px;
	height: 52px;
	font-size: 34px;
	transform: translateY(-50%);
}

.mac-gallery-lightbox__previous {
	left: 24px;
}

.mac-gallery-lightbox__next {
	right: 24px;
}

.mac-gallery-lightbox__counter {
	position: fixed;
	bottom: 22px;
	left: 50%;
	margin: 0;
	color: rgb(255 255 255 / 75%);
	font: 14px/1.4 sans-serif;
	transform: translateX(-50%);
}

@media screen and (max-width: 600px) {
	.mac-gallery-lightbox__image {
		max-width: 100vw;
		max-height: 86vh;
	}

	.mac-gallery-lightbox__previous,
	.mac-gallery-lightbox__next {
		display: none;
	}

	.mac-gallery-lightbox__close {
		top: 14px;
		right: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mac-gallery *,
	.mac-gallery-lightbox * {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
