.services_box {
	display: block;
	position: relative;
	margin-bottom: 40px;
	padding: 30px 0;
	background: #eef6ea;
	border-radius: 10px;
}

.services_box .title_box {
	margin-bottom: 20px;
}

.services_grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
}

.service_card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #d7e8cf;
	border-radius: 10px;
	padding: 18px;
	text-decoration: none;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.service_card:hover {
	border-color: #4c8c3c;
	box-shadow: 0 4px 14px rgba(76, 140, 60, 0.15);
}

.service_title {
	color: #323458;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 8px;
}

.service_text {
	color: #555555;
	font-size: 14px;
	line-height: 1.4;
	margin-bottom: 12px;
	flex-grow: 1;
}

.service_link {
	color: #4c8c3c;
	font-size: 14px;
	font-weight: 700;
}

.services_all {
	display: inline-block;
	margin-top: 20px;
	color: #4c8c3c;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
}

.services_all:hover {
	text-decoration: underline;
}

/* Одинокая последняя карточка в ряду — на всю ширину, а не висит в первой колонке. */
@media (min-width: 1025px) {
	.services_grid > .service_card:last-child:nth-child(3n+1) {
		grid-column: 1 / -1;
	}

	/* Две в последнем ряду — вторая занимает две колонки, без пустой клетки. */
	.services_grid > .service_card:last-child:nth-child(3n+2) {
		grid-column: span 2;
	}
}

@media (min-width: 641px) and (max-width: 1024px) {
	.services_grid > .service_card:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}
}

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

@media (max-width: 640px) {
	.services_grid {
		grid-template-columns: 1fr;
	}
}
