/* Примеры карточками: два в ряд, размеры сняты с прежнего сайта */

.cards {
	padding: 45px 20px;
	font-family: var(--vk-font);
}

.cards__title {
	width: min(1160px, 100%);
	margin: 0 auto 40px;
	font-size: 42px;
	font-weight: 600;
	line-height: 1.23;
	color: #000000;
	text-align: center;
	overflow-wrap: anywhere;
}

.cards__descr {
	width: min(560px, 100%);
	margin: 0 auto 90px;
	font-size: 24px;
	font-weight: 300;
	line-height: 1.5;
	color: #000000;
	text-align: center;
	overflow-wrap: anywhere;
}

.cards__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 40px;
	width: min(1160px, 100%);
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.card__image {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 20px;
	aspect-ratio: 28 / 17;
	object-fit: cover;
}

.card__body {
	flex: 1;
}

.card__uptitle {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	line-height: normal;
	letter-spacing: 2.5px;
	color: #ff8562;
	overflow-wrap: anywhere;
}

.card__title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	line-height: 1.35;
	color: #000000;
	overflow-wrap: anywhere;
}

.card__link {
	color: inherit;
	text-decoration: none;
}

/* Заголовок делает кликабельной всю карточку — кнопки лежат выше по слою */
.card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.card__descr {
	margin: 8px 0 0;
	font-size: 14px;
	font-weight: 300;
	line-height: 1.55;
	color: #000000;
	overflow-wrap: anywhere;
}

.card__buttons {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 19px;
}

.card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 35px;
	padding: 0 15px;
	border: 0;
	border-radius: 5px;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--vk-transition), color var(--vk-transition);
}

.card__button--dark {
	color: #ffffff;
	background: #000000;
}

.card__button--dark:hover {
	background: var(--vk-accent);
}

.card__button--outline {
	border: 1px solid #000000;
	color: #000000;
	background: transparent;
}

.card__button--outline:hover {
	color: #ffffff;
	background: #000000;
}

.card :focus-visible {
	outline: 2px solid var(--vk-accent);
	outline-offset: 2px;
}

/* Media */

@media (max-width: 1200px) {
	.cards__title {
		width: min(940px, 100%);
		font-size: 38px;
	}

	.cards__descr {
		font-size: 22px;
	}

	.cards__list {
		width: min(940px, 100%);
		gap: 0 20px;
	}

	.card__title {
		font-size: 22px;
	}

	.card__descr {
		font-size: 12px;
	}
}

@media (max-width: 960px) {
	.cards__title {
		width: min(600px, 100%);
		margin-bottom: 20px;
	}

	.cards__descr {
		margin-bottom: 60px;
	}

	.cards__list {
		width: min(600px, 100%);
		gap: 0 40px;
	}
}

@media (max-width: 640px) {
	.cards__title {
		font-size: 30px;
	}

	.cards__descr {
		font-size: 20px;
		line-height: 1.4;
	}

	.cards__list {
		width: 100%;
		gap: 0 20px;
	}

	.card__uptitle {
		font-size: 10px;
	}

	.card__title {
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.cards__list {
		grid-template-columns: minmax(0, 1fr);
		gap: 60px 0;
	}

	.card__button {
		min-height: 40px;
	}
}

/* Три в ряд: узкие карточки с высоким снимком на серой подложке —
   так этот раздел выглядел на прежнем сайте. */

.cards--three {
	padding: 75px 20px;
	background: #efefef;
}

.cards--three .cards__list {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0 40px;
}

.cards--three .card__image {
	margin-bottom: 27px;
	aspect-ratio: 9 / 10;
}

.cards--three .card__body,
.cards--three .card__buttons {
	padding-inline: 30px;
}

.cards--three .card__title {
	font-size: 20px;
	line-height: 1.35;
}

.cards--three .card__descr {
	font-size: 14px;
}

@media (max-width: 1200px) {
	.cards--three .cards__list {
		gap: 0 20px;
	}

	.cards--three .card__title {
		font-size: 18px;
	}

	.cards--three .card__descr {
		font-size: 12px;
	}
}

@media (max-width: 960px) {
	.cards--three .cards__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		width: min(640px, 100%);
		gap: 60px 40px;
	}
}

@media (max-width: 640px) {
	.cards--three .cards__list {
		width: 100%;
		gap: 60px 20px;
	}

	.cards--three .card__title {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.cards--three .cards__list {
		grid-template-columns: minmax(0, 1fr);
	}
}
