/* ──────────────────────────────────────────────
   Виджет «Публикации» (news)
   ────────────────────────────────────────────── */

.News {
	padding: 20px;
	box-sizing: border-box;
}

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

.News__Heading {
	margin: 0 0 24px;
	font-family: AvenirNextCyr-Bold, Arial, sans-serif;
	font-size: 25px;
	line-height: 1.2;
	color: #3c3e43;
	transition: color 0.2s ease;
}

/* Ховер по обёрнутому в ссылку заголовку (когда есть title.link) */
.News__HeadingLink:hover .News__Heading,
.News__Heading:hover {
	color: #995ce2;
}

.News__Grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px 24px;
}

/* ──────────────────────────────────────────────
   Карточка
   ────────────────────────────────────────────── */

.NewsCard {
	display: flex;
	flex-direction: column;
	gap: 16px;
	background: transparent;
}

/* Когда вся карточка — ссылка, убираем дефолтное подчёркивание/цвет */
.NewsCard_Link {
	text-decoration: none;
	color: inherit;
}

/* Блок с изображением, служит опорой для тегов-оверлея */
.NewsCard__Media {
	position: relative;
	overflow: hidden;
	border-radius: 20px;
	aspect-ratio: 16 / 9;
}

.NewsCard__Image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ──────────────────────────────────────────────
   Контент карточки
   ────────────────────────────────────────────── */

.NewsCard__Content {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.NewsCard__Title {
	margin: 0;
	font-family: AvenirNextCyr-Bold, Arial, sans-serif;
	font-size: 24px;
	line-height: 1.3;
	color: #3c3e43;
	text-decoration: none;
	transition: color 0.2s ease;
}

/* Заголовок-ссылка (когда нет картинки) — подчёркиваем как в дизайне */
.NewsCard__Title_Linked {
	display: inline;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Ховер по самому заголовку-ссылке (карточка без картинки) */
.NewsCard__Title_Linked:hover {
	color: #995ce2;
}

/* Ховер по карточке-ссылке (картинка + link) —
   заголовок подсвечивается тем же цветом для единого поведения */
.NewsCard_Link:hover .NewsCard__Title {
	color: #995ce2;
}

.NewsCard__Subtitle {
	margin: 0;
	font-family: AvenirNextCyr-Regular, Arial, sans-serif;
	font-size: 18px;
	line-height: 1.45;
	color: #3c3e43;
}

/* ──────────────────────────────────────────────
   Теги
   ────────────────────────────────────────────── */

.NewsCard__Tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Оверлей поверх изображения */
.NewsCard__Tags_Overlay {
	position: absolute;
	top: 12px;
	left: 12px;
	right: 12px;
	z-index: 2;
}

.NewsCard__Tag {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 13px;
	background: linear-gradient(180deg, #995ce2 0%, #7f6be5 99.48%);
	color: #fff;
	font-family: AvenirNextCyr-Medium, Arial, sans-serif;
	font-size: 16px;
	line-height: 18px;
	white-space: nowrap;
}

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

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

@media (max-width: 768px) {
	.News {
		padding: 10px;
	}

	.News__Heading {
		font-size: 22px;
		margin-bottom: 16px;
	}

	.News__Grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.NewsCard__Title {
		font-size: 18px;
	}

	.NewsCard__Subtitle {
		font-size: 16px;
	}

	.NewsCard__Tag {
		font-size: 14px;
		line-height: 16px;
	}
}
