/* =========================================================================
   NEWS SECTION — «Хабарҳо»: заголовок секции + бесконечный слайдер карточек
   последних записей. Токены цвета/шрифта — из base.css (--toj-*, --font-*).

   .section-head — намеренно общий класс (не "news-section-head"): такой же
   заголовок с маркером + стрелками понадобится и другим секциям главной
   («Аъзои Маҷлиси Миллӣ», «Аксҳо», «Шарикон» — см. README, этап 2+).
   ========================================================================= */

.news-section {
	padding-block: 40px 0;
	
}

/* ---------- Заголовок секции: маркер + название + стрелки ---------- */

.section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 30px;
}

.section-head__title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 20px;
	color: var(--toj-text);
}

.section-head__marker {
	width: 6px;
	height: 12px;
	flex: none;
	background: var(--toj-blue-dark);
	border-radius: 30%;
}

.section-head__nav {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
}

.section-head__arrow {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 10px;
	background: var(--toj-bg-light);
	color: var(--toj-text);
	transition: background .2s ease, opacity .2s ease, color .2s ease;
}

.section-head__arrow:hover,
.section-head__arrow:focus-visible {
	background: var(--toj-blue);
	color: #fff;
}

.section-head__arrow:disabled,
.section-head__arrow[hidden] {
	opacity: .35;
	pointer-events: none;
}

/* ---------- Слайдер ---------- */

.news-slider {
	position: relative;
	overflow: hidden;
}

.news-track {
	display: flex;
	gap: 22px;
	transition: transform .6s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Заглушка для админа, пока не опубликовано ни одной записи */
.news-slider--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 160px;
	background: var(--toj-bg-light);
	border: 1px dashed var(--toj-border);
	border-radius: 14px;
}

/* ---------- Карточка новости ---------- */

.news-card {
	flex: 0 0 calc((100% - 22px * 3) / 4); /* 4 карточки в ряд на десктопе */
	display: flex;
	flex-direction: column;
	background: var(--toj-white);
	box-shadow: 2px 4px 9px rgba(31, 39, 51, 0.103);
	border-radius: 14px;
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease !important;
	margin: 10px 0px;
}

.news-card:hover {
	box-shadow: 0 10px 24px rgba(31, 39, 51, .1);
	transform: translateY(-2px);
}

.news-card__media {
	position: relative;
	display: block;
	padding:10px;
	aspect-ratio: 16 / 11;
	overflow: hidden;
	height: 210px;
}

.news-card__img {
	
	width: 100%;
	height: 100%;
	border-radius: 12px;
	object-fit: cover;
	display: block;
	transition: transform .4s ease !important;
}

.news-card__img--placeholder {
	object-fit: contain;
	padding: 24%;
	opacity: .6;
}



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

.news-card__title {
	margin: 0 0 8px;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 15px;
	line-height: 1.4;
}

.news-card__title a {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--toj-text);
}

.news-card__title a:hover {
	color: var(--toj-blue);
}

.news-card__excerpt {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--toj-text-muted);
}

.news-card__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: auto;
	padding: 12px;
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.4;
	background: #F5F5F5;
}

.news-card__location {
	color: var(--toj-text);
}

.news-card__date {
	color: var(--toj-text-muted);
	font-size: 12px;
}

/* =========================================================================
   NEWS SECTION — responsive (те же брейкпоинты, что у hero.css: 960 / 640)
   ========================================================================= */

@media (max-width: 960px) {
	.news-card {
		flex-basis: calc((100% - 16px) / 2); /* 2 карточки в ряд */
	}

	.news-track {
		gap: 16px;
	}
}

@media (max-width: 640px) {
	.news-section {
		padding-block: 28px 0;
	}

	.section-head {
		margin-bottom: 14px;
	}

	.section-head__title {
		font-size: 17px;
	}

	.news-card {
		flex-basis: 100%; /* 1 карточка в ряд */
	}

	.news-track {
		gap: 12px;
	}
}
.news-section + .news-section {
	padding-top: 20px;
}
.section-head__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: none;
}

.section-head__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 10px;
	background: var(--toj-blue);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	transition: background .2s ease, transform .2s ease;
}

.section-head__more:hover,
.section-head__more:focus-visible {
	background: #3a6f96;
	color: #fff;
}

.section-head__more svg {
	flex: none;
}

@media (max-width: 640px) {
	.section-head__actions {
		gap: 8px;
	}

	.section-head__more {
		padding: 7px 12px;
		font-size: 12px;
	}
}