.spf_feed_outer {
	position: relative;
	width: 100%;
	--spf-gap: 0.5rem;
	--spf-feed-padding: 0rem;
	--spf-columns: 8;
	--spf-columns-tablet: 4;
	--spf-columns-mobile: 2;
	--spf-columns-small: 1;
	--spf-item-max-height: 205px;
	--spf-item-max-height-tablet: 185px;
	--spf-item-max-height-mobile: none;
	--spf-dot-size: 10px;
	--spf-dot-active-width: 24px;
}

.spf_container {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--spf-gap);
	padding: 1rem;
	white-space: normal;
}

.spf_container.spf_size_small {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.spf_container .spf_item {
	position: relative;
	overflow: hidden;
	border-radius: 0.55rem;
	aspect-ratio: 1 / 1;
}

.spf_container .spf_item img {
	position: absolute;
	top: 0;
	left: 0;
	margin: 0;
	object-fit: cover;
	width: 100%;
	height: 100%;
}

.spf_enable_hover_zoom .spf_item img {
	transition: transform 0.2s ease-in-out;
}

.spf_enable_hover_zoom .spf_item img:hover,
.spf_enable_hover_zoom .spf_item a:focus img {
	transform: scale(1.08);
}

.spf_caption {
	font-size: 11px;
	padding: 0.5rem;
}

.spf_feed_is_carousel .spf_container {
	display: flex;
	align-items: stretch;
	gap: var(--spf-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: auto;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y pinch-zoom;
	overscroll-behavior-x: contain;
	padding: var(--spf-feed-padding);
	scrollbar-width: none;
}

.spf_feed_is_carousel .spf_container::-webkit-scrollbar {
	display: none;
}

.spf_feed_is_carousel .spf_container.spf_is_animating {
	scroll-snap-type: none;
}

.spf_feed_is_carousel .spf_item_wrap,
.spf_feed_is_carousel .spf_item {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.spf_feed_is_carousel .spf_item_wrap,
.spf_feed_is_carousel .spf_container:not(.spf_has_text) .spf_item {
	width: calc((100% - (var(--spf-gap) * (var(--spf-columns) - 1)) - (var(--spf-feed-padding) * 2)) / var(--spf-columns));
}

.spf_feed_is_carousel .spf_item {
	width: 100%;
	aspect-ratio: 1 / 1;
	max-height: var(--spf-item-max-height);
}

.spf_carousel_dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.45rem;
	margin-top: 12px;
}

.spf_carousel_dot {
	appearance: none;
	border: 0;
	padding: 0;
	width: var(--spf-dot-size);
	height: var(--spf-dot-size);
	border-radius: 999px;
	background: rgba(25, 25, 25, 0.35);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
	cursor: pointer;
	opacity: 0.95;
	transition: width 0.22s ease, background-color 0.22s ease, transform 0.22s ease, opacity 0.22s ease;
}

.spf_carousel_dot:hover,
.spf_carousel_dot:focus-visible {
	background: rgba(25, 25, 25, 0.55);
	outline: none;
}

.spf_carousel_dot.is-active {
	width: var(--spf-dot-active-width);
	background: rgba(25, 25, 25, 0.88);
	transform: translateZ(0);
}

.spf_carousel_dot.is-animating {
	animation: spfDotPulse 0.3s ease;
}

@keyframes spfDotPulse {
	0% { transform: scale(0.92); }
	60% { transform: scale(1.05); }
	100% { transform: scale(1); }
}

[data-theme=dark] .spf_carousel_dot {
	background: rgba(255, 255, 255, 0.42);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

[data-theme=dark] .spf_carousel_dot:hover,
[data-theme=dark] .spf_carousel_dot:focus-visible {
	background: rgba(255, 255, 255, 0.66);
}

[data-theme=dark] .spf_carousel_dot.is-active {
	background: rgba(255, 255, 255, 0.98);
}

@media (max-width: 1024px) {
	.spf_feed_is_carousel .spf_item_wrap,
	.spf_feed_is_carousel .spf_container:not(.spf_has_text) .spf_item {
		width: calc((100% - (var(--spf-gap) * (var(--spf-columns-tablet) - 1)) - (var(--spf-feed-padding) * 2)) / var(--spf-columns-tablet));
	}

	.spf_feed_is_carousel .spf_item {
		max-height: var(--spf-item-max-height-tablet);
	}
}

@media (max-width: 767px) {
	.spf_feed_is_carousel .spf_item_wrap,
	.spf_feed_is_carousel .spf_container:not(.spf_has_text) .spf_item {
		width: calc((100% - (var(--spf-gap) * (var(--spf-columns-mobile) - 1)) - (var(--spf-feed-padding) * 2)) / var(--spf-columns-mobile));
	}

	.spf_feed_is_carousel .spf_item {
		max-height: var(--spf-item-max-height-mobile);
	}
}

@media (max-width: 480px) {
	.spf_feed_is_carousel .spf_item_wrap,
	.spf_feed_is_carousel .spf_container:not(.spf_has_text) .spf_item {
		width: calc((100% - (var(--spf-gap) * (var(--spf-columns-small) - 1)) - (var(--spf-feed-padding) * 2)) / var(--spf-columns-small));
	}
}

#spf_lightbox_container {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(5px);
	z-index: 99999999;
}

#spf_lightbox_image_box {
	position: fixed;
	top: 2em;
	left: 2em;
	right: calc(2em + 35%);
	bottom: 2em;
	text-align: center;
}

#spf_lightbox_image_box img {
	max-width: 100%;
	max-height: 100%;
	border: 2px solid #000;
	outline: 1px solid #ccc;
	box-sizing: border-box;
	position: absolute;
	left: 50%;
	top: 50%;
	translate: -50% -50%;
}

#spf_lightbox_caption {
	position: fixed;
	bottom: 11em;
	top: 7em;
	right: 2em;
	background: #222;
	color: #fff;
	padding: .5em;
	box-sizing: border-box;
	text-align: center;
	border: 1px solid #ccc;
	width: calc(35% - 4em);
	overflow-y: auto;
	text-align: left;
}

#spf_lightbox_link {
	position: fixed;
	right: 2em;
	bottom: 7em;
	background: #222;
	color: #fff;
	padding: .5em;
	width: calc(35% - 4em);
	box-sizing: border-box;
	text-align: center;
	text-decoration: none;
	border: 1px solid #ccc;
}

#spf_lightbox_link:hover { background: #444; }
#spf_lightbox_next > svg,
#spf_lightbox_prev > svg,
#spf_lightbox_close > svg { width: 3em; height: 3em; color: #fff; }
#spf_lightbox_next:hover > svg,
#spf_lightbox_prev:hover > svg,
#spf_lightbox_close:hover > svg { color: #aaaaaa; }
#spf_lightbox_next { position: fixed; right: 2em; transform: translateY(-50%); cursor: pointer; bottom: 1em; }
#spf_lightbox_prev { position: fixed; transform: translateY(-50%); cursor: pointer; bottom: 1em; right: calc(35% - 5em); }
#spf_lightbox_close { position: fixed; top: 2em; right: 2em; cursor: pointer; }

@media (orientation:portrait) {
	#spf_lightbox_image_box { right: 2em; bottom: 16em; top: 7em; }
	#spf_lightbox_caption { top: unset; left: 2em; width: unset; text-align: center; bottom: 2em; height: 8.8em; }
	#spf_lightbox_link { bottom: 12em; right: 50%; translate: 50%; }
	#spf_lightbox_next { bottom: 17em; right: 2em; }
	#spf_lightbox_prev { bottom: 17em; right: 5em; }
}



.spf_carousel {
	will-change: scroll-position, transform;
}

.spf_item_wrap.spf-clone,
.spf_item.spf-clone {
	pointer-events: none;
}

.spf_nav {
	position: absolute;
	top: 50%;
	z-index: 6;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 999px;
	padding: 0;
	background: rgba(25, 25, 25, 0.78);
	color: #fff;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%) scale(0.9);
	transition: opacity 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
	-webkit-tap-highlight-color: transparent;
}

.spf_nav i,
.spf_nav > i,
button.spf_nav i {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 28px !important;
	line-height: 1 !important;
	font-style: normal;
}

.spf_nav_prev {
	left: 0.85rem;
}

.spf_nav_next {
	right: 0.85rem;
}

.spf_feed_is_carousel:hover .spf_nav,
.spf_feed_is_carousel:focus-within .spf_nav {
	opacity: 1;
	pointer-events: auto;
}

.spf_nav:hover,
.spf_nav:focus-visible {
	background: rgba(25, 25, 25, 0.96);
	transform: translateY(-50%) scale(1.08);
	outline: none;
}

.spf_nav.is-hidden {
	opacity: 0 !important;
	pointer-events: none !important;
	transform: translateY(-50%) scale(0.88);
}

@media (max-width: 1024px) {
	.spf_nav {
		display: none !important;
	}
}


.spf_feed_outer.spf_theme_light,
.spf_feed_outer.spf_theme_dark,
.spf_feed_outer.spf_theme_inherit {
	background: transparent;
	color: inherit;
	padding: 0;
	border-radius: 0;
}
