.bbd-gallery {
	--bbd-gal-bg: linear-gradient(160deg, #171f33 0%, #0f1728 55%, #0b1326 100%);
	--bbd-gal-border: #232b3e;
	--bbd-gal-accent: var(--green, #10b982);
	--bbd-gal-text: #d7e0da;
	--bbd-gal-muted: #8a9a92;
	--bbd-gal-radius: 12px;
	--bbd-gal-nav: 44px;
	--bbd-gal-ease: cubic-bezier(0.22, 1, 0.36, 1);
	position: relative;
	display: block;
	margin: 1.5em 0 2em;
	padding: 0;
	border: 1px solid var(--bbd-gal-border);
	border-radius: var(--bbd-gal-radius);
	background: var(--bbd-gal-bg);
	overflow: hidden;
	color: var(--bbd-gal-text);
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.bbd-gallery__stage {
	position: relative;
}

.bbd-gallery__viewport {
	overflow: hidden;
	width: 100%;
	touch-action: pan-y;
}

.bbd-gallery__track {
	display: flex;
	width: 100%;
	transform: translate3d(0, 0, 0);
	transition: transform 320ms var(--bbd-gal-ease);
	will-change: transform;
}

.bbd-gallery__slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	margin: 0;
	text-align: center;
}

.bbd-gallery__media {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: zoom-in;
	line-height: 0;
	color: inherit;
}

div.bbd-gallery__media {
	cursor: default;
}

.bbd-gallery__media:focus-visible {
	outline: 2px solid var(--bbd-gal-accent);
	outline-offset: -2px;
}

.bbd-gallery__media img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: min(72vh, 720px);
	margin: 0 auto;
	object-fit: contain;
	background: rgba(0, 0, 0, 0.25);
}

.bbd-gallery__caption {
	display: block;
	margin: 0;
	padding: 0.75rem 1rem 0.35rem;
	font-size: 0.92rem;
	line-height: 1.45;
	color: var(--bbd-gal-muted);
	text-align: center;
}

.bbd-gallery__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--bbd-gal-nav);
	height: var(--bbd-gal-nav);
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	background: rgba(11, 19, 38, 0.72);
	color: #fff;
	cursor: pointer;
	transform: translateY(-50%);
	backdrop-filter: blur(8px);
	transition: background 180ms ease, border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.bbd-gallery__nav:hover:not(:disabled) {
	background: rgba(16, 185, 130, 0.92);
	border-color: transparent;
	color: #04140e;
}

.bbd-gallery__nav:focus-visible {
	outline: 2px solid var(--bbd-gal-accent);
	outline-offset: 2px;
}

.bbd-gallery__nav:disabled {
	opacity: 0.28;
	cursor: default;
	pointer-events: none;
}

.bbd-gallery__nav--prev {
	left: 10px;
}

.bbd-gallery__nav--next {
	right: 10px;
}

.bbd-gallery__nav i {
	font-size: 1.1rem;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bbd-gallery__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.65rem 1rem 0.9rem;
	border-top: 1px solid rgba(35, 43, 62, 0.9);
}

.bbd-gallery__counter {
	flex: 0 0 auto;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--bbd-gal-text);
	font-variant-numeric: tabular-nums;
}

.bbd-gallery__sep {
	margin: 0 0.2em;
	color: var(--bbd-gal-muted);
}

.bbd-gallery__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	max-width: 70%;
}

.bbd-gallery__dot {
	width: 10px;
	height: 10px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(173, 187, 179, 0.35);
	cursor: pointer;
	transition: transform 180ms ease, background 180ms ease, width 180ms ease;
}

.bbd-gallery__dot.is-active {
	width: 22px;
	background: var(--bbd-gal-accent);
}

.bbd-gallery__dot:focus-visible {
	outline: 2px solid var(--bbd-gal-accent);
	outline-offset: 2px;
}

.bbd-gallery-lb {
	position: fixed;
	inset: 0;
	z-index: 10000100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	background: rgba(5, 10, 20, 0.88);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 220ms ease, visibility 220ms ease;
	backdrop-filter: blur(6px);
}

.bbd-gallery-lb.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.bbd-gallery-lb__inner {
	position: relative;
	max-width: min(1100px, 100%);
	max-height: 90vh;
	margin: 0;
}

.bbd-gallery-lb__inner img {
	display: block;
	max-width: 100%;
	max-height: 90vh;
	width: auto;
	height: auto;
	margin: 0 auto;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.bbd-gallery-lb__close {
	position: absolute;
	top: -0.35rem;
	right: -0.35rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 12px;
	background: #fff;
	color: #0b1326;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.bbd-gallery-lb__close:focus-visible {
	outline: 2px solid var(--bbd-gal-accent);
	outline-offset: 2px;
}

.bbd-gallery-lb__caption {
	margin: 0.75rem 0 0;
	color: #d7e0da;
	text-align: center;
	font-size: 0.95rem;
}

body.bbd-gallery-lb-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.bbd-gallery__nav {
		width: 40px;
		height: 40px;
	}

	.bbd-gallery__nav--prev {
		left: 6px;
	}

	.bbd-gallery__nav--next {
		right: 6px;
	}

	.bbd-gallery__bar {
		flex-direction: column;
		align-items: stretch;
		gap: 0.65rem;
	}

	.bbd-gallery__dots {
		max-width: none;
		justify-content: center;
	}

	.bbd-gallery__counter {
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bbd-gallery__track,
	.bbd-gallery__nav,
	.bbd-gallery__dot,
	.bbd-gallery-lb {
		transition: none !important;
	}
}
