
/* Gallery page mobile fixes
   - Prevent fixed-height clipping from global responsive rules
   - Re-enable marquee auto-scroll on touch devices for this page only
*/

html,
body {
	max-width: 100%;
	overflow-x: hidden;
}

.page {
	max-width: 100%;
	overflow-x: hidden;
}

#gallery {
	max-width: 100%;
	overflow-x: hidden;
}

#gallery .gallery-carousel-wrapper,
#gallery .gallery-carousel {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

#gallery .gallery-slide img {
	cursor: zoom-in;
}

@media (max-width: 1080px) {
	#gallery .gallery-carousel-wrapper,
	#gallery .gallery-carousel {
		overflow-x: hidden;
	}
}

#gallery .gallery-carousel-wrapper {
	content-visibility: visible;
	contain-intrinsic-size: auto;
}

@media (max-width: 1080px) {
	/* Small screens: avoid horizontal overflow from full-bleed negative margins */
	#gallery.gallery-section-full {
		margin-left: 0;
		margin-right: 0;
		width: 100%;
		max-width: 100%;
		padding-left: 0;
		padding-right: 0;
	}
}

#gallery .gallery-carousel {
	height: auto !important;
	max-height: none !important;
	scroll-behavior: auto !important;
}

/* If the CSS marquee fallback is active, do not pause on hover. */
#gallery .gallery-carousel-wrapper:hover .gallery-track {
	animation-play-state: running;
}

@media (max-width: 1080px) {
	#gallery .gallery-carousel {
		height: auto !important;
		max-height: none !important;
	}
}

@media (max-width: 760px) {
	#gallery .gallery-slide {
		aspect-ratio: 4 / 3;
		display: flex;
		align-items: center;
	}

	#gallery .gallery-slide img {
		width: 100%;
		height: auto;
		object-fit: contain;
	}
}
/* Disabled CSS marquee on mobile/touch to prevent conflicts with JS auto-scroll 
   and to avoid image-snapping visual bugs. JS auto-scroll now handles this smoothly.
@media (hover: none), (pointer: coarse) {
	#gallery .gallery-track {
		animation: marquee linear infinite 30s;
		animation-play-state: running;
	}

	#gallery .gallery-track.dragging-mode {
		animation: none;
	}
}
*/

@media (prefers-reduced-motion: reduce) {
	#gallery .gallery-track {
		animation: none !important;
	}
}

