/**
 * Single news page (single-news.php) — mockup _sketch/новость.jpg.
 * Mobile First. Breakpoints: 576 / 768 / 992 / 1200.
 *
 * Article typography (.cncgc-prose) lives in prose.css (shared with the
 * information pages).
 */

/* ---------- Hero ---------- */
.cncgc-news-hero {
	background: var(--cncgc-bg-soft);
}

.cncgc-news-hero .cncgc-breadcrumb {
	padding-bottom: 16px;
}

.cncgc-news-hero .cncgc-breadcrumb__item--current {
	color: var(--cncgc-text);
}

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

.cncgc-news-hero__text {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.cncgc-news-hero__title {
	margin: 0 0 16px;
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
	font-weight: 600;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.cncgc-news-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 20px;
	font-size: 0.8125rem;
	color: var(--cncgc-text-muted);
}

.cncgc-news-hero__updated::before {
	content: "·";
	margin-right: 8px;
}

.cncgc-news-hero__lead {
	margin: 0;
	max-width: 62ch;
	font-size: 1rem;
	line-height: 1.7;
	color: #4a4a4a;
}

@media (min-width: 992px) {
	.cncgc-news-hero__grid {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
		gap: 48px;
		align-items: center;
	}

	.cncgc-news-hero__grid--no-media {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- Slider (shared: hero 1-up + bottom multi-up) ---------- */
.cncgc-news-slider {
	position: relative;
	min-width: 0;
}

.cncgc-news-slider__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
}

.cncgc-news-slider__track::-webkit-scrollbar {
	display: none;
}

.cncgc-news-slider__track:focus-visible {
	outline: 2px solid var(--cncgc-black);
	outline-offset: 2px;
}

.cncgc-news-slider__slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
}

.cncgc-news-slider__figure {
	margin: 0;
	aspect-ratio: 16 / 9;
	background: var(--cncgc-bg-muted);
}

.cncgc-news-slider__figure img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
}

.cncgc-news-slider__controls {
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	background: rgb(255 255 255 / 92%);
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
}

.cncgc-news-slider__counter {
	min-width: 3.5em;
	text-align: center;
}

.cncgc-news-slider__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--cncgc-text);
}

.cncgc-news-slider__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.cncgc-news-slider__btn:focus-visible,
.cncgc-news-gallery__arrow:focus-visible {
	outline: 2px solid var(--cncgc-black);
	outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
	.cncgc-news-slider__track {
		scroll-behavior: auto;
	}
}

/* ---------- Layout: article + sidebar ---------- */
.cncgc-news__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px;
	padding-block: 40px 64px;
}

@media (min-width: 992px) {
	.cncgc-news__layout {
		grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
		gap: 48px;
		padding-block: 48px 80px;
	}
}

@media (min-width: 1200px) {
	.cncgc-news__layout {
		gap: 64px;
	}
}

.cncgc-news__main {
	min-width: 0;
}

.cncgc-news__pages {
	display: flex;
	gap: 8px;
	margin-top: 24px;
	font-weight: 600;
}

/* ---------- Bottom photo carousel ---------- */
.cncgc-news-gallery {
	margin-top: 32px;
}

.cncgc-news-gallery__viewport {
	position: relative;
}

.cncgc-news-slider--multi .cncgc-news-slider__track {
	gap: 12px;
}

.cncgc-news-slider--multi .cncgc-news-slider__slide {
	flex-basis: 80%;
}

@media (min-width: 576px) {
	.cncgc-news-slider--multi .cncgc-news-slider__slide {
		flex-basis: calc((100% - 2 * 12px) / 3);
	}
}

@media (min-width: 1200px) {
	.cncgc-news-slider--multi .cncgc-news-slider__slide {
		flex-basis: calc((100% - 3 * 12px) / 4);
	}
}

.cncgc-news-gallery__link {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--cncgc-bg-muted);
}

.cncgc-news-gallery__link img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.cncgc-news-gallery__link:focus-visible {
	outline: 2px solid var(--cncgc-black);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.cncgc-news-gallery__link:hover img {
		transform: scale(1.03);
	}
}

.cncgc-news-gallery__arrow {
	position: absolute;
	top: 50%;
	z-index: 1;
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: #fff;
	color: var(--cncgc-text);
	box-shadow: 0 4px 16px rgb(0 0 0 / 12%);
	transform: translateY(-50%);
}

.cncgc-news-gallery__arrow--prev {
	left: 0;
}

.cncgc-news-gallery__arrow--next {
	right: 0;
}

.cncgc-news-gallery__arrow:disabled {
	opacity: 0;
	pointer-events: none;
}

@media (min-width: 576px) {
	.cncgc-news-gallery__arrow {
		display: inline-flex;
	}
}

@media (min-width: 1200px) {
	.cncgc-news-gallery__arrow--prev {
		left: -22px;
	}

	.cncgc-news-gallery__arrow--next {
		right: -22px;
	}
}

.cncgc-news-gallery__counter {
	margin: 12px 0 0;
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	color: var(--cncgc-text-muted);
	text-align: right;
}

/* ---------- Sidebar ---------- */
.cncgc-news__aside {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

.cncgc-news-box {
	padding: 24px 20px;
	background: var(--cncgc-bg-soft);
}

.cncgc-news-box__title {
	margin: 0 0 20px;
	font-size: 1.0625rem;
	font-weight: 600;
}

.cncgc-news-other__list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.cncgc-news-other__item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 16px;
	align-items: center;
}

.cncgc-news-other__thumb {
	display: block;
	width: 72px;
	height: 72px;
	background: var(--cncgc-bg-muted);
	overflow: hidden;
}

.cncgc-news-other__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cncgc-news-other__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.cncgc-news-other__title {
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
	color: var(--cncgc-text);
}

.cncgc-news-other__meta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.75rem;
	color: var(--cncgc-text-muted);
}

.cncgc-news-other__meta .cncgc-icon svg {
	width: 12px;
	height: 12px;
	transition: transform var(--cncgc-transition);
}

.cncgc-news-other__item:focus-visible {
	outline: 2px solid var(--cncgc-black);
	outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
	.cncgc-news-other__item:hover .cncgc-news-other__title {
		color: var(--cncgc-black);
		text-decoration: underline;
		text-underline-offset: 3px;
	}

	.cncgc-news-other__item:hover .cncgc-icon svg {
		transform: translateX(3px);
	}
}

.cncgc-news-share__title {
	margin: 0 0 12px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--cncgc-text);
}

.cncgc-news-share__list {
	display: flex;
	gap: 8px;
}

.cncgc-news-share__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: #fff;
	color: var(--cncgc-text);
}

.cncgc-news-share__link:focus-visible {
	outline: 2px solid var(--cncgc-black);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.cncgc-news-share__link:hover {
		background: var(--cncgc-charcoal);
		color: #fff;
	}
}

/* ---------- Lightbox ---------- */
.cncgc-news-lightbox {
	max-width: min(96vw, 1400px);
	max-height: 92vh;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}

.cncgc-news-lightbox::backdrop {
	background: rgb(0 0 0 / 85%);
}

.cncgc-news-lightbox__img {
	max-width: 100%;
	max-height: 92vh;
	width: auto;
	object-fit: contain;
}

.cncgc-news-lightbox__close {
	position: fixed;
	top: max(12px, env(safe-area-inset-top));
	right: max(12px, env(safe-area-inset-right));
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: #fff;
}

/* =====================================================================
 * "Все новости" listing (template-parts/page/news-list.php) — main column
 * of the information-page layout (info-page.css: hero + sidebar).
 * 3 cards per row from 1200px (cards narrowed to fit next to the
 * sidebar); 992–1199px stays at 2 — the main column there is ~570px,
 * 3 cards would be ~170px wide.
 * ===================================================================== */
.cncgc-news-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 40px 24px;
	padding-bottom: 48px;
}

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

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

.cncgc-news-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.cncgc-news-card__media {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--cncgc-bg-muted) url("../images/logo_cnc_black.png") center / 40% auto no-repeat;
}

.cncgc-news-card__media img {
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
	background: var(--cncgc-bg-muted);
	transition: transform 0.3s ease;
}

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

.cncgc-news-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	font-size: 0.75rem;
	color: var(--cncgc-text-muted);
}

.cncgc-news-card__label {
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.cncgc-news-card__label::before {
	content: "|";
	margin-right: 8px;
	opacity: 0.5;
}

.cncgc-news-card__title {
	margin: 0 0 12px;
	font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
	font-weight: 600;
	line-height: 1.35;
}

.cncgc-news-card__title a {
	color: var(--cncgc-black);
}

.cncgc-news-card__excerpt {
	margin: 0 0 16px;
	font-size: 0.9375rem;
	line-height: 1.6;
	color: var(--cncgc-text-muted);
}

.cncgc-news-card__more {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	align-self: flex-start;
	min-height: 44px;
	margin-top: auto;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--cncgc-black);
}

.cncgc-news-card__more .cncgc-icon svg {
	width: 14px;
	height: 14px;
	transition: transform var(--cncgc-transition);
}

.cncgc-news-card__title a:focus-visible,
.cncgc-news-card__more:focus-visible {
	outline: 2px solid var(--cncgc-black);
	outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
	.cncgc-news-card:hover .cncgc-news-card__media img {
		transform: scale(1.03);
	}

	.cncgc-news-card__title a:hover {
		text-decoration: underline;
		text-underline-offset: 3px;
	}

	.cncgc-news-card__more:hover .cncgc-icon svg {
		transform: translateX(3px);
	}
}

.cncgc-news-archive__empty {
	margin: 0;
	color: var(--cncgc-text-muted);
}

/*
 * Pagination: design comes ONLY from the site-wide rules in main.css
 * ("Unified pagination") — no box/colour/size styles here, by rule
 * (CLAUDE.md, «Пейджинатор: единый стиль на всём сайте»). Outer spacing only.
 */
.cncgc-pagination {
	padding-bottom: 64px;
}
