.partner-container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	justify-items: stretch;
	align-items: stretch;
}

.partner-container > * {
	width: 100%;
}

.partner-item-link {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.partner-item {
	background-color: transparent;
	width: 100%;
	height: 100%;
	perspective: 1000px;
	display: flex;
	flex-direction: column;
	flex: 1;
}
.card-inner {
	position: relative;
	width: 100%;
	flex: 1;
	text-align: center;
	transition: transform 0.6s;
	transform-style: preserve-3d;
    border: 1px solid var(--gray-color-300);
    border-radius: 22px;
	display: flex;
	flex-direction: column;
}

.partner-item:hover .card-inner,
.partner-item-link:hover .card-inner {
	transform: rotateY(180deg);
}

.partner-item:hover .partner-item-front,
.partner-item-link:hover .partner-item-front {
	z-index: 1;
}

.partner-item:hover .partner-item-back,
.partner-item-link:hover .partner-item-back {
	z-index: 2;
}

/* Hidden helper to establish height based on back content */
.partner-item-back-height-helper {
	padding: 20px;
	visibility: hidden;
	opacity: 0;
	position: relative;
	pointer-events: none;
	width: 100%;
	height: auto;
	display: flex;
	flex-direction: column;
	font-size: 16px;
	line-height: 20px;
	margin: 0;
}

.partner-item-back-height-helper img {
	background-color: #fff;
	max-height: 50px;
	border-radius: 10px;
	margin-bottom: 10px;
    width: auto;
}

.partner-item-back-height-helper ul {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	margin: 0 20px;
}

.partner-item-front {
    padding: 20px;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
    text-align: left;
    border-radius: 22px;
    font-size: 14px;
    line-height: 16px;
    overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	transform: rotateY(0deg) translateZ(1px);
	z-index: 2;
}
.partner-item-front img {
    max-width: 140px;
}

.partner-item-back {
    padding: 20px;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
    text-align: left;
    border-radius: 22px;
    font-size: 16px;
    font-weight: 700;
	line-height: 20px;
    overflow: hidden;
	display: flex;
	flex-direction: column;
	background-color: var(--primary-color);
	color: white;
	transform: rotateY(180deg) translateZ(0px);
	justify-content: flex-start;
	align-items: flex-start;
	z-index: 1;
}

.partner-item:hover .partner-item-back,
.partner-item-link:hover .partner-item-back {
	transform: rotateY(180deg) translateZ(1px);
}

.partner-item:hover .partner-item-front,
.partner-item-link:hover .partner-item-front {
	transform: rotateY(0deg) translateZ(0px);
}

.partner-item-back img {
    background-color: #fff;
    max-height: 60px;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 10px;
}
.partner-item-back ul {
	list-style: none;
    display: flex;
    align-items: center;
    justify-content: left;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 16px;
    gap: 10px;
}
.partner-item-back ul li {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 16px;
    background-color: #DDDEDF;
    color: var(--primary-color);
    font-weight: 700;
}
.partner-item-back ul li::before {
    content: "#";
    margin-right: 2px;
}
@media (max-width: 1699px) {
	.partner-container {
		grid-template-columns: repeat(3, 1fr);
	}
}
@media (max-width: 991px) {
	.partner-container {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 767px) {
	.partner-container {
		grid-template-columns: repeat(1, 1fr);
	}
}