/* Partners Section Styles */
.partners-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	justify-content: center;
	align-items: center;
	margin-top: 2rem;
}

/* Ensure 3 columns on desktop by setting flex-basis */
.partner-item {
	flex: 0 0 calc(33.333% - 1.33rem); /* 3 columns with gap consideration */
	background: #ffffff;
	border-radius: 12px;
	padding: 0;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	border: 2px solid #f8f9fa;
	height: 180px;
	width: 260px;
	max-width: 260px; /* Ensure consistent width */
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.partner-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(127, 190, 65, 0.2);
	border-color: #7fbe41;
}

.partner-logo {
	width: 100%;
	height: 100%;
	object-fit: contain; /* Changed from 'cover' to 'contain' to ensure full image visibility */
	filter: grayscale(70%);
	transition: filter 0.3s ease;
	border-radius: 12px;
	padding: 15px; /* Added padding to give some space around the images */
}

.partner-item:hover .partner-logo {
	filter: grayscale(0%);
}

/* Responsive Design */
@media (max-width: 992px) {
	.partner-item {
		flex: 0 0 calc(50% - 1rem); /* 2 columns on tablets */
		height: 160px;
		width: 220px;
		max-width: 220px;
		padding: 0;
	}
}

@media (max-width: 576px) {
	.partners-grid {
		gap: 1rem;
	}
	.partner-item {
		flex: 0 0 100%; /* 1 column on mobile */
		height: 140px;
		width: 200px;
		max-width: 200px;
		padding: 0;
	}
}

/* Animation for grid items */
.partner-item {
	animation: fadeInUp 0.6s ease forwards;
	opacity: 0;
	transform: translateY(20px);
}

.partner-item:nth-child(1) {
	animation-delay: 0.1s;
}
.partner-item:nth-child(2) {
	animation-delay: 0.2s;
}
.partner-item:nth-child(3) {
	animation-delay: 0.3s;
}
.partner-item:nth-child(4) {
	animation-delay: 0.4s;
}
.partner-item:nth-child(5) {
	animation-delay: 0.5s;
}
.partner-item:nth-child(6) {
	animation-delay: 0.6s;
}
.partner-item:nth-child(7) {
	animation-delay: 0.7s;
}
.partner-item:nth-child(8) {
	animation-delay: 0.8s;
}
.partner-item:nth-child(9) {
	animation-delay: 0.9s;
}

@keyframes fadeInUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Section spacing */
#partners {
	padding: 4rem 0;
}

#partners h2 {
	color: #2c3e50;
	font-weight: 700;
	margin-bottom: 1rem;
}

#partners .text-muted {
	font-size: 1.1rem;
	line-height: 1.6;
}

/* Green theme integration */
#partners .divider {
	border-color: #7fbe41;
	width: 3.25rem;
	border-width: 0.2rem;
	margin: 1.5rem auto;
}
