/**
 * Секция «Направления хирургии».
 * Шаблон: template-parts/sections/services.php
 */

.services {
	--sv-navy: #133b50;
	--sv-navy-soft: #5a6e7b;
	--sv-accent: #a51e24;
	--sv-line: #e3e7eb;
	--sv-line-soft: #eef1f4;

	padding: 44px 0 52px;
	background-color: #f5f7f9;
}

.services__head {
	margin-bottom: 30px;
}

.services .services__title {
	margin: 0 0 10px;
	padding: 0;
	font-size: 32px;
	line-height: 1.2;
	font-weight: bold;
	text-transform: none;
	color: var(--sv-navy);
}

.services__subtitle {
	margin: 0;
	font-size: 16px;
	line-height: 1.45;
	color: var(--sv-navy-soft);
}

.services__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

.services__card {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: flex-start;
	align-items: flex-start;
	min-width: 0;
	padding: 26px 28px;
	border: 1px solid var(--sv-line);
	border-radius: 4px;
	background-color: #fff;
}

.services__icon {
	-webkit-flex: 0 0 auto;
	flex: 0 0 auto;
	width: 96px;
	margin-right: 24px;
	text-align: center;
}

.services__icon img,
.services__icon svg {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: 96px;
	margin: 0 auto;
}

.services__body {
	-webkit-flex: 1 1 auto;
	flex: 1 1 auto;
	min-width: 0;
}

/* Заголовок карточки + короткая красная черта под ним */
.services .services__name {
	position: relative;
	margin: 0 0 20px;
	padding: 0 0 12px;
	font-size: 19px;
	line-height: 1.25;
	font-weight: bold;
	text-transform: none;
	color: var(--sv-navy);
}

.services .services__name a {
	color: inherit;
	text-decoration: none;
}

.services .services__name a:hover {
	color: var(--sv-accent);
}

.services .services__name:after {
	content: '';
	display: block;
	position: absolute;
	left: 0;
	bottom: 0;
	width: 34px;
	height: 3px;
	border-radius: 2px;
	background-color: var(--sv-accent);
}

.services__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.services__item {
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--sv-line-soft);
}

.services__item:last-child {
	border-bottom: 0;
}

.services__link {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: space-between;
	justify-content: space-between;
	padding: 9px 2px 9px 0;
	font-size: 15px;
	line-height: 1.35;
	color: var(--sv-navy);
	text-decoration: none;
}

.services__link:hover,
.services__link:focus {
	color: var(--sv-accent);
	text-decoration: none;
}

.services__link-text {
	min-width: 0;
	padding-right: 14px;
}

/* Шеврон справа — на бордерах, без картинки */
.services__link:after {
	content: '';
	-webkit-flex: 0 0 auto;
	flex: 0 0 auto;
	width: 7px;
	height: 7px;
	border-top: 1.5px solid #9fb0bb;
	border-right: 1.5px solid #9fb0bb;
	-webkit-transform: rotate(45deg);
	transform: rotate(45deg);
}

.services__link:hover:after,
.services__link:focus:after {
	border-color: var(--sv-accent);
}

.services__text {
	font-size: 15px;
	line-height: 1.45;
	color: var(--sv-navy-soft);
}

.services__text p {
	margin: 0 0 8px;
}

.services__text p:last-child {
	margin-bottom: 0;
}

/* Когда в карточке есть и описание, и список — разводим их */
.services__text + .services__list {
	margin-top: 14px;
}

.services__more {
	display: -webkit-inline-flex;
	display: inline-flex;
	-webkit-align-items: center;
	align-items: center;
	margin-top: 18px;
	font-size: 15px;
	line-height: 1.35;
	color: var(--sv-navy);
	text-decoration: none;
}

.services__more:hover,
.services__more:focus {
	color: var(--sv-accent);
	text-decoration: none;
}

.services__more:after {
	content: '';
	width: 7px;
	height: 7px;
	margin-left: 10px;
	border-top: 1.5px solid #9fb0bb;
	border-right: 1.5px solid #9fb0bb;
	-webkit-transform: rotate(45deg);
	transform: rotate(45deg);
}

.services__more:hover:after,
.services__more:focus:after {
	border-color: var(--sv-accent);
}

/* --- Адаптив --- */

@media (max-width: 1199px) {
	.services__card {
		padding: 24px;
	}

	.services__icon {
		width: 82px;
		margin-right: 20px;
	}

	.services__icon img,
	.services__icon svg {
		max-height: 82px;
	}
}

@media (max-width: 991px) {
	.services {
		padding: 34px 0 40px;
	}

	.services .services__title {
		font-size: 26px;
	}

	.services__subtitle {
		font-size: 15px;
	}

	.services__grid {
		gap: 18px;
	}

	.services__card {
		padding: 20px;
	}

	.services__icon {
		width: 64px;
		margin-right: 16px;
	}

	.services__icon img,
	.services__icon svg {
		max-height: 64px;
	}

	.services .services__name {
		font-size: 17px;
		margin-bottom: 16px;
	}

	.services__link {
		font-size: 14px;
	}
}

@media (max-width: 767px) {
	.services__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
}

@media (max-width: 575px) {
	.services {
		padding: 26px 0 32px;
	}

	.services .services__title {
		font-size: 22px;
	}

	.services__head {
		margin-bottom: 22px;
	}

	.services__card {
		padding: 18px 16px;
	}

	.services__icon {
		width: 52px;
		margin-right: 14px;
	}

	.services__icon img,
	.services__icon svg {
		max-height: 52px;
	}
}
