/**
 * 3 Image Bar Block Styles
 *
 * @package made-to-thrive-2026-base
 * @since 1.0.0
 */

.image-3-bar {
	width: 100%;
	position: relative;
	padding: 4rem 2rem;
	overflow: visible;
}

.image-3-bar-container {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
}

/* Background Color Bar */
.image-3-bar-background {
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	height: 224px;
	width: 100%;
	z-index: 1;
	background-color: var(--wp--preset--color--cream, #EFE6DD);
}

/* If block has background color, use it */
.image-3-bar.has-background .image-3-bar-background {
	background-color: inherit;
}

/* Images Container */
.image-3-bar-images {
	position: relative;
	z-index: 2;
	display: flex;
	gap: 2rem;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	padding: 0 0 0;
}

/* Above 900px: Swiper classes should not interfere with flex layout */
@media (min-width: 901px) {
	.image-3-bar-images.image-3-bar-swiper {
		display: flex;
	}
	
	.image-3-bar-images.image-3-bar-swiper .swiper-wrapper {
		display: flex;
		gap: 2rem;
		justify-content: center;
		align-items: center;
		width: 100%;
		flex-wrap: wrap;
	}
	
	.image-3-bar-images.image-3-bar-swiper .swiper-slide {
		display: block;
		width: auto;
		flex: 0 0 auto;
	}
}

/* Individual Image Figure */
.image-3-bar-figure {
	margin: 0;
	padding: 0;
	position: relative;
}
.image-3-bar-figure:before {
	content:"";
	display:block;
	width: 308px;
	height: 447px;
	background:#C1B488;
	position:absolute;
	top: -7px;
	left:-8px;
	border-radius:12px
}

/* Individual Images */
.image-3-bar-image {
	width: 308px;
	height: 448px;
	object-fit: cover;
	object-position: center;
	display: block;
	border-radius: 12px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
	z-index: 1;
}

@media (max-width:1024px) {
	.image-3-bar-figure:before {
		width:100%;
		height:100%;
	}
	.image-3-bar-image {
		width:100%;
		height:auto;
		aspect-ratio:8/11;
	}
	.image-3-bar-figure {
		width:30%;
	}
}
/* Swiper Slider - 900px and below */
@media (max-width: 900px) {
	.image-3-bar {
		padding: 3rem 1rem;
	}

	/* Disable flex layout for Swiper */
	.image-3-bar-images.image-3-bar-swiper {
		display: block;
		flex-direction: row;
		flex-wrap: nowrap;
		overflow: visible;
		padding: 2rem 0 1.5rem;
		gap: 28px;
	}

	.image-3-bar-images.image-3-bar-swiper .swiper-wrapper {
		position: relative;
		z-index: 1;
		display: flex;
	}

	.image-3-bar-images.image-3-bar-swiper .swiper-slide {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 308px; /* Fixed width for centered slides peek effect */
		flex-shrink: 0;
		box-sizing: border-box;
	}

	.image-3-bar-images.image-3-bar-swiper .image-3-bar-figure {
		flex: 0 0 auto;
		width: 308px;
		margin: 0;
	}

	.image-3-bar-images.image-3-bar-swiper .image-3-bar-figure:before {
		width: 308px;
		height: 447px;
	}

	.image-3-bar-images.image-3-bar-swiper .image-3-bar-image {
		width: 308px;
		height: 448px;
		max-width: none;
		aspect-ratio: auto;
	}

	.image-3-bar-background {
		height: auto;
		min-height: 150px;
		top: 50%;
	}
}

/* Responsive Styles - Mobile (768px and below) - Legacy styles for non-Swiper */
@media (max-width: 768px) {
	.image-3-bar-images:not(.image-3-bar-swiper) {
		/* Mobile slider (like memories-images) */
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		/* Hide scrollbar (keep scroll/swipe) */
		scrollbar-width: none; /* Firefox */
		-ms-overflow-style: none; /* IE/Edge legacy */
		scroll-snap-type: x mandatory;
		gap: 28px;
		justify-content: flex-start;
		align-items: stretch;
		padding: 2rem 0 1.5rem;
	}

	.image-3-bar-images:not(.image-3-bar-swiper)::-webkit-scrollbar {
		display: none; /* Chrome/Safari */
		height: 0;
	}

	.image-3-bar-images:not(.image-3-bar-swiper)::-webkit-scrollbar-track {
		background: rgba(76, 76, 59, 0.1);
		border-radius: 4px;
	}

	.image-3-bar-images:not(.image-3-bar-swiper)::-webkit-scrollbar-thumb {
		background: rgba(76, 76, 59, 0.3);
		border-radius: 4px;
	}

	.image-3-bar-images:not(.image-3-bar-swiper)::-webkit-scrollbar-thumb:hover {
		background: rgba(76, 76, 59, 0.5);
	}

	/* Ensure each image "card" snaps cleanly */
	.image-3-bar-images:not(.image-3-bar-swiper) .image-3-bar-figure {
		flex: 0 0 auto;
		width: 308px;
		scroll-snap-align: start;
	}
}

/* Extra Small Devices */
@media (max-width: 480px) {
	.image-3-bar {
		padding: 2rem 0.75rem;
	}

	.image-3-bar-images {
		gap: 1.5rem;
		padding: 1.5rem 0;
	}

	.image-3-bar-figure {
		width: 270px;
	}

	.image-3-bar-figure:before {
		width: 270px;
		height: 392px;
	}

	.image-3-bar-image {
		width: 270px;
		height: 393px;
		max-width: none;
	}
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
	.image-3-bar-image {
		border: 3px solid #000000;
		box-shadow: -8px -8px 16px rgba(0, 0, 0, 0.4);
	}
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
	.image-3-bar-image {
		transition: none;
	}

	.image-3-bar-image:hover {
		transform: none;
	}
}

/* Print Styles */
@media print {
	.image-3-bar {
		padding: 1rem 0;
		page-break-inside: avoid;
	}

	.image-3-bar-background {
		background-color: transparent;
		border: 2px solid #000000;
	}

	.image-3-bar-images {
		flex-direction: row;
		gap: 1rem;
	}

	.image-3-bar-image {
		box-shadow: none;
		border: 2px solid #000000;
		page-break-inside: avoid;
	}
}

/* Support for block wrapper color classes */
.image-3-bar.has-background {
	padding: 0 0 57px;
	margin: -18px 0 0;
	position: relative;
}
.image-3-bar.has-background:before {
	content:"";
	display:block;
	width:100%;
	height: 216px;
	background: #f8f2df;
	position:absolute;
	left:0;
	top:0;
}
.image-3-bar.has-text-color {
	color: inherit;
}

/* Ensure proper spacing when background color is applied */
.image-3-bar.has-background .image-3-bar-container {
	position: relative;
}

@media (max-width: 768px) {
	.image-3-bar.has-background {
		padding: 3rem 0;
	}
}

