/* ==========================================================================
   Страница новостей - News Page
   ========================================================================== */

.news-page {
	background-color: var(--gray-50);
	min-height: calc(100vh - 4rem);
}

.news-page .container {
	padding: var(--container-padding-y) var(--container-padding-x);
	max-width: var(--container-max-width);
	margin: 0 auto;
}

.news-content {
	padding: 0 0px;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

/* Основной стиль h1 */
h1 {
	font-size: 2rem;
}

/* Заголовок страницы */
.page-title {
	font-family: 'Inter', sans-serif;
	font-weight: 700;
	font-size: 2rem;
	line-height: 43.2px;
	color: var(--gray-900);
}

/* Фильтры новостей */
.news-filters {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	height: 3rem;
}

.filter-btn {
	background-color: var(--gray-50);
	color: var(--gray-900);
	padding: 0.6875rem 1.5rem;
	border-radius: 0.625rem;
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 1rem;
	line-height: 1.5rem;
	text-align: center;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.filter-btn:hover {
	background-color: var(--gray-200);
}

.filter-btn.active {
	background-color: var(--red-700);
	color: white;
}

/* Сетка новостей */
.news-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	width: 100%;
}

/* Карточка новости */
.page-news-card,
.news-card {
	background-color: white;
	border-radius: 0.625rem;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.page-news-card:hover,
.news-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 0.5rem 0.75rem var(--shadow-hover);
}

.page-news-card-link,
.news-card-link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

/* Изображение новости */
.page-news-card-image,
.news-card-image {
	width: 100%;
	height: 192px;
	overflow: hidden;
	position: relative;
	background: linear-gradient(158.42deg, var(--gray-50) 0%, var(--gray-200) 100%);
}

.page-news-card-image img,
.news-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Заглушка для изображения */
.news-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	position: relative;
	background: linear-gradient(158.42deg, var(--gray-50) 0%, var(--gray-200) 100%);
}

.news-placeholder::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0.05;
	background: repeating-linear-gradient(
		90deg,
		var(--green-600) 0px,
		var(--green-600) 12.5%,
		var(--green-500) 12.5%,
		var(--green-500) 25%
	);
}

.placeholder-icon {
	width: 5rem;
	height: 68px;
	background-color: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 3rem;
	box-shadow: 0 0.625rem 0.9375rem -3px var(--color-dark-gray)1a, 0 0.25rem 0.375rem -4px var(--color-dark-gray)1a;
	opacity: 0.985;
	z-index: 1;
}

.placeholder-text {
	margin-top: 1rem;
	text-align: center;
	z-index: 1;
}

.placeholder-title {
	font-family: 'Inter', sans-serif;
	font-weight: 500;
	font-size: 1rem;
	line-height: 1.5rem;
	color: var(--gray-600);
	margin-bottom: 0.25rem;
}

.placeholder-subtitle {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 0.75rem;
	line-height: 1rem;
	color: var(--gray-500);
	max-width: 293px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Содержимое карточки */
.page-news-card-content,
.news-card-content {
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	flex: 1;
}

/* Метаданные */
.news-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 1.25rem;
}

.news-category {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: var(--red-700);
}

.news-date {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: var(--gray-500);
}

/* Заголовок новости */
.news-title {
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	font-size: 1.25rem;
	line-height: 1.75rem;
	color: var(--gray-900);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	min-height: 3.5rem;
}

/* Описание новости */
.news-excerpt {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 1rem;
	line-height: 25.6px;
	color: var(--gray-600);
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* Автор */
.news-author {
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: var(--gray-500);
	margin-top: auto;
}

/* Сообщение об отсутствии новостей */
.no-news {
	grid-column: 1 / -1;
	text-align: center;
	padding: 3rem;
	font-family: 'Inter', sans-serif;
	font-size: 1.125rem;
	color: var(--gray-500);
}

/* Пагинация */
.pagination {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	margin-top: 2rem;
}

.pagination a,
.pagination span {
	padding: 0.5rem 1rem;
	background-color: white;
	border-radius: 0.375rem;
	font-family: 'Inter', sans-serif;
	font-size: 0.875rem;
	color: var(--gray-900);
	text-decoration: none;
	transition: all 0.3s ease;
	box-shadow: 0 1px 0.125rem #0d0d0d0d;
}

.pagination a:hover {
	background-color: var(--gray-50);
	box-shadow: 0 0.125rem 0.25rem var(--color-dark-gray)1a;
}

.pagination .current {
	background-color: var(--red-900);
	color: white;
}

/* ==========================================================================
   Адаптивность
   ========================================================================== */

@media (max-width: 1024px) {
	h1, h2, h3, h4, h5, h6 {
		text-align: left;

	}
	.news-page .container {
	padding: 1.5rem 0;	
   }
   .news-content {
		padding: 0 1.5rem;
	}

	.page-title {
		font-size: 1.75rem;
	}
}

@media (max-width: 768px) {
	h1, h2, h3, h4, h5, h6 {
		text-align: left;
	}

	h1 {
		font-size: 1.5rem;
	}

	.page-title {
		font-size: 1.75rem;
		line-height: 34px;
	}
	
	.news-filters {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	.news-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	
	.page-news-card-image {
		height: 160px;
	}
}

@media (max-width: 30rem) {
	h1, h2, h3, h4, h5, h6 {
		text-align: left;
	}

	h1 {
		font-size: 1.25rem;
	}

	.news-content {
		padding: 1rem 0.5rem;
	}
	
	.page-title {
		font-size: 1.5rem;
		line-height: 1.875rem;
	}
	
	.filter-btn {
		font-size: 0.875rem;
		padding: 0.5rem 1rem;
	}
}




