/**
 * News CPT — single + archive (editorial layout).
 */

.news-single-page,
.news-archive-page {
	--news-ink: #0f172a;
	--news-muted: #64748b;
	--news-line: #e2e8f0;
	--news-sky: #0284c7;
	--news-sky-soft: #e0f2fe;
	--news-accent: #0e7490;
	--news-up: #059669;
	--news-down: #dc2626;
	--news-surface: #ffffff;
	--news-bg: #f8fafc;
	padding: 1.25rem 0 3rem;
	font-family: var(--chimisanat-font-family, Tahoma, system-ui, sans-serif);
	color: var(--news-ink);
	background: var(--news-bg);
}

.news-single-shell,
.news-archive-shell {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 1rem;
}

.news-single-shell {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 1024px) {
	.news-single-shell {
		grid-template-columns: 6rem minmax(0, 1fr) 18rem;
		align-items: start;
		gap: 1.75rem;
		padding: 0 1.25rem;
	}
}

/* —— Main article —— */
.news-main {
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	background: var(--news-surface);
	border: 1px solid var(--news-line);
	border-radius: 0.85rem;
	padding: 1.25rem 1.15rem 1.75rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

@media (min-width: 768px) {
	.news-main {
		padding: 1.75rem 1.85rem 2.25rem;
	}
}

.news-category-badge {
	display: inline-block;
	margin-bottom: 0.75rem;
	padding: 0.28rem 0.7rem;
	border-radius: 0.35rem;
	background: linear-gradient(135deg, var(--news-sky), var(--news-accent));
	color: #fff;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-decoration: none;
}

.news-title {
	margin: 0 0 1.15rem;
	font-size: clamp(1.35rem, 2.4vw, 1.85rem);
	font-weight: 900;
	line-height: 1.55;
	color: var(--news-ink);
	text-align: justify;
}

@media (min-width: 768px) {
	.news-title {
		text-align: start;
	}
}

.news-hero {
	margin: 0 0 1rem;
	border-radius: 0.65rem;
	overflow: hidden;
	background: #e2e8f0;
	max-width: 100%;
}

.news-hero img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.news-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem 1.25rem;
	margin-bottom: 1.35rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--news-line);
	font-size: 0.82rem;
	color: var(--news-muted);
	font-weight: 600;
}

.news-meta__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.news-meta__item svg {
	width: 1rem;
	height: 1rem;
	color: var(--news-sky);
}

.news-content {
	font-size: 1.02rem;
	line-height: 2;
	font-weight: 300;
	color: #334155;
	max-width: 100%;
	overflow-x: clip;
	min-width: 0;
}

.news-content > *:first-child {
	margin-top: 0;
}

.news-content h2,
.news-content h3,
.news-content h4 {
	color: var(--news-sky);
	font-weight: 800;
	margin: 1.75rem 0 0.75rem;
	line-height: 1.5;
}

.news-content p {
	margin: 0 0 1.1rem;
	text-align: justify;
}

.news-content a {
	color: var(--news-sky);
}

.news-content img,
.news-content video,
.news-content iframe {
	max-width: 100% !important;
	height: auto;
	border-radius: 0.5rem;
}

.news-content figure,
.news-content .wp-block-image,
.news-content .wp-caption,
.news-content .gallery {
	max-width: 100% !important;
	width: auto !important;
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
}

.news-content figure:has(> img),
.news-content .wp-block-image:has(img),
.news-content .wp-caption:has(img) {
	overflow: hidden;
	border-radius: 0.5rem;
}

.news-content .alignwide,
.news-content .alignfull {
	max-width: 100% !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.news-content blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.15rem;
	background: #f8fafc;
	border-right: 4px solid #e11d48;
	border-radius: 0 0.5rem 0.5rem 0;
	color: #1e293b;
	font-weight: 500;
}

.news-content ul,
.news-content ol {
	margin: 0 0 1.1rem;
	padding-right: 1.25rem;
}

.news-main #comments-section {
	margin-top: 1.75rem;
}

/* —— Sidebar —— */
.news-sidebar {
	display: flex;
	flex-direction: column;
	gap: 1.15rem;
}

@media (min-width: 1024px) {
	.news-sidebar {
		position: sticky;
		top: 5.5rem;
	}
}

.news-sidebar-list,
.news-rates,
.news-sidebar-widgets .widget {
	background: var(--news-surface);
	border: 1px solid var(--news-line);
	border-radius: 0.75rem;
	padding: 1rem 1rem 0.85rem;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.news-sidebar-list__title,
.news-rates__title {
	margin: 0 0 0.85rem;
	padding-bottom: 0.65rem;
	border-bottom: 2px solid var(--news-sky);
	font-size: 0.95rem;
	font-weight: 900;
	color: var(--news-ink);
}

.news-sidebar-list__items {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.news-sidebar-list__link {
	display: grid;
	grid-template-columns: 4.25rem minmax(0, 1fr);
	gap: 0.7rem;
	align-items: center;
	text-decoration: none;
	color: inherit;
}

.news-sidebar-list.is-numbered .news-sidebar-list__link,
.news-sidebar-list__items.is-numbered .news-sidebar-list__link {
	grid-template-columns: 1.35rem 4.25rem minmax(0, 1fr);
}

.news-sidebar-list__rank {
	font-size: 0.95rem;
	font-weight: 900;
	color: var(--news-sky);
	text-align: center;
}

.news-sidebar-list__thumb {
	display: block;
	width: 4.25rem;
	aspect-ratio: 4 / 3;
	border-radius: 0.4rem;
	overflow: hidden;
	background: #e2e8f0;
}

.news-sidebar-list__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.news-sidebar-list__text {
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.55;
	color: #1e293b;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.news-sidebar-list__link:hover .news-sidebar-list__text {
	color: var(--news-sky);
}

.news-rates__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.news-rates__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	gap: 0.5rem;
	align-items: center;
	font-size: 0.8rem;
	padding: 0.45rem 0;
	border-bottom: 1px dashed var(--news-line);
}

.news-rates__row:last-child {
	border-bottom: 0;
}

.news-rates__name {
	font-weight: 700;
	color: #334155;
}

.news-rates__price {
	font-weight: 800;
	color: var(--news-ink);
	font-variant-numeric: tabular-nums;
}

.news-rates__change {
	font-weight: 800;
	font-size: 0.75rem;
}

.news-rates__change.is-up { color: var(--news-up); }
.news-rates__change.is-down { color: var(--news-down); }
.news-rates__change.is-flat { color: var(--news-muted); }

.news-rates__more {
	display: block;
	margin-top: 0.85rem;
	text-align: center;
	padding: 0.65rem 0.75rem;
	border-radius: 0.45rem;
	background: linear-gradient(135deg, var(--news-sky), var(--news-accent));
	color: #fff;
	font-size: 0.8rem;
	font-weight: 800;
	text-decoration: none;
}

.news-rates__more:hover {
	filter: brightness(1.05);
}

/* —— Archive —— */
.news-archive-header {
	margin-bottom: 1.5rem;
}

.news-archive-kicker {
	margin: 0 0 0.35rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--news-sky);
}

.news-archive-title {
	margin: 0;
	font-size: clamp(1.4rem, 2.5vw, 1.9rem);
	font-weight: 900;
}

.news-archive-lead {
	margin: 0.45rem 0 0;
	color: var(--news-muted);
	font-size: 0.9rem;
}

.news-archive-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.15rem;
}

@media (min-width: 640px) {
	.news-archive-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.news-archive-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.news-archive-card {
	background: var(--news-surface);
	border: 1px solid var(--news-line);
	border-radius: 0.75rem;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.news-archive-card:hover {
	box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
	transform: translateY(-2px);
}

.news-archive-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	background: #e2e8f0;
	overflow: hidden;
}

.news-archive-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.news-archive-card__body {
	padding: 0.9rem 1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.news-archive-card__cat {
	align-self: flex-start;
	font-size: 0.7rem;
	font-weight: 800;
	color: var(--news-sky);
	background: var(--news-sky-soft);
	padding: 0.15rem 0.5rem;
	border-radius: 0.3rem;
}

.news-archive-card__title {
	margin: 0;
	font-size: 0.98rem;
	font-weight: 800;
	line-height: 1.55;
}

.news-archive-card__title a {
	color: inherit;
	text-decoration: none;
}

.news-archive-card__title a:hover {
	color: var(--news-sky);
}

.news-archive-card__excerpt {
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.65;
	color: var(--news-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.news-archive-pagination {
	margin-top: 2rem;
}

.news-archive-empty {
	padding: 2rem;
	text-align: center;
	color: var(--news-muted);
	background: var(--news-surface);
	border: 1px dashed var(--news-line);
	border-radius: 0.75rem;
}

@media print {
	.media-rail,
	.news-sidebar,
	.news-main #comments-section {
		display: none !important;
	}

	.news-single-shell {
		display: block;
	}

	.news-main {
		border: 0;
		box-shadow: none;
		padding: 0;
	}
}
