/*
Theme Name: Связисты Красноярья
Description: Простая тема для сайта Красноярской краевой организации работников связи: новости лентой, документы, раздел «Профсоюз помог» со страницами, форма «Задать вопрос».
Version: 2.8.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: krasnoyarsk-svyaz
*/

:root {
	--river: #123B63;
	--deep: #0C2A47;
	--mist: #EEF3F7;
	--line: #D3DFE9;
	--signal: #F2A900;
	--ink: #1A2632;
	--muted: #5B6B7A;
	--font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--font-display: "Unbounded", "Golos Text", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--wrap: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--mist);
	color: var(--ink);
	font: 400 1.0625rem/1.65 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--river); }
a:hover { color: var(--deep); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link:focus {
	position: fixed !important;
	top: .5rem; left: .5rem;
	width: auto; height: auto;
	clip: auto;
	padding: .6rem 1rem;
	background: #fff;
	color: var(--deep);
	z-index: 100;
	border-radius: 8px;
}

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

/* ---------- Шапка ---------- */
.site-header { background: var(--river); color: #fff; }
.header-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
}
.brand {
	display: flex;
	align-items: center;
	gap: 1.2rem;
	min-width: 0;
	color: #fff;
	text-decoration: none;
}
.brand:hover { color: #fff; }
.brand-mark { width: auto; height: 80px; flex: none; }
.brand .custom-logo { width: auto; height: 80px; flex: none; }
.brand-name {
	display: flex;
	flex-direction: column;
	gap: .1rem;
	font: 700 clamp(0.95rem, .8rem + 0.8vw, 1.25rem)/1.3 var(--font-display);
}
.brand-line { display: block; }

.header-contact {
	flex: none;
	align-self: center;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 14px;
	padding: .9rem 1.2rem;
	text-align: left;
	color: rgba(255, 255, 255, .95);
	font: 400 .88rem/1.45 var(--font-body);
}
.header-contact p { margin: 0; }
.header-contact-line { display: flex; align-items: flex-start; gap: .6rem; white-space: nowrap; }
.header-contact-icon { flex: none; width: 1.05rem; height: 1.05rem; margin-top: .15em; color: var(--signal); }
.header-contact a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .45); }
.header-contact a:hover { border-bottom-color: #fff; }

.nav-toggle {
	display: none;
	align-items: center;
	padding: .6rem 1.1rem;
	border: 2px solid rgba(255, 255, 255, .5);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: 600 1rem var(--font-body);
	cursor: pointer;
}

.main-nav {
	padding-top: 1rem;
	padding-bottom: 1rem;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.main-nav a {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
	padding: .65rem 1.2rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s, color .15s;
}
.main-nav a:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a,
.main-nav .current-post-ancestor > a {
	background: var(--signal);
	color: var(--deep);
}

.main-nav .nav-news > a::before,
.main-nav .nav-docs > a::before,
.main-nav .nav-help > a::before,
.main-nav .nav-question > a::before {
	content: "";
	width: 1.2em;
	height: 1.2em;
	flex: none;
	background: currentColor;
	-webkit-mask: var(--ic) center / contain no-repeat;
	mask: var(--ic) center / contain no-repeat;
}
.nav-news { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11a9 9 0 0 1 9 9'/%3E%3Cpath d='M4 4a16 16 0 0 1 16 16'/%3E%3Ccircle cx='5' cy='19' r='1'/%3E%3C/svg%3E"); }
.nav-docs { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3Cline x1='16' y1='13' x2='8' y2='13'/%3E%3Cline x1='16' y1='17' x2='8' y2='17'/%3E%3C/svg%3E"); }
.nav-help { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E"); }

.nav-question { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
/* Кнопка «Задать вопрос» выделена акцентным цветом */
.main-nav .nav-question > a { background: var(--signal); color: var(--deep); }
.main-nav .nav-question > a:hover { background: #fff; color: var(--deep); }

/* Пункты меню с выпадающим списком */
.main-nav li.menu-item-has-children { position: relative; }
.main-nav li.menu-item-has-children > a { padding-right: 2.3rem; position: relative; }
.main-nav li.menu-item-has-children > a::after {
	content: "";
	position: absolute;
	right: 1.1rem;
	top: 50%;
	width: .5rem;
	height: .5rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-65%) rotate(45deg);
	transition: transform .15s;
}
.main-nav li.menu-item-has-children.is-open > a::after { transform: translateY(-35%) rotate(-135deg); }

.main-nav .sub-menu {
	list-style: none;
	margin: 0;
	padding: .5rem;
	position: absolute;
	top: 100%; /* Убрали зазор + .5rem */
	left: 0;
	min-width: 15rem;
	display: none;
	flex-direction: column;
	gap: .15rem;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: 0 16px 32px rgba(12, 42, 71, .18);
	z-index: 30;
	/* Невидимый "мостик" сверху, чтобы курсор не терял hover при переходе */
	padding-top: 0.75rem;
	margin-top: -0.25rem;
}
.main-nav li.menu-item-has-children.is-open > .sub-menu { display: flex; }
.main-nav .sub-menu a {
	background: transparent;
	color: var(--deep);
	border-radius: 8px;
	padding: .6rem .85rem;
}
.main-nav .sub-menu a:hover { background: var(--mist); color: var(--deep); }
.main-nav .sub-menu .current-menu-item > a { background: var(--mist); }

/* Волнистая кромка шапки */
.header-wave {
	height: 14px;
	background: var(--river) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='14' viewBox='0 0 60 14'%3E%3Cpath fill='%23EEF3F7' d='M0 14V9Q15 0 30 9T60 9V14z'/%3E%3C/svg%3E") repeat-x left bottom / 60px 14px;
}

/* ---------- Общее ---------- */
.site-main { padding-bottom: 3rem; }
.page-head { padding: 2.5rem 0 1.75rem; }
.page-head h1,
.article h1 {
	margin: 0;
	font: 600 clamp(1.3rem, 0.9rem + 1.5vw, 1.8rem)/1.25 var(--font-display);
	color: var(--deep);
	overflow-wrap: anywhere;
}
.page-head .lead { margin-top: .75rem; max-width: 60ch; color: var(--muted); }
.page-head .lead p { margin: 0; }

.btn {
	display: inline-block;
	padding: .6rem 1.3rem;
	border: 2px solid var(--river);
	border-radius: 999px;
	color: var(--river);
	font-weight: 600;
	font-size: .98rem;
	text-decoration: none;
	transition: background .15s, color .15s;
}
.btn:hover { background: var(--river); color: #fff; }

/* ---------- Лента новостей ---------- */
.feed { position: relative; padding-left: 2.25rem; }
.feed::before {
	content: "";
	position: absolute;
	left: .6rem;
	top: 1.4rem;
	bottom: 1.4rem;
	width: 2px;
	background: var(--line);
}
.entry { position: relative; margin-bottom: 1.75rem; }
.entry::before {
	content: "";
	position: absolute;
	left: calc(-1.65rem - 7px);
	top: 1.5rem;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--signal);
	box-shadow: 0 0 0 4px var(--mist);
}

.card {
	display: grid;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
	position: relative;
}
.card.has-media { grid-template-columns: minmax(0, clamp(14rem, 34%, 26rem)) 1fr; }
/* Рамка под фото — горизонтальная 4:3. Если текста много, рамка вытягивается по высоте карточки. */
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--line); overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.card-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .5rem;
	padding: 1.4rem 1.6rem 1.5rem;
}
.card-date { font-size: .9rem; color: var(--muted); }
.card-title { margin: 0; font: 700 1.1rem/1.35 var(--font-body); overflow-wrap: anywhere; }
.card-title a { color: var(--deep); text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.card-excerpt { margin: 0; color: #33434F; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { margin-top: .6rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.card-actions .btn { margin-top: 0; }

.pagination { margin: 2rem 0 0 2.25rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.pagination .page-numbers {
	padding: .5rem 1rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: #fff;
	color: var(--river);
	font-weight: 600;
	text-decoration: none;
}
.pagination .page-numbers.current { background: var(--river); border-color: var(--river); color: #fff; }
.pagination a.page-numbers:hover { border-color: var(--river); }

.empty { color: var(--muted); }

/* ---------- Список документов ---------- */
.doc-list { display: flex; flex-direction: column; gap: 1.25rem; }
.doc-item {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 1.5rem 1.7rem;
}
.doc-title { margin: 0 0 .6rem; font: 700 1.2rem/1.3 var(--font-body); color: var(--deep); overflow-wrap: anywhere; }
.doc-item .entry-content { margin-top: 0; }
.doc-item .wp-block-file { margin: 0; }

/* ---------- Статья и страница ---------- */
.article { max-width: 46rem; margin: 0 auto; padding-top: 2.5rem; }
.article .back { margin: 0 0 1.25rem; font-weight: 600; }
/* Обычные страницы: заголовок слева, как везде; текст — читаемой ширины */
.page-body { max-width: 56rem; }
.article-date { display: block; margin-bottom: .6rem; color: var(--muted); font-size: .95rem; }

.article-cover {
	margin: 2rem auto;
	max-width: 800px;
	text-align: center;
}
.article-cover a {
	display: inline-block;
	cursor: zoom-in;
	max-width: 100%;
}
.article-cover img {
	width: 100%;
	height: auto;
	max-width: 800px;
	border-radius: 14px;
	transition: transform 0.3s ease;
	display: block;
	margin: 0 auto;
}
.article-cover a:hover img {
	transform: scale(1.02);
}

.entry-content { overflow-wrap: anywhere; }
.entry-content > * + * { margin-top: 1.1em; margin-bottom: 0; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: var(--font-body); font-weight: 700; line-height: 1.3; color: var(--deep); }
.entry-content h2 { font-size: 1.3rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.1rem; margin-top: 1.4em; }

.entry-content img {
	max-width: 100%;
	height: auto;
	border-radius: 10px;
	display: block;
	margin: 0 auto;
}
.entry-content a.news-image-link {
	display: inline-block;
	cursor: zoom-in;
	max-width: 100%;
}

.entry-content figure,
.entry-content .wp-block-image { 
	margin-inline: auto !important; 
	max-width: 100%;
	text-align: center;
}
.entry-content figcaption { 
	margin-top: .5rem; 
	color: var(--muted); 
	font-size: .92rem;
	text-align: center;
}
.entry-content blockquote {
	margin-inline: 0;
	padding: .25rem 0 .25rem 1.25rem;
	border-left: 4px solid var(--signal);
	color: #33434F;
}
.entry-content table { width: 100%; border-collapse: collapse; background: #fff; }
.entry-content th, .entry-content td { padding: .7rem .9rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { background: var(--river); color: #fff; }

.wp-block-file {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .75rem 1rem;
	margin: 0 0 .75rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 12px;
}
.wp-block-file + .wp-block-file { margin-top: 0; }
.wp-block-file a:not(.wp-block-file__button) { color: var(--deep); font-weight: 600; text-decoration: none; }
.wp-block-file a:not(.wp-block-file__button):hover { text-decoration: underline; }
.wp-block-file .wp-block-file__button {
	margin: 0;
	padding: .5rem 1.1rem;
	border-radius: 999px;
	background: var(--river);
	color: #fff;
	font-size: .95rem;
	text-decoration: none;
}
.wp-block-file .wp-block-file__button:hover { background: var(--deep); }

/* ---------- О нас ---------- */
.about { padding-bottom: 1rem; }
.about-head { display: grid; grid-template-columns: minmax(0, 18rem) 1fr; gap: 2rem 3rem; align-items: start; }
.about-head.no-photo { 
    grid-template-columns: 1fr; 
    max-width: 46rem; 
    margin-inline: auto; 
}
.portrait { margin: 0; }
.portrait img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 14px; }
.chair-name { margin: 0; font: 700 1.5rem/1.25 var(--font-body); color: var(--deep); }
.chair-role { margin: .25rem 0 1.25rem; color: var(--muted); }

.contact-set { margin-top: 3rem; }
.contact-set h2 { margin: 0 0 1rem; font: 600 1.25rem/1.3 var(--font-display); color: var(--deep); }
.contact-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	overflow: hidden;
}
.contact-table th { padding: .85rem 1rem; background: var(--river); color: #fff; font-weight: 600; font-size: .95rem; text-align: left; }
.contact-table td { padding: .9rem 1rem; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.contact-table tbody tr:first-child td { border-top: 0; }
.contact-table a { font-weight: 500; }

/* ---------- Подвал ---------- */
.site-footer { margin-top: 2rem; padding: 2.5rem 0 2rem; background: var(--deep); color: #C9D8E6; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem 3rem; }
.footer-name { margin: 0; font: 600 1.05rem/1.35 var(--font-display); color: #fff; }
.footer-tag { margin: .4rem 0 0; }
.footer-contacts { margin: 0; padding: 0; list-style: none; }
.footer-contacts li + li { margin-top: .4rem; }
.footer-copy { grid-column: 1 / -1; margin: 0; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .18); font-size: .9rem; }

/* =================================================== */
/* АДАПТИВНОСТЬ */
/* =================================================== */

@media (min-width: 1024px) {
	.wrap { max-width: 1280px; }
	.feed { padding-left: 0; }
	.feed::before, .entry::before { display: none; }
	.entry, .pagination { margin-left: 0; }
	.site-header .wrap { display: block; }
	.site-header .header-top { display: flex; }
	.header-top, .main-nav { max-width: 100%; }
	.main-nav ul { justify-content: flex-start; }
}

@media (min-width: 1920px) {
	.wrap { max-width: 1760px; }
}

/* Средние мониторы 1400-1919px */
@media (min-width: 1400px) and (max-width: 1919px) {
	.wrap { max-width: 1560px; }
}

/* Обычные ноутбуки 1024-1399px */
@media (min-width: 1024px) and (max-width: 1399px) {
	.wrap { max-width: 1280px; }
}


@media (max-width: 899px) {
	.header-contact { display: none; }
}

@media (max-width: 760px) {
	.header-top {
		flex-wrap: wrap;
		justify-content: center;
		text-align: center;
		gap: 0.75rem;
		padding: 1rem 0;
	}
	.brand { flex-direction: column; width: 100%; gap: 0.5rem; }
	.brand-mark, .brand .custom-logo { height: 60px; }
	.brand-name { text-align: center; font-size: 0.9rem; }
	
	html.js .nav-toggle { display: inline-flex !important; margin: 0.5rem auto 0; }
	html.js .main-nav { display: none !important; }
	html.js .main-nav.is-open { display: block !important; }
	.main-nav ul { flex-direction: column; }
	.main-nav a { display: flex; width: 100%; }
	
	.main-nav .sub-menu {
		position: static !important;
		display: none !important;
		background: rgba(255, 255, 255, .06) !important;
		border: 0 !important;
		box-shadow: none !important;
		margin-top: .3rem !important;
		margin-left: 1rem !important;
		padding: .5rem !important;
	}
	.main-nav li.menu-item-has-children.is-open > .sub-menu { display: flex !important; }
	.main-nav .sub-menu a { color: #fff !important; }
	.main-nav .sub-menu a:hover { background: rgba(255, 255, 255, .16) !important; }
	
	.main-nav li.menu-item-has-children > a::after {
		content: '▾' !important;
		position: static !important;
		display: inline-block !important;
		margin-left: auto !important;
		transform: none !important;
		border: none !important;
		font-size: 1.2rem !important;
	}
	.main-nav li.menu-item-has-children.is-open > a::after {
		transform: rotate(180deg) !important;
	}

	.feed { padding-left: 1.5rem; }
	.feed::before { left: 0.5rem; }
	.entry::before { left: calc(-1rem - 5px); width: 10px; height: 10px; }
	.card.has-media { grid-template-columns: 1fr !important; }
	.card-media { min-height: 0 !important; aspect-ratio: 16 / 9 !important; }
	.card-body { padding: 1rem 1.2rem 1.2rem !important; }
	.card-title { font-size: 1.05rem; }
	.pagination { margin-left: 1.5rem; }

	.article-cover { margin: 1.5rem 0; max-width: 100%; }
	.article-cover img { border-radius: 10px; }
	.entry-content h2 { font-size: 1.2rem; }
	.entry-content h3 { font-size: 1.05rem; }
	.entry-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	
	.about-head { grid-template-columns: 1fr; }
	.portrait { max-width: 16rem; margin: 0 auto; }
	.contact-table, .contact-table tbody, .contact-table tr, .contact-table td { display: block; width: 100%; }
	.contact-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
	.contact-table tr { padding: .5rem 0; border-top: 1px solid var(--line); }
	.contact-table tbody tr:first-child { border-top: 0; }
	.contact-table td { border: 0; padding: .3rem 1rem; }
	.contact-table td::before { content: attr(data-label); display: block; font-size: .82rem; color: var(--muted); }
	.contact-table td:empty { display: none; }
	
	.footer-grid { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 600px) {
	.wrap { width: 100%; padding-left: 1rem; padding-right: 1rem; }
	.page-head h1 { font-size: 1.4rem; }
	.card-body { padding: 0.875rem 1rem 1rem !important; }
	.btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
}

/* =================================================== */
/* ЛАЙТБОКС */
/* =================================================== */
.news-lightbox {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.95);
	z-index: 10000;
	justify-content: center;
	align-items: center;
	cursor: zoom-out;
	opacity: 0;
	transition: opacity 0.3s ease;
}
.news-lightbox.active {
	display: flex;
	opacity: 1;
}
.news-lightbox img {
	max-width: 90%;
	max-height: 90%;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}
.news-lightbox-close {
	position: absolute;
	top: 20px;
	right: 40px;
	font-size: 60px;
	color: #fff;
	cursor: pointer;
	line-height: 1;
	opacity: 0.7;
	transition: opacity 0.2s;
	user-select: none;
	z-index: 10001;
}
.news-lightbox-close:hover { opacity: 1; }

@media (max-width: 760px) {
	.news-lightbox img { max-width: 95%; max-height: 85%; }
	.news-lightbox-close { top: 10px; right: 15px; font-size: 36px; }
}

/* =================================================== */
/* КНОПКА "ПОДЕЛИТЬСЯ" (Внутри новости) */
/* =================================================== */
.share-buttons {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.share-native-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: var(--river);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(18, 59, 99, 0.15);
}

.share-native-btn:hover {
    background: var(--deep);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 42, 71, 0.2);
}

.share-native-btn:active {
    transform: translateY(0);
}

.share-icon {
    font-size: 1.2rem;
    font-weight: 400;
}

@media (max-width: 760px) {
    .share-native-btn {
        padding: 0.875rem 2rem;
        font-size: 1.05rem;
    }
}

/* =================================================== */
/* РЕАКЦИИ НА НОВОСТИ */
/* =================================================== */
.kk-reactions {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--line);
}
.kk-reactions-total {
	margin: 0 0 .75rem;
	font-size: .9rem;
	color: var(--muted);
}
.kk-reactions-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}
.kk-reaction-btn {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .5rem .9rem;
	background: #fff;
	border: 1.5px solid var(--line);
	border-radius: 999px;
	font: 600 .92rem/1 var(--font-body);
	color: var(--ink);
	cursor: pointer;
	transition: background .15s, border-color .15s, transform .1s;
}
.kk-reaction-btn:hover { border-color: var(--river); transform: translateY(-1px); }
.kk-reaction-btn.is-active {
	background: var(--mist);
	border-color: var(--signal);
	color: var(--deep);
}
.kk-reaction-emoji { font-size: 1.15rem; }
.kk-reaction-label { display: none; }
.kk-reaction-count { color: var(--muted); font-weight: 700; }
.kk-reaction-btn.is-active .kk-reaction-count { color: var(--river); }

@media (min-width: 560px) {
	.kk-reaction-label { display: inline; }
}

/* Компактный счётчик реакций на карточке в ленте новостей — в правом углу, рядом с «Подробнее» */
.card-reactions {
	margin: 0;
	flex: none;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--deep);
	display: flex;
	align-items: center;
	gap: .35rem;
}
.card-reactions span[aria-hidden] { font-size: 1.3rem; line-height: 1; }

/* =================================================== */
/* КНОПКА "ПОДЕЛИТЬСЯ" В УГЛУ КАРТОЧКИ */
/* =================================================== */
.card-share-btn {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 5;
	width: 36px;
	height: 36px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid var(--line);
	border-radius: 50%;
	color: var(--river);
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 6px rgba(12, 42, 71, 0.1);
}

.card-share-btn:hover {
	background: var(--river);
	color: #fff;
	border-color: var(--river);
	transform: scale(1.1);
	box-shadow: 0 4px 12px rgba(18, 59, 99, 0.25);
}

.card-share-btn:active {
	transform: scale(0.95);
}

.card-share-btn svg {
	width: 18px;
	height: 18px;
}

.card-share-btn span:not(svg) {
	display: none;
}

@media (max-width: 760px) {
	.card-share-btn {
		top: 0.5rem;
		right: 0.5rem;
		width: 32px;
		height: 32px;
	}
	.card-share-btn svg {
		width: 16px;
		height: 16px;
	}
}

/* =================================================== */
/* ФИЛЬТР ПО ГОДАМ */
/* =================================================== */
.news-year-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.year-btn {
    padding: 0.5rem 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--river);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.year-btn:hover {
    background: var(--river);
    color: #fff;
    border-color: var(--river);
}

.year-btn.active {
    background: var(--signal);
    color: var(--deep);
    border-color: var(--signal);
}

/* =================================================== */
/* КНОПКА "ЗАГРУЗИТЬ ЕЩЁ" */
/* =================================================== */
.load-more-wrap {
    text-align: center;
    margin: 3rem 0 2rem;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    background: #fff;
    border: 2px solid var(--river);
    border-radius: 999px;
    color: var(--river);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover:not(:disabled) {
    background: var(--river);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(18, 59, 99, 0.2);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.load-more-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.load-more-btn.all-loaded {
    background: var(--mist);
    border-color: var(--line);
    color: var(--muted);
}

/* Анимация появления новых карточек */
.entry {
    animation: fadeSlideIn 0.4s ease;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .news-year-filter {
        justify-content: center;
    }
    .year-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    .load-more-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}
/* ---------- Подменю на десктопе по наведению ---------- */
@media (min-width: 1201px) {
	.main-nav li.menu-item-has-children:hover > .sub-menu {
		display: flex;
	}
	
	.main-nav li.menu-item-has-children:hover > a::after {
		transform: translateY(-35%) rotate(-135deg);
	}
	
	/* Родительский пункт остаётся активным, пока курсор на подменю */
	.main-nav li.menu-item-has-children:hover > a,
	.main-nav .sub-menu:hover ~ a {
		background: rgba(255, 255, 255, .24);
	}
}
/* =================================================== */
/* БЛОК СОЦИАЛЬНЫХ ПАРТНЁРОВ */
/* =================================================== */
.partners-section {
	background: #fff;
	border-top: 1px solid var(--line);
	padding: 2.5rem 0;
	margin-top: 2rem;
}

.partners-title {
	text-align: center;
	margin: 0 0 1.5rem;
	font: 600 1.1rem/1.3 var(--font-display);
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.partners-logos {
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	gap: 2rem;
}

.partner-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 180px;
	height: 60px;
	transition: opacity 0.2s ease, transform 0.2s ease;
	opacity: 0.7;
}

.partner-logo:hover {
	opacity: 1;
	transform: scale(1.05);
}
.partner-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	/* Мягкая прозрачность вместо жёсткого фильтра */
	opacity: 0.7;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.partner-logo:hover img {
	/* При наведении возвращаем оригинальные цвета и полную яркость */
	filter: brightness(1) opacity(1);
	transform: scale(1.05);
}

@media (max-width: 760px) {
	.partners-section {
		padding: 2rem 0;
	}
	.partners-logos {
		gap: 1.5rem;
	}
	.partner-logo {
	display: flex;
	align-items: center; /* Центрируем по вертикали */
	justify-content: center;
	width: 180px; /* Фиксируем ширину зоны клика */
	height: 80px; /* Фиксируем высоту зоны */
	padding: 10px; /* Отступы внутри, чтобы лого не касалось краев */
	box-sizing: border-box;
}
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* =================================================== */
/* ФОРМА «ЗАДАТЬ ВОПРОС» */
/* =================================================== */
.kk-question-form {
	margin-top: 1.75rem;
	padding: 1.5rem;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 14px;
	max-width: 42rem;
}
.kk-field { margin-bottom: 1.1rem; }
.kk-field label { display: block; margin-bottom: .35rem; font-weight: 600; color: var(--deep); }
.kk-req { color: #C0392B; }
.kk-opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
.kk-field input[type="text"],
.kk-field input[type="email"],
.kk-field input[type="tel"],
.kk-field textarea {
	width: 100%;
	padding: .7rem .9rem;
	border: 1.5px solid var(--line);
	border-radius: 10px;
	background: var(--mist);
	color: var(--ink);
	font: 400 1rem/1.5 var(--font-body);
}
.kk-field textarea { resize: vertical; min-height: 9rem; }
.kk-field input:focus,
.kk-field textarea:focus { border-color: var(--river); background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(242, 169, 0, .45); }
.kk-consent label { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; color: var(--ink); }
.kk-consent input { margin-top: .3rem; flex: none; width: 1.1rem; height: 1.1rem; }
.kk-submit { cursor: pointer; background: var(--river); color: #fff; font-family: inherit; }
.kk-submit:hover { background: var(--deep); }
.kk-submit:disabled { opacity: .6; cursor: default; }
.kk-form-status { margin: 1rem 0 0; font-weight: 600; min-height: 1.5em; }
.kk-form-status.is-ok { color: #1E7B45; }
.kk-form-status.is-error { color: #C0392B; }
/* Поле-ловушка для ботов: уводим за пределы экрана, людям оно не видно */
.kk-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
	.kk-question-form { padding: 1rem; }
}

/* =================================================== */
/* ДОКУМЕНТЫ: кнопка «Скачать документ» */
/* =================================================== */
.doc-file {
	display: inline-flex;
	align-items: center;
	gap: .8rem;
	margin-top: .9rem;
	padding: .7rem 1.2rem .7rem .9rem;
	background: var(--mist);
	border: 1.5px solid var(--line);
	border-radius: 12px;
	color: var(--deep);
	text-decoration: none;
	transition: border-color .15s, background .15s;
}
.doc-file:hover { border-color: var(--river); background: #fff; color: var(--deep); }
.doc-file svg { width: 1.8rem; height: 1.8rem; flex: none; color: var(--river); }
.doc-file-text { display: flex; flex-direction: column; line-height: 1.3; }
.doc-file-title { font-weight: 700; }
.doc-file-meta { font-size: .85rem; color: var(--muted); }
.doc-item .entry-content:empty + .doc-file { margin-top: 0; }
