.brightmind-gallery {
	--bm-gallery-transition: 350ms;
	--bm-gallery-scale: 1.06;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 24px;
}

.brightmind-gallery__item {
	position: relative;
	display: block;
	overflow: hidden;
	min-width: 0;
	margin: 0;
	aspect-ratio: 4 / 3;
	color: inherit;
	text-decoration: none;
	isolation: isolate;
}

.brightmind-gallery__image {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	object-position: var(--bm-gallery-position, center center);
	transition: transform var(--bm-gallery-transition) ease;
}

.brightmind-gallery__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(12,69,96,.78);
	opacity: 0;
	text-align: center;
	transition: opacity var(--bm-gallery-transition) ease;
}

.brightmind-gallery__content {
	display: flex;
	flex-direction: column;
	align-items: inherit;
	max-width: 100%;
	opacity: 0;
	transform: translateY(12px);
	transition: opacity var(--bm-gallery-transition) ease, transform var(--bm-gallery-transition) ease;
}

.brightmind-gallery__icon {
	display: inline-flex;
	align-self: center;
	margin-bottom: 16px;
	color: #c8e61e;
	font-size: 32px;
}

.brightmind-gallery__icon svg { width: 1em; height: 1em; fill: currentColor; }
.brightmind-gallery__title { display: block; margin-bottom: 8px; color: #fff; font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.brightmind-gallery__caption { display: block; color: #fff; line-height: 1.5; }

.brightmind-gallery__item:hover .brightmind-gallery__image,
.brightmind-gallery__item:focus .brightmind-gallery__image,
.brightmind-gallery__item:focus-visible .brightmind-gallery__image { transform: scale(var(--bm-gallery-scale)); }

.brightmind-gallery__item:hover .brightmind-gallery__overlay,
.brightmind-gallery__item:focus .brightmind-gallery__overlay,
.brightmind-gallery__item:focus-visible .brightmind-gallery__overlay,
.brightmind-gallery__item:hover .brightmind-gallery__content,
.brightmind-gallery__item:focus .brightmind-gallery__content,
.brightmind-gallery__item:focus-visible .brightmind-gallery__content { opacity: 1; transform: translateY(0); }

.brightmind-gallery__item:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
	.brightmind-gallery__image,
	.brightmind-gallery__overlay,
	.brightmind-gallery__content { transition: none; }
}
