/* ==========================================================================
   Главная страница — единый стиль с шаблоном books-index-adaptive
   ========================================================================== */

.mouo-page-home .mouo-page-body {
	padding: clamp(20px, 3vw, 32px);
	max-width: 1360px;
	margin: 0 auto;
	background: transparent;
	border: 0;
	box-shadow: none;
	min-height: 0;
}

/* Секции */
.mouo-home-section {
	margin-bottom: 36px;
}

.mouo-home-section__title,
.mouo-page-home .mouo-page-body > div[style*="text-align: left"]:not(.mouo-home-duplicate-title) > b,
.mouo-page-home .mouo-page-body > div > div > div > b {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	padding: 0;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--mouo-primary);
}

.mouo-home-section__title::after,
.mouo-page-home .mouo-page-body > div[style*="text-align: left"]:not(.mouo-home-duplicate-title) > b::after,
.mouo-page-home .mouo-page-body > div > div > div > b::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, var(--mouo-line), transparent);
}

.mouo-page-home .mouo-page-body .Apple-style-span,
.mouo-page-home .mouo-page-body span[style*="color: #438ccb"] {
	display: none;
}

/* Скрыть дубли заголовков, если секция уже с h2 */
.mouo-page-home .mouo-home-duplicate-title,
.mouo-page-home .mouo-page-body > div[style*="text-align: left"]:has(+ br + div .mouo-home-section--projects),
.mouo-page-home .mouo-page-body > div[style*="text-align: left"]:has(+ br + section.mouo-home-section--projects),
.mouo-page-home .mouo-page-body > div[style*="text-align: left"]:has(+ br + .mouo-home-section--projects) {
	display: none !important;
}

.mouo-page-home .mouo-page-body > div[style*="text-align: left"]:has(+ br + div .mouo-home-section--projects) + br,
.mouo-page-home .mouo-page-body > div[style*="text-align: left"]:has(+ br + .mouo-home-section--projects) + br {
	display: none;
}

.mouo-page-home .mouo-home-section--appeal + br,
.mouo-page-home .mouo-page-body > div[style*="text-align: left"]:has(+ br + section.mouo-home-section--appeal) {
	display: none;
}

/* Hero: слайдер слева + баннер справа (600 + 600) */
.mouo-home-hero {
	margin-bottom: 36px;
}

.mouo-home-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 600px) minmax(0, 600px);
	gap: clamp(16px, 2.5vw, 24px);
	align-items: stretch;
	justify-content: start;
}

.mouo-home-hero__col {
	width: 100% !important;
	max-width: 600px;
	margin: 0 !important;
}

.mouo-home-hero__col--slider .mouo-hero-slider {
	max-width: 600px;
	width: 100%;
	margin: 0;
}

.mouo-home-hero__col--banners {
	display: grid;
	grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
	gap: 12px;
	min-height: 0;
}

.mouo-home-hero__col--banner > a,
.mouo-home-hero__col--banners > a {
	display: block;
	min-height: 0;
	height: 100%;
	line-height: 0;
	border-radius: var(--mouo-radius);
	overflow: hidden;
	box-shadow: var(--mouo-shadow-md);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mouo-home-hero__col--banner > a:hover,
.mouo-home-hero__col--banners > a:hover {
	transform: translateY(-2px);
	box-shadow: var(--mouo-shadow-lg);
}

.mouo-home-hero__col--banner img,
.mouo-home-hero__col--banners img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: var(--mouo-radius);
	box-shadow: none;
}

@media (min-width: 1280px) {
	.mouo-home-hero__col--slider .mouo-hero-slider,
	.mouo-home-hero__col--slider .mouo-hero-slider__window {
		height: 307px;
	}

	.mouo-home-hero__col--banners {
		height: 307px;
	}
}

.mouo-home-hero img:not(.mouo-hero-slider img):not(.mouo-home-hero__col--banners img),
.mouo-page-home .mouo-page-body a img:not(.mouo-hero-slider img):not(.mouo-home-hero__col--banner img):not(.mouo-home-hero__col--banners img):not(.mouo-banner-grid__img):not(.mouo-home-promo img) {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto !important;
	border-radius: var(--mouo-radius);
	box-shadow: var(--mouo-shadow-md);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mouo-hero-slider img {
	width: 100%;
	max-width: none;
	height: 100% !important;
	border-radius: 0;
	box-shadow: none;
}

.mouo-home-hero a:hover img:not(.mouo-hero-slider img):not(.mouo-home-hero__col--banner img):not(.mouo-home-hero__col--banners img):not(.mouo-banner-grid__img),
.mouo-page-home .mouo-page-body a:hover img:not(.mouo-hero-slider img):not(.mouo-home-hero__col--banner img):not(.mouo-home-hero__col--banners img):not(.mouo-banner-grid__img):not(.mouo-home-promo img) {
	transform: translateY(-2px);
	box-shadow: var(--mouo-shadow-lg);
}

.mouo-hero-slider a:hover img {
	transform: none;
	box-shadow: none;
}

.mouo-page-home .mouo-hero-slider {
	position: relative;
}

@media (max-width: 1279px) {
	.mouo-home-hero__grid {
		grid-template-columns: minmax(0, 600px);
		justify-content: center;
	}

	.mouo-home-hero__col--banners {
		height: auto;
		grid-template-rows: auto auto;
	}

	.mouo-home-hero__col--banners img {
		height: auto;
		object-fit: contain;
	}
}

/* Баннеры проектов / партнёров */
.mouo-page-home .mouo-banner-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 16px;
}

.mouo-page-home .mouo-banner-grid--projects {
	display: grid;
	grid-template-columns: repeat(4, 325px);
	gap: 16px;
	align-items: start;
	justify-content: start;
	max-width: none;
}

.mouo-page-home .mouo-banner-grid--projects > a,
.mouo-page-home .mouo-banner-grid--projects > span,
.mouo-page-home .mouo-banner-grid--projects > div,
.mouo-page-home .mouo-banner-grid--projects .mouo-banner-grid__item {
	width: 325px;
	max-width: 100%;
}

.mouo-page-home .mouo-banner-grid--projects .mouo-banner-grid__img,
.mouo-page-home .mouo-banner-grid--projects img {
	width: 325px;
	max-width: 100%;
	height: 150px !important;
	object-fit: contain;
	background: var(--mouo-surface);
}

.mouo-page-home .mouo-banner-grid__img,
.mouo-page-home .mouo-banner-grid:not(.mouo-banner-grid--projects):not(.mouo-banner-grid--bottom) img {
	width: 100%;
	height: auto;
	border-radius: var(--mouo-radius);
	box-shadow: var(--mouo-shadow-md);
}

.mouo-page-home .mouo-banner-grid--bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-start;
	justify-content: flex-start;
}

.mouo-page-home .mouo-banner-grid--bottom a {
	display: inline-block;
	width: auto;
}

.mouo-page-home .mouo-banner-grid--bottom .mouo-banner-grid__img,
.mouo-page-home .mouo-banner-grid--bottom img {
	width: auto;
	max-width: none;
	height: auto;
	border-radius: var(--mouo-radius);
	box-shadow: var(--mouo-shadow-md);
}

.mouo-page-home .mouo-banner-grid--projects .mouo-banner-grid__item a {
	display: block;
	line-height: 0;
	border-radius: var(--mouo-radius);
	overflow: hidden;
	transition: transform 0.25s ease;
}

.mouo-page-home .mouo-banner-grid--projects .mouo-banner-grid__item a:hover {
	transform: translateY(-3px);
}

.mouo-page-home .mouo-banner-grid a {
	display: block;
	line-height: 0;
	border-radius: var(--mouo-radius);
	overflow: hidden;
	transition: transform 0.25s ease;
}

.mouo-page-home .mouo-banner-grid a:hover {
	transform: translateY(-3px);
}

/* Промо Госуслуги — 2 баннера в ряд на всю ширину */
.mouo-page-home .mouo-home-promo {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	width: 100%;
	max-width: 100% !important;
	margin: 0 0 36px !important;
	padding: 0;
	text-align: left !important;
}

.mouo-page-home .mouo-home-promo--duo {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mouo-page-home .mouo-home-promo > a {
	display: block;
	width: 100%;
	min-width: 0;
	margin: 0 !important;
	line-height: 0;
	border-radius: var(--mouo-radius);
	overflow: hidden;
	box-shadow: var(--mouo-shadow-md);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mouo-page-home .mouo-home-promo > a:hover {
	transform: translateY(-2px);
	box-shadow: var(--mouo-shadow-lg);
}

.mouo-page-home .mouo-home-promo img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto !important;
	border-radius: var(--mouo-radius);
	box-shadow: none;
	object-fit: cover;
}

/* Важное объявление */
.mouo-home-notice {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 20px;
	border: 1px solid rgba(180, 83, 9, 0.22);
	border-left: 4px solid #b45309;
	border-radius: var(--mouo-radius);
	background: linear-gradient(135deg, rgba(180, 83, 9, 0.08) 0%, rgba(255, 255, 255, 0.96) 100%);
	box-shadow: var(--mouo-shadow-sm);
	color: var(--mouo-text);
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mouo-home-notice:hover {
	transform: translateY(-2px);
	box-shadow: var(--mouo-shadow-md);
	border-color: rgba(180, 83, 9, 0.35);
}

.mouo-home-notice__badge {
	flex: 0 0 auto;
	padding: 4px 10px;
	border-radius: 999px;
	background: #b45309;
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mouo-home-notice__text {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.55;
	color: var(--mouo-primary);
}

/* Карточки горячих линий */
.mouo-home-hotlines {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.mouo-home-hotline-card {
	display: grid;
	gap: 12px;
	padding: 20px 22px;
	border: 1px solid var(--mouo-line);
	border-left: 4px solid var(--mouo-accent);
	border-radius: var(--mouo-radius);
	background: linear-gradient(180deg, rgba(42, 80, 130, 0.04) 0%, var(--mouo-surface) 100%);
	box-shadow: var(--mouo-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mouo-home-hotline-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--mouo-shadow-md);
	border-color: rgba(42, 80, 130, 0.18);
}

.mouo-home-hotline-card--wide {
	grid-column: 1 / -1;
}

.mouo-home-hotline-card__title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.4;
	color: var(--mouo-primary);
}

.mouo-home-hotline-card__lead {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: var(--mouo-muted);
}

.mouo-home-hotline-card__groups {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.mouo-home-hotline-card__group {
	display: grid;
	gap: 8px;
	padding: 12px 14px;
	border: 1px solid rgba(42, 80, 130, 0.1);
	border-radius: calc(var(--mouo-radius) - 2px);
	background: rgba(255, 255, 255, 0.72);
}

.mouo-home-hotline-card__group--full {
	grid-column: 1 / -1;
}

.mouo-home-hotline-card__label {
	font-size: 11px;
	font-weight: 800;
	line-height: 1.35;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--mouo-primary-light);
}

.mouo-home-hotline-card__contacts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mouo-home-hotline-card__contacts li {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 10px;
	font-size: 14px;
	line-height: 1.5;
	color: var(--mouo-text);
}

.mouo-home-hotline-card__contacts li + li {
	margin-top: 8px;
}

.mouo-home-hotline-card__contacts a {
	color: var(--mouo-primary);
	font-weight: 800;
	text-decoration: none;
	border-bottom: 1px solid rgba(42, 80, 130, 0.2);
	white-space: nowrap;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.mouo-home-hotline-card__contacts a:hover {
	color: var(--mouo-accent);
	border-bottom-color: var(--mouo-accent);
}

.mouo-home-hotline-card__person {
	color: var(--mouo-muted);
	font-size: 13px;
}

.mouo-home-divider {
	margin: 36px 0;
	border: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--mouo-line), transparent);
}

.mouo-home-section--notice,
.mouo-home-section--announcements,
.mouo-home-section--docs {
	margin-bottom: 36px;
}

/* Алерты / объявления / горячие линии (legacy tables) */
.mouo-home-alert,
.mouo-page-home .mouo-page-body table.data-table,
.mouo-page-home .mouo-page-body table[align="center"][border="1"],
.mouo-page-home .mouo-page-body table[style*="width: 650px"],
.mouo-page-home .mouo-page-body table[style*="width: 600px"] {
	width: 100% !important;
	max-width: 100%;
	margin: 0 0 14px;
	border: 0 !important;
	border-collapse: separate;
	border-spacing: 0 12px;
	background: transparent;
}

.mouo-home-alert td,
.mouo-page-home .mouo-page-body table td {
	padding: 18px 20px 18px 22px !important;
	border: 1px solid var(--mouo-line) !important;
	border-left: 4px solid var(--mouo-accent) !important;
	border-radius: var(--mouo-radius) !important;
	background: var(--mouo-surface) !important;
	box-shadow: var(--mouo-shadow-sm);
	vertical-align: top;
}

.mouo-home-alert td p,
.mouo-page-home .mouo-page-body table td p {
	margin: 0 0 0.65em;
	text-align: left !important;
	line-height: 1.65;
	font-size: 15px;
	color: var(--mouo-text);
}

.mouo-home-alert td p:last-child,
.mouo-page-home .mouo-page-body table td p:last-child {
	margin-bottom: 0;
}

.mouo-home-alert td b,
.mouo-page-home .mouo-page-body table td b {
	color: var(--mouo-primary);
	font-weight: 700;
}

.mouo-home-alert td a,
.mouo-page-home .mouo-page-body table td a {
	color: var(--mouo-primary-light);
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid rgba(42, 80, 130, 0.25);
	transition: color 0.2s ease, border-color 0.2s ease;
}

.mouo-home-alert td a:hover,
.mouo-page-home .mouo-page-body table td a:hover {
	color: var(--mouo-accent);
	border-bottom-color: var(--mouo-accent);
}

/* Обращение через Госуслуги */
.mouo-home-section--appeal {
	margin-bottom: 36px;
}

.mouo-page-home .mouo-page-body #js-show-iframe-wrapper {
	border-radius: var(--mouo-radius);
	overflow: hidden;
	box-shadow: var(--mouo-shadow-md);
	border: 1px solid var(--mouo-line);
}

.mouo-home-section__head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px 16px;
	margin-bottom: 16px;
}

.mouo-home-section__head .mouo-home-section__title {
	flex: 1;
	min-width: min(100%, 220px);
	margin-bottom: 0;
}

.mouo-home-docs-archive {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-shrink: 0;
	padding: 10px 18px;
	border: 1px solid rgba(42, 80, 130, 0.22);
	border-radius: 999px;
	background: var(--mouo-surface);
	box-shadow: var(--mouo-shadow-sm);
	color: var(--mouo-primary);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mouo-home-docs-archive::after {
	content: "→";
	font-size: 14px;
	line-height: 1;
}

.mouo-home-docs-archive:hover {
	color: var(--mouo-accent);
	border-color: rgba(196, 30, 58, 0.35);
	box-shadow: var(--mouo-shadow-md);
	transform: translateY(-1px);
	text-decoration: none;
}

.mouo-home-docs-archive:focus-visible {
	outline: 2px solid var(--mouo-primary-light);
	outline-offset: 2px;
}

/* Документы */
#mouo-home-docs {
	scroll-margin-top: calc(var(--mouo-topbar-h, 76px) + 16px);
}

.mouo-home-docs-wrap {
	margin-bottom: 36px;
}

.mouo-home-section--docs .mouo-news-filter {
	margin-bottom: 16px;
}

.mouo-home-section--docs .mouo-news-filter__shell {
	border-radius: var(--mouo-radius);
}

.mouo-page-home .mouo-doc-list {
	gap: 12px;
}

.mouo-page-home .mouo-doc-item {
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mouo-page-home .mouo-doc-item:hover {
	transform: translateY(-2px);
	box-shadow: var(--mouo-shadow-md);
	border-color: rgba(42, 80, 130, 0.2);
}

.mouo-page-home .mouo-doc-list__pager {
	margin-top: 16px;
}

.mouo-page-home .mouo-doc-list__pager .modern-page-navigation,
.mouo-page-home .mouo-doc-list__pager .bx-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.mouo-page-home .mouo-doc-list__pager a,
.mouo-page-home .mouo-doc-list__pager span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid var(--mouo-line);
	background: var(--mouo-surface);
	color: var(--mouo-text);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
}

.mouo-page-home .mouo-doc-list__pager a:hover {
	border-color: var(--mouo-primary-light);
	color: var(--mouo-primary-light);
}

.mouo-page-home .mouo-doc-list__pager span.modern-page-current,
.mouo-page-home .mouo-doc-list__pager .bx-active {
	background: var(--mouo-primary-light);
	border-color: var(--mouo-primary-light);
	color: #fff;
}

/* Разделитель */
.mouo-page-home .mouo-page-body hr {
	margin: 36px 0;
	border: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--mouo-line), transparent);
}

/* Образовательные учреждения */
.mouo-home-section--schools {
	margin-bottom: 12px;
}

/* Убрать лишние br */
.mouo-page-home .mouo-page-body > br {
	display: none;
}

.mouo-page-home .mouo-page-body > div:empty {
	display: none;
}

/* Inline style overrides */
.mouo-page-home .mouo-page-body > div[style*="width: 650px"]:not(.mouo-home-hero__col),
.mouo-page-home .mouo-page-body > div[style*="width: 100%"] > div[style*="width: 650px"]:not(.mouo-home-hero__col) {
	width: 100% !important;
	max-width: 600px;
	margin-left: auto !important;
	margin-right: auto !important;
}

.mouo-home-hero__col[style*="width: 650px"] {
	max-width: 600px !important;
	margin: 0 !important;
}

.mouo-page-home .mouo-page-body > div[style*="text-align: center"]:not(.mouo-home-promo):not(:has(.mouo-banner-grid)) {
	max-width: 100%;
	margin: 0 auto 24px;
}

@media (max-width: 1399px) {
	.mouo-page-home .mouo-banner-grid--projects {
		grid-template-columns: repeat(2, 325px);
	}
}

@media (min-width: 1400px) {
	.mouo-page-home .mouo-banner-grid--projects {
		grid-template-columns: repeat(4, 325px);
	}
}

@media (max-width: 768px) {
	.mouo-page-home .mouo-page-body {
		padding: 16px;
	}

	.mouo-home-section {
		margin-bottom: 28px;
	}

	.mouo-home-alert td,
	.mouo-page-home .mouo-page-body table td {
		padding: 14px 16px !important;
	}

	.mouo-home-hero__grid {
		gap: 16px;
	}

	.mouo-page-home .mouo-banner-grid--projects {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: 100%;
		justify-content: center;
	}

	.mouo-page-home .mouo-banner-grid--projects .mouo-banner-grid__item:nth-child(n + 3) {
		display: none;
	}

	.mouo-page-home .mouo-banner-grid--projects > a,
	.mouo-page-home .mouo-banner-grid--projects > span,
	.mouo-page-home .mouo-banner-grid--projects > div,
	.mouo-page-home .mouo-banner-grid--projects .mouo-banner-grid__item {
		width: 100%;
		max-width: 325px;
	}

	.mouo-page-home .mouo-home-promo,
	.mouo-page-home .mouo-home-promo--duo {
		grid-template-columns: 1fr !important;
		gap: 14px;
	}

	.mouo-home-hotlines,
	.mouo-home-hotline-card__groups {
		grid-template-columns: 1fr;
	}

	.mouo-home-notice {
		flex-direction: column;
	}
}

@media (max-width: 480px) {
	.mouo-page-home .mouo-doc-btn {
		min-width: 100%;
	}
}
