/**
 * BBF Gallery Slider — front-end styles.
 * Self-contained (no theme Tailwind dependency); brand colours: ink #0b1220, red #ce2127.
 */

.bbf-gallery {
	position: relative;
	margin: 2rem 0;
}

.bbf-gallery .swiper {
	overflow: hidden;
	border-radius: 12px;
}

/* Swiper needs the wrapper laid out horizontally even before JS runs. */
.bbf-gallery .swiper-wrapper {
	display: flex;
}

.bbf-gallery .swiper-slide {
	height: auto;
	box-sizing: border-box;
}

.bbf-gallery__figure {
	position: relative;
	margin: 0;
	height: 100%;
	background: #0b1220;
	border-radius: 8px;
	overflow: hidden;
}

.bbf-gallery__img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

/* Graceful fallback for very old browsers without aspect-ratio. */
@supports not (aspect-ratio: 1 / 1) {
	.bbf-gallery__img {
		height: 320px;
	}
}

.bbf-gallery__caption {
	position: absolute;
	inset: auto 0 0 0;
	padding: 1.5rem 1rem 0.85rem;
	margin: 0;
	font-size: 0.85rem;
	line-height: 1.4;
	color: #fff;
	background: linear-gradient(to top, rgba(11, 18, 32, 0.85), rgba(11, 18, 32, 0));
}

/* Navigation arrows */
.bbf-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 9999px;
	background: rgba(11, 18, 32, 0.6);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
	backdrop-filter: blur(4px);
}

.bbf-gallery__nav:hover {
	background: #ce2127;
}

.bbf-gallery__nav:focus-visible {
	outline: 2px solid #ce2127;
	outline-offset: 2px;
}

.bbf-gallery__nav--prev {
	left: 12px;
}

.bbf-gallery__nav--next {
	right: 12px;
}

.bbf-gallery__nav svg {
	width: 20px;
	height: 20px;
}

.bbf-gallery__nav.swiper-button-disabled {
	opacity: 0;
	pointer-events: none;
}

/* Pagination bullets */
.bbf-gallery__pagination {
	position: relative;
	margin-top: 0.85rem;
	text-align: center;
}

.bbf-gallery .swiper-pagination-bullet {
	background: #94a3b8;
	opacity: 0.5;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}

.bbf-gallery .swiper-pagination-bullet-active {
	background: #ce2127;
	opacity: 1;
}

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

	.bbf-gallery__nav svg {
		width: 18px;
		height: 18px;
	}
}
