/* News content components only — scoped under .news-content */

.news-content {
	--news-card: #ffffff;
	--news-text: #13374f;
	--news-muted: #7a8694;
	--news-link: #4ec1cf;
	--news-link-hover: #3e96a0;
	--news-border: #dde3ea;
	--news-accent: #4ec1cf;
	--news-serif: Forum, Georgia, "Times New Roman", serif;
	--news-sans: "Open Sans", Helvetica, Arial, sans-serif;
	color: var(--news-text);
	font-family: var(--news-sans);
}

.news-content *,
.news-content *::before,
.news-content *::after {
	box-sizing: border-box;
}

.news-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 32px;
}

.news-title.page-header {
	margin: 0;
}

.news-search {
	position: relative;
	flex: 0 0 280px;
	width: 280px;
	max-width: 100%;
	margin-top: 0;
}

.news-search-label {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--news-muted);
	display: flex;
	pointer-events: none;
}

.news-search-input {
	box-sizing: border-box;
	width: 100%;
	height: 40px;
	padding: 0 32px 0 40px;
	border: 1px solid var(--news-border);
	background: #fff;
	font-family: var(--news-sans);
	font-size: 14px;
	color: var(--news-text);
	outline: none;
	box-shadow: 0 1px 2px rgba(28, 42, 54, 0.04);
}

.news-content .news-search input[type="search"] {
	box-sizing: border-box;
}

.news-search-input:focus {
	border-color: var(--news-accent);
	box-shadow: 0 0 0 3px rgba(78, 193, 207, 0.18);
}

.news-search-input::-webkit-search-cancel-button {
	-webkit-appearance: searchfield-cancel-button;
	cursor: pointer;
}

.news-content .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* Shared Article / Gallery / Video accents */
.news-card,
.news-featured,
.news-featured-latest-item {
	--news-format-accent: var(--news-link);
	--news-format-accent-hover: var(--news-link-hover);
}

.news-format--gallery {
	--news-format-accent: #eb774b;
	--news-format-accent-hover: #d4653a;
}

.news-format--video {
	--news-format-accent: #edbf47;
	--news-format-accent-hover: #d4a83a;
}

.news-featured {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-areas:
		"media"
		"body"
		"latest";
	column-gap: 28px;
	row-gap: 24px;
	align-items: stretch;
	margin-bottom: 40px;
}

.news-featured-media {
	grid-area: media;
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 8;
	background: #243140;
	text-decoration: none;
	border: 1px solid var(--news-format-accent);
}

.news-featured-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.news-featured-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 8px 12px;
	background: var(--news-format-accent);
	color: #fff;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 4px;
	font-weight: 600;
}

.news-format--video .news-featured-badge {
	color: var(--news-text);
}

.news-featured-body {
	grid-area: body;
	padding-bottom: 16px;
	min-width: 0;
}

@media (min-width: 1200px) {
	.news-featured-body {
		padding-top: 16px;
    padding-bottom: 0;
	}
}

.news-featured-title {
	margin: 0 0 12px;
	font-family: var(--news-serif);
	font-size: 24px;
	line-height: 1.28;
	font-weight: 700;
}

.news-featured-title a {
	color: var(--news-text);
	text-decoration: none;
}

.news-featured-title a:hover {
	color: var(--news-format-accent-hover);
}

.news-featured-excerpt {
	margin: 0 0 16px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--news-muted);
}

.news-featured-more {
	color: var(--news-format-accent);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.news-featured-more:hover {
	color: var(--news-format-accent-hover);
	text-decoration: underline;
}

.news-featured-latest {
	grid-area: latest;
	display: flex;
	flex-direction: column;
	min-height: 0;
	height: auto;
}

.news-featured-latest-title {
	margin: 0 0 16px;
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--news-text);
	font-weight: 700;
}

.news-featured-latest-list {
	margin: 0;
	padding: 0;
	flex: 0 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	gap: 12px;
	min-height: 0;
}

.news-featured-latest-item {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
}

.news-featured-latest-separator {
	width: 100%;
	height: 1px;
	flex: 0 0 1px;
	background: rgba(19, 55, 79, 0.12);
}

.news-featured-latest-link {
	display: flex;
	gap: 12px;
	width: 100%;
	text-decoration: none;
	color: inherit;
	align-items: flex-start;
}

.news-featured-latest-thumb {
	flex: 0 0 68px;
	width: 68px;
	height: 68px;
	overflow: hidden;
	background: #d5dde5;
	border: 1px solid var(--news-format-accent);
}

.news-featured-latest-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.news-featured-latest-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.news-featured-latest-item-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 700;
	color: var(--news-text);
}

.news-featured-latest-link:hover .news-featured-latest-item-title {
	color: var(--news-format-accent-hover);
}

.news-card-date {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
	font-size: 13px;
	color: var(--news-muted);
}

.news-card-date .fa {
	flex-shrink: 0;
	color: inherit;
	line-height: 1;
}

.news-featured-latest-text .news-card-date {
	margin-bottom: 0;
}

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

.news-section-title {
	margin: 0;
	font-family: var(--news-serif);
	font-size: 15px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--news-text);
}

.news-section-meta {
	margin: 0;
	font-size: 13px;
	color: var(--news-muted);
	text-align: right;
}

.news-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}

.news-card {
	background: var(--news-card);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 1px solid var(--news-format-accent);
}

.news-card-media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 8;
	background: #243140;
	overflow: hidden;
	text-decoration: none;
}

.news-card-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.news-card-format {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 8px;
	background: rgba(28, 42, 54, 0.92);
	color: #fff;
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	border-radius: 3px;
	font-weight: 600;
}

.news-format--gallery .news-card-format,
.news-format--video .news-card-format {
	background: var(--news-format-accent);
}

.news-card-format .fa {
	color: inherit;
	font-size: 1em;
	line-height: 1;
}

.news-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	border-top: 5px solid var(--news-format-accent);
}

.news-card-title {
	margin: 0 0 8px;
	font-family: var(--news-serif);
	font-size: 19px;
	line-height: 1.3;
	font-weight: 700;
}

.news-card-title a {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	color: var(--news-text);
	text-decoration: none;
}

.news-card-title a:hover {
	color: var(--news-format-accent-hover);
}

.news-card-excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--news-muted);
	flex: 1;
	margin-bottom: 16px;
}

.news-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid var(--news-border);
}

.news-card-more {
	color: var(--news-format-accent);
	text-decoration: none;
	font-size: 14px;
	font-weight: 600;
}

.news-card-more:hover {
	color: var(--news-format-accent-hover);
	text-decoration: underline;
}

.news-card-reading {
	font-size: 12px;
	color: var(--news-muted);
	white-space: nowrap;
}

.news-empty {
	padding: 20px 0 8px;
	color: var(--news-muted);
	font-size: 14px;
}

.news-pagination {
	margin-top: 32px;
	padding-bottom: 8px;
}

.news-pagination .title {
	display: none;
}

.news-pagination .wp-seo-paginate {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.news-pagination .wp-seo-paginate li {
	margin: 0;
	padding: 0;
}

.news-pagination .wp-seo-paginate a,
.news-pagination .wp-seo-paginate span.page,
.news-pagination .wp-seo-paginate span.gap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--news-border);
	border-radius: 4px;
	background: #fff;
	color: var(--news-text);
	text-decoration: none;
	font-size: 14px;
}

.news-pagination .wp-seo-paginate span.current {
	background: #1c2a36;
	border-color: #1c2a36;
	color: #fff;
}

.news-pagination .wp-seo-paginate a:hover {
	border-color: var(--news-link-hover);
	color: var(--news-link-hover);
}

.news-pagination .wp-seo-paginate span.gap {
	border: 0;
	background: transparent;
	min-width: 20px;
	padding: 0;
}

@media (min-width: 1200px) {
	.news-featured {
		grid-template-columns: minmax(0, 1.65fr) minmax(220px, 0.9fr);
		row-gap: 0;
	}

	.news-featured-latest {
		height: 100%;
	}

	.news-featured-latest-list {
		flex: 1 1 auto;
		justify-content: space-between;
		gap: 0;
	}
}

/* 1200–1599: Latest spans full Featured post height */
@media (min-width: 1200px) and (max-width: 1599px) {
	.news-featured {
		grid-template-areas:
			"media latest"
			"body latest";
	}
}

/* 1600+: Latest aligns to Featured image height only */
@media (min-width: 1600px) {
	.news-featured {
		grid-template-areas:
			"media latest"
			"body .";
	}
}

@media (max-width: 900px) {
	.news-header {
		flex-direction: column;
		align-items: stretch;
	}

	.news-search {
		flex: 0 0 auto;
		width: 100%;
	}

	.news-grid {
		grid-template-columns: 1fr;
	}

	.news-featured-title {
		font-size: 22px;
	}
}

/* Homepage-only “Більше” CTA (inside .news-content for design tokens) */
.front-page-news-more {
	margin: 28px 0 8px;
	text-align: center;
}

.front-page-news-more-link {
	color: var(--news-link);
	font-family: var(--news-sans);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.front-page-news-more-link:hover {
	color: var(--news-link-hover);
}
