/* ============================== Photo gallery =========================== */

.bb-gallery__grid {
	--bb-cols: 5;

	display: grid;
	grid-template-columns: repeat(var(--bb-cols), minmax(0, 1fr));
	gap: 14px;
}

.bb-gallery__item {
	position: relative;
	display: block;
	height: 190px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--bb-grey-bg);
}

.bb-gallery--grid .bb-gallery__item {
	height: auto;
	aspect-ratio: 1.35;
}

.bb-gallery__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s var(--bb-ease);
}

.bb-gallery__item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(14, 33, 72, 0) 45%, rgba(14, 33, 72, .55) 100%);
	opacity: 0;
	transition: opacity .3s var(--bb-ease);
	pointer-events: none;
}

.bb-gallery--hover-zoom .bb-gallery__item:hover img,
.bb-gallery--hover-both .bb-gallery__item:hover img {
	transform: scale(1.07);
}

.bb-gallery--hover-overlay .bb-gallery__item:hover::after,
.bb-gallery--hover-both .bb-gallery__item:hover::after {
	opacity: 1;
}

.bb-gallery__caption {
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 10px;
	z-index: 2;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-shadow: 0 1px 5px rgba(0, 0, 0, .55);
}

/* --------------------------------------------------------------- masonry */

.bb-gallery--masonry .bb-gallery__grid {
	display: block;
	column-count: var(--bb-cols);
	column-gap: 14px;
}

.bb-gallery--masonry .bb-gallery__item {
	height: auto;
	break-inside: avoid;
	margin-bottom: 14px;
}

.bb-gallery--masonry .bb-gallery__item img {
	height: auto;
}

/* ------------------------------------------------------------ breakpoints */

@media (max-width: 1024px) {
	.bb-gallery__item {
		height: 165px;
	}
}

@media (max-width: 767px) {
	.bb-gallery__grid {
		gap: 10px;
	}

	.bb-gallery__item {
		height: 130px;
	}
}
