.boots-gallery {
	margin: 55px 0 20px;
}

.boots-gallery-title {
	margin: 0 0 38px;
	text-align: center;
}

.boots-gallery-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 58px 32px;
}

.boots-gallery-card {
	display: block;
	appearance: none;
	flex: 0 1 calc((100% - 96px) / 4);
	max-width: calc((100% - 96px) / 4);
	width: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: #222222;
	cursor: pointer;
	font-family: "Raleway", sans-serif;
	text-align: left;
}

.boots-gallery-card-image {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background-color: #f4f4f4;
}

.boots-gallery-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.3s, transform 0.3s;
}

.boots-gallery-card-title,
.boots-gallery-card-description {
	display: block;
}

.boots-gallery-card-title {
	margin: 22px 0 8px;
	font-family: "Playfair Display", serif;
	font-size: 32px;
	font-weight: 400;
	line-height: 1.14em;
	color: #222222;
	transition: color 0.3s;
}

.boots-gallery-card-description {
	margin: 0;
	font-size: 16px;
	line-height: 1.5em;
	color: #5c687c;
}

.boots-gallery-card:hover .boots-gallery-card-image img,
.boots-gallery-card:focus-visible .boots-gallery-card-image img {
	opacity: 0.9;
	transform: scale(1.03);
}

.boots-gallery-card:hover .boots-gallery-card-title,
.boots-gallery-card:focus-visible .boots-gallery-card-title {
	color: #c64239;
}

.boots-gallery-card:focus-visible {
	outline: none;
}

.boots-gallery-card:focus-visible .boots-gallery-card-image {
	outline: 3px solid #c64239;
	outline-offset: 4px;
}

.boots-gallery-modal {
	position: fixed;
	z-index: 9999;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 76px 26px 34px;
	background-color: rgba(13, 20, 48, 0.94);
}

.boots-gallery-modal.is-open {
	display: flex;
}

.boots-gallery-modal-open {
	overflow: hidden;
}

.boots-gallery-modal-dialog {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 1180px;
	max-height: 100%;
}

.boots-gallery-modal-image {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: calc(100vh - 210px);
	object-fit: contain;
	background-color: #ffffff;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.boots-gallery-modal-caption {
	width: 100%;
	max-width: 920px;
	margin-top: 22px;
	color: #ffffff;
	text-align: center;
}

.boots-gallery-modal-caption h3 {
	margin: 0 0 8px;
	color: #ffffff;
}

.boots-gallery-modal-caption p {
	margin: 0;
	color: rgba(255, 255, 255, 0.82);
	font-size: 17px;
	line-height: 1.5em;
}

.boots-gallery-modal-close {
	position: absolute;
	top: 22px;
	right: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0 0 4px;
	border: 1px solid rgba(255, 255, 255, 0.68);
	border-radius: 50%;
	background-color: transparent;
	color: #ffffff;
	cursor: pointer;
	font-size: 36px;
	line-height: 1;
	transition: background-color 0.3s, border-color 0.3s;
}

.boots-gallery-modal-close:hover,
.boots-gallery-modal-close:focus-visible {
	border-color: #c64239;
	background-color: #c64239;
	outline: none;
}

@media screen and (max-width: 1199px) {
	.boots-gallery-card {
		flex-basis: calc((100% - 64px) / 3);
		max-width: calc((100% - 64px) / 3);
	}
}

@media screen and (max-width: 768px) {
	.boots-gallery {
		margin-top: 42px;
	}

	.boots-gallery-grid {
		gap: 38px 22px;
	}

	.boots-gallery-card {
		flex-basis: calc((100% - 22px) / 2);
		max-width: calc((100% - 22px) / 2);
	}

	.boots-gallery-card-title {
		font-size: 26px;
	}

	.boots-gallery-modal {
		padding: 72px 16px 28px;
	}

	.boots-gallery-modal-image {
		max-height: calc(100vh - 230px);
	}
}

@media screen and (max-width: 520px) {
	.boots-gallery-card {
		flex-basis: 100%;
		max-width: 100%;
	}

	.boots-gallery-modal-caption h3 {
		font-size: 26px;
	}
}
