/*
 * Specialist-NT — Accessibility Toolbar Styles (a11y.css)
 * Панель доступности: версия для слабовидящих.
 */

/* =====================================================
   Кнопка открытия панели (в шапке)
   ===================================================== */
.a11y-toggle {
	display: inline-flex;
	align-items: center;
	align-self: center;
	gap: 0.4rem;
	padding: 0.45rem 0.875rem;
	background: transparent;
	color: rgba(255, 255, 255, 0.85);
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-radius: var(--radius-md);
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background var(--transition), color var(--transition), border-color var(--transition);
	flex-shrink: 0;
}
.a11y-toggle:hover,
.a11y-toggle:focus-visible {
	background: rgba(255, 255, 255, 0.15);
	color: var(--color-white);
	border-color: rgba(255, 255, 255, 0.8);
	outline: 2px solid var(--color-secondary);
	outline-offset: 2px;
}
.a11y-toggle svg { flex-shrink: 0; }
.a11y-toggle__label { display: none; }

@media (max-width: 768px) {
	.a11y-toggle {
		padding: 0.45rem 0.6rem;
	}
}

/* =====================================================
   Overlay
   ===================================================== */
.a11y-panel__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 1099;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}
.a11y-panel__overlay.is-visible {
	opacity: 1;
	pointer-events: auto;
}

/* =====================================================
   Панель доступности
   ===================================================== */
.a11y-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(380px, 100vw);
	z-index: 1100;
	background: var(--color-white);
	box-shadow: -4px 0 32px rgba(0, 0, 0, 0.18);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	overflow-y: auto;
}
.a11y-panel:not([hidden]) {
	transform: translateX(0);
}
/* При hidden не анимируем, убираем из вёрстки */
.a11y-panel[hidden] {
	display: flex !important; /* override [hidden] для анимации выезда */
	transform: translateX(100%);
	pointer-events: none;
}

.a11y-panel__inner {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	height: 100%;
}

/* Шапка панели */
.a11y-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.a11y-panel__title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--color-primary);
	margin: 0;
}
.a11y-panel__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 2px solid var(--color-border);
	border-radius: var(--radius-sm);
	background: transparent;
	color: var(--color-text);
	cursor: pointer;
	transition: all var(--transition);
	flex-shrink: 0;
}
.a11y-panel__close:hover,
.a11y-panel__close:focus-visible {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-white);
}

/* Группы настроек */
.a11y-group {
	border-bottom: 1px solid var(--color-border);
	padding-bottom: 1.25rem;
}
.a11y-group:last-of-type { border-bottom: none; }

.a11y-group__title {
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-text-muted);
	margin-bottom: 0.75rem;
}

.a11y-group__controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.a11y-group__hint {
	font-size: 0.8125rem;
	color: var(--color-text-muted);
	line-height: 1.5;
	margin: 0;
}

/* Кнопки внутри панели */
.a11y-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.5rem 0.875rem;
	font-family: var(--font-sans);
	font-size: 0.875rem;
	font-weight: 600;
	border: 2px solid var(--color-border);
	border-radius: var(--radius-sm);
	background: var(--color-bg);
	color: var(--color-text);
	cursor: pointer;
	transition: all var(--transition);
	line-height: 1.2;
}
.a11y-btn:hover,
.a11y-btn:focus-visible {
	border-color: var(--color-primary);
	color: var(--color-primary);
	outline: none;
}
.a11y-btn:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 2px; }

.a11y-btn--active,
.a11y-btn[aria-pressed="true"] {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-white);
}

/* Цветовые образцы */
.a11y-btn--color {
	flex-direction: column;
	padding: 0.5rem 0.625rem;
	font-size: 0.75rem;
	min-width: 62px;
	justify-content: center;
}
.a11y-color-swatch {
	width: 28px;
	height: 18px;
	border-radius: 3px;
	border: 1px solid rgba(0,0,0,0.15);
	display: block;
}
.a11y-color-swatch--normal   { background: linear-gradient(135deg, #1b3f6e 50%, #f7f9fc 50%); }
.a11y-color-swatch--dark     { background: linear-gradient(135deg, #111 50%, #222 50%); }
.a11y-color-swatch--contrast { background: linear-gradient(135deg, #000 50%, #ff0 50%); }
.a11y-color-swatch--gray     { background: linear-gradient(135deg, #555 50%, #ddd 50%); }
.a11y-color-swatch--inverted { background: linear-gradient(135deg, #e83d1a 50%, #1b3f6e 50%); }

/* Кнопка сброса */
.a11y-btn--reset {
	width: 100%;
	justify-content: center;
	border-color: var(--color-error);
	color: var(--color-error);
	background: var(--color-error-bg);
}
.a11y-btn--reset:hover,
.a11y-btn--reset:focus-visible {
	background: var(--color-error);
	color: var(--color-white);
}

.a11y-panel__footer { margin-top: auto; padding-top: 1rem; }

/* =====================================================
   Применяемые режимы доступности на <html>
   ===================================================== */

/* ── Размеры шрифта ── */
html.a11y-font-sm  { font-size: 13px !important; }
html.a11y-font-md  { font-size: 16px !important; }
html.a11y-font-lg  { font-size: 20px !important; }
html.a11y-font-xl  { font-size: 24px !important; }

/* ── Тёмная тема ── */
html.a11y-dark {
	--color-bg:          #1a1a2e;
	--color-white:       #1a1a2e;
	--color-text:        #e0e0e0;
	--color-text-muted:  #9a9a9a;
	--color-primary:     #90b4e8;
	--color-primary-dark:#bbd0f5;
	--color-secondary:   #ffb347;
	--color-border:      #333355;
	background-color:    #1a1a2e !important;
	color:               #e0e0e0 !important;
}
html.a11y-dark body       { background: #1a1a2e !important; color: #e0e0e0 !important; }
html.a11y-dark .site-header { background: #10102a !important; }
html.a11y-dark .header-main { background: #10102a !important; }
html.a11y-dark .header-topbar { background: #08081a !important; }
html.a11y-dark a          { color: #90b4e8 !important; }
html.a11y-dark a:hover    { color: #bbd0f5 !important; }
html.a11y-dark .a11y-panel { background: #1a1a2e; color: #e0e0e0; }

/* ── Высокий контраст ── */
html.a11y-contrast {
	--color-bg:          #000000;
	--color-white:       #000000;
	--color-text:        #ffff00;
	--color-text-muted:  #ffff00;
	--color-primary:     #ffff00;
	--color-primary-dark:#ffffff;
	--color-secondary:   #00ff00;
	--color-border:      #ffffff;
	background-color:    #000000 !important;
	color:               #ffff00 !important;
}
html.a11y-contrast body       { background: #000 !important; color: #ffff00 !important; }
html.a11y-contrast .site-header { background: #000 !important; border-bottom: 2px solid #ffff00; }
html.a11y-contrast a          { color: #00ff00 !important; }
html.a11y-contrast a:hover    { color: #ffffff !important; text-decoration: underline !important; }
html.a11y-contrast .btn--primary,
html.a11y-contrast .btn--secondary { background: #ffff00 !important; color: #000 !important; border-color: #ffff00 !important; }
html.a11y-contrast .a11y-panel { background: #000; color: #ffff00; }

/* ── Чёрно-белая (grayscale) ── */
html.a11y-gray {
	filter: grayscale(100%);
}

/* ── Инверсия цветов ── */
html.a11y-inverted {
	filter: invert(100%) hue-rotate(180deg);
}
html.a11y-inverted img,
html.a11y-inverted video,
html.a11y-inverted iframe {
	filter: invert(100%) hue-rotate(180deg);
}

/* ── Без изображений ── */
html.a11y-no-images img:not([role="presentation"]) {
	visibility: hidden !important;
}
html.a11y-no-images [style*="background-image"] {
	background-image: none !important;
}

/* =====================================================
   Раздел «Сведения об образовательной организации»
   ===================================================== */

/* Макет: sidebar + content */
.svedeniya-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 2.5rem;
	align-items: start;
	padding-top: 2rem;
	padding-bottom: 4rem;
}

@media (max-width: 900px) {
	.svedeniya-layout {
		grid-template-columns: 1fr;
	}
	.svedeniya-sidebar {
		order: -1;
	}
}

/* Боковое навигационное меню */
.svedeniya-nav {
	position: sticky;
	top: 90px;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	overflow: hidden;
}

.svedeniya-nav__heading {
	font-size: 0.875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-white);
	background: var(--color-primary);
	padding: 1rem 1.25rem;
	margin: 0;
}
.svedeniya-nav__heading a {
	color: inherit;
	text-decoration: none;
}

.svedeniya-nav__list {
	list-style: none;
	margin: 0;
	padding: 0.5rem 0;
}
.svedeniya-nav__list li { margin: 0; }

.svedeniya-nav__list a,
.svedeniya-nav__list > li > a {
	display: block;
	padding: 0.625rem 1.25rem;
	font-size: 0.875rem;
	color: var(--color-text);
	text-decoration: none;
	border-left: 3px solid transparent;
	transition: all var(--transition);
}
.svedeniya-nav__list a:hover,
.svedeniya-nav__list > li > a:hover {
	color: var(--color-primary);
	border-left-color: var(--color-secondary);
	background: rgba(27, 63, 110, 0.05);
}
.svedeniya-nav__list .current-menu-item > a,
.svedeniya-nav__list .current_page_item > a,
.svedeniya-nav__list li.active > a {
	color: var(--color-primary);
	font-weight: 600;
	border-left-color: var(--color-primary);
	background: rgba(27, 63, 110, 0.07);
}

/* Хлебные крошки */
.breadcrumb {
	margin-bottom: 1.5rem;
}
.breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.8125rem;
	color: var(--color-text-muted);
}
.breadcrumb__item + .breadcrumb__item::before {
	content: '/';
	margin-right: 0.25rem;
	color: var(--color-border);
}
.breadcrumb__item a {
	color: var(--color-text-muted);
	text-decoration: none;
}
.breadcrumb__item a:hover { color: var(--color-primary); }
.breadcrumb__item--current { color: var(--color-text); }

/* Страница подраздела */
.svedeniya-page__title {
	font-size: clamp(1.375rem, 3vw, 2rem);
	margin-bottom: 0.5rem;
}
.svedeniya-page__updated {
	font-size: 0.8125rem;
	color: var(--color-text-muted);
	margin-bottom: 1.5rem;
}
.svedeniya-page__intro {
	background: rgba(27, 63, 110, 0.05);
	border-left: 4px solid var(--color-primary);
	padding: 1rem 1.25rem;
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
	margin-bottom: 2rem;
	font-size: 0.9375rem;
}
.svedeniya-page__content { font-size: 0.9375rem; }

/* Индекс подразделов (главная страница раздела) */
.svedeniya-index {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 0.75rem;
	margin-top: 2rem;
}
.svedeniya-index__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	color: var(--color-text);
	text-decoration: none;
	font-size: 0.9375rem;
	transition: all var(--transition);
}
.svedeniya-index__item:hover {
	border-color: var(--color-primary);
	color: var(--color-primary);
	box-shadow: var(--shadow-sm);
	transform: translateY(-1px);
}
.svedeniya-index__arrow { flex-shrink: 0; opacity: 0.5; }
.svedeniya-index__item:hover .svedeniya-index__arrow { opacity: 1; }
