/**
 * Новости (WP posts): карточки + горизонтальная прокрутка + вкладки рубрик.
 */

.legstom-news-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 24px;
	padding: 0;
}

.legstom-news-tabs__item {
	padding: 10px 20px;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #0079ff;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
	white-space: nowrap;
	line-height: 1.1;
}

.legstom-news-tabs__item--active {
	background: #e8e8e8;
	color: #333;
}

@media (max-width: 768px) {
	.legstom-news-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		margin-bottom: 20px;
	}
	.legstom-news-tabs::-webkit-scrollbar {
		display: none;
	}
}

.legstom-news__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	padding: 4px 2px 14px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.legstom-news__track::-webkit-scrollbar {
	display: none;
}

.legstom-news__item {
	flex: 0 0 360px;
	scroll-snap-align: start;
}

@media (max-width: 768px) {
	.legstom-news__item {
		flex-basis: 85vw;
	}
}

/* Архив /news/: сетка карточек */
.legstom-news-archive .legstom-news__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.legstom-news-archive .legstom-news__item {
	flex: none;
}

@media (max-width: 1024px) {
	.legstom-news-archive .legstom-news__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.legstom-news-archive .legstom-news__grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
}

.legstom-news--loading {
	opacity: 0.7;
	pointer-events: none;
}

.legstom-news-card {
	height: 100%;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.legstom-news-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.legstom-news-card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #eee;
}

.legstom-news-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.25s ease;
}

.legstom-news-card__link:hover .legstom-news-card__media img {
	transform: scale(1.03);
}

.legstom-news-card__badge {
	position: absolute;
	left: 12px;
	top: 12px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	backdrop-filter: blur(6px);
}

.legstom-news-card__body {
	padding: 16px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.legstom-news-card__date {
	font-size: 13px;
	color: #777;
}

.legstom-news-card__title {
	margin: 0;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.2;
	color: #111;
}

.legstom-news-card__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #333;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.legstom-news-card__more {
	margin-top: auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #0079ff;
	font-weight: 700;
}

/* Сингл новости: блок "Другие новости" */
.legstom-news-related .legstom-section__title {
	text-align: left;
	position: relative;
	padding-top: 16px;
}

.legstom-news-related .legstom-section__title::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 64px;
	height: 4px;
	border-radius: 4px;
	background: #04bf68;
}

/* Сингл новости: дата + поделиться */
.legstom-news-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin: 0 0 16px;
}

.legstom-news-meta__date {
	font-size: 14px;
	color: #777;
}

.legstom-news-meta__share {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.legstom-news-meta__share-label {
	font-size: 14px;
	font-weight: 700;
	color: #111;
}

.legstom-news-meta__btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 12px;
	border-radius: 10px;
	background: #fff;
	border: 1px solid #e0e0e0;
	color: #111;
	text-decoration: none;
	font-size: 14px;
	font-weight: 700;
	transition: transform 0.15s, border-color 0.15s, background 0.15s;
}

.legstom-news-meta__btn:hover {
	transform: translateY(-1px);
	border-color: #0079ff;
}

.legstom-news-meta__btn--tg:hover {
	border-color: #229ED9;
}

.legstom-news-meta__btn--wa:hover {
	border-color: #25D366;
}

