/** ====================================
**  SCROLLABLE POSTS BASE STYLES
** ==================================== */
/* Wrapper - the scrollable container */
.scrollable-posts-wrapper {
	display: flex !important;
	gap: 15px;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	-ms-overflow-style: none;
	scrollbar-width: none;
	scroll-snap-type: x mandatory;
	margin: 0 auto;
}
/* Disable scroll-snap for auto-scroll mode */
.scrollable-posts-wrapper.no-snap {
	scroll-snap-type: none;
}
/* Hide browser scrollbar */
.scrollable-posts-wrapper::-webkit-scrollbar {
	display: none;
}
/* Dragging cursor states */
.scrollable-posts-wrapper.dragging {
	cursor: grabbing;
	user-select: none;
}
.scrollable-posts-wrapper:not(.dragging) {
	cursor: grab;
}
/* Individual slides */
.scrollable-posts-wrapper > * {
	flex-shrink: 0;
	scroll-snap-align: start;
}

/** ====================================
**  CUSTOM SCROLLBAR
** ==================================== */
.scroll-posts-bar {
	position: relative;
	height: 7px;
	background-color: rgba(0, 0, 0, 0.1);
	border-radius: 3px;
	cursor: pointer;
	/** add offset */
	background-clip: padding-box;
	border: 2px solid #fff;
}
.scroll-posts-thumb {
	position: absolute;
	left: 0;
	/* top: 0;
  height: 100%; */
	/* background-color: rgba(0, 0, 0, 0.4); */
	background: var(--accent);
	border-radius: 3px;
	cursor: grab;
	transition:
		background-color 0.2s ease,
		left 0.3s ease;
	/** add offset */
	top: -2px;
	height: calc(100% + 4px);
}
.scroll-posts-thumb:hover {
	background-color: rgba(0, 0, 0, 0.6);
}
.scroll-posts-thumb:active,
.scroll-posts-bar.dragging .scroll-posts-thumb {
	cursor: grabbing;
	background-color: rgba(0, 0, 0, 0.7);
}

/** ====================================
**  MOBILE DOTS
** ==================================== */
.scroll-posts-dots {
	display: none;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
}
.scroll-posts-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: rgba(0, 0, 0, 0.2);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: all 0.3s ease;
}
.scroll-posts-dot:hover {
	background-color: rgba(0, 0, 0, 0.4);
}
.scroll-posts-dot.active {
	background-color: rgba(0, 0, 0, 0.6);
	transform: scale(1.2);
}

/** ====================================
**  ARROWS
** ==================================== */
div:has(> .scrollable-posts-wrapper) {
	position: relative;
}
.scroll-posts-arrows {
	display: flex;
	justify-content: space-between;
	align-items: center;
	pointer-events: none;
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	transform: translateY(-50%);
}
.slide-arrow {
	pointer-events: all;
	width: 63px;
	height: 63px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	z-index: 1;
	background: var(--why-icon-sprite);
	background-size: 400px;
	background-position: 0 -70px;
}
.slide-arrow:hover:not(:disabled) {
	transform: scale(1.05);
}
.slide-arrow:disabled,
.slide-arrow.disabled {
	opacity: 0.4;
	cursor: not-allowed;
}
.slide-arrow.prev-arrow {
	position: relative;
	/* left: -10px; */
}
.slide-arrow.next-arrow {
	position: relative;
	/* right: -10px; */
	background-position: -91px -70px;
}

/** ====================================
**  ACCESSIBILITY
** ==================================== */
/* Keyboard focus styles */
.scroll-posts-dot:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}
.scroll-posts-thumb:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}
.scrollable-posts-wrapper:focus-visible {
	outline: 2px solid #000;
	outline-offset: -2px;
}
/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
	.scrollable-posts-wrapper,
	.scroll-posts-thumb,
	.scroll-posts-dot {
		scroll-behavior: auto;
		transition: none;
	}
}
