/* Homepage customer stories horizontal-flowing masonry Swiper aligned with .dentistry_post_main tokens */
.customer-stories-masonry {
	--jwhq-masonry-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	width: min(100%, 1240px);
	margin-inline: auto;
	padding: 20px 16px 32px;
	color: var(--primary-color-main, #004250);
}

.customer-stories-masonry__swiper {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
}

.customer-stories-masonry__grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	grid-template-rows: auto auto;
	gap: 16px;
	align-items: stretch;
}

.customer-stories-masonry__tile {
	position: relative;
	display: block;
	aspect-ratio: 13 / 11;
	overflow: hidden;
	border: 1px solid var(--primary-color-gray-light, #e5e6e8);
	border-radius: 12px;
	background: var(--accent-fill-color, #e6f3f6);
	text-decoration: none;
	color: var(--primary-color-main, #004250);
	transition: border-color 180ms ease, transform 140ms var(--jwhq-masonry-ease-out);
}

.customer-stories-masonry__tile:active {
	transform: scale(0.985);
}

.customer-stories-masonry__tile:focus-visible {
	outline: 2px solid var(--primary-color-main, #004250);
	outline-offset: 2px;
}

/* Balanced 13:11 bento placement: 1 large featured tile (left) + 2x2 tiles (right) */
.customer-stories-masonry__tile:nth-child(1) {
	grid-column: 1 / 2;
	grid-row: 1 / 3;
	aspect-ratio: auto;
	height: 100%;
}

.customer-stories-masonry__tile:nth-child(2) {
	grid-column: 2 / 3;
	grid-row: 1 / 2;
}

.customer-stories-masonry__tile:nth-child(3) {
	grid-column: 3 / 4;
	grid-row: 1 / 2;
}

.customer-stories-masonry__tile:nth-child(4) {
	grid-column: 2 / 3;
	grid-row: 2 / 3;
}

.customer-stories-masonry__tile:nth-child(5) {
	grid-column: 3 / 4;
	grid-row: 2 / 3;
}

.customer-stories-masonry__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 240ms var(--jwhq-masonry-ease-out);
}

@media (hover: hover) and (pointer: fine) {
	.customer-stories-masonry__tile:hover {
		border-color: var(--primary-color-main, #004250);
	}

	.customer-stories-masonry__tile:hover .customer-stories-masonry__img {
		transform: scale(1.03);
	}
}

.customer-stories-masonry__overlay {
	position: absolute;
	inset: auto 0 0 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 28px 12px 12px;
	background: linear-gradient(to top, rgb(0 66 80 / 0.78) 0%, rgb(0 66 80 / 0.3) 60%, transparent 100%);
	pointer-events: none;
}

.customer-stories-masonry__badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 6px;
	background: var(--accent-fill-color, #e6f3f6);
	color: var(--primary-color-main, #004250);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
}

.customer-stories-masonry__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--secondary-color-main, #cde65b);
	color: var(--primary-color-main, #004250);
	font-size: 0.95rem;
	font-weight: 700;
	opacity: 0;
	transform: translateX(-4px);
	transition: opacity 200ms var(--jwhq-masonry-ease-out), transform 200ms var(--jwhq-masonry-ease-out);
}

@media (hover: hover) and (pointer: fine) {

	.customer-stories-masonry__tile:hover .customer-stories-masonry__arrow,
	.customer-stories-masonry__tile:focus-visible .customer-stories-masonry__arrow {
		opacity: 1;
		transform: translateX(0);
	}
}

.customer-stories-masonry__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 20px;
}

.customer-stories-masonry__nav {
	position: static;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 44px;
	margin: 0;
	border: 1px solid var(--primary-color-gray-light, #e5e6e8);
	border-radius: 50%;
	background: var(--white-color-text, #fff);
	color: var(--primary-color-main, #004250);
	cursor: pointer;
	transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms var(--jwhq-masonry-ease-out);
}

.customer-stories-masonry__nav:active {
	transform: scale(0.95);
}

.customer-stories-masonry__nav::after {
	display: none;
}

.customer-stories-masonry__nav svg {
	width: 20px;
	height: 20px;
}

.customer-stories-masonry__nav:is(:hover, :focus-visible) {
	background: var(--accent-fill-color, #e6f3f6);
	color: var(--primary-color-main, #004250);
	border-color: var(--primary-color-main, #004250);
}

.customer-stories-masonry__nav:focus-visible {
	outline: 2px solid var(--primary-color-main, #004250);
	outline-offset: 2px;
}

.customer-stories-masonry__pagination.swiper-pagination-bullets {
	position: static;
	width: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.customer-stories-masonry__pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	margin: 0 !important;
	background: rgb(var(--primary-color-spectrum, 0, 66, 80) / 0.22);
	opacity: 1;
	transition: transform 220ms var(--jwhq-masonry-ease-out), background-color 220ms ease;
}

.customer-stories-masonry__pagination .swiper-pagination-bullet-active {
	background: var(--primary-color-main, #004250);
	transform: scale(1.25);
}

.customer-stories-masonry__cta {
	margin-top: 22px;
	text-align: center;
}

@media (max-width: 991.98px) {
	.customer-stories-masonry__grid {
		grid-template-columns: 1.85fr 1fr 1fr;
		gap: 10px;
	}
}

@media (max-width: 767.98px) {
	.customer-stories-masonry {
		padding: 18px 12px 28px;
	}

	.customer-stories-masonry__grid {
		grid-template-columns: repeat(2, 1fr);
		grid-template-rows: auto;
		gap: 8px;
	}

	.customer-stories-masonry__tile:nth-child(1) {
		grid-column: 1 / 3;
		grid-row: 1 / 2;
		aspect-ratio: 13 / 11;
		height: auto;
	}

	.customer-stories-masonry__tile:nth-child(2) {
		grid-column: 1 / 2;
		grid-row: 2 / 3;
	}

	.customer-stories-masonry__tile:nth-child(3) {
		grid-column: 2 / 3;
		grid-row: 2 / 3;
	}

	.customer-stories-masonry__tile:nth-child(4) {
		grid-column: 1 / 2;
		grid-row: 3 / 4;
	}

	.customer-stories-masonry__tile:nth-child(5) {
		grid-column: 2 / 3;
		grid-row: 3 / 4;
	}

	.customer-stories-masonry__badge {
		font-size: 0.72rem;
		padding: 3px 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.customer-stories-masonry__tile,
	.customer-stories-masonry__img,
	.customer-stories-masonry__arrow,
	.customer-stories-masonry__nav,
	.customer-stories-masonry__pagination .swiper-pagination-bullet {
		transition: none;
	}
}