.bcg {
	--bcg-cols: 3;
	--bcg-cols-t: 2;
	--bcg-cols-m: 1;
	--bcg-gap: 10px;
	--bcg-radius: 0px;
	--bcg-ratio: auto;
	position: relative;
	width: 100%;
}
.bcg__item { margin: 0; position: relative; overflow: hidden; border-radius: var(--bcg-radius); }
.bcg__link { display: block; line-height: 0; overflow: hidden; border-radius: var(--bcg-radius); }
.bcg__img { width: 100%; height: auto; display: block; transition: transform .4s ease, opacity .3s ease; }
.bcg--ratio .bcg__img { aspect-ratio: var(--bcg-ratio); object-fit: cover; height: 100%; }

/* Grid */
.bcg--grid { display: grid; grid-template-columns: repeat(var(--bcg-cols), minmax(0, 1fr)); gap: var(--bcg-gap); }

/* Masonry */
.bcg--masonry { column-count: var(--bcg-cols); column-gap: var(--bcg-gap); }
.bcg--masonry .bcg__item { break-inside: avoid; margin-bottom: var(--bcg-gap); }

/* Carrusel */
.bcg--carousel .bcg__track {
	display: flex; gap: var(--bcg-gap); overflow-x: auto; scroll-snap-type: x mandatory;
	scroll-behavior: smooth; scrollbar-width: none;
}
.bcg--carousel .bcg__track::-webkit-scrollbar { display: none; }
.bcg--carousel .bcg__item {
	flex: 0 0 calc((100% - var(--bcg-gap) * (var(--bcg-cols) - 1)) / var(--bcg-cols));
	scroll-snap-align: start;
}
.bcg__arrow {
	position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
	width: 40px; height: 40px; border: 0; border-radius: 50%; cursor: pointer;
	background: rgba(255,255,255,.85); color: #222; font-size: 26px; line-height: 1; padding: 0;
}
.bcg__arrow--prev { left: 10px; }
.bcg__arrow--next { right: 10px; }

/* Hover */
.bcg--hover-zoom .bcg__item:hover .bcg__img { transform: scale(1.06); }
.bcg--hover-fade .bcg__item:hover .bcg__img { opacity: .75; }

/* Leyendas */
.bcg__caption { font-size: 14px; padding: 8px 2px; }
.bcg__caption--overlay {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 14px; color: #fff;
	background: linear-gradient(transparent, rgba(0,0,0,.65)); pointer-events: none;
}

@media (max-width: 1024px) {
	.bcg--inline.bcg--grid { grid-template-columns: repeat(var(--bcg-cols-t), minmax(0, 1fr)); }
	.bcg--inline.bcg--masonry { column-count: var(--bcg-cols-t); }
	.bcg--inline.bcg--carousel .bcg__item { flex-basis: calc((100% - var(--bcg-gap) * (var(--bcg-cols-t) - 1)) / var(--bcg-cols-t)); }
}
@media (max-width: 767px) {
	.bcg--inline.bcg--grid { grid-template-columns: repeat(var(--bcg-cols-m), minmax(0, 1fr)); }
	.bcg--inline.bcg--masonry { column-count: var(--bcg-cols-m); }
	.bcg--inline.bcg--carousel .bcg__item { flex-basis: calc((100% - var(--bcg-gap) * (var(--bcg-cols-m) - 1)) / var(--bcg-cols-m)); }
}

/* Lightbox */
.bcg-lb {
	position: fixed; inset: 0; z-index: 999999; background: rgba(0,0,0,.92);
	display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.bcg-lb__img { max-width: 92vw; max-height: 82vh; object-fit: contain; }
.bcg-lb__cap { color: #fff; margin-top: 12px; font-size: 14px; text-align: center; max-width: 80vw; }
.bcg-lb button {
	position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
	font-size: 44px; line-height: 1; padding: 10px 16px;
}
.bcg-lb__close { top: 10px; right: 14px; }
.bcg-lb__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.bcg-lb__next { right: 10px; top: 50%; transform: translateY(-50%); }
