/* «Новини»: список (tempalate-news.php) і сторінка запису (single.php). Стиль узгоджено з новими сторінками */
.npc-news,
.npc-post {
	--npc-green: #007a53;
	--npc-green-dark: #00653f;
	--npc-ink: #2b2b2b;
	--npc-muted: #6b6b6b;
	--npc-line: #e3e3e3;
	--npc-tint: #f4f8f6;
	font-family: 'Open Sans', sans-serif;
	color: var(--npc-ink);
}
.npc-news { background: #f2f2f2; padding: 24px 0 72px; }
.npc-news *, .npc-news *::before, .npc-news *::after,
.npc-post *, .npc-post *::before, .npc-post *::after { box-sizing: border-box; }

/* ---------- Шапка списку ---------- */
.npc-news__intro {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 32px;
	margin: 8px 0 32px;
}
.npc-news__eyebrow {
	display: inline-block;
	margin: 0 0 12px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #e8f3ee;
	color: var(--npc-green);
	font-size: 13px;
	font-weight: 700;
}
.npc-news__title {
	margin: 0 0 12px;
	padding: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 48px;
	line-height: 1.1;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-transform: none;
	text-align: left;
	color: var(--npc-ink);
}
.npc-news__lead { max-width: 640px; margin: 0; font-size: 17px; line-height: 1.6; color: var(--npc-muted); }
.npc-news .npc-news__subscribe {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 14px 24px;
	border: 1px solid var(--npc-green);
	border-radius: 999px;
	background: #fff;
	color: var(--npc-green);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: background .2s ease, color .2s ease;
}
.npc-news .npc-news__subscribe:hover,
.npc-news .npc-news__subscribe:focus-visible { background: var(--npc-green); color: #fff; text-decoration: none; }

/* ---------- Сітка карток ---------- */
.npc-news__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}
.npc-news-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--npc-line);
	border-radius: 20px;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.npc-news-card:hover { border-color: var(--npc-green); box-shadow: 0 8px 24px rgba(0, 0, 0, .06); transform: translateY(-2px); }
.npc-news-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--npc-tint);
}
.npc-news-card .npc-news-card__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: cover;
	transition: transform .4s ease;
}
.npc-news-card:hover .npc-news-card__img { transform: scale(1.03); }
.npc-news-card__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: var(--npc-green);
}
.npc-news-card__ph img { display: block; width: 46%; max-width: 180px; height: auto; margin: 0; opacity: .9; }
.npc-news-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	padding: 20px 22px 22px;
}
.npc-news-card__date { font-size: 13px; font-weight: 600; color: var(--npc-green); }
.npc-news .npc-news-card__title,
.npc-post .npc-news-card__title {
	margin: 0;
	padding: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 18px;
	line-height: 1.4;
	font-weight: 700;
	text-transform: none;
	text-align: left;
	letter-spacing: 0;
	overflow-wrap: break-word;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.npc-news-card__title a { color: var(--npc-ink); text-decoration: none; }
.npc-news-card__title a:hover { color: var(--npc-green); text-decoration: none; }
.npc-news-card__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--npc-muted);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.npc-news-card .npc-news-card__more {
	margin-top: auto;
	padding-top: 4px;
	font-size: 14px;
	font-weight: 600;
	color: var(--npc-green);
	text-decoration: none;
}
.npc-news-card .npc-news-card__more:hover { color: var(--npc-green-dark); text-decoration: none; }

/* Перша (найновіша) новина — велика картка */
.npc-news__grid--first .npc-news-card--featured {
	grid-column: 1 / -1;
	flex-direction: row;
}
.npc-news-card--featured .npc-news-card__media { flex: 0 0 58%; aspect-ratio: auto; min-height: 340px; }
.npc-news-card--featured .npc-news-card__body { justify-content: center; padding: 36px 40px; gap: 14px; }
.npc-news .npc-news-card--featured .npc-news-card__title { font-size: 28px; line-height: 1.3; -webkit-line-clamp: 5; }
.npc-news-card--featured .npc-news-card__text { font-size: 16px; -webkit-line-clamp: 5; }
.npc-news-card--featured .npc-news-card__more { margin-top: 8px; font-size: 15px; }

/* ---------- Пагінація ---------- */
.npc-news__pager { margin-top: 36px; }
.npc-news__pager ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.npc-news__pager li { margin: 0; padding: 0; }
.npc-news__pager li::before { display: none; content: none; }
.npc-news__pager .page-numbers:not(ul) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--npc-line);
	border-radius: 999px;
	background: #fff;
	color: var(--npc-ink);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.npc-news__pager a.page-numbers:hover { border-color: var(--npc-green); color: var(--npc-green); }
.npc-news__pager .page-numbers.current { background: var(--npc-green); border-color: var(--npc-green); color: #fff; }
.npc-news__pager .page-numbers.dots { border: 0; background: none; min-width: 24px; padding: 0; }
.npc-news .screen-reader-text,
.npc-post .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

/* ---------- Сторінка запису ---------- */
.npc-post { background: #f2f2f2; padding: 24px 0 72px; }
.npc-post .npc-article { border-radius: 24px; }
.npc-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
	margin: 0 0 16px;
}
.npc-post .npc-post__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: #e8f3ee;
	color: var(--npc-green);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}
.npc-post .npc-post__back:hover { background: var(--npc-green); color: #fff; text-decoration: none; }
.npc-post__date { font-size: 14px; font-weight: 600; color: var(--npc-muted); }
.npc-post .npc-article__title { margin-bottom: 28px; font-size: 34px; }
.npc-post__hero { max-width: 860px; margin: 0 auto 32px; }
.npc-post .npc-post__hero-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 520px;
	margin: 0;
	object-fit: cover;
	border-radius: 18px;
}

/* Інші новини */
.npc-post__more { margin-top: 40px; }
.npc-post__more-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 18px;
}
.npc-post .npc-post__more-head h2 {
	margin: 0;
	padding: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 26px;
	line-height: 1.3;
	font-weight: 700;
	text-transform: none;
	text-align: left;
	color: var(--npc-ink);
}
.npc-post .npc-post__more-head a { font-size: 15px; font-weight: 600; color: var(--npc-green); text-decoration: none; white-space: nowrap; }

/* ---------- Адаптив ---------- */
@media (max-width: 991px) {
	.npc-news__title { font-size: 38px; }
	.npc-news__intro { flex-direction: column; align-items: flex-start; }
	.npc-news__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.npc-news__grid--first .npc-news-card--featured { flex-direction: column; }
	.npc-news-card--featured .npc-news-card__media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
	.npc-news-card--featured .npc-news-card__body { padding: 24px 26px 26px; }
	.npc-news .npc-news-card--featured .npc-news-card__title { font-size: 24px; }
	.npc-post__more .npc-news__grid > :nth-child(3) { display: none; }
}
@media (max-width: 767px) {
	.npc-news { padding: 16px 0 48px; }
	.npc-news__title { font-size: 30px; }
	.npc-news__lead { font-size: 16px; }
	.npc-news .npc-news__subscribe { width: 100%; justify-content: center; }
	.npc-news__grid { grid-template-columns: 1fr; gap: 14px; }
	.npc-news-card { border-radius: 16px; }
	.npc-news .npc-news-card--featured .npc-news-card__title { font-size: 21px; }
	.npc-news-card--featured .npc-news-card__body { padding: 20px; }
	.npc-post { padding: 16px 0 40px; } /* відступ після хлібних крихт */
	.npc-post .npc-article { border-radius: 0; }
	.npc-post .npc-article__title { font-size: 24px; margin-bottom: 20px; }
	.npc-post__hero { margin-bottom: 24px; }
	.npc-post .npc-post__hero-img { border-radius: 12px; }
	.npc-post__more { margin-top: 28px; padding: 0 16px; }
	.npc-post__more .npc-news__grid > :nth-child(3) { display: block; }
	.npc-post__more-head { flex-direction: column; gap: 6px; }
	.npc-post .npc-post__more-head h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.npc-news-card, .npc-news-card__img { transition: none; }
	.npc-news-card:hover { transform: none; }
	.npc-news-card:hover .npc-news-card__img { transform: none; }
}

/* «Наш досвід»: посилання-мітка над заголовком і кнопка запису */
.npc-news a.npc-news__eyebrow--link { text-decoration: none; }
.npc-news a.npc-news__eyebrow--link:hover { background: var(--npc-green); color: #fff; }
.npc-news .npc-case-consult { background: var(--npc-green); color: #fff; }
.npc-news .npc-case-consult:hover { background: var(--npc-green-dark); border-color: var(--npc-green-dark); }
