/* =========================================================================
   Электронный музей Краснодарского университета МВД России
   Редизайн 2026 — современный слой поверх protostar
   Цветовая схема сайта сохранена (синяя гамма МВД)
   ========================================================================= */

:root {
	--blue-900: #1a3352;
	--blue-800: #2c4a70;
	--blue-700: #3a5c8f;
	--blue-600: #40689c;
	--blue-500: #4f7ab5;
	--blue-200: #c7d8ee;
	--accent: #0088cc;
	--accent-light: #1f9fd8;
	--body-bg-top: #f4f6f7;
	--body-bg-bottom: #e9eef5;
	--text-main: #23303f;
	--text-muted: #5a6b7d;
	--card-bg: rgba(255, 255, 255, 0.92);
	--card-shadow: 0 8px 28px rgba(26, 51, 82, 0.10), 0 2px 6px rgba(26, 51, 82, 0.06);
	--radius-lg: 16px;
	--radius-md: 12px;
	--radius-sm: 8px;
}

/* ======================= 1. БАЗОВЫЕ СТИЛИ ============================== */

html {
	scroll-behavior: smooth;
}

html body.site {
	border-top: 4px solid transparent !important;
	background:
		linear-gradient(rgba(64, 104, 156, 0.04), rgba(64, 104, 156, 0)),
		linear-gradient(180deg, var(--body-bg-top) 0%, var(--body-bg-bottom) 100%) !important;
	background-color: var(--body-bg-top) !important;
	color: var(--text-main);
	font-family: "Open Sans", "Segoe UI", Tahoma, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.7;
	padding: 18px 20px 0 !important;
}

/* Акцентная линия сверху (в стиле мвд.рф) */
html body.site::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	z-index: 10001;
	background: linear-gradient(90deg, var(--blue-900) 0%, var(--blue-600) 45%, var(--accent) 100%);
}

html body.site.fluid {
	background-color: transparent !important;
}

/* Контентный контейнер: центрирование и ограничение ширины */
html .body .container-fluid {
	max-width: 1360px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Убираем хаотичный сдвиг вправо на планшетах (наследие фиксированных таблиц) */
@media (max-width: 992px) {
	html body.site {
		padding-left: 16px !important;
		padding-right: 16px !important;
	}
}

/* ======================= 2. ШАПКА С ГЕРБАМИ (главная) ================= */

/* Тёмно-синяя «гербовая» панель в стиле мвд.рф */
html .header-inner {
	display: flex !important;
	flex-direction: column !important;
	justify-content: center !important;
	align-items: center !important;
	width: 100% !important;
	margin: 8px 0 28px 0 !important;
	padding: 30px 24px 24px 24px !important;
	border-radius: var(--radius-lg) !important;
	background:
		radial-gradient(1200px 400px at 50% -80px, rgba(255, 255, 255, 0.14), transparent 70%),
		linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 52%, var(--blue-600) 100%) !important;
	box-shadow: 0 14px 40px rgba(26, 51, 82, 0.35) !important;
	position: relative;
	overflow: hidden;
}

/* Лёгкий узор поверх панели гербов */
html .header-inner::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
	background-size: 44px 44px;
	pointer-events: none;
}

html .header-search {
	float: none !important;
	width: 100% !important;
	text-align: center !important;
	margin: 0 auto !important;
	position: relative;
	z-index: 1;
}

/* Эмблемы: карточки-«медали» с прозрачностью */
html .header-search .custom table {
	margin: 0 auto !important;
	display: table !important;
	float: none !important;
	width: auto !important;
	border-collapse: separate !important;
	border-spacing: 14px !important;
}

html body .header-search .custom td {
	text-align: center !important;
	vertical-align: top !important;
	padding: 18px 12px 12px 12px !important;
	width: 25% !important;
	background: rgba(255, 255, 255, 0.10) !important;
	border: 1px solid rgba(255, 255, 255, 0.18) !important;
	border-radius: var(--radius-md) !important;
	backdrop-filter: blur(6px) !important;
	-webkit-backdrop-filter: blur(6px) !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18) inset, 0 2px 8px rgba(0, 0, 0, 0.10) !important;
	transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease !important;
}

html body .header-search .custom td:hover {
	transform: translateY(-4px) !important;
	background: rgba(255, 255, 255, 0.16) !important;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22) inset, 0 10px 22px rgba(0, 0, 0, 0.18) !important;
}

/* Изображения гербов */
html body .header-search .custom img {
	display: block !important;
	margin: 0 auto 12px auto !important;
	max-width: 100% !important;
	height: auto !important;
	max-height: 160px !important;
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
	transition: transform 0.35s ease !important;
}

html body .header-search .custom td:hover img {
	transform: scale(1.06);
}

/* Подписи под гербами */
html body .header-search .custom h6 {
	text-align: center !important;
	margin: 10px auto !important;
	font-size: 13px !important;
	line-height: 1.45 !important;
	max-width: 210px !important;
	display: block !important;
	padding: 0 4px !important;
	color: #ffffff !important;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

html .header-search .custom tr:last-child td {
	text-align: center !important;
	padding-top: 4px !important;
}

html .header-search .custom tbody tr:last-child td h6 {
	margin-left: auto !important;
	margin-right: auto !important;
	text-align: center !important;
	width: 100% !important;
}

/* ======================= 3. ЛОГОТИП И ЗАГОЛОВОК (главная) ============== */

html #mod-custom121 {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	text-align: center !important;
	margin: 0 auto 30px auto !important;
	padding: 30px 24px 26px 24px !important;
	max-width: 860px !important;
	background: var(--card-bg) !important;
	border: 1px solid rgba(64, 104, 156, 0.16) !important;
	border-radius: var(--radius-lg) !important;
	box-shadow: var(--card-shadow) !important;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

html #mod-custom121 img[alt=""] {
	max-height: 300px !important;
	width: auto !important;
	filter: drop-shadow(0 6px 14px rgba(26, 51, 82, 0.25));
}

/* Заголовок «Электронный музей» */
html #mod-custom121 h1 {
	font-size: 32px !important;
	line-height: 1.25 !important;
	font-weight: 800 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.05em !important;
	color: var(--blue-900) !important;
	margin: 18px 0 6px 0 !important;
	background: linear-gradient(90deg, var(--blue-900), var(--blue-600));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	text-shadow: none;
}

html #mod-custom121 h1 br {
	display: none;
}

/* ======================= 4. КНОПКИ ===================================== */

/* Современные кнопки: градиент, скругление, тень, подъём при наведении */
html body .btn-primary,
html body .button,
html body .btn {
	background-image: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-800) 100%) !important;
	background-color: var(--blue-600) !important;
	border: 1px solid rgba(255, 255, 255, 0.18) !important;
	color: #ffffff !important;
	text-shadow: none !important;
	border-radius: 10px !important;
	padding: 11px 26px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	letter-spacing: 0.02em;
	box-shadow: 0 4px 14px rgba(26, 51, 82, 0.28) !important;
	transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease !important;
	cursor: pointer;
}

html body .btn-primary:hover,
html body .button:hover,
html body .btn:hover,
html body .btn-primary:focus {
	background-image: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-700) 100%) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 8px 22px rgba(26, 51, 82, 0.35) !important;
	color: #ffffff !important;
}

html body .btn-primary:active {
	transform: translateY(0) !important;
	box-shadow: 0 2px 8px rgba(26, 51, 82, 0.3) !important;
}

/* Кнопки-«чипы» годов в формуляре (только настоящие ссылки) */
html .com-content-article p.buttond a[href] {
	display: inline-block !important;
	margin: 4px 3px !important;
	padding: 10px 20px !important;
	border-radius: 10px !important;
	border: 1px solid var(--blue-200) !important;
	background: #ffffff !important;
	color: var(--blue-700) !important;
	font-weight: 600 !important;
	font-size: 15px !important;
	text-decoration: none !important;
	box-shadow: 0 2px 6px rgba(26, 51, 82, 0.08) !important;
	transition: all 0.25s ease !important;
}

html .com-content-article p.buttond a[href]:hover {
	border-color: var(--blue-600) !important;
	background: linear-gradient(135deg, var(--blue-600), var(--blue-800)) !important;
	color: #ffffff !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 16px rgba(26, 51, 82, 0.3) !important;
}

html .com-content-article p.buttond a.formulyar-active {
	background: linear-gradient(135deg, var(--blue-600), var(--blue-800)) !important;
	color: #ffffff !important;
	border-color: var(--blue-600) !important;
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--blue-600), 0 8px 20px rgba(64, 104, 156, 0.4) !important;
	transform: translateY(-2px) !important;
}

/* Пустые служебные якоря (<a name="…">) в кнопках годов — скрываем */
html .com-content-article p.buttond a:not([href]) {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	overflow: hidden !important;
}

/* ======================= 5. КОНТЕНТ ==================================== */

/* Карточка статьи */
html .com-content-article.item-page,
html .com-content-article__body {
	background: var(--card-bg) !important;
	border: 1px solid rgba(64, 104, 156, 0.14) !important;
	border-radius: var(--radius-lg) !important;
	box-shadow: var(--card-shadow) !important;
	padding: 28px 34px !important;
	margin: 0 0 30px 0 !important;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

html .com-content-article__body {
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 0 !important;
}

/* Заголовки */
html .com-content-article h1,
html .com-content-article h2,
html .com-content-article h3,
html .com-content-article h4,
html .com-content-article h5,
html .com-content-article h6 {
	color: var(--blue-900) !important;
	font-weight: 700;
	line-height: 1.35;
	margin: 1.4em 0 0.6em 0;
}

html .com-content-article h1 {
	font-size: 26px !important;
	padding-bottom: 12px !important;
	border-bottom: 3px solid var(--blue-200) !important;
	position: relative;
}

html .com-content-article h2 {
	font-size: 22px !important;
	padding-left: 14px !important;
	border-left: 4px solid var(--blue-600) !important;
}

html .com-content-article h3 {
	font-size: 19px !important;
}

html .com-content-article h4,
html .com-content-article h5 {
	font-size: 17px !important;
}

/* Текст */
html .com-content-article p,
html .com-content-article li,
html .com-content-article td {
	color: var(--text-main) !important;
	font-size: 16px !important;
	line-height: 1.75 !important;
}

/* Ссылки */
html .com-content-article a {
	color: var(--blue-700) !important;
	text-decoration: underline;
	text-decoration-color: rgba(64, 104, 156, 0.35);
	text-underline-offset: 3px;
	transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

html .com-content-article a:hover {
	color: var(--accent) !important;
	text-decoration-color: var(--accent);
}

/* Списки */
html .com-content-article ul,
html .com-content-article ol {
	padding-left: 26px !important;
}

html .com-content-article ul li {
	margin: 6px 0 !important;
}

html .com-content-article ul li::marker {
	color: var(--blue-600);
}

/* Таблицы контента: мягкие разделители */
html .com-content-article table {
	border-collapse: separate !important;
	border-spacing: 0 !important;
}

html .com-content-article table td,
html .com-content-article table th {
	vertical-align: top !important;
}

/* Фото-сетки в таблицах: изображения-карточки */
html .com-content-article table td:has(> img) {
	background: rgba(64, 104, 156, 0.05) !important;
	border-radius: var(--radius-md) !important;
	padding: 10px !important;
}

html .com-content-article table td > img {
	max-width: 100% !important;
	height: auto !important;
	display: block !important;
	margin: 0 auto 10px auto !important;
	border-radius: var(--radius-sm) !important;
	box-shadow: 0 4px 14px rgba(26, 51, 82, 0.14) !important;
	transition: transform 0.35s ease, box-shadow 0.35s ease !important;
}

html .com-content-article table td:hover > img {
	transform: scale(1.03);
	box-shadow: 0 8px 22px rgba(26, 51, 82, 0.22) !important;
}

/* Одиночные изображения в тексте */
html .com-content-article img {
	border-radius: var(--radius-sm);
	box-shadow: 0 4px 14px rgba(26, 51, 82, 0.12);
}

/* Видео — центрирование уже настроено, добавляем обтекание карточкой */
html .com-content-article iframe,
html .com-content-article video {
	border-radius: var(--radius-md);
	box-shadow: 0 6px 18px rgba(26, 51, 82, 0.18);
}

/* ======================= 6. АККОРДЕОН «ИСТОРИЧЕСКИЙ ФОРМУЛЯР» ========== */

html .formulyar-panel {
	margin: 24px auto 30px auto !important;
	padding: 24px 26px 26px 26px !important;
	border: 1px solid rgba(64, 104, 156, 0.25) !important;
	background: #ffffff !important;
	border-radius: var(--radius-md) !important;
	box-shadow: 0 8px 26px rgba(26, 51, 82, 0.12) !important;
	text-align: left !important;
	border-top: 4px solid var(--blue-600) !important;
}

/* ======================= 7. СЛАЙДЕР DJ MEDIA TOOLS ===================== */

html body #dj-slideshowThumbs3m214,
html body #dj-slideshowThumbs3m214 .dj-slideshowThumbs-in {
	border-radius: var(--radius-md) !important;
	overflow: hidden !important;
	box-shadow: 0 8px 26px rgba(26, 51, 82, 0.16) !important;
}

/* ======================= 8. ФУТЕР ====================================== */

html footer.footer {
	background:
		radial-gradient(900px 300px at 50% -60px, rgba(255, 255, 255, 0.08), transparent 70%),
		linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 60%, var(--blue-700) 100%) !important;
	border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
	margin-top: 30px !important;
	padding: 26px 28px 20px 28px !important;
	color: rgba(255, 255, 255, 0.92) !important;
	box-shadow: 0 -6px 24px rgba(26, 51, 82, 0.22) !important;
}

html footer.footer .container-fluid {
	max-width: 1360px !important;
	margin: 0 auto !important;
}

html footer.footer hr {
	border-color: rgba(255, 255, 255, 0.14) !important;
}

html footer.footer p {
	color: rgba(255, 255, 255, 0.92) !important;
	font-size: 14px !important;
}

html footer.footer a,
html footer.footer #back-top {
	color: #ffffff !important;
	background: rgba(255, 255, 255, 0.12) !important;
	padding: 8px 18px !important;
	border-radius: 8px !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	text-decoration: none !important;
	transition: background-color 0.25s ease, transform 0.25s ease !important;
}

html footer.footer a:hover,
html footer.footer #back-top:hover {
	background: rgba(255, 255, 255, 0.22) !important;
	transform: translateY(-2px);
	text-decoration: none !important;
}

/* ======================= 9. СТРОКА НАВИГАЦИИ (хлебные крошки) ========== */

html .breadcrumb {
	background: rgba(255, 255, 255, 0.85) !important;
	border: 1px solid rgba(64, 104, 156, 0.14) !important;
	border-radius: var(--radius-sm) !important;
	padding: 10px 16px !important;
	box-shadow: 0 2px 8px rgba(26, 51, 82, 0.06) !important;
}

html .breadcrumb a {
	color: var(--blue-700) !important;
}

/* Модули в позициях */
html .well {
	background: var(--card-bg) !important;
	border: 1px solid rgba(64, 104, 156, 0.14) !important;
	border-radius: var(--radius-md) !important;
	box-shadow: var(--card-shadow) !important;
}

html .moduletable h3,
html .well h3 {
	color: var(--blue-900) !important;
}

/* ======================= 10. АНИМАЦИИ ПОЯВЛЕНИЯ ======================== */

/* Класс .reveal-init добавляет JS (html.js); без JS контент виден всегда */
html.js .reveal-init {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.75s cubic-bezier(0.2, 0.6, 0.2, 1), transform 0.75s cubic-bezier(0.2, 0.6, 0.2, 1);
	will-change: opacity, transform;
}

html.js .reveal-in {
	opacity: 1;
	transform: none;
}

/* Меню: плавное появление при загрузке */
html.js .gor_menu {
	animation: menuDrop 0.6s cubic-bezier(0.2, 0.6, 0.2, 1) both;
}

@keyframes menuDrop {
	from {
		opacity: 0;
		transform: translateY(-14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Появление выпадающих подменю */
.gor_menu .mod-menu__sub,
.gor_menu .dropdown-menu {
	animation: submenuIn 0.22s ease both !important;
}

@keyframes submenuIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Уважение к настройкам пользователя */
@media (prefers-reduced-motion: reduce) {
	html.js .reveal-init,
	html.js .gor_menu,
	.gor_menu .mod-menu__sub,
	.gor_menu .dropdown-menu {
		opacity: 1 !important;
		transform: none !important;
		animation: none !important;
		transition: none !important;
	}
}

/* ======================= 11. ПРОЧЕЕ ==================================== */

/* Скроллбар */
html ::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}

html ::-webkit-scrollbar-track {
	background: var(--body-bg-top);
}

html ::-webkit-scrollbar-thumb {
	background: linear-gradient(var(--blue-500), var(--blue-800));
	border-radius: 8px;
	border: 2px solid var(--body-bg-top);
}

/* Выделение текста */
::selection {
	background: rgba(64, 104, 156, 0.28);
}

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

@media (max-width: 768px) {
	html #mod-custom121 h1 {
		font-size: 24px !important;
		letter-spacing: 0.03em !important;
	}

	html #mod-custom121 {
		padding: 22px 16px !important;
	}

	html .com-content-article.item-page {
		padding: 18px 14px !important;
	}

	html .com-content-article p,
	html .com-content-article li,
	html .com-content-article td {
		font-size: 15px !important;
		line-height: 1.65 !important;
	}

	html .header-inner {
		padding: 18px 10px 12px 10px !important;
		margin-bottom: 20px !important;
	}

	html .header-search .custom table {
		border-spacing: 8px !important;
	}

	html .header-search .custom img {
		max-height: 110px !important;
	}

	html .header-search .custom h6 {
		font-size: 12px !important;
	}

	html footer.footer {
		padding: 20px 16px 16px 16px !important;
	}
}

@media (max-width: 480px) {
	html body.site {
		padding: 12px 10px 0 !important;
	}

	html .header-search .custom td {
		padding: 10px 6px !important;
	}

	html .com-content-article h1 {
		font-size: 21px !important;
	}

	html .com-content-article h2 {
		font-size: 18px !important;
	}
}


/* ======================= 14. ПЕРСОНАЛИИ: ФОТО И ПОДПИСИ ================= */

/* Заголовки-подписи подразделений и фото без полосы снизу */
html body.page-personalii .com-content-article h1 {
	border-bottom: none !important;
	padding-bottom: 0 !important;
}

/* Таблица фото-сетки: фиксированная раскладка, чтобы колонки были ровными */
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) {
	table-layout: fixed !important;
	width: 810px !important;
	margin: 0 auto !important;
}

/* Ячейки фото-сетки (фото может быть обёрнуто в h1/u/strong/p): единая ширина */
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:not(:has(a)):has(img) {
	width: 270px !important;
	padding: 12px 8px 4px 8px !important;
	vertical-align: top !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

/* Нейтрализация обёрток вокруг фото (лишние отступы/подчёркивания) */
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:not(:has(a)):has(img) h1,
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:not(:has(a)):has(img) u,
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:not(:has(a)):has(img) strong,
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:not(:has(a)):has(img) p {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 0 !important;
	line-height: 0 !important;
	text-decoration: none !important;
	border: none !important;
}

/* Сами фото: единый кадр 250x330, пропорции сохраняются (object-fit) */
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:not(:has(a)):has(img) img {
	display: block !important;
	width: 250px !important;
	height: 330px !important;
	margin: 0 auto 12px auto !important;
	object-fit: contain !important;
	object-position: center top !important;
	background: #eef2f8 !important;
	border-radius: 10px !important;
	box-shadow: 0 4px 14px rgba(26, 51, 82, 0.14) !important;
}

/* Мусорные картинки (пустые src="/" и вставленные docx-данные) — скрыть */
html body.page-personalii .com-content-article img[src="/"] {
	display: none !important;
}

html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) img[src^="data:application/"] {
	display: none !important;
}

/* Ячейки с подписями: по центру, без пустых параграфов-отступов */
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):not(:has(img)) {
	width: 270px !important;
	text-align: center !important;
	vertical-align: top !important;
}

html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):not(:has(img)) p {
	margin: 2px 0 !important;
	padding: 0 !important;
}

html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):not(:has(img)) p:not(:has(a)) {
	display: none !important;
}

/* Подписи под фото: тёмный читаемый текст вместо белых кнопок */
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):not(:has(img)) a {
	display: inline-block !important;
	color: var(--blue-900) !important;
	background: transparent !important;
	border: 0 solid transparent !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 2px 6px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.5 !important;
	text-decoration: none !important;
	transition: color 0.2s ease !important;
}

html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):not(:has(img)) a:hover {
	color: var(--accent) !important;
	background: transparent !important;
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
}

/* Ячейки, где фото и подпись находятся в одной ячейке */
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):has(img) {
	width: 270px !important;
	padding: 12px 8px 4px 8px !important;
	vertical-align: top !important;
	text-align: center !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):has(img) img {
	display: block !important;
	width: 250px !important;
	height: 330px !important;
	margin: 0 auto 12px auto !important;
	object-fit: contain !important;
	object-position: center top !important;
	background: #eef2f8 !important;
	border-radius: 10px !important;
	box-shadow: 0 4px 14px rgba(26, 51, 82, 0.14) !important;
}

html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):has(img) p {
	margin: 2px 0 !important;
	padding: 0 !important;
}

html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):has(img) p:not(:has(a)):not(:has(img)) {
	display: none !important;
}

html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):has(img) a {
	display: inline-block !important;
	color: var(--blue-900) !important;
	background: transparent !important;
	border: 0 solid transparent !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 2px 6px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.5 !important;
	text-decoration: none !important;
	transition: color 0.2s ease !important;
}

html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):has(img) a:hover {
	color: var(--accent) !important;
	background: transparent !important;
	text-decoration: underline !important;
	text-underline-offset: 3px !important;
}

/* Финальное скрытие мусорных картинок (перекрывает рамку фото) */
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td img[src="/"],
html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td img[src^="data:application/"] {
	display: none !important;
}

@media (max-width: 767px) {
	html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) {
		width: 100% !important;
	}

	html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:not(:has(a)):has(img),
	html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):not(:has(img)),
	html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):has(img) {
		width: 50% !important;
		padding: 8px 4px 4px 4px !important;
	}

	html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:not(:has(a)):has(img) img,
	html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):has(img) img {
		width: 100% !important;
		height: auto !important;
		max-height: 300px !important;
		object-fit: contain !important;
	}
}

@media (max-width: 480px) {
	html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:not(:has(a)):has(img),
	html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):not(:has(img)),
	html body.page-personalii .com-content-article table:has(a[href^="/personalii2"]) td:has(a):has(img) {
		width: 100% !important;
	}
}

/* ======================= 15. ВЕРХНЕЕ МЕНЮ: УБОРКА СТАРОЙ ПЛАШКИ =========== */

/* Квадратная синяя плашка (td с inline-фоном) под закруглённым меню — убрать */
html body .com-content-article td:has(.gor_menu) {
	background: transparent !important;
	background-color: transparent !important;
	height: auto !important;
	padding: 0 !important;
	border: none !important;
}

/* ======================= 16. МЕНЮ ВСЕГДА ПОВЕРХ ВСЕХ ОБЪЕКТОВ ============== */

/* Сам блок меню — позиционированный слой поверх всего */
html body .gor_menu {
	position: relative !important;
	z-index: 999999 !important;
}

/* Все выпадающие списки (все уровни вложенности) — поверх всего */
html body .gor_menu .dropdown-menu,
html body .gor_menu .mod-menu .mod-menu__sub,
html body .gor_menu .mod-menu__sub .mod-menu__sub,
html body .gor_menu li.open > .mod-menu__sub {
	z-index: 999999 !important;
}

/* Слайдер DJ Media Tools — принудительно вниз, чтобы не перекрывал меню */
html body .dj-slideshowThumbs-main,
html body #dj-slideshowThumbs3m214 {
	position: relative !important;
	z-index: 1 !important;
}

/* Анимация подменю не должна оставлять трансформаций поверх страницы */
html .gor_menu .mod-menu__sub,
html .gor_menu .dropdown-menu {
	animation: none !important;
	transform: none !important;
}

/* Высокие подменю (много пунктов) не должны уходить за нижний край экрана:
   внутренняя прокрутка, чтобы все пункты были доступны без закрытия меню.
   Класс .menu-overflow скриптом вешается ТОЛЬКО на реально переполняющиеся
   подменю: скролл-контейнер-родитель ломает клики по вложенным подменю
   (Chromium), поэтому обычные подменю не должны быть скролл-контейнерами */
html body .gor_menu .mod-menu__sub.menu-overflow {
	max-height: calc(100vh - 340px) !important;
	min-height: 0 !important;
	overflow-y: auto !important;
	overflow-x: hidden !important;
}

html body .gor_menu .mod-menu__sub .mod-menu__sub.menu-overflow {
	max-height: calc(100vh - 360px) !important;
}
