.egallery {
	--egallery-gap: 1.25rem;
	--egallery-radius: 0.75rem;
}

.egallery-heading {
	margin-bottom: 1.5rem;
}

.egallery-heading h1 {
	margin-top: 0;
}

.egallery-main-image {
	margin: 0 0 1.5rem;
}

.egallery-main-image img {
	display: block;
	width: 100%;
	max-height: 32rem;
	border-radius: var(--egallery-radius);
	object-fit: cover;
}

.egallery-card {
	overflow: hidden;
	border: 0;
	box-shadow: 0 0.35rem 1.25rem rgba(0, 0, 0, 0.1);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.egallery-card:hover {
	transform: translateY(-0.25rem);
	box-shadow: 0 0.7rem 1.75rem rgba(0, 0, 0, 0.14);
}

.egallery-card-image,
.egallery-placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #eef1f4;
	overflow: hidden;
}

.egallery-card-image img,
.egallery-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.egallery-card-image img {
	transition: transform 0.35s ease;
}

.egallery-card:hover .egallery-card-image img {
	transform: scale(1.04);
}

.egallery-card .card-title a {
	color: inherit;
	text-decoration: none;
}

.egallery-count {
	font-size: 0.9rem;
	opacity: 0.7;
}

.egallery-card-description {
	margin-bottom: 0.75rem;
	color: inherit;
	opacity: 0.82;
}

.egallery-back {
	display: inline-block;
	margin-bottom: 1rem;
}

.egallery-description {
	max-width: 60rem;
}

.egallery-photo {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: var(--egallery-radius);
	aspect-ratio: var(--egallery-thumb-ratio, 4 / 3);
	overflow: hidden;
	background: #eef1f4;
	cursor: zoom-in;
}

.egallery-photo img {
	transition: transform 0.25s ease;
}

.egallery-photo:hover img,
.egallery-photo:focus img {
	transform: scale(1.04);
}

.egallery-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: grid;
	grid-template-columns: minmax(2.75rem, 1fr) minmax(0, 76rem) minmax(2.75rem, 1fr);
	align-items: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.92);
}

.egallery-modal[hidden] {
	display: none;
}

.egallery-modal figure {
	grid-column: 2;
	margin: 0;
	text-align: center;
	color: #fff;
}

.egallery-modal figure img {
	display: block;
	max-width: 100%;
	max-height: 78vh;
	margin: 0 auto;
	object-fit: contain;
}

.egallery-modal figcaption {
	display: grid;
	gap: 0.25rem;
	margin-top: 0.75rem;
}

.egallery-modal figcaption span {
	opacity: 0.8;
}

.egallery-modal-close,
.egallery-modal-prev,
.egallery-modal-next {
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.egallery-modal-close {
	position: absolute;
	top: 0.5rem;
	right: 1rem;
	font-size: 2.5rem;
}

.egallery-modal-prev,
.egallery-modal-next {
	font-size: 2rem;
}

.egallery-modal-prev {
	grid-column: 1;
}

.egallery-modal-next {
	grid-column: 3;
}

body.egallery-modal-open {
	overflow: hidden;
}

.egallery-pagination {
	display: flex;
	justify-content: center;
	margin-top: 2rem;
}

.egallery-menu-albums {
	display: grid;
	gap: 0.75rem;
	margin: 0;
}

.egallery-menu-albums li a {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: inherit;
	text-decoration: none;
}

.egallery-menu-albums img {
	width: 4rem;
	height: 3rem;
	border-radius: 0.35rem;
	object-fit: cover;
}

.egallery-menu-images {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
}

.egallery-menu-images a {
	display: block;
	aspect-ratio: 1;
	border-radius: 0.35rem;
	overflow: hidden;
}

.egallery-menu-images img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
