/* =========================================================================
   Шапка, подвал и общий каркас темы Jewmil.
   Значения перенесены из прежней сборки Elementor (шаблоны 2403 и 2263).
   ====================================================================== */

:root {
	--jm-text: #162427;
	--jm-nav: #253C41;
	--jm-nav-hover: #324A6D;
	--jm-line: #141414;
	--jm-dropdown-bg: #F3F5F8;
	--jm-dropdown-hover: #F9FAFD;
	--jm-footer-bg: #162427;
	--jm-footer-text: #D4E3E7;
	--jm-header-h: 64px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

.jm-skip-link:focus {
	position: fixed; top: 8px; left: 8px;
	width: auto; height: auto; clip: auto;
	z-index: 1000; padding: 10px 16px;
	background: #fff; color: var(--jm-text);
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ---------------------------------------------------------------- ШАПКА */

.jm-header {
	position: sticky;
	top: 0;
	z-index: 95;
	background: #FFFFFF;
	border-bottom: 1px solid var(--jm-line);
}

.jm-header__inner {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 20px;
	min-height: var(--jm-header-h);
	padding: 0 8%;
}

.jm-header__left,
.jm-header__right {
	display: flex;
	align-items: center;
	gap: 20px;
}

.jm-header__right { justify-content: flex-end; }

.jm-logo img,
.jm-logo .custom-logo {
	display: block;
	max-height: 44px;
	width: auto;
}

.jm-logo__link {
	font-family: "Roboto", sans-serif;
	font-weight: 600;
	font-size: 20px;
	color: var(--jm-text);
	text-decoration: none;
}

/* --- меню --- */

.jm-menu,
.jm-menu ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.jm-menu {
	display: flex;
	align-items: center;
	gap: 20px;
}

.jm-menu li { position: relative; }

.jm-menu a {
	display: block;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	text-transform: capitalize;
	color: var(--jm-nav);
	text-decoration: none;
	padding: 5px 0;
	transition: color .15s ease;
}

.jm-menu a:hover,
.jm-menu .current-menu-item > a,
.jm-menu .current_page_item > a {
	color: var(--jm-nav-hover);
}

/* стрелка у пунктов с вложенностью */
.jm-menu .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 6px; height: 6px;
	margin-left: 6px;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

/* выпадающий список */
.jm-menu > li > ul {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 240px;
	background: var(--jm-dropdown-bg);
	box-shadow: 0 6px 18px rgba(0,0,0,.12);
	padding: 6px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity .15s ease, transform .15s ease;
	z-index: 100;
}

.jm-menu > li:hover > ul,
.jm-menu > li:focus-within > ul {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.jm-menu > li > ul a {
	padding: 8px 18px;
	font-size: 15px;
	color: #141414;
	text-transform: none;
}

.jm-menu > li > ul a:hover { background: var(--jm-dropdown-hover); }

/* Панель «Категории»: всё дерево видно сразу, как на старом сайте */
.jm-menu > li.jm-categories > ul {
	max-height: 78vh;
	overflow-y: auto;
	min-width: 360px;
}

.jm-menu > li.jm-categories > ul ul {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	background: transparent;
	min-width: 0;
	padding: 0 0 4px;
}

.jm-menu > li.jm-categories > ul > li > a { font-weight: 600; }

.jm-menu > li.jm-categories > ul ul a {
	padding-left: 34px;
	font-size: 14px;
	opacity: .9;
}

.jm-menu > li.jm-categories ul .menu-item-has-children > a::after { display: none; }

.jm-menu > li.jm-categories > ul::-webkit-scrollbar { width: 8px; }
.jm-menu > li.jm-categories > ul::-webkit-scrollbar-thumb {
	background: rgba(22,36,39,.25);
	border-radius: 4px;
}

/* --- поиск --- */

.jm-search {
	display: flex;
	align-items: center;
	gap: 8px;
}

.jm-search__input {
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	color: var(--jm-text);
	background: transparent;
	border: 0;
	border-bottom: 1px solid #000;
	border-radius: 0;
	padding: 5px 8px;
	width: 180px;
	outline: none;
}

.jm-search__input::placeholder { color: rgba(22,36,39,.55); }
.jm-search__input:focus { border-bottom-color: var(--jm-nav-hover); }

.jm-search__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 4px;
	color: var(--jm-text);
	cursor: pointer;
}

/* --- кнопка --- */

.jm-btn {
	display: inline-block;
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 140%;
	color: #243c44;
	background: #FFFFFF;
	border: 1px solid #243c44;
	border-radius: 0;
	padding: 12px 16px;
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease;
}

.jm-btn:hover { background: #243c44; color: #fff; }

/* --- бургер --- */

.jm-burger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 36px; height: 36px;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
}

.jm-burger span {
	display: block;
	height: 2px;
	background: var(--jm-text);
	transition: transform .2s ease, opacity .2s ease;
}

.jm-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.jm-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.jm-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- ПОДВАЛ */

.jm-footer {
	background: var(--jm-footer-bg);
	color: var(--jm-footer-text);
	padding: 90px 0 45px;
	box-shadow: 0 0 10px rgba(0,0,0,.5);
	font-family: "Lato", sans-serif;
}

.jm-footer__inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 20px;
}

.jm-footer__cols {
	display: flex;
	justify-content: space-between;
	gap: 50px;
	padding-bottom: 30px;
}

.jm-footer__col--brand { flex: 0 0 38%; }
.jm-footer__col { flex: 1 1 auto; }

.jm-footer__logo {
	max-width: 260px;
	height: auto;
	display: block;
}

.jm-footer__title {
	font-size: 16px;
	font-weight: 400;
	letter-spacing: .5px;
	color: rgba(212,227,231,.5);
	margin-bottom: 12px;
}

.jm-footer__title--social { margin-top: 24px; }

.jm-footer__text {
	font-size: 16px;
	font-weight: 400;
	line-height: 22px;
	letter-spacing: .5px;
	color: var(--jm-footer-text);
}

.jm-footer__text a,
.jm-footer__social a {
	color: var(--jm-footer-text);
	text-decoration: none;
}

.jm-footer__text a:hover,
.jm-footer__social a:hover { text-decoration: underline; }

.jm-footer__social {
	display: flex;
	gap: 16px;
}

.jm-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 24px;
	border-top: 1px solid rgba(212,227,231,.15);
}

.jm-footer__copy {
	font-size: 12px;
	font-weight: 500;
	color: rgba(213,227,231,.5);
}

.jm-footer__menu {
	display: flex;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.jm-footer__menu a {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: .5px;
	color: rgba(212,227,231,.75);
	text-decoration: none;
}

.jm-footer__menu a:hover { color: var(--jm-footer-text); }

/* ---------------------------------------------------------------- АДАПТИВ */

@media (max-width: 1024px) {
	.jm-header__inner { padding: 0 20px; }
	.jm-search__input { width: 140px; }
	.jm-footer { padding: 60px 0 30px; }
	.jm-footer__cols { flex-wrap: wrap; gap: 20px; }
	.jm-footer__col--brand { flex: 0 0 100%; }
}

/* Дерево категорий в мобильном меню — на десктопе не показывается */
.jm-menu .jm-mtree { display: none; }

@media (max-width: 900px) {
	.jm-burger { display: flex; }

	/* «Категории» ведёт туда же, куда и «Биографии», — в мобильном меню дубль не нужен */
	.jm-menu > li.jm-categories { display: none; }

	/* «Биографии» раскрывают дерево: стрелка справа */
	.jm-menu > li.menu-item-object-biography > a {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.jm-menu > li.menu-item-object-biography > a::after {
		content: "";
		width: 8px;
		height: 8px;
		margin-right: 4px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		transition: transform .2s;
	}
	.jm-menu > li.is-tree-open > a::after { transform: rotate(-135deg); }
	.jm-menu > li.is-tree-open > .jm-mtree { display: block; }
	.jm-menu > li.is-loading > .jm-mtree::before { content: "Загрузка…"; display: block; padding: 8px 0; font-size: 14px; color: #666; }

	/* аккордеон категорий — повторяет левую панель на десктопе (new.css, .accordions-elem) */
	.jm-menu .jm-mtree { padding: 2px 0 12px; }
	/* у пунктов меню стоит capitalize — в категориях названия идут как написаны */
	.jm-menu .jm-mtree a { text-transform: none; }
	.jm-menu .jm-mtree__all {
		display: block;
		padding: 10px 0 12px;
		font-size: 14px;
		font-weight: 600;
	}
	.jm-menu .jm-mtree__node { margin-bottom: 6px; padding: 0 14px; }
	.jm-menu .jm-mtree__title {
		position: relative;
		display: block;
		padding: 9px 0 9px 20px;
		font-size: 14px;
		font-weight: 500;
		line-height: 140%;
		color: #000;
	}
	.jm-menu .jm-mtree__title::before {
		content: "";
		position: absolute;
		left: 0;
		top: 50%;
		width: 8px;
		height: 8px;
		transform: translateY(-50%);
		background: url(../images/icon-plus.svg) no-repeat;
		background-size: cover;
	}
	.jm-menu .jm-mtree__body { display: none; padding: 2px 0 0 20px; }
	.jm-menu .jm-mtree__node.active {
		background: #F2F2F2;
		border: 1px solid #000;
		border-radius: 12px;
		margin-bottom: 12px;
		padding-top: 6px;
		padding-bottom: 12px;
	}
	.jm-menu .jm-mtree__node.active > .jm-mtree__title::before {
		background: url(../images/icon-minus.svg) no-repeat;
		background-size: contain;
	}
	.jm-menu .jm-mtree__node.active > .jm-mtree__body { display: block; }
	.jm-menu .jm-mtree__node .jm-mtree__node { padding: 0; }
	.jm-menu .jm-mtree__leaf {
		display: block;
		padding: 7px 0;
		font-size: 14px;
		line-height: 140%;
		color: #000;
	}

	.jm-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		border-bottom: 1px solid var(--jm-line);
		box-shadow: 0 8px 20px rgba(0,0,0,.12);
		display: none;
		max-height: calc(100vh - var(--jm-header-h));
		overflow-y: auto;
	}

	.jm-nav.is-open { display: block; }

	.jm-menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 8px 20px 20px;
	}

	.jm-menu a { padding: 10px 0; font-size: 16px; }

	.jm-menu > li > ul,
	.jm-menu > li.jm-categories > ul {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		background: transparent;
		min-width: 0;
		max-height: none;
		padding: 0 0 8px 14px;
	}

	.jm-menu .menu-item-has-children > a::after { display: none; }

	.jm-header__right { gap: 10px; }
	.jm-btn { padding: 10px 12px; font-size: 13px; }
}

@media (max-width: 600px) {
	.jm-header__inner { flex-wrap: wrap; padding: 8px 16px; gap: 10px; }
	.jm-header__left { flex: 1 1 auto; }
	.jm-header__right { flex: 1 1 100%; justify-content: space-between; }
	.jm-search__input { width: 100%; }
	.jm-search { flex: 1 1 auto; }
	.jm-footer__bottom { flex-direction: column; align-items: flex-start; }
	.jm-footer__menu { flex-wrap: wrap; gap: 12px; }
}


/*
 * Предложение-определение в начале биографии. Абзац убран из шаблона
 * 20.08.2026, правила оставлены на случай возврата — сейчас не применяются.
 */
.single-lead {
	font-family: "Roboto", sans-serif;
	font-size: 17px;
	line-height: 1.55;
	color: #2b3a3e;
	margin: 14px 0 22px;
	padding-left: 14px;
	border-left: 3px solid #243c44;
}

@media (max-width: 767px) {
	.single-lead { font-size: 15px; }
}

/* Списки биографий: алфавит, постраничность, пустой результат */
.main-column-abc a.active {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.main-column-desc {
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	line-height: 1.55;
	color: #2b3a3e;
	margin: 0 0 18px;
}

.main-column-empty {
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	color: #2b3a3e;
	margin: 24px 0;
}

.pagination .page-numbers.current {
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 4px;
}


/* -------------------------------------------------------------------------
 *  Мобильная вёрстка списков
 * ---------------------------------------------------------------------- */

/* На широких экранах кнопка не нужна: меню категорий видно всегда */
.sidebar-toggle { display: none; }

/* 991px — та же граница, на которой колонки складываются в столбец (new.css) */
@media (max-width: 991px) {
	.sidebar-collapsible .sidebar-toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		padding: 14px 16px;
		background: #F3F5F8;
		border: 1px solid #D9E0E6;
		border-radius: 4px;
		font-family: "Roboto", sans-serif;
		font-size: 16px;
		font-weight: 500;
		color: #253C41;
		text-align: left;
		cursor: pointer;
	}

	.sidebar-collapsible .sidebar-toggle::after {
		content: "";
		width: 9px;
		height: 9px;
		margin-left: 12px;
		border-right: 2px solid #253C41;
		border-bottom: 2px solid #253C41;
		transform: rotate(45deg) translateY(-2px);
		transition: transform .15s ease;
	}

	.sidebar-collapsible.is-open .sidebar-toggle::after {
		transform: rotate(-135deg) translateY(-2px);
	}

	.sidebar-collapsible .sidebar-body { display: none; }
	.sidebar-collapsible.is-open .sidebar-body { display: block; margin-top: 12px; }
}

@media (max-width: 767px) {
	/* Буквы указателя: область нажатия под палец */
	.main-column-abc { gap: 6px; }

	.main-column-abc a {
		min-width: 40px;
		min-height: 40px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		padding: 0 6px;
	}

	/* Карточки статей: были 754px каждая, лента уходила на 24 экрана */
	.page-content > article .post-body-pic img {
		width: 100%;
		max-height: 170px;
		object-fit: cover;
	}

	.page-content > article .entry-title {
		font-size: 18px;
		line-height: 1.3;
		margin-bottom: 10px;
	}

	.page-content > article .post-body-info p {
		display: -webkit-box;
		-webkit-line-clamp: 3;
		-webkit-box-orient: vertical;
		overflow: hidden;
		margin-bottom: 10px;
	}

	.page-content > article .post-bottom { height: auto; }

	.page-content > article .post-bottom .section-btn {
		height: auto;
		min-height: 44px;
		padding: 10px 18px;
	}
}


/* Страница отдельного видео.
   Класс не может называться single-video: WordPress вешает ровно такой же
   на <body> для записи типа video, и правила разъезжаются по всей странице. */
.jm-video {
	position: relative;
	width: 100%;
	max-width: 900px;
	aspect-ratio: 16 / 9;
	margin: 0 0 24px;
	background: #000;
}

.jm-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.jm-video-date {
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	color: #5b6b70;
	margin: 0 0 16px;
}

.jm-video-back {
	margin: 24px 0 0;
}

.jm-video-back a,
.jm-video-link a {
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	color: #243c44;
}


/* Количество биографий рядом с названием категории */
.jm-count {
	font-family: "Roboto", sans-serif;
	font-weight: 400;
	font-size: 13px;
	color: #7a8a8f;
	white-space: nowrap;
}

.jm-count--title {
	font-size: 0.6em;
	vertical-align: middle;
	margin-left: 6px;
}

.accordions-elem-title .jm-count { font-size: 12px; }


/* Главная на телефоне: короче ленты и не во весь экран обложки статей */
@media (max-width: 767px) {
	/* показываем шесть карточек, остальное — по кнопке «Больше биографий» */
	.section-actual .actual .actual-elem:nth-child(n+7) { display: none; }

	.articles-elem-pic img {
		width: 100%;
		height: 180px;
		object-fit: cover;
	}
}


/* Подпись рядом с логотипом в шапке */
.jm-tagline {
	margin: 0;
	max-width: 240px;
	font-family: "Roboto", sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--jm-nav);
}

/* Между 901 и 1400px меню идёт строкой — подпись не помещается */
@media (max-width: 1400px) and (min-width: 901px) {
	.jm-tagline { display: none; }
}

@media (max-width: 900px) {
	.jm-tagline {
		max-width: 190px;
		font-size: 11px;
	}
}

@media (max-width: 600px) {
	.jm-tagline {
		max-width: 210px;
		font-size: 11px;
	}
}


/* -------------------------------------------------------------------------
 *  Наградные планки
 * ---------------------------------------------------------------------- */

/* раскладка планок задана в new.css (flex по центру), здесь ширина ячейки */
.single-medals {
	margin: 14px 0 0;
}

/* Пять в ряд: ширину задаём напрямую — у картинок flex-basis отступает
   перед собственным размером файла. Неполный последний ряд центрирует
   justify-content в new.css. */
.single-medals .jm-medal {
	flex: 0 0 auto;
	width: calc((100% - 4 * 6px) / 5);
	height: auto;
	max-width: 100%;
}

.jm-medal {
	display: block;
	height: 30px;
	width: auto;
	max-width: 100%;
}

.single-awards-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.single-awards-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 4px 0;
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	line-height: 1.35;
}

.single-awards-item a {
	color: #243c44;
	text-decoration: none;
}

.single-awards-item a:hover { text-decoration: underline; }

.jm-medal--inline {
	flex: 0 0 auto;
	height: 24px;
}

/* у наград без картинки текст не должен ехать влево */
.single-awards-item:not(:has(.jm-medal)) { padding-left: 0; }

@media (max-width: 767px) {
	.jm-medal { height: 26px; }
	.jm-medal--inline { height: 22px; }
	.single-awards-item { font-size: 14px; }
}

.single-awards-count {
	flex: 0 0 auto;
	font-size: 13px;
	color: #7a8a8f;
	font-variant-numeric: tabular-nums;
}


/* -------------------------------------------------------------------------
 *  Страница поиска по имени
 * ---------------------------------------------------------------------- */

.jm-search-page {
	display: flex;
	gap: 10px;
	margin: 0 0 18px;
}

.jm-search-page__input {
	flex: 1 1 auto;
	font-family: "Roboto", sans-serif;
	font-size: 16px;
	color: #162427;
	background: #fff;
	border: 1px solid #c9d2d6;
	border-radius: 0;
	padding: 10px 14px;
	outline: none;
}

.jm-search-page__input:focus { border-color: #243c44; }

.jm-search-page__submit {
	flex: 0 0 auto;
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: #fff;
	background: #243c44;
	border: 1px solid #243c44;
	border-radius: 0;
	padding: 10px 22px;
	cursor: pointer;
}

.jm-search-page__submit:hover { background: #162427; }

.jm-search-summary {
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	color: #5b6b70;
	margin: 0 0 16px;
}

.jm-search-hint {
	font-family: "Roboto", sans-serif;
	font-size: 15px;
	color: #5b6b70;
}

.jm-search-hint a { color: #243c44; }

@media (max-width: 600px) {
	.jm-search-page { flex-wrap: wrap; }
	.jm-search-page__input { flex: 1 1 100%; }
	.jm-search-page__submit { flex: 1 1 100%; padding: 12px 22px; }
}


/* Ряды планок: каждый ряд — своя строка, выравнивание по центру */
.single-medals {
	flex-direction: column;
	gap: 6px;
}

.single-medals__row {
	display: flex;
	flex-wrap: wrap;     /* планки сверх пятой переносятся на следующую строку */
	justify-content: center;
	align-items: center;
	gap: 6px;
	width: 100%;
}

/*
 * Планок в ряду не больше пяти: ширина — ровно пятая часть строки,
 * шестая и следующие переносятся ниже и встают по центру.
 * Раньше длинные ряды ужимались, чтобы уместиться в одну строку,
 * и планки в них выходили вдвое мельче обычных.
 */
.single-medals__row .jm-medal {
	flex: 0 0 auto;
	width: calc((100% - 4 * 6px) / 5);
	height: auto;
	max-width: 100%;
}
/* -------------------------------------------------------------------------
 *  Фотографии и наградные листы: лента на широких экранах, сетка на узких
 *
 *  Размер превью — прежний: три карточки в ряд, пропорция 3/4, обрезка
 *  по центру. Пропорция задана в CSS, поэтому высота ленты известна
 *  до загрузки ленивых картинок и лента не схлопывается.
 * ---------------------------------------------------------------------- */

.jm-media {
	--jm-media-lenta: 0;          /* на узких экранах — обычная сетка */
	--jm-media-gap: 24px;
	position: relative;
}

.jm-media__track {
	display: flex;
	flex-wrap: wrap;
	gap: var(--jm-media-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.jm-media__item {
	display: block;
	flex: 0 0 auto;
	/* полпикселя запаса: без него три карточки на пиксель шире ленты и кнопки появляются впустую */
	width: calc((100% - var(--jm-media-gap) * 2) / 3 - 0.5px);
	line-height: 0;
	text-decoration: none;
	cursor: zoom-in;
}

.jm-media__item img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 0.75;
	object-fit: cover;
	transition: opacity .15s ease;
}

.jm-media__item:hover img,
.jm-media__item:focus-visible img { opacity: .85; }

/* кнопки прокрутки нужны только ленте */
.jm-media__btns { display: none; }   /* кнопки нужны только ленте на широких экранах */

@media (max-width: 600px) {
	.jm-media { --jm-media-gap: 20px; }
	.jm-media__item { width: calc((100% - var(--jm-media-gap)) / 2); }
}

@media (min-width: 992px) {
	.jm-media { --jm-media-lenta: 1; }

	.jm-media__track {
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x proximity;   /* mandatory не даёт докрутить короткую ленту: остаток меньше шага привязки */
		scroll-behavior: smooth;
		scrollbar-width: none;
	}

	.jm-media__track::-webkit-scrollbar { display: none; }
	.jm-media__item { scroll-snap-align: start; }

	/*
	 * Кнопки лежат поверх крайних карточек, а не на полях: иначе поля
	 * съедают ширину ленты и превью становятся мельче прежних.
	 */
	/*
	 * Кнопки — под лентой по центру, как у прежнего слайдера темы
	 * (.single-info-slider-btns): квадратные, с рамкой. Стрелка нарисована
	 * SVG: символы ‹ › в шрифте смещены от центра глифа и в кнопке
	 * выглядели съехавшими.
	 */
	.jm-media__btns {
		display: flex;
		justify-content: center;
		gap: 20px;
		margin-top: 20px;
		line-height: 0;
	}

	.jm-media__nav {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 35px;
		height: 35px;
		padding: 0;
		color: #162427;
		background: transparent;
		border: 1px solid #162427;
		border-radius: 0;
		cursor: pointer;
		transition: background-color .15s ease, opacity .15s ease;
	}

	.jm-media__nav svg { display: block; width: 75%; height: 75%; }
	.jm-media__nav:hover { background-color: #d7d7d7; }
	.jm-media__nav:disabled { opacity: .35; cursor: default; }

	/* когда всё помещается, лента ведёт себя как обычный ряд */
	.jm-media.is-static .jm-media__btns { display: none; }
	.jm-media.is-static .jm-media__track { overflow-x: visible; flex-wrap: wrap; }
}

/* --- просмотрщик --- */

.jm-lightbox {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px 68px;
	background: rgba(12, 18, 20, .92);
	z-index: 9999;
}

.jm-lightbox.is-open { display: flex; }
body.jm-lightbox-open { overflow: hidden; }

.jm-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	margin: 0;
	max-width: 100%;
	max-height: 100%;
}

.jm-lightbox__img {
	max-width: 100%;
	max-height: calc(100vh - 120px);
	object-fit: contain;
	background: #fff;
}

.jm-lightbox__caption {
	font-family: "Roboto", sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #e8ebec;
	text-align: center;
	max-width: 720px;
}

.jm-lightbox__counter {
	position: absolute;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	font-family: "Roboto", sans-serif;
	font-size: 13px;
	color: #c9d1d3;
}

.jm-lightbox__close,
.jm-lightbox__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: rgba(255, 255, 255, .12);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background .15s ease;
}

.jm-lightbox__close:hover,
.jm-lightbox__nav:hover { background: rgba(255, 255, 255, .24); }
.jm-lightbox__nav:disabled { opacity: .25; cursor: default; }

.jm-lightbox__close {
	position: absolute;
	top: 16px;
	right: 20px;
	width: 40px;
	height: 40px;
	font-size: 26px;
	line-height: 1;
}

.jm-lightbox__nav {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
}

.jm-lightbox__nav svg { display: block; width: 26px; height: 26px; }

@media (max-width: 767px) {
	.jm-lightbox { padding: 16px 8px 48px; gap: 4px; }
	.jm-lightbox__nav { width: 38px; height: 38px; }
	.jm-lightbox__nav svg { width: 22px; height: 22px; }
	.jm-lightbox__img { max-height: calc(100vh - 150px); }
}

/* -------------------------------------------------------------------------
 *  Личный кабинет автора (шорткод [jm_cabinet])
 * ---------------------------------------------------------------------- */

.jm-cabinet { font-family: "Roboto", sans-serif; max-width: 900px; margin: 0 auto; }

.jm-cabinet__head {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; flex-wrap: wrap; margin-bottom: 24px;
}
.jm-cabinet__hi { font-size: 20px; font-weight: 600; color: #162427; }

.jm-cabinet__add,
.jm-cabinet--guest .button {
	display: inline-block; background: #243c44; color: #fff;
	padding: 10px 18px; border-radius: 4px; text-decoration: none;
	font-size: 15px; line-height: 1.2; transition: background .15s ease;
}
.jm-cabinet__add:hover,
.jm-cabinet--guest .button:hover { background: #16262b; color: #fff; }

.jm-cabinet__empty { color: #55606a; font-size: 16px; padding: 24px 0; }

.jm-cabinet__list { width: 100%; border-collapse: collapse; }
.jm-cabinet__list th {
	text-align: left; font-size: 12px; text-transform: uppercase;
	letter-spacing: .04em; color: #7a848c; font-weight: 600;
	padding: 8px 12px; border-bottom: 2px solid #e2e5e6;
}
.jm-cabinet__list td {
	padding: 14px 12px; border-bottom: 1px solid #eceff0;
	font-size: 15px; color: #1e2a2e; vertical-align: top;
}
.jm-cabinet__list td a { color: #243c44; }
.jm-cabinet__reason {
	margin-top: 6px; font-size: 13px; color: #b32d2e;
	background: #fbeaea; border-radius: 4px; padding: 6px 10px;
}

.jm-badge {
	display: inline-block; font-size: 13px; font-weight: 600;
	padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.jm-badge--ok    { background: #e3f5e8; color: #1c7a3e; }
.jm-badge--wait  { background: #fff3d6; color: #9a6b00; }
.jm-badge--no    { background: #fbeaea; color: #b32d2e; }
.jm-badge--draft { background: #eceff0; color: #55606a; }

.jm-cabinet__logout { margin-top: 24px; }
.jm-cabinet__logout a { color: #7a848c; font-size: 14px; }

@media (max-width: 600px) {
	.jm-cabinet__list thead { display: none; }
	.jm-cabinet__list, .jm-cabinet__list tbody, .jm-cabinet__list tr, .jm-cabinet__list td { display: block; width: 100%; }
	.jm-cabinet__list tr { border: 1px solid #e2e5e6; border-radius: 6px; margin-bottom: 12px; padding: 6px 4px; }
	.jm-cabinet__list td { border: 0; padding: 6px 12px; }
	.jm-cabinet__list td:first-child { font-weight: 600; }
}

/* -------------------------------------------------------------------------
 *  Формы: предложить биографию, вход, регистрация
 * ---------------------------------------------------------------------- */

.jm-suggest, .jm-auth { max-width: 620px; margin: 0 auto; font-family: "Roboto", sans-serif; }
.jm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.jm-field { margin-bottom: 16px; }
.jm-field label { display: block; font-size: 14px; font-weight: 600; color: #2b3a3e; margin-bottom: 6px; }
.jm-field label span { color: #b32d2e; }
.jm-field input[type=text],
.jm-field input[type=email],
.jm-field input[type=password],
.jm-field input[type=number],
.jm-field textarea {
	width: 100%; box-sizing: border-box; font-family: inherit; font-size: 15px;
	padding: 10px 12px; border: 1px solid #c7ced1; border-radius: 4px; background: #fff;
}
.jm-field input:focus, .jm-field textarea:focus { outline: none; border-color: #243c44; box-shadow: 0 0 0 2px rgba(36,60,68,.12); }
.jm-field input[type=file] { font-size: 14px; }
.jm-field__note { display: block; font-size: 12px; color: #7a848c; margin-top: 4px; }
.jm-field-row { display: flex; gap: 16px; }
.jm-field-row .jm-field { flex: 1; }

.jm-suggest__hint { color: #55606a; font-size: 14px; margin-bottom: 18px; }
.jm-suggest hr, .jm-auth hr { border: 0; border-top: 1px solid #e2e5e6; margin: 22px 0; }

.jm-suggest__submit, .jm-auth .button, #jm-login-submit, .jm-auth__form button {
	display: inline-block; background: #243c44; color: #fff; border: 0; cursor: pointer;
	font-size: 16px; font-family: inherit; padding: 12px 26px; border-radius: 4px;
	transition: background .15s ease; margin-top: 22px; margin-bottom: 40px;
}
.jm-suggest__submit:hover, #jm-login-submit:hover, .jm-auth__form button:hover { background: #16262b; }

.jm-suggest__ok { background: #e3f5e8; border-radius: 8px; padding: 24px; text-align: center; }
.jm-suggest__ok h3 { margin: 0 0 8px; color: #1c7a3e; }
.jm-suggest__err { background: #fbeaea; color: #b32d2e; border-radius: 6px; padding: 12px 16px; margin-bottom: 18px; font-size: 15px; }

.jm-captcha { max-width: 260px; }

/* нативная форма входа WordPress */
.jm-auth .login-username, .jm-auth .login-password { margin-bottom: 16px; }
.jm-auth .login-username label, .jm-auth .login-password label { display:block; font-size:14px; font-weight:600; color:#2b3a3e; margin-bottom:6px; }
.jm-auth .input, .jm-auth #user_login, .jm-auth #user_pass {
	width: 100%; box-sizing: border-box; font-size: 15px; padding: 10px 12px;
	border: 1px solid #c7ced1; border-radius: 4px;
}
.jm-auth .login-remember { font-size: 14px; margin: 8px 0 14px; }
.jm-auth__alt { font-size: 14px; margin-top: 12px; }
.jm-auth__alt a { color: #243c44; }

/* ссылка «Личный кабинет» в шапке */
.jm-account-link {
	display: inline-flex; align-items: center; gap: 6px; font-family: "Roboto", sans-serif;
	font-size: 14px; color: var(--jm-nav, #162427); text-decoration: none; white-space: nowrap;
}
.jm-account-link:hover { color: var(--jm-nav-hover, #b8964f); }
.jm-account-link svg { width: 18px; height: 18px; }

@media (max-width: 600px) {
	.jm-field-row { flex-direction: column; gap: 0; }
}

/* Вкладки и аккордеоны гостевой формы */
.jm-field select {
	width: 100%; box-sizing: border-box; font-family: inherit; font-size: 16px;
	padding: 10px 12px; border: 1px solid #c7ced1; border-radius: 4px; background: #fff;
}
.jm-tabs__nav { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid #e2e5e6; margin-bottom: 20px; }
.jm-tab {
	background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -2px;
	padding: 10px 18px; font-family: inherit; font-size: 15px; color: #55606a; cursor: pointer;
}
.jm-tab.is-active { color: #243c44; font-weight: 600; border-bottom-color: #243c44; }
/* перебиваем чужое правило .is-active (розовый фон) id-специфичностью */
#jm-suggest-tabs .jm-tab { background: transparent !important; -webkit-tap-highlight-color: transparent; }
#jm-suggest-tabs .jm-tab.is-active { background: transparent !important; color: #243c44 !important; border-bottom: 2px solid #243c44 !important; }
.jm-step { font-size: 13px; color: #7a848c; margin: -8px 0 18px; }
.jm-tabpane { display: none; }
.jm-tabpane.is-active { display: block; }

.jm-acc { border: 1px solid #e2e5e6; border-radius: 6px; margin: 14px 0; overflow: hidden; }
.jm-acc__head {
	width: 100%; text-align: left; background: #f6f7f7; border: 0; cursor: pointer;
	padding: 12px 14px; font-family: inherit; font-size: 15px; font-weight: 600; color: #2b3a3e;
	display: flex; justify-content: space-between; align-items: center;
}
.jm-acc__head::after { content: "+"; font-size: 20px; line-height: 1; color: #7a848c; }
.jm-acc.is-open .jm-acc__head::after { content: "\2013"; }
.jm-acc__body { padding: 4px 14px 14px; display: none; }
.jm-acc.is-open .jm-acc__body { display: block; }

.jm-taxbox { border: 1px solid #c7ced1; border-radius: 4px; padding: 8px 12px; background: #fff; }
.jm-taxbox label { display: block; font-weight: 400; font-size: 15px; color: #2b3a3e; margin: 4px 0; cursor: pointer; }
.jm-taxbox input { margin-right: 6px; }
.jm-taxbox--tags label { display: inline-block; margin-right: 18px; }

/* навигация по вкладкам: Далее / Назад / Отправить */
.jm-tabnav { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.jm-tabnav .jm-next, .jm-tabnav .jm-suggest__submit { margin-left: auto; }
.jm-btn-nav {
	background: #243c44; color: #fff; border: 0; cursor: pointer;
	font-family: inherit; font-size: 15px; padding: 11px 22px; border-radius: 4px;
	transition: background .15s ease;
}
.jm-btn-nav:hover { background: #16262b; }
.jm-btn-nav.jm-back { background: #e6e9ea; color: #2b3a3e; }
.jm-btn-nav.jm-back:hover { background: #d7dcde; }
.jm-tabnav .jm-suggest__submit { margin-top: 0; margin-bottom: 0; }

@media (max-width: 600px) {
	.jm-tab { flex: 1 0 auto; text-align: center; padding: 10px 12px; }
}

/* =========================================================================
   Мобильная шапка и меню, версия 2 (05.10.2026).
   Шапка в одну строку: логотип слева, справа иконки «поиск», «кабинет», «меню».
   Поиск раскрывается строкой под шапкой (на планшете виден сразу), меню — панель
   с крупными строками, затемнением страницы и кнопкой «Предложить биографию».
   Переопределяет прежние мобильные правила выше; десктоп не затрагивает.
   ====================================================================== */

/* элементы, которые нужны только в мобильной вёрстке, на десктопе скрыты */
.jm-search-toggle,
.jm-nav__cta,
.jm-nav__tagline { display: none; }

@media (max-width: 900px) {

	:root { --jm-hh: 60px; }

	.jm-header {
		border-bottom: 0;
		box-shadow: 0 1px 0 rgba(22,36,39,.08), 0 8px 24px rgba(22,36,39,.06);
	}

	/* обе половины шапки «растворяем», детей раскладываем сеткой */
	.jm-header .jm-header__inner {
		display: grid;
		grid-template-columns: 1fr auto auto auto;
		grid-template-areas: "logo search account burger";
		align-items: center;
		gap: 0 4px;
		min-height: 60px;                 /* высота строки с логотипом и иконками; --jm-hh ниже — измеренная скриптом высота всей шапки */
		padding: 8px 10px 8px 18px;
	}
	.jm-header .jm-header__left,
	.jm-header .jm-header__right { display: contents; }

	.jm-header .jm-logo { grid-area: logo; }
	.jm-header .jm-logo__link {
		font-size: 24px;
		font-weight: 700;
		letter-spacing: -.02em;
		line-height: 1;
	}
	.jm-header .jm-tagline { display: none; }

	/* --- иконки справа: одинаковые круглые кнопки 44 px --- */
	.jm-header .jm-account-link,
	.jm-header .jm-search-toggle,
	.jm-header .jm-burger {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: transparent;
		color: var(--jm-text);
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
		transition: background .15s ease;
	}
	.jm-header .jm-account-link:active,
	.jm-header .jm-search-toggle:active,
	.jm-header .jm-burger:active { background: #EEF1F4; }
	.jm-header .jm-account-link svg { width: 24px; height: 24px; }
	.jm-header .jm-account-link__label { display: none; }
	.jm-header .jm-account-link { grid-area: account; }
	.jm-header .jm-burger { grid-area: burger; gap: 5px; flex-direction: column; }
	.jm-header .jm-burger span { width: 22px; border-radius: 2px; }
	.jm-header .jm-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.jm-header .jm-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	/* кнопка «Предложить биографию» из шапки уходит в меню */
	.jm-header .jm-header__right > .jm-btn--add { display: none; }

	/* --- поиск: пилюля --- */
	.jm-header .jm-search {
		grid-area: search;
		justify-self: end;
		display: flex;
		align-items: center;
		gap: 0;
		width: min(100%, 340px);
		height: 44px;
		padding: 0 4px 0 16px;
		background: #F1F4F6;
		border-radius: 999px;
		margin-right: 6px;
	}
	.jm-header .jm-search__input {
		flex: 1 1 auto;
		min-width: 0;
		width: auto;
		padding: 0;
		border: 0;
		background: transparent;
		font-size: 16px;               /* не меньше 16 px — иначе iOS увеличивает страницу при фокусе */
		line-height: 44px;
	}
	.jm-header .jm-search__submit {
		flex: 0 0 auto;
		width: 36px;
		height: 36px;
		padding: 0;
		border-radius: 50%;
		background: var(--jm-nav);
		color: #fff;
	}
	.jm-header .jm-search__submit svg { width: 18px; height: 18px; }

	/* --- панель меню --- */
	.jm-header .jm-nav {
		display: block;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		max-height: calc(100vh - var(--jm-hh));
		max-height: calc(100dvh - var(--jm-hh));
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 4px 18px 22px;
		background: #fff;
		border: 0;
		border-radius: 0 0 22px 22px;
		box-shadow: 0 24px 48px rgba(10,20,22,.22);
		visibility: hidden;
		opacity: 0;
		transform: translateY(-8px);
		pointer-events: none;
		transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
	}
	.jm-header .jm-nav.is-open {
		visibility: visible;
		opacity: 1;
		transform: none;
		pointer-events: auto;
		transition: opacity .18s ease, transform .18s ease;
	}

	.jm-header .jm-menu { padding: 0; gap: 0; }
	.jm-header .jm-menu > li { border-bottom: 1px solid rgba(22,36,39,.08); }
	.jm-header .jm-menu > li:last-child { border-bottom: 0; }
	.jm-header .jm-menu > li > a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 54px;
		padding: 0 2px;
		font-size: 18px;
		font-weight: 500;
		line-height: 1.2;
		text-transform: none;
		color: var(--jm-text);
	}
	.jm-header .jm-menu > li > a:active { color: var(--jm-nav-hover); }
	.jm-header .jm-menu > li.current-menu-item > a,
	.jm-header .jm-menu > li.current-menu-ancestor > a { color: var(--jm-nav-hover); font-weight: 600; }

	/* стрелка у «Биографии» */
	.jm-header .jm-menu > li.menu-item-object-biography > a::after {
		width: 9px;
		height: 9px;
		margin-right: 6px;
		border-width: 0 2px 2px 0;
		opacity: .7;
	}

	/* кнопка и подпись внизу панели */
	.jm-header .jm-nav__cta {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		margin-top: 18px;
		padding: 16px;
		border: 0;
		border-radius: 14px;
		background: var(--jm-nav);
		color: #fff;
		font-size: 16px;
		font-weight: 500;
		text-align: center;
	}
	.jm-header .jm-nav__cta::before {
		content: "+";
		font-size: 22px;
		font-weight: 300;
		line-height: 1;
	}
	.jm-header .jm-nav__cta:hover,
	.jm-header .jm-nav__cta:active { background: #16262b; color: #fff; }
	.jm-header .jm-nav__tagline {
		display: block;
		margin: 14px 4px 0;
		font-size: 12px;
		line-height: 1.4;
		text-align: center;
		color: rgba(22,36,39,.55);
	}

	/* дерево категорий внутри меню — мягче и просторнее */
	.jm-header .jm-menu .jm-mtree { padding: 0 0 14px; }
	.jm-header .jm-menu .jm-mtree__all {
		display: inline-flex;
		margin: 2px 0 12px;
		padding: 9px 16px;
		border-radius: 999px;
		background: #F1F4F6;
		font-size: 14px;
		font-weight: 500;
		color: var(--jm-nav);
	}
	.jm-header .jm-menu .jm-mtree__node { padding: 0 14px; }
	.jm-header .jm-menu .jm-mtree__title { padding: 11px 0 11px 22px; font-size: 15px; }
	.jm-header .jm-menu .jm-mtree__leaf { padding: 9px 0; font-size: 15px; }
	.jm-header .jm-menu .jm-mtree__node.active { border-radius: 14px; }

	/* затемнение страницы под открытым меню и запрет прокрутки фона */
	body.jm-menu-open { overflow: hidden; }
	body.jm-menu-open::after {
		content: "";
		position: fixed;
		top: var(--jm-hh);
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 90;
		background: rgba(10,20,22,.45);
	}
}

/* планшет: поиск виден сразу в строке шапки */
@media (min-width: 601px) and (max-width: 900px) {
	.jm-header .jm-header__inner { padding-left: 28px; padding-right: 18px; }
}

/* телефон: поиск прячется за иконкой и раскрывается второй строкой */
@media (max-width: 600px) {
	.jm-header .jm-header__inner {
		grid-template-areas:
			"logo toggle account burger"
			"bar  bar    bar     bar";
	}
	.jm-header .jm-search-toggle { grid-area: toggle; }
	.jm-header .jm-search-toggle[aria-expanded="true"] { background: #EEF1F4; }
	.jm-header .jm-search {
		display: none;
		grid-area: bar;
		justify-self: stretch;
		width: auto;
		margin: 2px 8px 6px 0;
	}
	.jm-header.is-search-open .jm-search { display: flex; }
}
@media (min-width: 601px) and (max-width: 900px) {
	.jm-header .jm-search-toggle { display: none; }
}
