/* Выравниваем отступ под заголовком под секцию "О компании" (gap: 32px) */
.services__title {
	margin-bottom: 32px;
}

/* ===== Services tabs wrapper ===== */
.services-tabs-wrap {
	margin: 0 0 40px;
	padding: 0;
}

/* Плашка-контейнер */
.services-tabs {
	display: flex;
	align-items: center;
	justify-content: space-evenly;
	gap: 0;
	height: 63px;
	padding: 11px;
	/* gradient border + radius через padding-box/border-box */
	background:
		linear-gradient(#FFFFFF, #FFFFFF) padding-box,
		linear-gradient(180deg, #E8E8E8 0%, #F0F0F0 4%, #FFFFFF 31%, #FFFFFF 60%, #F8F8F8 85.1%, #E8E8E8 100%) border-box;
	border: 2px solid transparent;
	border-radius: 10px;
	box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
}

/* Неактивные вкладки — только текст, без фона, размер по тексту */
.services-tab {
	flex: 0 0 auto;
	height: 41px;
	min-width: 0;
	padding: 0 8px;
	font-family: 'Open Sans', sans-serif;
	font-style: normal;
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	text-align: center;
	color: #5B5B5B;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 10px;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: background 0.25s ease, border-color 0.25s ease, flex 0.25s ease;
}

/* Hover — лёгкий серый намёк */
.services-tab:hover:not(.is-active) {
	background: rgba(229, 229, 229, 0.35);
}

/* Активная вкладка — 151×41px, жёлтая рамка, градиентный фон */
.services-tab.is-active {
	flex: 0 0 151px;
	height: 41px;
	background: linear-gradient(180deg, #EFEDED 7.29%, #E4E4E4 92.71%);
	border: 1px solid #EEC843;
	-webkit-backdrop-filter: blur(40px);
	backdrop-filter: blur(40px);
}

/* ===== Panels ===== */
.services-panels {
	position: relative;
	margin: 0;
	padding: 0;
}

.services-panel {
	display: none;
}

.services-panel.is-active {
	display: block;
	animation: services-fade 0.4s ease both;
}

@keyframes services-fade {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}

.services-panel--empty {
	min-height: 200px;
	display: none;
	align-items: center;
	justify-content: center;
	color: #888;
	font-family: 'Source Sans Pro', sans-serif;
	font-size: 18px;
	text-align: center;
	padding: 60px 20px;
}
.services-panel--empty.is-active {
	display: flex;
}

/* ===== Cards grid (3 колонки) ===== */
.services-cards {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	/* отступ сверху — чтобы жёлтый кружок логотипа не наезжал на плашку */
	margin-top: 55px;
	padding-top: 15px;
}

/* Одиночная центрированная карточка (Валидация / Оборудование / Сертификация / Обучение) */
.services-cards--single {
	grid-template-columns: 340px;
	justify-content: center;
}

/* Карточка */
.service-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 340px;
	padding: 40px 25px 30px;
	background: #FFFFFF;
	box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.25);
	border-radius: 50px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
	transform: translateY(-4px);
	box-shadow: 0px 10px 18px rgba(0, 0, 0, 0.18);
}

/* Жёлтый круг с логотипом в левом верхнем углу */
.service-card__logo {
	position: absolute;
	top: -20px;
	left: -20px;
	width: 73px;
	height: 73px;
	border-radius: 50%;
	background: #EEC843;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	flex-shrink: 0;
}

.service-card__logo img {
	width: 62%;
	height: 62%;
	object-fit: contain;
}

/* Картинка */
.service-card__image {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-bottom: 18px;
}

.service-card__image img {
	max-width: 100%;
	max-height: 230px;
	object-fit: contain;
}

/* Заголовок карточки */
.service-card__title {
	font-family: 'Source Sans Pro', sans-serif;
	font-weight: 700;
	font-size: 20px;
	line-height: 1.2;
	color: #5B5B5B;
	text-align: center;
	margin: 0;
}

/* ===== Adaptive ===== */
@media (max-width: 1024px) {
	.services-tabs {
		overflow-x: auto;
		justify-content: flex-start;
	}
	.services-tab {
		flex: 0 0 auto;
	}
	.services-tab.is-active {
		flex: 0 0 151px;
	}
	.services-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 640px) {
	.services-tabs-wrap {
		padding: 0 10px;
		margin-bottom: 30px;
	}
	.services-tabs {
		height: auto;
		padding: 8px;
		gap: 5px;
	}
	.services-tab {
		font-size: 14px;
		height: 36px;
	}
	.services-tab.is-active {
		flex: 0 0 130px;
		height: 36px;
	}
	.services-cards {
		grid-template-columns: 1fr;
		gap: 50px;
	}
	.service-card {
		border-radius: 30px;
	}
	.service-card__logo {
		width: 60px;
		height: 60px;
		top: -12px;
		left: -12px;
	}
}
