/* ==================== NEWS: список (mytoy_new.pen → NewsItem) ==================== */

/* query.news-list > ul.news-list__list > li > .news-card > group.news-card__body:
     post-date.__date + post-title.__title (Playfair) + post-excerpt.__excerpt + read-more.__more «Читать далее →».
   Карточка без фото: рамка, радиус 12, поля 24; ссылка заголовка растянута на всю карточку (::after).
   Акции (archive-sale.html) — те же карточки + строка «дата · срок» (sales.css). Размеры — --news-*. */

.news-list .news-list__list{
	display: flex;
	flex-direction: column;
	gap: var(--news-card-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.news-list .news-list__list > li{
	margin: 0;
}

.news-list .news-card{
	position: relative;
	margin: 0;
	padding: var(--news-card-pad);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-xl);
	background: var(--color-bg);
	transition: box-shadow .2s ease, border-color .2s ease;
}

.news-list .news-card:hover{
	border-color: transparent;
	box-shadow: var(--card-shadow-hover);
}

.news-list .news-card__body{
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--news-line-gap);
	margin: 0;
}

.news-list .news-card__body > *{
	margin: 0;
}

.news-list .news-card__date{
	font-size: var(--news-date-size);
	line-height: 1.3;
	color: var(--color-muted);
}

.news-list .news-card__title{
	font-family: var(--font-heading);
	font-size: var(--news-title-size);
	font-weight: 700;
	line-height: 1.3;
	color: var(--color-text);
}

.news-list .news-card__title a{
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}

.news-list .news-card__title a::after{
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.news-list .news-card:hover .news-card__title a{
	color: var(--color-accent);
}

.news-list .news-card__excerpt{
	font-size: var(--news-text-size);
	line-height: 1.5;
	color: var(--color-text-2);
}

.news-list .news-card__excerpt p{
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--news-excerpt-lines);
}

.news-list .news-card__more{
	color: var(--color-accent);
	font-size: var(--news-text-size);
	font-weight: 500;
	text-decoration: none;
}

/* ==================== NEWS PAGE: /news/<новость>/ (templates/single-news.html) ==================== */

/* .catalog-page__main.service-single.news-single > post-date.news-single__date («21 июня 2025») + фото (если есть) + текст.
   Колонка, фото и текст — общие со страницей услуги (services.css); здесь — дата под заголовком. */

.news-single .news-single__date{
	font-size: var(--news-date-size);
	line-height: 1.3;
	color: var(--color-muted);
}

/* ==================== HOME: «Новости» (patterns/home-news.php) ==================== */

/* .home-news > h2.__title + query.__query.product-carousel > ul.__list > li > .__item (post-featured-image.__image + post-title.__name)
   + buttons.__more «Все новости». Container, title, tile, photo and the whole-tile link — shared with .home-services (services.css),
   the button — with .home-services__all (catalog.css). Here: the mosaic, the name bar and the phone carousel.
   Desktop: 12-column grid, the first (latest) news 6 columns, the others 3 (570 / 270 / 270); ≤1200px: the first across, two below;
   ≤600px: one tile per screen with scroll-snap, arrows — assets/product-carousel.js. */

.home-news .home-news__list{
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--home-news-gap-y) var(--home-news-gap-x);
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-news .home-news__list > li{
	grid-column: span var(--home-news-span);
}

.home-news .home-news__list > li:first-child{
	grid-column: span var(--home-news-span-first);
}

/* Shared tile rule sets aspect-ratio for the service tiles; news tiles have a fixed height instead. */
.home-news .home-news__item{
	height: var(--home-news-height);
	aspect-ratio: auto;
}

.home-news .home-news__name{
	box-sizing: border-box;
	display: flex;
	align-items: center;
	min-height: var(--home-news-bar);
	margin: 0;
	padding: 10px var(--home-news-bar-pad);
	background: var(--home-services-bar-bg);
	color: #fff;
	font-size: var(--home-news-name-size);
	font-weight: 500;
	line-height: 1.25;
	text-transform: uppercase;
	transition: background .2s ease;
}

.home-news .home-news__item:hover .home-news__name{
	background: rgba(0, 0, 0, .85);
}

/* Arrows come from the shared carousel script — only for the phone carousel. */
.home-news .product-carousel__arrow{
	display: none;
}

@media (max-width: 600px){
	.home-news .home-news__list{
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.home-news .home-news__list::-webkit-scrollbar{
		display: none;
	}

	.home-news .home-news__list > li,
	.home-news .home-news__list > li:first-child{
		flex: 0 0 100%;
		scroll-snap-align: start;
	}

	.home-news .home-news__item{
		height: auto;
		aspect-ratio: var(--home-news-ratio);
	}

	.home-news .product-carousel__arrow{
		display: block;
		top: calc(50% - var(--home-news-bar) / 2);
	}
}
