.bfsg-gallery {
	--bfsg-radius: var(--card-radius, 22px);
	--bfsg-gap: 2%;
	--bfsg-thumb-padding: 0%;
	--bfsg-visible-gap-total: 4%;
	--bfsg-border: var(--button-border-color, #111);
	--bfsg-button-bg: var(--button-bg-color, #fff);
	--bfsg-button-text: var(--button-text-color, #111);
	--bfsg-button-hover-bg: var(--button-hover-bg-color, #111);
	--bfsg-button-hover-text: var(--button-hover-text-color, #fff);
	--bfsg-font-nav: var(--font-family-navigation, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	--bfsg-font-body: var(--font-family-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	position: relative;
	font-family: var(--bfsg-font-body);
}

.bfsg-shell {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: calc(var(--site-grid-gap, 1rem) * 0.75);
	align-items: center;
}

.bfsg-viewport {
	overflow: hidden;
	border-radius: var(--bfsg-radius);
}

.bfsg-track {
	display: flex;
	gap: max(var(--bfsg-gap), 0%);
	list-style: none;
	margin: 0;
	padding: 0;
	transition: transform var(--bfsg-speed, 450ms) ease;
	will-change: transform;
}

.bfsg-slide {
	flex: 0 0 calc((100% - var(--bfsg-visible-gap-total, 0%)) / var(--bfsg-active-visible, var(--bfsg-visible, 3)));
	min-width: 0;
	margin: 0;
	margin-right: min(var(--bfsg-gap), 0%);
}

.bfsg-card {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 2px solid var(--bfsg-border);
	border-radius: var(--bfsg-radius);
	background: rgba(255, 255, 255, 0.72);
	box-shadow: 0 16px 42px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	overflow: hidden;
	transition: box-shadow 180ms ease, background-color 180ms ease;
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
}

.bfsg-card:hover,
.bfsg-card:focus-visible {
	box-shadow: 0 20px 52px rgba(0, 0, 0, 0.13);
	outline: none;
}

.bfsg-card:focus-visible,
.bfsg-arrow:focus-visible,
.bfsg-modal button:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}


.bfsg-card--linked,
.bfsg-card--linked * {
	cursor: pointer;
}

.bfsg-link-indicator {
	position: absolute;
	right: 0.55rem;
	bottom: 0.55rem;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.1rem;
	height: 1.1rem;
	border: 0;
	background: transparent;
	color: var(--bfsg-button-text);
	opacity: 0;
	transform: translate(0.1rem, 0.1rem) scale(0.96);
	transition: opacity 160ms ease, transform 160ms ease, color 160ms ease;
	pointer-events: none;
}

.bfsg-link-indicator__svg {
	display: block;
	width: 1rem;
	height: 1rem;
	fill: currentColor;
}

.bfsg-link-indicator__plus {
	position: absolute;
	right: -0.25rem;
	top: -0.35rem;
	font-family: var(--bfsg-font-nav);
	font-size: 1.2rem;
	font-weight: 900;
	line-height: 1;
	color: currentColor;
}

.bfsg-card--linked:hover .bfsg-link-indicator,
.bfsg-card--linked:focus-visible .bfsg-link-indicator {
	opacity: 0.95;
	transform: translate(0, 0) scale(1);
	color: var(--bfsg-button-hover-bg);
}

.bfsg-card img {
	display: block;
	width: 100%;
	aspect-ratio: var(--bfsg-aspect, 4 / 3);
	object-fit: var(--bfsg-fit, cover);
	object-position: var(--bfsg-position-x, center) var(--bfsg-position-y, center);
	background: rgba(255, 255, 255, 0.55);
	transition: transform 0.2s ease-in-out;
}

.bfsg-gallery.is-bfsg-fit-contain .bfsg-card img {
	padding: var(--bfsg-thumb-padding, 0%);
}

.bfsg-card:hover img,
.bfsg-card:focus-visible img {
	transform: scale(1.1) rotate(2deg);
}


.bfsg-gallery.is-bfsg-fade .bfsg-viewport {
	position: relative;
}

.bfsg-gallery.is-bfsg-fade .bfsg-track {
	display: grid;
	gap: 0;
	transform: none !important;
}

.bfsg-gallery.is-bfsg-fade .bfsg-slide {
	grid-area: 1 / 1;
	width: 100%;
	flex-basis: 100%;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--bfsg-speed, 450ms) ease;
}

.bfsg-gallery.is-bfsg-fade .bfsg-slide.is-bfsg-active {
	opacity: 1;
	pointer-events: auto;
}

.bfsg-gallery.is-bfsg-fade .bfsg-slide--clone {
	display: none;
}

.bfsg-arrow,
.bfsg-modal__close,
.bfsg-modal__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	min-width: 46px;
	min-height: 46px;
	padding: 0;
	border: 2px solid var(--bfsg-border);
	border-radius: 999px;
	background: var(--bfsg-button-bg);
	color: var(--bfsg-button-text);
	font-family: var(--bfsg-font-nav);
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.bfsg-arrow:hover,
.bfsg-modal__close:hover,
.bfsg-modal__nav:hover {
	background: var(--bfsg-button-hover-bg);
	color: var(--bfsg-button-hover-text);
	transform: translateY(-1px);
}

.bfsg-modal__nav[hidden],
.bfsg-arrow[hidden],
.bfsg-modal.is-bfsg-single-item .bfsg-modal__nav {
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.bfsg-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	padding: clamp(1rem, 3vw, 2.5rem);
}

.bfsg-modal[aria-hidden="false"] {
	display: grid;
	place-items: center;
}

.bfsg-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.68);
}

.bfsg-modal__panel {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 1rem;
	align-items: center;
	width: min(1120px, 100%);
	max-height: 92vh;
	overflow: hidden;
	padding: clamp(0.75rem, 2vw, 1.5rem);
	border: 2px solid var(--bfsg-border);
	border-radius: var(--bfsg-radius);
	background: rgba(255, 255, 255, 0.88);
	box-shadow: 0 28px 90px rgba(0, 0, 0, 0.35);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

.bfsg-modal.is-bfsg-single-item .bfsg-modal__panel {
	grid-template-columns: minmax(0, 1fr);
}

.bfsg-modal__close {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	font-size: 1.45rem;
}

.bfsg-modal__figure {
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	align-self: stretch;
	max-height: calc(92vh - 3rem);
	margin: 0;
	min-width: 0;
	text-align: center;
}

.bfsg-modal__image-scroll {
	overflow: auto;
	width: 100%;
	min-height: 0;
	border-radius: calc(var(--bfsg-radius) * 0.72);
}

.bfsg-modal__image {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	max-height: none;
	margin: 0 auto;
	border-radius: calc(var(--bfsg-radius) * 0.72);
	object-fit: contain;
}

.bfsg-modal__caption {
	margin-top: 0.75rem;
	font-family: var(--bfsg-font-body);
	font-size: 0.98rem;
	font-weight: 600;
	color: #111;
}

.bfsg-modal-open {
	overflow: hidden;
}

@media (max-width: 900px) {
	.bfsg-gallery {
		--bfsg-active-visible: min(var(--bfsg-visible, 2), 2);
	}
}

@media (max-width: 768px) {
	.bfsg-gallery {
		--bfsg-active-visible: var(--bfsg-mobile-visible, 1);
	}

	.bfsg-shell {
		grid-template-columns: 1fr 1fr;
	}

	.bfsg-viewport {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.bfsg-arrow--prev,
	.bfsg-arrow--next {
		grid-row: 2;
		justify-self: center;
	}

	.bfsg-modal__panel {
		grid-template-columns: 1fr 1fr;
		padding-top: 3.75rem;
	}

	.bfsg-modal.is-bfsg-single-item .bfsg-modal__panel {
		grid-template-columns: 1fr;
	}

	.bfsg-modal__figure {
		grid-column: 1 / -1;
		grid-row: 1;
		max-height: calc(92vh - 7rem);
	}

	.bfsg-modal__nav--prev,
	.bfsg-modal__nav--next {
		grid-row: 2;
		justify-self: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.bfsg-track,
	.bfsg-card,
	.bfsg-arrow,
	.bfsg-modal__close,
	.bfsg-modal__nav {
		transition: none;
	}
}

.bfsg-card-video {
	display: block;
	width: 100%;
	aspect-ratio: var(--bfsg-aspect, 4 / 3);
	object-fit: var(--bfsg-fit, cover);
	object-position: var(--bfsg-position-x, center) var(--bfsg-position-y, center);
	background: rgba(255, 255, 255, 0.55);
	transition: transform 0.2s ease-in-out;
}


.bfsg-card {
	position: relative;
}

.bfsg-video-play-indicator {
	position: absolute;
	inset: 50% auto auto 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: clamp(2.4rem, 18%, 4.4rem);
	aspect-ratio: 1;
	transform: translate(-50%, -50%);
	border-radius: 999px;
	color: var(--button-text-color, #fff);
	background: var(--button-bg-color, #111);
	box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
	pointer-events: none;
	opacity: 0.9;
	transition: opacity 0.18s ease-in-out, transform 0.18s ease-in-out;
}

.bfsg-video-play-indicator svg {
	display: block;
	width: 58%;
	height: 58%;
	fill: currentColor;
	transform: translateX(5%);
}

.bfsg-card:hover .bfsg-video-play-indicator,
.bfsg-card:focus-visible .bfsg-video-play-indicator {
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.88);
}

.bfsg-card:hover .bfsg-card-video,
.bfsg-card:focus-visible .bfsg-card-video {
	transform: scale(1.1) rotate(2deg);
}

.bfsg-gallery.is-bfsg-transparent .bfsg-card {
	border-color: transparent;
	background: transparent;
	box-shadow: none;
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

.bfsg-gallery.is-bfsg-transparent .bfsg-card:hover,
.bfsg-gallery.is-bfsg-transparent .bfsg-card:focus-visible {
	box-shadow: none;
}

.bfsg-gallery.is-bfsg-transparent .bfsg-card img,
.bfsg-gallery.is-bfsg-transparent .bfsg-card-video {
	background: transparent;
}

.bfsg-gallery.is-bfsg-arrows-hidden .bfsg-shell {
	grid-template-columns: minmax(0, 1fr);
}

.bfsg-gallery.is-bfsg-modal-disabled .bfsg-card {
	cursor: default;
}

.bfsg-gallery.is-bfsg-modal-disabled .bfsg-card--linked,
.bfsg-gallery.is-bfsg-modal-disabled .bfsg-card--linked * {
	cursor: pointer;
}


.bfsg-modal__image[hidden],
.bfsg-modal__video[hidden],
.bfsg-modal__iframe[hidden] {
	display: none !important;
}

.bfsg-modal__video,
.bfsg-modal__iframe {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	max-height: none;
	margin: 0 auto;
	border-radius: calc(var(--bfsg-radius) * 0.72);
}



.bfsg-modal__iframe {
	min-height: min(74vh, 900px);
	border: 0;
	background: #fff;
}
.bfsg-popup-image,
[class*="bfsg-popup-image-"],
.sgpop,
[class*="sgpop-"]:not(.sgpop-all-images),
.bfsg-popup-image-ready {
	cursor: pointer;
}

.bfsg-popup-image:hover,
.bfsg-popup-image:focus-visible,
[class*="bfsg-popup-image-"]:hover,
.sgpop:hover,
[class*="sgpop-"]:not(.sgpop-all-images):hover,
[class*="bfsg-popup-image-"]:focus-visible,
.sgpop:focus-visible,
[class*="sgpop-"]:not(.sgpop-all-images):focus-visible,
.bfsg-popup-image-ready:hover,
.bfsg-popup-image-ready:focus-visible {
	cursor: pointer;
}



.bfsg-popup-marker-wrap {
	position: relative !important;
	display: inline-block;
	max-width: 100%;
}

.bfsg-popup-marker-wrap > img,
.bfsg-popup-marker-wrap > picture,
.bfsg-popup-marker-wrap > picture > img {
	display: block;
}

.bfsg-popup-marker {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 2;
	width: clamp(24px, 8%, 42px);
	aspect-ratio: 1;
	background: url('../img/sgpop.png') center / contain no-repeat;
	pointer-events: none;
	filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.32));
}

.bfsg-standalone-modal-wrap {
	--bfsg-radius: var(--card-radius, 22px);
	--bfsg-gap: 2%;
	--bfsg-border: var(--button-border-color, #111);
	--bfsg-button-bg: var(--button-bg-color, #fff);
	--bfsg-button-text: var(--button-text-color, #111);
	--bfsg-button-hover-bg: var(--button-hover-bg-color, #111);
	--bfsg-button-hover-text: var(--button-hover-text-color, #fff);
	--bfsg-font-nav: var(--font-family-navigation, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	--bfsg-font-body: var(--font-family-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-family: var(--bfsg-font-body);
}

.bfsg-slide {
	position: relative;
}

.bfsg-caption-popover {
	position: absolute;
	left: 50%;
	top: calc(100% + 0.65rem);
	z-index: 12;
	box-sizing: border-box;
	width: clamp(100%, 125%, 150%);
	max-width: min(150%, 36rem);
	padding: 0.8rem 0.95rem;
	border: 2px solid var(--bfsg-border);
	border-radius: calc(var(--bfsg-radius) * 0.72);
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
	color: #111;
	font-family: var(--bfsg-font-body);
	font-size: 0.92rem;
	line-height: 1.45;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transform: translate(-50%, -0.15rem) scale(0.98);
	transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
	pointer-events: none;
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

.bfsg-caption-popover::before {
	content: "";
	position: absolute;
	left: 50%;
	top: -0.48rem;
	width: 0.8rem;
	height: 0.8rem;
	border-left: 2px solid var(--bfsg-border);
	border-top: 2px solid var(--bfsg-border);
	background: inherit;
	transform: translateX(-50%) rotate(45deg);
}

.bfsg-caption-popover > :first-child {
	margin-top: 0;
}

.bfsg-caption-popover > :last-child {
	margin-bottom: 0;
}

.bfsg-slide:hover .bfsg-caption-popover,
.bfsg-slide:focus-within .bfsg-caption-popover {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, 0) scale(1);
}

@media (max-width: 768px) {
	.bfsg-caption-popover {
		width: 100%;
		max-width: 100%;
		font-size: 0.88rem;
	}
}

.bfsg-viewport {
	overflow-x: clip;
	overflow-y: visible;
}

/* Floating item captions are portalled to <body> so parent containers cannot clip them. */
.bfsg-caption-popover {
	display: none;
}

.bfsg-floating-caption {
	position: fixed;
	z-index: 2147483000;
	box-sizing: border-box;
	max-width: calc(100vw - 24px);
	padding: 0.8rem 0.95rem;
	border: 2px solid var(--bfsg-border, #111);
	border-radius: calc(var(--bfsg-radius, 22px) * 0.72);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
	color: #111;
	font-family: var(--bfsg-font-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
	font-size: 0.92rem;
	line-height: 1.45;
	text-align: left;
	opacity: 0;
	transform: translateY(-0.15rem) scale(0.98);
	transition: opacity 160ms ease, transform 160ms ease;
	pointer-events: none;
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

.bfsg-floating-caption.is-bfsg-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.bfsg-floating-caption::before {
	content: "";
	position: absolute;
	left: var(--bfsg-caption-arrow-left, 50%);
	top: -0.48rem;
	width: 0.8rem;
	height: 0.8rem;
	border-left: 2px solid var(--bfsg-border, #111);
	border-top: 2px solid var(--bfsg-border, #111);
	background: inherit;
	transform: translateX(-50%) rotate(45deg);
}

.bfsg-floating-caption > :first-child {
	margin-top: 0;
}

.bfsg-floating-caption > :last-child {
	margin-bottom: 0;
}

.bfsg-modal__image-scroll.is-bfsg-zoomable .bfsg-modal__image {
	cursor: zoom-in;
}

.bfsg-modal__image-scroll.is-bfsg-zoomed {
	cursor: crosshair;
}

.bfsg-modal__image-scroll.is-bfsg-zoomed .bfsg-modal__image {
	cursor: crosshair;
	max-width: none;
	user-select: none;
}

.bfsg-modal__pdf-controls {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	margin-top: 0.75rem;
	font-family: var(--bfsg-font-nav);
}

.bfsg-modal__pdf-controls[hidden] {
	display: none !important;
}

.bfsg-modal__pdf-controls button {
	appearance: none;
	border: 2px solid var(--bfsg-border);
	border-radius: 999px;
	background: var(--bfsg-button-bg);
	color: var(--bfsg-button-text);
	font: inherit;
	font-weight: 700;
	padding: 0.45rem 0.8rem;
	cursor: pointer;
}

.bfsg-modal__pdf-controls button:hover,
.bfsg-modal__pdf-controls button:focus-visible {
	background: var(--bfsg-button-hover-bg);
	color: var(--bfsg-button-hover-text);
}

.bfsg-modal__pdf-page {
	font-weight: 700;
}

.bfsg-pdf-card {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	aspect-ratio: var(--bfsg-aspect, 4 / 3);
	background: rgba(255, 255, 255, 0.65);
}

.bfsg-card .bfsg-card-image--pdf {
	width: min(44%, 140px);
	height: auto;
	aspect-ratio: auto;
	object-fit: contain;
	background: transparent;
}

.bfsg-pdf-card__label {
	position: absolute;
	left: 0.75rem;
	bottom: 0.75rem;
	padding: 0.18rem 0.5rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-family: var(--bfsg-font-nav);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.bfsg-card--pdf-linked::after,
.bfsg-card[data-type="pdf"]::after {
	content: "PDF";
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	z-index: 3;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	background: #ed1c24;
	color: #fff;
	font-family: var(--bfsg-font-nav);
	font-size: 0.7rem;
	font-weight: 900;
	line-height: 1.3;
	letter-spacing: 0.04em;
	pointer-events: none;
}

.bfsg-modal__image-scroll {
	position: relative;
}

.bfsg-modal__loader {
	position: absolute;
	inset: 0;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.58);
	pointer-events: none;
}

.bfsg-modal__loader[hidden] {
	display: none;
}

.bfsg-modal__spinner {
	width: 2.75rem;
	height: 2.75rem;
	border: 0.28rem solid rgba(0, 0, 0, 0.16);
	border-top-color: var(--bfsg-button-hover-bg);
	border-radius: 999px;
	animation: bfsg-spin 820ms linear infinite;
}

@keyframes bfsg-spin {
	to { transform: rotate(360deg); }
}

/* Standalone popup modifiers (.sgscale-10..100 and .sglock). */
.bfsg-modal__image-scroll.is-bfsg-scaled .bfsg-modal__image,
.bfsg-modal__image-scroll.is-bfsg-scaled .bfsg-modal__video {
	max-width: var(--bfsg-modal-scale-percent, 100%);
}

.bfsg-modal__image-scroll.is-bfsg-scaled .bfsg-modal__iframe {
	width: calc(100% / var(--bfsg-modal-scale-factor, 1));
	height: calc(min(74vh, 900px) / var(--bfsg-modal-scale-factor, 1));
	transform: scale(var(--bfsg-modal-scale-factor, 1));
	transform-origin: top left;
}

.bfsg-modal__image-scroll.is-bfsg-locked .bfsg-modal__iframe {
	pointer-events: auto;
	cursor: grab;
}

.bfsg-modal__image-scroll.is-bfsg-locked,
.bfsg-modal__image-scroll.is-bfsg-locked .bfsg-modal__image {
	cursor: default !important;
}


/* v01.52 scaled iframe overflow fix: hide only the popup wrapper scrollbars for iframe content. */
.bfsg-modal__image-scroll.is-bfsg-scaled.is-bfsg-iframe {
	overflow: hidden;
}

.bfsg-modal__image-scroll.is-bfsg-scaled.is-bfsg-iframe .bfsg-modal__iframe {
	display: block;
}


/* v01.54 iframe lock shield: blocks click-style events, briefly passes wheel scrolling.
 * v01.71: leave a permanent 15px right-side gap so iframe scrollbars remain reachable. */
.bfsg-modal__iframe-lock {
	position: absolute;
	top: 0;
	right: 15px;
	bottom: 0;
	left: 0;
	z-index: 5;
	display: block;
	background: transparent;
	cursor: default;
	touch-action: none;
}

.bfsg-modal__iframe-lock[hidden] {
	display: none !important;
}

.bfsg-modal__iframe-lock.is-bfsg-wheel-pass {
	pointer-events: none;
	opacity: 0;
}


/* v01.56: keep scaled webpage iframes vertically balanced and remove transform layout gap. */
.bfsg-modal__image-scroll.is-bfsg-scaled.is-bfsg-iframe {
	height: min(74vh, 900px);
	max-height: min(74vh, 900px);
	overflow: hidden;
}

.bfsg-modal__image-scroll.is-bfsg-scaled.is-bfsg-iframe .bfsg-modal__iframe {
	height: calc(100% / var(--bfsg-modal-scale-factor, 1));
	min-height: 0;
}


/* v01.57 popup polish */
.bfsg-popup-marker-host {
	position: relative !important;
}

.bfsg-modal__counter {
	position: absolute;
	top: 0.85rem;
	left: 0.95rem;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 1.6rem;
	padding: 0.22rem 0.58rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.66);
	color: #fff;
	font-family: var(--bfsg-font-nav);
	font-size: 0.78rem;
	font-weight: 800;
	line-height: 1;
	pointer-events: none;
}

.bfsg-modal__counter[hidden] {
	display: none !important;
}

/* Single-item popups still need their title/caption; only the prev/next controls and counter should disappear. */
.bfsg-modal.is-bfsg-single-item .bfsg-modal__caption:not([hidden]) {
	display: grid !important;
}

.bfsg-modal__caption {
	display: grid;
	gap: 0.2rem;
	justify-items: center;
}

.bfsg-modal__title {
	font-weight: 700;
}

.bfsg-modal__caption-text {
	font-size: 0.86rem;
	font-weight: 400;
	line-height: 1.35;
	opacity: 0.82;
}

.bfsg-modal__caption-pill {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	padding: 0.16rem 0.52rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.08);
	font-size: 0.76rem;
	font-weight: 600;
	line-height: 1.25;
	opacity: 0.76;
}


/* v01.65: keep iframe popups at the normal modal width. */
.bfsg-modal__figure {
	width: 100%;
}

.bfsg-modal__image-scroll.is-bfsg-iframe {
	width: 100%;
	min-width: min(900px, calc(100vw - 8rem));
	height: min(74vh, 900px);
	overflow: hidden;
}

.bfsg-modal__image-scroll.is-bfsg-iframe .bfsg-modal__iframe {
	width: 100%;
	height: 100%;
	min-height: 0;
}

@media (max-width: 768px) {
	.bfsg-modal__image-scroll.is-bfsg-iframe {
		min-width: 0;
		height: min(72vh, 760px);
	}
}

/* v01.67: scaled gallery iframe popups need the same inverse iframe width as standalone sgpop URL popups. */
.bfsg-modal__image-scroll.is-bfsg-scaled.is-bfsg-iframe .bfsg-modal__iframe {
	width: calc(100% / var(--bfsg-modal-scale-factor, 1));
	height: calc(100% / var(--bfsg-modal-scale-factor, 1));
	transform: scale(var(--bfsg-modal-scale-factor, 1));
	transform-origin: top left;
}

.bfsg-modal__image-scroll.is-bfsg-scaled.is-bfsg-iframe {
	min-width: min(900px, calc(100vw - 8rem));
}

@media (max-width: 768px) {
	.bfsg-modal__image-scroll.is-bfsg-scaled.is-bfsg-iframe {
		min-width: 0;
	}
}

/* v01.76: animated scroll hint for tall image and PDF popups; PDF hover-zone dismissal. */
.bfsg-modal__scroll-hint {
	position: absolute;
	left: 50%;
	bottom: clamp(2.2rem, 8vh, 4.2rem);
	z-index: 6;
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.63rem 1.08rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.64);
	color: #fff;
	font-family: var(--bfsg-font-nav);
	font-size: 1.2rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1;
	text-transform: uppercase;
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
	transform: translateX(-50%);
	pointer-events: auto;
	animation: bfsg-scroll-hint-float 1.55s ease-in-out infinite;
}

.bfsg-modal__scroll-hint::before {
	content: '';
	position: absolute;
	inset: -2.25rem;
	border-radius: 999px;
	background: transparent;
}

.bfsg-modal__scroll-hint[hidden] {
	display: none !important;
}

.bfsg-modal__scroll-icon {
	position: relative;
	display: inline-block;
	width: 1.58rem;
	height: 2.43rem;
	border: 2px solid currentColor;
	border-radius: 999px;
	opacity: 0.96;
}

.bfsg-modal__scroll-wheel {
	position: absolute;
	left: 50%;
	top: 0.45rem;
	width: 0.27rem;
	height: 0.63rem;
	border-radius: 999px;
	background: currentColor;
	transform: translateX(-50%);
	animation: bfsg-scroll-wheel 1.55s ease-in-out infinite;
}

.bfsg-modal__scroll-text {
	display: inline-block;
}

@keyframes bfsg-scroll-hint-float {
	0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.9; }
	50% { transform: translateX(-50%) translateY(0.42rem); opacity: 1; }
}

@keyframes bfsg-scroll-wheel {
	0% { transform: translateX(-50%) translateY(0); opacity: 1; }
	55% { transform: translateX(-50%) translateY(0.72rem); opacity: 0.42; }
	100% { transform: translateX(-50%) translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.bfsg-modal__scroll-hint,
	.bfsg-modal__scroll-wheel {
		animation: none;
	}
}
