.cm_team_grid_inner {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-gap: 25px;
	grid-auto-rows: 1fr; /* Ensure equal height for all rows */
}

.cm_team_grid_item {
	position: relative;
	display: flex;
	flex-direction: column;
}

.cm_team_grid_item img {
	display: block;
	width: 100%;
}

.cm_team_grid_item-img_wrapper {
	overflow: hidden;
	border: 1px solid #FFFFFF;
	border-bottom: unset;
	border-radius: 4px 4px 0px 0px;

}
.cm_team_grid_item-img_wrapper img{
aspect-ratio: 570 / 480; /* or simply aspect-ratio: 1.1875; */
  width: 100%;
}
.cm_team_grid_item_job_wrapper {
	text-align: center;
	padding: 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 5px;
	border-radius: 0px 0px 4px 4px;
	background: #4DB6E7;
	flex-grow: 1; /* Ensure equal height */
}

.cm_team_grid_item_job_wrapper > * {
	margin: 0;
}

.cm_team_grid_item_job_wrapper .cm_team_grid_item_name {
	font-size: 20px;
	font-weight: 600; 
	color: #000000;
}

.cm_team_grid_item_job_wrapper .cm_team_grid_item_title {
	font-size: 16px;
	font-weight: 600;
	color: #FFFFFF;
}

.cm_team_grid_item:hover img {
	transform: scale(1.1);
}

.cm_team_grid_item_quote_block {
	display: none;
	opacity: 0; 
	transition: opacity 0.3s ease-in-out; 
}

.cm_team_grid_item:hover .cm_team_grid_item_quote_block {
	display: block;
	background: #6f188d;
	color: white;
	border-radius: 20px;
	position: absolute;
	top: 20px;
	left: 80%;
	padding: 17px 30px;
	width: calc(100% + 60px); 
	box-sizing: border-box; 
	z-index: 10;
	opacity: 1;
}

.cm_team_grid_item:nth-child(4n):hover .cm_team_grid_item_quote_block {
	left: -80%;
}

.cm_team_grid_item_quote_name {
	padding-top: 16px;
}

@media (max-width: 900px) {
	.cm_team_grid_inner {
		grid-template-columns: repeat(3, 1fr);
	}

	.cm_team_grid_item:nth-child(4n):hover .cm_team_grid_item_quote_block {
		left: 80%;
	}

	.cm_team_grid_item:nth-child(3n):hover .cm_team_grid_item_quote_block {
		left: -80%;
	}
}

@media (max-width: 600px) {
	.cm_team_grid_inner {
		grid-template-columns: repeat(2, 1fr);
	}

	.cm_team_grid_item:nth-child(3n):hover .cm_team_grid_item_quote_block {
		left: 80%;
	}

	.cm_team_grid_item:nth-child(2n):hover .cm_team_grid_item_quote_block {
		left: -80%;
	}

	.cm_team_grid_item.new img {
		height: unset !important;
		max-width: unset;
	}  
}

@media (max-width: 500px) {
	.cm_team_grid_inner {
		grid-template-columns: repeat(1, 1fr);
	}

	.cm_team_grid_item:nth-child(3n):hover .cm_team_grid_item_quote_block {
		left: 80%;
	}

	.cm_team_grid_item:hover .cm_team_grid_item-img_wrapper {
		filter: brightness(0.3); /* Adjust the filter as needed */
	}

	.cm_team_grid_item:hover .cm_team_grid_item_quote_block,
	.cm_team_grid_item:nth-child(2n):hover .cm_team_grid_item_quote_block,
	.cm_team_grid_item:nth-child(3n):hover .cm_team_grid_item_quote_block,
	.cm_team_grid_item:nth-child(4n):hover .cm_team_grid_item_quote_block  {
		left: 0%;
		width: 100%;
		height 100%;
		background-color: transparent;
		padding-top: 0;
		padding-bottom: 0;
		font-size: 16px;
	}

	.cm_team_grid_item_quote_block {
		top: 0;
		padding: 17px 30px;
		position: absolute;
	}

	.cm_team_grid_item_quote_block .cm_team_grid_item_quote_name,
	.cm_team_grid_item_quote_block .cm_team_grid_item_quote_title {
		display: none; 
	}
  @media (max-width: 360px) {
  	.cm_team_grid_item:hover .cm_team_grid_item_quote_block,
	.cm_team_grid_item:nth-child(2n):hover .cm_team_grid_item_quote_block,
	.cm_team_grid_item:nth-child(3n):hover .cm_team_grid_item_quote_block,
    .cm_team_grid_item:nth-child(4n):hover .cm_team_grid_item_quote_block {
    		font-size: 14px;
    }
  }
}
