/* Блок услуг на главной: карточка = картинка сверху, название, список дочерних.
   Namespace chm-sw-* не пересекается с классами стены категорий из stylesheet.css,
   поэтому прежние правила темы сюда не приходят. */

.chm-services-wall {
	margin-bottom: 30px;
}

.chm-sw-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -10px;
}

.chm-sw-item {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	padding: 0 10px;
	margin-bottom: 28px;
	width: 50%;
}

@media (min-width: 768px) {
	.chm-sw-item {
		width: 33.3333%;
	}
}

@media (min-width: 1200px) {
	.chm-sw-item {
		width: 25%;
	}
}

/* --- Картинка --- */

.chm-sw-image {
	display: block;
	margin-bottom: 12px;
	border-radius: 8px;
	overflow: hidden;
	background-color: #fff;
}

.chm-sw-image img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.25s ease;
}

@media (min-width: 768px) {
	a.chm-sw-image:hover img {
		transform: scale(1.04);
	}
}

/* --- Название главной услуги --- */

.chm-sw-name {
	display: block;
	margin-bottom: 10px;
	color: #1f2328;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
}

a.chm-sw-name:hover,
a.chm-sw-name:focus {
	color: #1f2328;
	text-decoration: underline;
}

/* --- Список дочерних услуг --- */

.chm-sw-children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.chm-sw-children li {
	margin-bottom: 7px;
}

.chm-sw-children li:last-child {
	margin-bottom: 0;
}

.chm-sw-children a {
	color: #57606a;
	font-size: 14px;
	line-height: 1.35;
	text-decoration: none;
	transition: color 0.15s ease;
}

.chm-sw-children a:hover,
.chm-sw-children a:focus {
	color: #1f2328;
	text-decoration: underline;
}

/* Дочерние сверх лимита скрыты до раскрытия. Они есть в разметке, а не
   догружаются, поэтому ссылки на них видны поисковику и работают без скриптов. */
.chm-sw-item:not(.is-expanded) .chm-sw-extra {
	display: none;
}

/* --- Кнопка «показати ще» --- */

.chm-sw-toggle {
	align-self: flex-start;
	margin-top: 10px;
	padding: 0;
	border: 0;
	background: none;
	color: #1f2328;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	transition: color 0.15s ease;
}

.chm-sw-toggle::after {
	content: '';
	display: inline-block;
	margin-left: 6px;
	vertical-align: 2px;
	border: 4px solid transparent;
	border-top-color: currentColor;
	transition: transform 0.2s ease;
}

.chm-sw-item.is-expanded .chm-sw-toggle::after {
	transform: rotate(180deg);
	vertical-align: 5px;
}

.chm-sw-toggle:hover,
.chm-sw-toggle:focus {
	color: #000;
	text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
	.chm-sw-toggle::after {
		transition: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.chm-sw-image img {
		transition: none;
	}

	a.chm-sw-image:hover img {
		transform: none;
	}
}
