/* ============================================================
   Building Gallery Widget — gallery.css
   ============================================================ */

/* ── Carousel wrapper ─────────────────────────────────────── */

.bgw-carousel {
	position: relative;
	border-radius: 6px;
}

/* ── Slide ────────────────────────────────────────────────── */
.bgw-slide__inner {
	position: relative;
	cursor: pointer;
	overflow: hidden;
	border-radius: 6px;
}

/* Scale on hover — subtle zoom cue */
.bgw-slide__inner:hover .bgw-slide__image {
	transform: scale(1.03);
}

.bgw-slide__image {
	display: block;
	width: 100%;
	height: 480px; /* default; overridden by Elementor slider control */
	object-fit: cover;
	transition: transform 0.45s ease;
}

/* ── Caption overlay ──────────────────────────────────────── */
.bgw-slide__caption {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 36px 28px 24px;
	background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, transparent 100%);
	pointer-events: none; /* let click pass through to inner */
}

.bgw-slide__title {
	margin: 0 0 6px;
	font-size: 1.35rem;
	font-weight: 700;
	color: #fff;
	line-height: 1.25;
}

.bgw-slide__desc {
	margin: 0 0 10px;
	font-size: 0.9rem;
	color: rgba(255,255,255,0.82);
	line-height: 1.5;
}

.bgw-slide__hint {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	color: rgba(255,255,255,0.55);
}

.bgw-slide__hint::before {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.55)'%3E%3Cpath d='M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm0 16H5V5h14v14zm-7-2l-5-5 1.41-1.41L12 14.17l7.59-7.59L21 8l-9 9z'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
}

/* ── Navigation arrows ────────────────────────────────────── */
.bgw-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background: rgba(0,0,0,0.45);
	cursor: pointer;
	transition: background 0.2s, opacity 0.2s;
	padding: 0;
}

.bgw-arrow:hover  { background: rgba(0,0,0,0.7); }
.bgw-arrow:focus  { outline: 2px solid #fff; outline-offset: 2px; }

.bgw-arrow svg    { fill: #fff; display: block; }

.bgw-arrow--prev  { left: 14px; }
.bgw-arrow--next  { right: 14px; }

.bgw-arrow.swiper-button-disabled {
	opacity: 0.3;
	pointer-events: none;
}

/* ── Pagination dots ──────────────────────────────────────── */
.bgw-pagination {
	position: absolute;
	bottom: 14px !important;
	left: 0;
	right: 0;
	text-align: center;
	z-index: 10;
}

.bgw-pagination .swiper-pagination-bullet {
	width: 8px;
	height: 8px;
	background: rgba(255,255,255,0.45);
	opacity: 1;
	margin: 0 4px;
	transition: background 0.2s, transform 0.2s;
}

.bgw-pagination .swiper-pagination-bullet-active {
	background: #fff;
	transform: scale(1.3);
}

/* ── Editor / empty state ─────────────────────────────────── */
.bgw-empty {
	padding: 20px;
	text-align: center;
	color: #888;
	font-style: italic;
}

/* ── Multi-column: when >1 slide is visible the overflow
      must be visible so adjacent slides peek in, but the
      outer wrapper clips anything outside its own bounds. ── */
.bgw-wrapper {
	/* Give room for arrows that sit outside the track */
	padding: 0 0;
}

/* When arrows are shown and multiple slides visible,
   push them to the very edges of the wrapper */
.bgw-wrapper .bgw-arrow--prev { left: 6px; }
.bgw-wrapper .bgw-arrow--next { right: 6px; }

/* Allow partial-visibility of adjacent slides */
.bgw-carousel.swiper {
	overflow: visible;   /* slides can peek left/right */
}

/* Re-clip at wrapper level so nothing bleeds outside */
.bgw-wrapper {
	overflow: hidden;
}

/* ================================================================
   LIGHTBOX
   ================================================================ */

#bgw-lightbox {
	display: none; /* shown by JS */
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0,0,0,0.93);
	flex-direction: column;
	align-items: stretch;
}

#bgw-lightbox.bgw-lb-open {
	display: flex;
}

/* ── Lightbox header bar ─────────────────────────────────── */
.bgw-lb-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 20px;
	flex-shrink: 0;
}

.bgw-lb-counter {
	font-size: 0.85rem;
	color: rgba(255,255,255,0.6);
	font-family: inherit;
}

.bgw-lb-title {
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 60%;
	text-align: center;
}

.bgw-lb-close {
	background: none;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	border-radius: 50%;
	transition: background 0.18s;
	color: #fff;
}

.bgw-lb-close:hover  { background: rgba(255,255,255,0.12); }
.bgw-lb-close:focus  { outline: 2px solid rgba(255,255,255,0.5); }
.bgw-lb-close svg    { fill: #fff; display: block; }

/* ── Lightbox swiper (inner) ─────────────────────────────── */
.bgw-lb-swiper-wrap {
	flex: 1;
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
}

.bgw-lb-swiper {
	width: 100%;
	height: 100%;
}

.bgw-lb-swiper .swiper-slide {
	display: flex;
	align-items: center;
	justify-content: center;
}

.bgw-lb-swiper img {
	max-width: 100%;
	max-height: calc(100vh - 130px);
	object-fit: contain;
	border-radius: 3px;
	user-select: none;
	-webkit-user-drag: none;
}

/* ── Lightbox arrows ─────────────────────────────────────── */
.bgw-lb-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	background: rgba(255,255,255,0.10);
	border: none;
	border-radius: 50%;
	width: 52px;
	height: 52px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
	padding: 0;
}

.bgw-lb-arrow:hover  { background: rgba(255,255,255,0.22); }
.bgw-lb-arrow:focus  { outline: 2px solid rgba(255,255,255,0.5); }
.bgw-lb-arrow svg    { fill: #fff; display: block; }
.bgw-lb-arrow--prev  { left: 18px; }
.bgw-lb-arrow--next  { right: 18px; }

.bgw-lb-arrow.swiper-button-disabled {
	opacity: 0.25;
	pointer-events: none;
}

/* ── Lightbox thumbnail strip ────────────────────────────── */
.bgw-lb-thumbs {
	flex-shrink: 0;
	padding: 10px 16px;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.bgw-lb-thumbs::-webkit-scrollbar        { height: 4px; }
.bgw-lb-thumbs::-webkit-scrollbar-track  { background: transparent; }
.bgw-lb-thumbs::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.3); border-radius: 2px; }

.bgw-lb-thumbs-inner {
	display: flex;
	gap: 8px;
	justify-content: center;
}

.bgw-lb-thumb {
	flex-shrink: 0;
	width: 64px;
	height: 48px;
	border-radius: 3px;
	overflow: hidden;
	cursor: pointer;
	border: 2px solid transparent;
	transition: border-color 0.18s, opacity 0.18s;
	opacity: 0.6;
}

.bgw-lb-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.bgw-lb-thumb.bgw-lb-thumb--active {
	border-color: #fff;
	opacity: 1;
}

/* ── Mobile tweaks ───────────────────────────────────────── */
@media (max-width: 600px) {
	.bgw-lb-arrow { width: 38px; height: 38px; }
	.bgw-lb-arrow--prev { left: 6px; }
	.bgw-lb-arrow--next { right: 6px; }
	.bgw-lb-title { max-width: 50%; font-size: 0.88rem; }
	.bgw-lb-thumb { width: 50px; height: 38px; }
}
