.grey-background:has(#cbam-sliding-cards) {
	position: relative;
	&::after {
		top: 0;
		content: '';
		position: absolute;
		height: 100%;
		width: 100vw;
		background-color: #F5F5F7;
		z-index: -2;
	}
}

.wp-block-column:has(#cbam-sliding-cards) :is(h2, p) {
	max-width: 880px;
	margin-left: auto;
	margin-right: auto;
}

.wp-block-column:has(#cbam-sliding-cards) p {
	margin-bottom: 0;
	margin-top: 23px;
	font-size: 18px;
	margin-left: 0;
	margin-right: 0;
	&.has-text-align-center  {
		margin-left: auto;
		margin-right: auto;
	}
}

.wp-block-column:has(#cbam-sliding-cards) :is(p, div).has-text-align-center  {
	margin-left: auto;
	margin-right: auto;
}

#cbam-sliding-cards {
	--gap: 15px;
	padding-bottom: 80px;
	gap: var(--gap);
	max-width: 1156px;
	margin: 0 auto;
	
	& + .sec-heading {
		position: relative;
		display: none;
	}
	
	& .row {
		gap: var(--gap);
	}
	
	& .row-wrapper {
		min-width: 100%;
	}
	
	@media (max-width: 991px) {
		
		margin: 0 calc(var(--sideGap) * -1);
		width: 100vw;
		max-width: 100vw;
		
		& .row {
			display: flex;
			gap: var(--gap);
			overflow: auto;
			flex-wrap: nowrap;
			scroll-snap-type: x mandatory;
			-ms-overflow-style: none;
			scrollbar-width: none;
			border-bottom: 0;
			position: relative;
			justify-content: start;
			padding: 0 var(--sideGap) !important;
			scroll-padding: 0 var(--sideGap);
			scroll-behavior: smooth;
			margin-bottom: 0;
			flex-wrap: nowrap !important;
			
			&::before {
				opacity: 0;
				content: '';
				background-color: #000;
				height: 100%;
				width: 100%;
				display: block;
				position: fixed;
				top: 0;
				left: 0;
				z-index: 1000;
				pointer-events: none;
				transition: opacity linear 400ms;
			}
			
			&:has(.wp-block-columns.show) {
				&::before {
					opacity: 0.5;
					pointer-events: auto;
				}
			}
			
		}
		
		& .row-wrapper {
			width: 100%;
			position: relative;
			&::before, &::after {
				content: '';
				background: linear-gradient(90deg, rgba(238, 238, 241, 0.00) 0%, #EEEEF1 100%);
				position: absolute;
				right: 0;
				top: 1em;
				bottom: 1em;
				width: 103px;
				z-index: 10;
				@media (max-width: 991px) {
					width: 40px;
					bottom: 0;
				}
			}
			&::after {
				left: 0;
				right: auto;
				rotate: 180deg;
			}
		}
		
		& + .sec-heading {
			display: flex;
			padding-top: 32px;
			& .resources-btns {
				position: relative; 
			}
		}
	}
	
	
	& .row > .wp-block-column {
		position: relative;
		padding: 16px;
		overflow: hidden;
		border-radius: 16px;
		aspect-ratio: 370 / 450;
		display: flex;
		flex-direction: column;
		justify-content: end;
		flex: 1;
		margin-bottom: 0;
		@media (max-width: 991px) {
			width: 100%;
			min-width: 300px;
			scroll-snap-align: start;
			aspect-ratio: 370 / 550;
		}
		
		& h3 {
			font-size: 24px;
			font-weight: 600;
			line-height: 120%; 
			margin-bottom: 0;
		}
		& .details-btn {
			margin-top: 33px;
			border: none;
			font-size: 15px;
			font-weight: 600;
			line-height: 125%;
			gap: 8px;
			background-color: transparent;
			display: flex;
			align-items: center;
			justify-content: end;
			padding: 0;
			&::after {
				content: '';
				background-image: url(/wp-content/themes/assent-wp/assets/images/webistry/XCircle.svg);
				width: 32px;
				height: 32px;
				display: block;
			}
		}
		& p {
			margin-bottom: 13px;
		}
		& > :where(p, h3, .details-btn) {
			color: #fff;
			position: relative;
			z-index: 1;
			pointer-events: none;
		}
		&:has(.show) {
			box-shadow: 0px 0px 22px 0px rgba(4, 4, 4, 0.10);
		}
	}
	& .close-btn {
		position: absolute;
		width: 32px;
		height: 32px;
		right: 16px;
		top: 16px;
		mask-image: url(/wp-content/themes/assent-wp/assets/images/webistry/XCircle.svg);
		background-color: #4D758F;
		rotate: 45deg;
	}
	& .wp-block-columns {
		position: absolute;
		top: 100%;
		height: 100%;
		left: 0;
		transition: top linear 400ms;
		border-radius: 16px;
		padding: 20px 16px !important;
		background: #FFF;
		justify-content: start;
		overflow: auto;
		z-index: 10;
		
		@media (max-width: 991px) {
			transition: bottom linear 400ms;
			bottom: -100%;
			top: auto;
			position: fixed;
			z-index: 1010;
			height: auto;
		}
		
		& .wp-block-column {
			display: flex;
			flex-direction: column;
			& p:has(.btn) {
				margin-top: auto;
			}
		}
		& h4 {
			color: #343A40;
			font-size: 18px;
			font-weight: 600;
			line-height: 125%;
			padding-right: 50px;
		}
		& :is(p, li) {
			color: #77797E;
			font-size: 14px;
			font-weight: 400;
			line-height: 150%;
			margin-bottom: 11px;
			padding: 0;
		}
		& ul {
			margin-bottom: 20px;
		}
		&.show {
			top: 0;
			@media (max-width: 991px) {
				top: auto;
				bottom: 0;
				max-heigth: 100vh;
			}
		}
	}
	& figure {
		position: absolute;
		inset: 0;
		height: 100%;
		z-index: 0;
		cursor: pointer;
		& img {
			height: 100%;
			object-fit: cover;
			scale: 1;
			transition: scale linear 0.25s;
		}
		&:hover img {
			scale: 1.1;
		}
		&::before {
			content: '';
			background: linear-gradient(180deg, rgba(52, 58, 64, 0.00) -22.39%, #343A40 100%);
			z-index: 10;
			position: absolute;
			inset: 0;
		}
  	}
}