/* Image Stacking Pattern */
.parallax-layers-container {
	position: relative;
	/* Height will be calculated dynamically based on number of images */
}

.parallax-layer {
	position: sticky;
	top: 0;
	width: 100%;
	height: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
}

/* Dynamic z-index for flexible number of images - last image has highest z-index */
.parallax-layer:nth-child(1) { z-index: 10; }
.parallax-layer:nth-child(2) { z-index: 20; }
.parallax-layer:nth-child(3) { z-index: 30; }
.parallax-layer:nth-child(4) { z-index: 40; }
.parallax-layer:nth-child(5) { z-index: 50; }
.parallax-layer:nth-child(6) { z-index: 60; }
.parallax-layer:nth-child(7) { z-index: 70; }
.parallax-layer:nth-child(8) { z-index: 80; }
.parallax-layer:nth-child(9) { z-index: 90; }
.parallax-layer:nth-child(10) { z-index: 100; }

.block-editor-block-list__block .layer-image, .layer-image {
	position: relative;
	width: 100%;
	margin: 0;
}

.layer-image img, .block-editor-block-list__block .layer-image img {
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: 0 !important;
	box-shadow: none !important;
}

.block-editor-block-list__block figure {
	& > * {
		max-width: 100% !important;
		width: 100% !important;
	}
}



/* Mobile responsive */
@media (max-width: 768px) {
	.layer-image img {
		height: 60vh;
	}
	.image-full-container-with-white-legend .layer-legend {
		bottom: 0 !important;
		top: unset !important;
		max-width: 100vw;
		position: relative;
	}
}

.block-editor-block-list__block .parallax-layers-container {
	overflow: hidden !important;
}

.is-position-sticky {
	z-index: -1 !important;
}

.image-full-container.is-position-sticky{
	overflow: hidden !important;
}
