/**
 * === Section Activity Gallery Marquee - Hình ảnh hoạt động ===
 *
 * Mô tả: Dựng dải ảnh hoạt động chạy ngang liên tục, lấy cảm hứng từ carousel
 *        đối tác Thuận Hải nhưng dùng CSS marquee nhẹ và có reduced-motion fallback.
 */

.section-activity-gallery-marquee {
	position: relative;
	--activity-gallery-edge: clamp(20px, 2vw, 29px);
	padding-block: clamp(44px, 5vw, 68px) clamp(64px, 7vw, 88px);
	overflow: hidden;
	background: linear-gradient(180deg, #f2f2f2 0%, #f7faf8 100%);
}

.activity-gallery-marquee {
	position: relative;
	width: 100vw;
	margin-top: clamp(28px, 4vw, 48px);
	margin-inline: calc(50% - 50vw);
	overflow: hidden;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
}

.activity-gallery-marquee.is-dragging {
	cursor: grabbing;
}

.activity-gallery-marquee__drag {
	width: max-content;
	will-change: transform;
	transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

.activity-gallery-marquee.is-dragging .activity-gallery-marquee__drag {
	transition-duration: 0ms;
}

.activity-gallery-marquee::before,
.activity-gallery-marquee::after {
	content: none;
	position: absolute;
	top: 0;
	bottom: 0;
	z-index: 2;
	width: min(5vw, 64px);
	pointer-events: none;
}

.activity-gallery-marquee::before {
	left: 0;
	background: linear-gradient(90deg, rgba(242, 242, 242, 0.62) 0%, rgba(242, 242, 242, 0) 100%);
}

.activity-gallery-marquee::after {
	right: 0;
	background: linear-gradient(270deg, rgba(247, 250, 248, 0.62) 0%, rgba(247, 250, 248, 0) 100%);
}

.activity-gallery-marquee__track {
	display: flex;
	align-items: center;
	gap: clamp(22px, 3vw, 42px);
	width: max-content;
	padding-inline: var(--activity-gallery-edge);
	will-change: transform;
	animation: bvyhctActivityGalleryMarquee 54s linear infinite;
}

.activity-gallery-marquee__item {
	flex: 0 0 clamp(260px, 24vw, 430px);
	aspect-ratio: 16 / 10;
	margin: 0;
	overflow: hidden;
	border-radius: 24px;
	background: var(--color-surface-warm, #f5f5f0);
	box-shadow: none;
}

.activity-gallery-marquee__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	pointer-events: none;
	transform: scale(1.01);
	-webkit-user-drag: none;
	user-drag: none;
}

@keyframes bvyhctActivityGalleryMarquee {
	from {
		transform: translate3d(0, 0, 0);
	}

	to {
		transform: translate3d(calc(-50% - clamp(11px, 1.5vw, 21px)), 0, 0);
	}
}

@media (max-width: 767px) {
	.section-activity-gallery-marquee {
		--activity-gallery-edge: var(--gutter-mobile, 20px);
		padding-block: 42px 56px;
	}

	.activity-gallery-marquee {
		margin-top: 28px;
	}

	.activity-gallery-marquee__track {
		gap: 18px;
		padding-inline: var(--gutter-mobile, 20px);
		animation-duration: 42s;
	}

	.activity-gallery-marquee__item {
		flex-basis: 76vw;
		border-radius: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.activity-gallery-marquee__track {
		animation: none;
		transform: none;
	}

	.activity-gallery-marquee {
		overflow-x: auto;
		scrollbar-width: thin;
		cursor: auto;
		touch-action: auto;
		user-select: auto;
	}
}
