/*
 * CGE58 — стили темы. Перенос со старого сайта (templates/default/css/styles.css
 * + стили из шаблонов AVE) на Bootstrap 5, адаптив, версия для слабовидящих.
 *
 * 1. Переменные и база
 * 2. Шапка
 * 3. Меню
 * 4. Содержимое
 * 5. Списки (выборки)
 * 6. Главная
 * 7. Подвал
 * 8. Совместимость со старой разметкой Bootstrap 2 в текстах
 * 9. Окно просмотра картинок
 * 10. Версия для слабовидящих
 * 11. Печать
 */

/* ---------------------------------------------------------------- 1. Переменные и база */

:root {
	--cge-blue: #376092;
	--cge-blue-border: #597AAC;
	--cge-link: #035B87;
	--cge-accent: #EE3A07;
	--cge-yellow: #F7C703;
	--cge-grey: #7B7B7B;
	--cge-line: #E6E6E6;
	--cge-text: #000;
	--cge-bg: #fff;
	--cge-point-bg: #eff4fa;
	--cge-font: Arial, "Helvetica Neue", Helvetica, sans-serif;
	--cge-fs: 14px;

	--bs-body-font-family: var(--cge-font);
	--bs-body-font-size: var(--cge-fs);
	--bs-body-line-height: 1.43;
	--bs-body-color: var(--cge-text);
	--bs-body-bg: var(--cge-bg);
	--bs-link-color: var(--cge-link);
	--bs-link-color-rgb: 3, 91, 135;
	--bs-link-hover-color: var(--cge-link);
	--bs-link-hover-color-rgb: 3, 91, 135;
	--bs-link-decoration: none;
}

/* Ширина как на старом сайте: 940 px + промежутки 20 px (Bootstrap 2) */
.container,
.row {
	--bs-gutter-x: 20px;
}

@media (min-width: 992px) {
	.container {
		max-width: 960px;
	}
}

body {
	font-family: var(--cge-font);
	font-size: var(--cge-fs);
	line-height: 20px;
	color: var(--cge-text);
	background: var(--cge-bg);
}

a,
a:visited {
	color: var(--cge-link);
	text-decoration: none;
}

a:hover {
	color: var(--cge-link);
	text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--cge-yellow);
	outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--cge-font);
	font-weight: bold;
	line-height: 1.3;
	margin: 10px 0;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
h4 { font-size: 15px; }

p {
	margin: 0 0 10px;
}

img {
	max-width: 100%;
	height: auto;
}

hr {
	margin: 20px 0;
	border: 0;
	border-top: 1px solid #eee;
	opacity: 1;
}

.cge58-skip {
	position: absolute;
	left: 10px;
	top: 10px;
	z-index: 1000;
	padding: 8px 14px;
	background: var(--cge-yellow);
	color: #000 !important;
}

.rubhead,
.rubhead h1 {
	font-weight: bold;
	font-size: 17px;
	color: var(--cge-link);
	line-height: 21px;
}

.rubhead h1,
.rubhead h2 {
	margin: 10px 0;
}

.rubhead h2 {
	font-size: 17px;
	color: var(--cge-link);
}

.btn-cge58 {
	--bs-btn-color: #fff;
	--bs-btn-bg: var(--cge-blue);
	--bs-btn-border-color: var(--cge-blue);
	--bs-btn-hover-color: #fff;
	--bs-btn-hover-bg: #2c4d75;
	--bs-btn-hover-border-color: #2c4d75;
	--bs-btn-active-bg: #2c4d75;
	--bs-btn-active-border-color: #2c4d75;
	--bs-btn-border-radius: 4px;
}

/* ---------------------------------------------------------------- 2. Шапка */

.line1 {
	padding: 10px 12px;
}

.line1 .rubhead a {
	color: var(--cge-link);
}

.line1__phone {
	white-space: nowrap;
}

.tabu {
	display: inline-block;
	width: 40px;
	height: 20px;
	background: url(../img/16.png) no-repeat 50% 50%;
	vertical-align: middle;
}

.line2 {
	background: var(--cge-blue);
	margin-bottom: 20px;
	color: #fff;
}

.logo {
	display: block;
	width: 100px;
	max-width: 100%;
	margin: 15px 0;
}

.logo img {
	display: block;
	width: 100%;
	height: auto;
}

.title {
	text-align: center;
	font-size: 16px;
	line-height: 30px;
}

.title a,
.title a:visited,
.title a:hover {
	color: #fff;
	text-decoration: none;
}

.title__line {
	display: block;
}

.laureat {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	color: #fff;
	font-size: 13px;
	line-height: 17px;
}

.laureat a {
	color: #fff;
	text-decoration: none;
}

.laureat__img {
	max-width: 75px;
	height: auto;
}

/* ---------------------------------------------------------------- 3. Меню */

.menutop-wrap {
	position: relative;
	z-index: 20;
	padding-bottom: 4px;
}

ul.menutop {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}

.menutop__item {
	position: relative;
	margin: 10px 8px;
	font-size: 15px;
}

.menutop__item:first-child {
	margin-left: 0;
}

.menutop__item:last-child {
	margin-right: 0;
}

.menutop__link,
.menutop__link:visited {
	color: #fff;
	text-decoration: none;
	font-size: 15px;
	background: none;
	border: 0;
	padding: 0;
	font-family: inherit;
	cursor: pointer;
	line-height: 20px;
}

.menutop__link:hover {
	color: var(--cge-accent);
	text-decoration: none;
}

.menutop__arrow {
	display: none;
}

.menutop__sub {
	list-style: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 100%;
	margin: 0;
	padding: 10px 0 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s linear, visibility 0s linear .25s;
	z-index: 100;
}

.menutop__sub .menutop__item {
	margin: 0;
	background: var(--cge-blue);
}

.menutop__sub .menutop__link {
	display: block;
	padding: 5px 10px;
	white-space: nowrap;
	font-size: 13px;
	color: #fff;
}

.menutop__sub .menutop__link:hover,
.menutop__sub .menutop__link:focus-visible {
	background: var(--cge-yellow);
	color: #333;
}

@media (min-width: 992px) {
	.menutop__item--parent:hover > .menutop__sub,
	.menutop__item--parent:focus-within > .menutop__sub,
	.menutop__item--parent.is-open > .menutop__sub {
		opacity: 1;
		visibility: visible;
		transition: opacity .25s linear;
	}

	.menutop__item--parent:hover > .menutop__link {
		color: #fff;
	}
}

.menutop-burger {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	padding: 8px 14px;
	border: 1px solid var(--cge-blue-border);
	border-radius: 4px;
	background: transparent;
	color: #fff;
	font-size: 15px;
}

.menutop-burger__icon,
.menutop-burger__icon::before,
.menutop-burger__icon::after {
	display: block;
	width: 20px;
	height: 2px;
	background: #fff;
	position: relative;
}

.menutop-burger__icon::before,
.menutop-burger__icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.menutop-burger__icon::before { top: -6px; }
.menutop-burger__icon::after { top: 6px; }

@media (max-width: 991.98px) {
	ul.menutop {
		display: none;
		flex-direction: column;
		padding: 0 0 10px;
	}

	.menutop-wrap.is-open ul.menutop {
		display: flex;
	}

	.menutop__item {
		margin: 0;
		border-top: 1px solid var(--cge-blue-border);
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	.menutop__item:first-child { margin-left: 0; }

	.menutop__link {
		flex: 1 1 auto;
		padding: 11px 0;
		text-align: left;
		font-size: 16px;
	}

	.menutop__arrow {
		display: block;
		width: 44px;
		height: 44px;
		border: 0;
		background: transparent;
		color: #fff;
		position: relative;
	}

	.menutop__arrow::after,
	.menutop__toggle.menutop__link::after {
		content: "";
		display: inline-block;
		width: 9px;
		height: 9px;
		border-right: 2px solid #fff;
		border-bottom: 2px solid #fff;
		transform: rotate(45deg);
		margin-left: 10px;
		transition: transform .2s;
	}

	.menutop__toggle[aria-expanded="true"]::after {
		transform: rotate(-135deg);
	}

	.menutop__sub {
		position: static;
		opacity: 1;
		visibility: visible;
		display: none;
		width: 100%;
		padding: 0 0 6px 14px;
		transition: none;
	}

	.menutop__item.is-open > .menutop__sub {
		display: block;
	}

	.menutop__sub .menutop__item {
		border-top: 0;
	}

	.menutop__sub .menutop__link {
		white-space: normal;
		font-size: 15px;
		padding: 8px 10px;
	}

	.title {
		font-size: 13px;
		line-height: 20px;
		text-align: left;
	}

	.logo {
		width: 70px;
		margin: 10px 0;
	}
}

@media (max-width: 575.98px) {
	.title {
		font-size: 11px;
		line-height: 16px;
	}

	.logo {
		width: 56px;
	}
}

/* ---------------------------------------------------------------- 4. Содержимое */

.cge58-main {
	min-height: 40vh;
}

.cge58-notice {
	margin-bottom: 10px;
}

@media (min-width: 768px) {
	/* На старом сайте объявление сдвинуто двойным отступом колонок Bootstrap 2 */
	.cge58-notice {
		padding-left: 20px;
	}
}

.cge58-notice .rubhead {
	text-transform: uppercase;
}

.cge58-edit-link {
	display: block;
	margin-top: 17px;
	color: red !important;
	text-decoration: underline;
}

.newspage__thumb,
.newspage img.alignleft {
	float: left;
	margin: 0 20px 10px 0;
}

.newspage h2 {
	font-size: 17px;
	line-height: 24px;
	color: var(--cge-link);
}

.newspage h3 {
	font-size: 15px;
	line-height: 22px;
}

.newspage__content {
	overflow-wrap: anywhere;
}

.newspage__content::after {
	content: "";
	display: table;
	clear: both;
}

/* Как на старом сайте: все картинки в тексте — слева с обтеканием (inline-стили важнее) */
.newspage__content img {
	float: left;
	margin: 0 20px 10px 0;
}

.newspage__content img[style*="float: left"],
.newspage__content img[align="left"] {
	margin: 0 20px 10px 0;
}

.newspage__content img[style*="float: right"],
.newspage__content img[align="right"] {
	margin: 0 0 10px 20px;
}

.newspage__content iframe {
	max-width: 100%;
}

.alignleft { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter { display: block; margin: 0 auto 10px; }

p.newsdate,
.newsdate {
	color: var(--cge-grey);
	font-style: italic;
	font-size: 13px;
}

.cge58-download {
	margin-top: 15px;
}

.load,
.load:hover {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 5px;
	text-decoration: none;
}

.load img {
	width: 30px;
}

.cge58-download__meta {
	color: var(--cge-grey);
	font-size: 12px;
}

.cge58-gallery {
	margin-top: 20px;
}

.cge58-gallery__item {
	display: block;
	border: 10px solid #fff;
	border-bottom: 0;
	outline: 1px solid #E7E7E7;
}

.cge58-gallery__item img {
	display: block;
	width: 100%;
	aspect-ratio: 400 / 566;
	object-fit: cover;
}

.cge58-video-wrap {
	margin-top: 40px;
}

.cge58-table {
	margin-bottom: 15px;
}

.cge58-table table {
	width: auto;
	max-width: 100%;
}

.cge58-search .form-control {
	border-color: var(--cge-blue-border);
}

.cge58-404__code {
	margin: 40px 0 0;
	color: #FFD700;
	font-size: clamp(80px, 20vw, 160px);
	font-weight: bold;
	line-height: 1;
}

.cge58-404__search {
	max-width: 480px;
}

.cge58-pagination {
	margin: 15px 0;
}

.cge58-pagination .pagination {
	--bs-pagination-color: var(--cge-blue);
	--bs-pagination-border-color: var(--cge-blue);
	--bs-pagination-hover-color: #fff;
	--bs-pagination-hover-bg: var(--cge-blue);
	--bs-pagination-hover-border-color: var(--cge-blue);
	--bs-pagination-active-bg: var(--cge-blue);
	--bs-pagination-active-border-color: var(--cge-blue);
	--bs-pagination-font-size: 14px;
	gap: 8px;
}

.cge58-pagination .page-link {
	border-radius: 4px !important;
	margin: 0 !important;
}

.cge58-pagination .page-item.active .page-link {
	font-weight: bold;
	color: #fff;
	pointer-events: none;
}

.cge58-pagination {
	padding: 10px;
}

.cge58-pagination .page-item--info {
	color: var(--cge-grey);
	margin-right: 15px;
	font-size: 14px;
}

.cge58-pagination .page-item--gap {
	color: var(--cge-grey);
}

.show_all_btn,
.show_all_btn:visited {
	display: inline-block;
	margin-left: 15px;
	padding: 10px 20px;
	background-color: var(--cge-blue);
	color: #fff !important;
	text-decoration: none;
	font-size: 14px;
	border-radius: 4px;
	font-weight: bold;
	border: 1px solid var(--cge-blue);
	transition: background-color .2s ease, color .2s ease;
}

.show_all_btn:hover {
	background-color: #fff;
	color: var(--cge-blue) !important;
	text-decoration: none;
}

/* ---------------------------------------------------------------- 5. Списки (выборки) */

ul.lenta-main {
	list-style: none;
	margin: 15px 0;
	padding: 15px 40px 0 0;
	border-top: 1px solid var(--cge-line);
}

ul.lenta-main li {
	margin-bottom: 4px;
}

ul.lenta-main li a,
ul.lenta-main li a:visited {
	color: #000;
	text-decoration: none;
}

ul.lenta-main li a:hover {
	color: var(--cge-link);
}

.lenta-main--thumbs li {
	margin-left: 15px;
}

.lenta-main__thumb {
	float: left;
	width: 90px;
	height: 90px;
	object-fit: cover;
	margin: 0 10px 10px 0;
}

.lenta-main--docs li {
	margin-bottom: 20px;
}

.cge58-list-scroll {
	overflow: auto;
}

.cge58-list-aside p {
	margin: 0;
}

.cge58-list-aside br {
	display: none;
}

.cge58-list-aside img {
	float: none !important;
	display: block;
	width: 100%;
	margin: 25px 0 0 !important;
}

.doc-gallery__item {
	margin-bottom: 25px;
}

.doc-gallery .cge58-gallery {
	--bs-gutter-x: 0;
	--bs-gutter-y: 0;
	margin: 10px 0 0;
	gap: 20px 24px;
}

.doc-gallery .cge58-gallery > div {
	flex: 0 0 145px;
	width: 145px;
	padding: 0;
}

@media (max-width: 575.98px) {
	.doc-gallery .cge58-gallery {
		gap: 12px;
	}

	.doc-gallery .cge58-gallery > div {
		flex-basis: calc(33.333% - 8px);
		width: calc(33.333% - 8px);
	}
}

.doc-gallery .cge58-gallery__item {
	border-width: 2px;
	border-bottom: 2px solid #fff;
}

.doc-gallery .cge58-gallery__item img {
	aspect-ratio: 140 / 200;
}

@media (max-width: 767.98px) {
	ul.lenta-main {
		padding-right: 0;
	}
}

/* Календарь документов (страница /kalendar) */
.cge58-calendar {
	max-width: 320px;
	margin: 15px 0 20px;
	padding: 4px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
}

.cge58-calendar__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 4px;
	border-radius: 3px;
	background: var(--cge-blue);
	color: #fff;
	font-weight: bold;
}

.cge58-calendar__nav,
.cge58-calendar__nav:visited,
.cge58-calendar__nav:hover {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 28px;
	color: #fff;
	font-size: 22px;
	text-decoration: none;
	border-radius: 3px;
}

.cge58-calendar__nav:hover {
	background: rgba(255, 255, 255, .2);
}

.cge58-calendar__nav.is-disabled {
	opacity: .35;
}

.cge58-calendar .cge58-table {
	margin: 0;
}

.cge58-calendar__table,
.cge58-table .cge58-calendar__table {
	width: 100% !important;
	border-collapse: separate;
	border-spacing: 2px;
	text-align: center;
}

.cge58-calendar__table th {
	padding: 6px 0 2px;
	font-size: 12px;
	color: var(--cge-grey);
}

.cge58-calendar__table td {
	padding: 0;
	font-size: 13px;
}

.cge58-calendar__table td span,
.cge58-calendar__table td a {
	display: block;
	padding: 5px 0;
	border-radius: 3px;
}

.cge58-calendar__table td span {
	color: #aaa;
}

.cge58-calendar__table td a {
	background: #e8eef6;
	color: var(--cge-link);
	font-weight: bold;
	text-decoration: none;
}

.cge58-calendar__table td a:hover {
	background: var(--cge-blue);
	color: #fff;
}

.cge58-calendar__table td.is-today span,
.cge58-calendar__table td.is-today a {
	outline: 1px solid var(--cge-yellow);
}

.cge58-calendar__table td.is-selected a {
	background: var(--cge-blue);
	color: #fff;
}

.cge58-calendar__table .is-weekend,
.cge58-calendar__table th.is-weekend {
	color: #c0392b;
}

/* ---------------------------------------------------------------- 6. Главная */

.front-hotline {
	text-align: center;
	font-size: 13px;
}

.front-top .cge58-notice {
	margin-bottom: 0;
}

.front-banners__item {
	display: block;
	margin-top: 5px;
}

.front-banners__item img {
	display: block;
	margin: 0 auto;
	max-width: 300px;
	width: 100%;
	aspect-ratio: 300 / 188;
	object-fit: cover;
}

.front-side__item {
	margin-top: 15px;
	padding-top: 10px;
	text-align: center;
}

.front-side__item:first-child {
	padding-top: 15px;
	border-top: 1px solid #E5E5E5;
}

.front-side__item img {
	max-width: 100%;
}

ul.front-side__icons {
	margin-top: 15px;
	padding: 10px 0 0;
	border-top: 2px solid var(--cge-blue);
}

ul.front-side__icons li {
	margin-top: 10px;
	line-height: 22px;
	font-size: 17px;
	border-bottom: 1px solid var(--cge-line);
	padding-bottom: 20px;
	display: flex;
}

ul.front-side__icons li a {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	color: #000;
	font-weight: bold;
	text-transform: uppercase;
}

ul.front-side__icons li span {
	display: block;
	padding-top: 13px;
}

.front-side__icon {
	max-width: 50px;
	height: auto;
}

ul.lenta-main1 {
	list-style: none;
	padding: 15px 0 0;
	margin: 15px 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	border-top: 1px solid var(--cge-line);
}

ul.lenta-main1 li {
	width: 100%;
	text-align: center;
	font-size: 15px;
	line-height: 1.2;
	border-bottom: 1px solid var(--cge-line);
	padding-bottom: 20px;
}

ul.lenta-main1 li a,
ul.lenta-main1 li a:visited {
	text-decoration: none;
	color: #000;
	display: flex;
	flex-direction: column;
	align-items: center;
}

ul.lenta-main1 li a:hover {
	color: var(--cge-link);
}

ul.lenta-main1 li img {
	max-width: 50px;
	height: auto;
	margin-bottom: 10px;
}

ul.lenta-main1 li span {
	display: block;
	padding-top: 5px;
}

@media (min-width: 576px) and (max-width: 991.98px) {
	ul.lenta-main1 li {
		width: calc(50% - 10px);
	}

	.front-side {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 15px;
		align-items: start;
	}

	.front-side__item,
	.front-side__item:first-child {
		margin-top: 0;
		padding-top: 0;
		border-top: 0;
	}

	ul.front-side__icons {
		grid-column: 1 / -1;
	}
}

.front-map {
	margin-top: 20px;
}

.filials-map {
	position: relative;
	margin: 20px 0 40px;
	padding-top: 10px;
	border-top: 1px solid var(--cge-line);
}

.filials-map__svg {
	display: block;
	width: 100%;
	height: auto;
	max-height: 530px;
}

.filials-map__area {
	fill: #CCCCCC;
	stroke: #fff;
	stroke-width: 1;
	stroke-linejoin: round;
	cursor: pointer;
	transition: fill .3s;
}

.filials-map__area:hover,
.filials-map__area:focus,
.filials-map__area.is-active {
	fill: #1669AD;
	outline: none;
}

.point {
	position: absolute;
	left: 0;
	top: 20px;
	max-width: min(560px, 100%);
	padding: 10px 15px;
	background: var(--cge-point-bg);
	color: #0088CC;
	font-size: 14px;
	font-weight: bold;
	border: 1px solid var(--cge-blue);
	border-left-width: 4px;
	pointer-events: none;
}

@media (max-width: 767.98px) {
	.point {
		position: static;
		margin-top: 10px;
		font-size: 13px;
	}
}

.partners {
	margin-top: 10px;
}

.partners img {
	margin: 20px auto;
	max-height: 90px;
	width: auto;
}

/* ---------------------------------------------------------------- 7. Подвал */

.bottomline {
	height: 62px;
	margin-top: 20px;
	background: url(../img/bottomline.jpg) no-repeat 0 0;
	background-size: auto 100%;
}

.footer {
	margin-top: 20px;
	font-size: 13px;
}

.footer__docs ul {
	list-style: none;
	margin: 0 0 30px;
	padding: 0;
}

.footer__docs p {
	margin: 0;
}

.footer__docs a,
.footer__docs a:visited {
	color: var(--cge-link);
}

.footer__phone,
.footer__phone:visited,
.footer__phone:hover,
.line1__phone,
.line1__phone:visited {
	white-space: nowrap;
	color: inherit;
	text-decoration: none;
}

/* ---------------------------------------------------------------- 8. Совместимость с разметкой Bootstrap 2 в текстах */

/* В текстах страниц AVE встречается сетка .row > .span1…12, .offset*, .row-fluid */
.newspage__content .row,
.cge58-notice .row,
.cge58-block .row {
	--bs-gutter-x: 20px;
}

.newspage__content [class*="span"],
.cge58-notice [class*="span"],
.cge58-block [class*="span"] {
	max-width: 100%;
}

@media (min-width: 768px) {
	.newspage__content .row > .span1, .cge58-notice .span1, .cge58-block .row > .span1 { flex: 0 0 auto; width: 8.3333%; }
	.newspage__content .row > .span2, .cge58-notice .span2, .cge58-block .row > .span2 { flex: 0 0 auto; width: 16.6667%; }
	.newspage__content .row > .span3, .cge58-notice .span3, .cge58-block .row > .span3 { flex: 0 0 auto; width: 25%; }
	.newspage__content .row > .span4, .cge58-notice .span4, .cge58-block .row > .span4 { flex: 0 0 auto; width: 33.3333%; }
	.newspage__content .row > .span5, .cge58-notice .span5, .cge58-block .row > .span5 { flex: 0 0 auto; width: 41.6667%; }
	.newspage__content .row > .span6, .cge58-notice .span6, .cge58-block .row > .span6 { flex: 0 0 auto; width: 50%; }
	.newspage__content .row > .span7, .cge58-notice .span7, .cge58-block .row > .span7 { flex: 0 0 auto; width: 58.3333%; }
	.newspage__content .row > .span8, .cge58-notice .span8, .cge58-block .row > .span8 { flex: 0 0 auto; width: 66.6667%; }
	.newspage__content .row > .span9, .cge58-notice .span9, .cge58-block .row > .span9 { flex: 0 0 auto; width: 75%; }
	.newspage__content .row > .span10, .cge58-notice .span10, .cge58-block .row > .span10 { flex: 0 0 auto; width: 83.3333%; }
	.newspage__content .row > .span11, .cge58-notice .span11, .cge58-block .row > .span11 { flex: 0 0 auto; width: 91.6667%; }
	.newspage__content .row > .span12, .cge58-notice .span12, .cge58-block .row > .span12 { flex: 0 0 auto; width: 100%; }

	.newspage__content .row > .offset1 { margin-left: 8.3333%; }
	.newspage__content .row > .offset2 { margin-left: 16.6667%; }
	.newspage__content .row > .offset3 { margin-left: 25%; }
}

/* Блоки .spanN вне .row (блок объявлений) — на всю ширину */
.cge58-notice > [class*="span"] {
	width: 100%;
}

.newspage__content .row-fluid {
	display: flex;
	flex-wrap: wrap;
	gap: 0 20px;
}

.newspage__content .row-fluid > [class*="span"] {
	flex: 1 1 240px;
}

.newspage__content .pull-left { float: left; }
.newspage__content .pull-right { float: right; }
.newspage__content .img-polaroid { padding: 4px; background: #fff; border: 1px solid rgba(0, 0, 0, .2); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.newspage__content .img-rounded { border-radius: 6px; }
.newspage__content .img-circle { border-radius: 50%; }
.newspage__content .well { min-height: 20px; padding: 19px; margin-bottom: 20px; background: #f5f5f5; border: 1px solid #e3e3e3; border-radius: 4px; }
.newspage__content .hero-unit { padding: 30px; margin-bottom: 20px; background: #eee; border-radius: 6px; }
.newspage__content .label { display: inline-block; padding: 2px 4px; font-size: 11.8px; font-weight: bold; color: #fff; background: #999; border-radius: 3px; }
.newspage__content .table-bordered { border: 1px solid #ddd; }
.newspage__content .table-bordered td,
.newspage__content .table-bordered th { border: 1px solid #ddd; }
.newspage__content table:not([class]) td,
.newspage__content table:not([class]) th { padding: 4px 6px; vertical-align: top; }

/* Старая галерея modgallary (если попадётся в тексте) */
ul.modgallary {
	list-style: none;
	margin: 20px 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

ul.modgallary li img {
	border: 2px solid #fff;
	outline: 1px solid #E7E7E7;
}

@media (max-width: 575.98px) {
	.newspage__content img {
		float: none !important;
		display: block;
		margin: 0 auto 15px !important;
	}
}

@media (max-width: 767.98px) {
	.newspage__thumb,
	.newspage__content img[style*="float"],
	.newspage__content img[align] {
		float: none !important;
		display: block;
		margin: 0 auto 15px !important;
	}

	.newspage__content [style*="width:"][style*="px"]:not(img):not(iframe) {
		max-width: 100% !important;
	}
}

/* ---------------------------------------------------------------- 9. Окно просмотра картинок */

.cge58-lightbox {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .85);
}

.cge58-lightbox[hidden] {
	display: none;
}

.cge58-lightbox__figure {
	margin: 0;
	max-width: 92vw;
	max-height: 88vh;
}

.cge58-lightbox__figure img {
	display: block;
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	background: #fff;
	padding: 10px;
}

.cge58-lightbox button {
	position: absolute;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 48px;
	line-height: 1;
	width: 56px;
	height: 56px;
	cursor: pointer;
}

.cge58-lightbox__close { top: 10px; right: 10px; }
.cge58-lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.cge58-lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }

.cge58-lightbox__count {
	position: absolute;
	bottom: 14px;
	left: 0;
	right: 0;
	text-align: center;
	color: #fff;
	font-size: 14px;
}

/* ---------------------------------------------------------------- 10. Версия для слабовидящих */

.cge58-a11y-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 4px 10px;
	border: 1px solid var(--cge-blue);
	border-radius: 4px;
	background: #fff;
	color: var(--cge-blue);
	font-size: 13px;
	font-weight: bold;
	line-height: 1.2;
	cursor: pointer;
}

.cge58-a11y-toggle:hover {
	background: var(--cge-blue);
	color: #fff;
}

.cge58-a11y-toggle__off,
.a11y-on .cge58-a11y-toggle__on {
	display: none;
}

.a11y-on .cge58-a11y-toggle__off {
	display: inline;
}

.cge58-a11y-panel {
	display: none;
	padding: 10px 0;
	background: #fff;
	border-bottom: 2px solid #000;
	color: #000;
}

.a11y-on .cge58-a11y-panel {
	display: block;
}

.cge58-a11y-panel__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 24px;
}

.cge58-a11y-panel__group {
	display: flex;
	align-items: center;
	gap: 6px;
}

.cge58-a11y-panel__label {
	font-weight: bold;
	font-size: 18px;
}

.a11y-btn {
	min-width: 44px;
	height: 44px;
	padding: 0 10px;
	border: 2px solid #000;
	border-radius: 0;
	background: #fff;
	color: #000;
	font-family: Arial, sans-serif;
	font-weight: bold;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.a11y-btn[aria-pressed="true"] {
	outline: 3px solid #1669AD;
	outline-offset: 1px;
}

.a11y-btn--s1 { font-size: 16px; }
.a11y-btn--s2 { font-size: 21px; }
.a11y-btn--s3 { font-size: 26px; }
.a11y-btn--normal { background: #fff; color: var(--cge-blue); }
.a11y-btn--bw { background: #fff; color: #000; }
.a11y-btn--wb { background: #000; color: #fff; }
.a11y-btn--blue { background: #9DD1FF; color: #063462; }

/* Размер шрифта */
html.a11y-size-1 { --cge-fs: 18px; }
html.a11y-size-2 { --cge-fs: 22px; }
html.a11y-size-3 { --cge-fs: 26px; }

html.a11y-on body,
html.a11y-on .newspage,
html.a11y-on .newspage__content * {
	font-size: var(--cge-fs) !important;
	line-height: 1.5 !important;
}

html.a11y-on h1,
html.a11y-on .rubhead h1 { font-size: calc(var(--cge-fs) * 1.5) !important; line-height: 1.3 !important; }
html.a11y-on h2,
html.a11y-on .rubhead,
html.a11y-on .rubhead h2 { font-size: calc(var(--cge-fs) * 1.25) !important; line-height: 1.3 !important; }

html.a11y-on .menutop__link,
html.a11y-on .menutop__sub .menutop__link,
html.a11y-on .title,
html.a11y-on .newsdate,
html.a11y-on .footer,
html.a11y-on ul.lenta-main1 li,
html.a11y-on ul.front-side__icons li {
	font-size: var(--cge-fs) !important;
	line-height: 1.4 !important;
}

html.a11y-on .newsdate {
	font-style: normal;
}

/* Интервал */
html.a11y-spacing body,
html.a11y-spacing body * {
	letter-spacing: .12em !important;
	word-spacing: .16em !important;
}

/* Изображения выключены: прячем картинки, оставляем подписи */
html.a11y-noimg img:not(.cge58-keep-img),
html.a11y-noimg .tabu,
html.a11y-noimg .bottomline,
html.a11y-noimg .cge58-video-wrap,
html.a11y-noimg iframe {
	display: none !important;
}

html.a11y-noimg .front-banners__item[title]::before,
html.a11y-noimg .front-side__item a[title]::before,
html.a11y-noimg .partners a[title]::before {
	content: attr(title);
	display: block;
	padding: 10px;
	border: 2px solid currentColor;
}

/* Карта филиалов в режиме слабовидящих — списком */
html.a11y-on .filials-map__svg,
html.a11y-on .filials-map__info {
	display: none !important;
}

html.a11y-on .filials-map__list {
	position: static !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 0 0 20px !important;
	overflow: visible !important;
	clip: auto !important;
	white-space: normal !important;
}

html.a11y-on .filials-map__list li {
	margin-bottom: 15px;
}

/* Цветовые схемы */
html.a11y-scheme-bw { --a11y-fg: #000; --a11y-bg: #fff; --a11y-link: #000; }
html.a11y-scheme-wb { --a11y-fg: #fff; --a11y-bg: #000; --a11y-link: #fff; }
html.a11y-scheme-blue { --a11y-fg: #063462; --a11y-bg: #9DD1FF; --a11y-link: #063462; }

html[class*="a11y-scheme-"] body,
html[class*="a11y-scheme-"] .line2,
html[class*="a11y-scheme-"] .menutop__sub .menutop__item,
html[class*="a11y-scheme-"] .point,
html[class*="a11y-scheme-"] .cge58-a11y-panel,
html[class*="a11y-scheme-"] .newspage__content *,
html[class*="a11y-scheme-"] .cge58-notice *,
html[class*="a11y-scheme-"] .well,
html[class*="a11y-scheme-"] .hero-unit {
	background: var(--a11y-bg) !important;
	color: var(--a11y-fg) !important;
	border-color: var(--a11y-fg) !important;
}

html[class*="a11y-scheme-"] a,
html[class*="a11y-scheme-"] a:visited,
html[class*="a11y-scheme-"] .rubhead,
html[class*="a11y-scheme-"] .rubhead h1,
html[class*="a11y-scheme-"] .rubhead h2,
html[class*="a11y-scheme-"] .menutop__link,
html[class*="a11y-scheme-"] .title a,
html[class*="a11y-scheme-"] .newsdate,
html[class*="a11y-scheme-"] .footer__docs a,
html[class*="a11y-scheme-"] ul.lenta-main li a,
html[class*="a11y-scheme-"] ul.lenta-main1 li a {
	color: var(--a11y-link) !important;
}

html[class*="a11y-scheme-"] a {
	text-decoration: underline !important;
}

html[class*="a11y-scheme-"] .line2 {
	border-bottom: 2px solid var(--a11y-fg);
}

html[class*="a11y-scheme-"] .menutop__sub {
	border: 2px solid var(--a11y-fg);
}

html[class*="a11y-scheme-"] .menutop__link:hover,
html[class*="a11y-scheme-"] .menutop__sub .menutop__link:hover {
	background: var(--a11y-fg) !important;
	color: var(--a11y-bg) !important;
}

html[class*="a11y-scheme-"] .show_all_btn,
html[class*="a11y-scheme-"] .btn-cge58,
html[class*="a11y-scheme-"] .cge58-a11y-toggle,
html[class*="a11y-scheme-"] .menutop-burger {
	background: var(--a11y-bg) !important;
	color: var(--a11y-fg) !important;
	border: 2px solid var(--a11y-fg) !important;
}

html[class*="a11y-scheme-"] .menutop-burger__icon,
html[class*="a11y-scheme-"] .menutop-burger__icon::before,
html[class*="a11y-scheme-"] .menutop-burger__icon::after {
	background: var(--a11y-fg);
}

html[class*="a11y-scheme-"] img {
	filter: grayscale(1);
}

html[class*="a11y-scheme-"] .logo img {
	filter: grayscale(1) contrast(1.2);
}

html[class*="a11y-scheme-"] .page-link {
	background: var(--a11y-bg) !important;
	color: var(--a11y-fg) !important;
	border-color: var(--a11y-fg) !important;
}

html[class*="a11y-scheme-"] .page-item.active .page-link {
	background: var(--a11y-fg) !important;
	color: var(--a11y-bg) !important;
}

/* Плашка cookie (из кода подвала) и админ-панель WP в режиме слабовидящих */
html.a11y-on .privacyModal {
	font-size: var(--cge-fs) !important;
	line-height: 1.4 !important;
	width: 560px !important;
}

html[class*="a11y-scheme-"] .privacyModal {
	background: var(--a11y-bg) !important;
	color: var(--a11y-fg) !important;
	border: 2px solid var(--a11y-fg) !important;
}

html[class*="a11y-scheme-"] .privacyModal .close__link {
	background: var(--a11y-fg) !important;
	color: var(--a11y-bg) !important;
}

html[class*="a11y-scheme-"] #wpadminbar a,
html[class*="a11y-scheme-"] #wpadminbar a:visited {
	color: #f0f0f1 !important;
	text-decoration: none !important;
}

html.a11y-on #wpadminbar,
html.a11y-on #wpadminbar * {
	font-size: 13px !important;
	letter-spacing: normal !important;
	word-spacing: normal !important;
}

/* ---------------------------------------------------------------- 11. Печать */

@media print {
	.line1,
	.menutop-wrap,
	.cge58-a11y-panel,
	.bottomline,
	.cge58-lightbox,
	.cge58-edit-link,
	.front-map {
		display: none !important;
	}

	.line2 {
		background: none;
		color: #000;
	}

	.title a {
		color: #000 !important;
	}

	a[href^="http"]::after {
		content: " (" attr(href) ")";
		font-size: 11px;
	}
}

/* ---------------------------------------------------------------- форма обращений
   Как в AVE: блок 470 px справа, текст обтекает слева; на телефоне — во всю ширину */

.cge58-form {
	margin: 0 0 20px;
}

@media (min-width: 768px) {
	.cge58-form {
		float: right;
		width: 470px;
		margin: 0 0 20px 20px;
	}
}

.cge58-form .form-control {
	font-size: 14px;
	border-radius: 4px;
}

.cge58-form textarea.form-control {
	resize: vertical;
}

.cge58-form .form-check-label {
	font-size: 14px;
}

.cge58-form__hp {
	position: absolute !important;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Заголовок левой колонки главной (добавлен при освежении дизайна) */
.front-side__title {
	margin-bottom: 10px;
}

@media (min-width: 576px) and (max-width: 991.98px) {
	.front-side__title {
		grid-column: 1 / -1;
	}
}

/* Календарь справа от списка в разделах (lists.php, 'calendar') */
.cge58-with-calendar {
	--bs-gutter-x: 30px;
	scroll-margin-top: 110px;
}

.cge58-with-calendar__aside .cge58-calendar {
	max-width: 320px;
	margin: 15px 0 20px;
}

@media (min-width: 992px) {
	.cge58-with-calendar__aside .cge58-calendar {
		position: sticky;
		top: 20px;
		max-width: none;
	}

	.admin-bar .cge58-with-calendar__aside .cge58-calendar {
		top: 52px;
	}
}

.cge58-cal-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 14px;
	margin: 15px 0 5px;
	padding: 10px 14px;
	border: 1px solid var(--cge-line);
	border-radius: 4px;
	background: var(--cge-point-bg);
	font-weight: bold;
}

.cge58-cal-filter__reset {
	font-weight: normal;
}

/* Кнопки городов под картой филиалов — только в обычном режиме на телефоне (refresh.css) */
.filials-map__chips {
	display: none;
}

/* Оформления текста из редактора (inc/editor.php): «Карточка», «Важно», «Список файлов», «Выделить красным» */
.cge-card {
	margin: 0 0 15px;
	padding: 12px 16px;
	border: 1px solid var(--cge-line);
	border-radius: 4px;
}

.cge-card > :last-child,
.cge-note > :last-child {
	margin-bottom: 0;
}

.cge-note {
	margin: 0 0 15px;
	padding: 12px 16px;
	border-left: 4px solid var(--cge-yellow);
	background: #fffbea;
}

.cge-files {
	padding-left: 20px;
}

.cge-alert {
	color: #b42318;
}
