/* Версия для слабовидящих */
/* Базовые настройки при включении режима */
body.accessible {
    --transition: none !important;
    /* Убираем анимации для производительности */
}

/* --- ЦВЕТОВЫЕ СХЕМЫ --- */

/* 1. БЕЛАЯ СХЕМА (Черным по белому) */
body.accessible.scheme-white {
    --bg-body: #ffffff !important;
    --bg-white: #ffffff !important;
    --bg-light: #f0f0f0 !important;
    --text-main: #000000 !important;
    --text-secondary: #000000 !important;
    --primary: #000000 !important;
    --secondary: #000000 !important;
    --accent: #000000 !important;
    --border-color: #000000 !important;

    background: #ffffff !important;
    color: #000000 !important;
}

body.accessible.scheme-white a,
body.accessible.scheme-white .btn,
body.accessible.scheme-white button {
    text-decoration: underline !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

body.accessible.scheme-white img {
    filter: grayscale(100%) contrast(120%);
}

/* 2. ЧЕРНАЯ СХЕМА (Белым по черному) */
body.accessible.scheme-black {
    --bg-body: #000000 !important;
    --bg-white: #000000 !important;
    --bg-light: #222222 !important;
    --text-main: #ffffff !important;
    --text-secondary: #ffffff !important;
    --primary: #ffffff !important;
    --secondary: #ffffff !important;
    --accent: #ffff00 !important;
    /* Желтый для акцента */
    --border-color: #ffffff !important;

    background: #000000 !important;
    color: #ffffff !important;
}

body.accessible.scheme-black a,
body.accessible.scheme-black .btn,
body.accessible.scheme-black button {
    color: #ffff00 !important;
    /* Желтые ссылки */
    text-decoration: underline !important;
    border: 2px solid #ffffff !important;
    background: #000000 !important;
}

body.accessible.scheme-black .card,
body.accessible.scheme-black .news-card,
body.accessible.scheme-black .specialty-card,
body.accessible.scheme-black .header,
body.accessible.scheme-black footer {
    background: #000000 !important;
    border: 1px solid #ffffff !important;
}

/* 3. СИНЯЯ СХЕМА (Темно-синим по голубому) */
body.accessible.scheme-blue {
    --bg-body: #9DD1FF !important;
    --bg-white: #9DD1FF !important;
    --bg-light: #76bcff !important;
    --text-main: #063462 !important;
    --text-secondary: #063462 !important;
    --primary: #063462 !important;
    --secondary: #063462 !important;
    --accent: #063462 !important;
    --border-color: #063462 !important;

    background: #9DD1FF !important;
    color: #063462 !important;
}

body.accessible.scheme-blue * {
    background-color: #9DD1FF !important;
    color: #063462 !important;
    border-color: #063462 !important;
}

body.accessible.scheme-blue img {
    filter: sepia(100%) hue-rotate(180deg) saturate(300%);
    opacity: 0.8;
}

/* --- РАЗМЕР ШРИФТА --- */
body.accessible.font-normal {
    font-size: 18px !important;
}

body.accessible.font-large {
    font-size: 24px !important;
}

body.accessible.font-large h1 {
    font-size: 1.5em !important;
}

body.accessible.font-large h2 {
    font-size: 1.4em !important;
}

body.accessible.font-xlarge {
    font-size: 30px !important;
}

body.accessible.font-xlarge h1 {
    font-size: 1.5em !important;
}

body.accessible.font-xlarge h2 {
    font-size: 1.4em !important;
}

/* --- ГАРНИТУРА (ШРИФТ) --- */
body.accessible.family-sans,
body.accessible.family-sans * {
    font-family: Arial, Helvetica, sans-serif !important;
}

body.accessible.family-serif,
body.accessible.family-serif * {
    font-family: "Times New Roman", Times, serif !important;
}

/* --- ИНТЕРВАЛЫ --- */
body.accessible.spacing-normal {
    letter-spacing: normal !important;
}

body.accessible.spacing-large,
body.accessible.spacing-large * {
    letter-spacing: 2px !important;
    line-height: 1.8 !important;
    /* Уменьшил с 2, т.к. сильно рвет верстку */
}

body.accessible.spacing-xlarge,
body.accessible.spacing-xlarge * {
    letter-spacing: 4px !important;
    line-height: 2.2 !important;
}

/* --- ОТКЛЮЧЕНИЕ ИЗОБРАЖЕНИЙ (Строгий режим) --- */
body.accessible.no-images img,
body.accessible.no-images svg,
body.accessible.no-images video,
body.accessible.no-images iframe,
body.accessible.no-images .hero-overlay,
body.accessible.no-images .news-img-wrap,
body.accessible.no-images .gallery-item img,
body.accessible.no-images .photo-item img,
body.accessible.no-images .specialty-image {
    display: none !important;
}

/* БРОНЕБОЙНОЕ отключение фоновых изображений (только картинки!) */
body.accessible.no-images *,
body.accessible.no-images .swiper-slide,
body.accessible.no-images .hero,
body.accessible.no-images [style*="background-image"] {
    background-image: none !important;
    /* Не трогаем background-color! */
}

/* Слайдер в режиме без картинок */
body.accessible.no-images .swiper-slide {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    padding: 30px 20px !important;
    border-bottom: 2px solid currentColor !important;
    margin-bottom: 20px !important;
    /* Возвращаем фон, чтобы текст читался, если он был белым на картинке */
    background-color: transparent !important;
}

/* Если схема белая или черная, фон задается глобально body */
/* Но карточкам нужно вернуть их границы и отступы */

body.accessible.no-images .hero {
    height: auto !important;
    min-height: auto !important;
    padding: 20px 0 !important;
    background-color: transparent !important;
}

body.accessible.no-images .hero-content {
    color: inherit !important;
    text-shadow: none !important;
    max-width: 100% !important;
    text-align: left !important;
    background: none !important;
    display: block !important;
    /* Force block to kill flex alignments */
}

/* Кнопки в слайдере в столбик или с отступами */
body.accessible.no-images .hero-btns {
    display: flex !important;
    flex-direction: column !important;
    /* В столбик чтобы не наезжали */
    gap: 15px !important;
    margin-top: 20px !important;
    align-items: flex-start !important;
}

body.accessible.no-images .hero-btns .btn {
    width: auto !important;
    max-width: 100% !important;
    display: inline-block !important;
    /* Fix inline-flex weirdness */
}

/* Восстановление кнопок и инпутов */
body.accessible .btn,
body.accessible button,
body.accessible input,
body.accessible .accessible-btn {
    border: 2px solid currentColor !important;
    color: var(--text-main) !important;
    /* ПРИНУДИТЕЛЬНО цвет текста как у всей темы */
    background: transparent !important;
    /* Прозрачный фон для контраста с рамкой */
}

body.accessible .btn:hover,
body.accessible button:hover {
    background: var(--text-main) !important;
    color: var(--bg-body) !important;
    /* Инверсия при наведении */
}

/* --- Слайдер / Дубликаты (Fix 3x Virtual Tour) --- */
/* Используем очень специфичный селектор и visibility: hidden, чтобы наверняка */
body.accessible.no-images .swiper-slide-duplicate,
body.accessible.no-images .swiper-slide.swiper-slide-duplicate,
body.accessible.no-images .swiper-duplicate {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Скрываем навигацию */
body.accessible.no-images .swiper-button-next,
body.accessible.no-images .swiper-button-prev,
body.accessible.no-images .swiper-pagination {
    display: none !important;
}

/* --- Глобальные фиксы для рамок (чтобы не было рамок вокруг ВСЕГО) --- */
/* Убираем рамки у div, span и прочих, оставляем только у значимых элементов */
/* Ранее было border: 2px solid ... для scheme-white * - это ошибка, если оно там есть */


/* --- ВОССТАНОВЛЕНИЕ СТИЛЕЙ КНОПКИ (были утеряны) --- */
.btn-accessible {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #1a237e;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.btn-accessible:hover {
    background: #3949ab;
    color: #fff;
}

.btn-accessible svg {
    fill: currentColor;
}

/* --- Слайдер / Дубликаты (Fix 3x Virtual Tour) --- */
/* Используем очень специфичный селектор и visibility: hidden, чтобы наверняка */
body.accessible.no-images .swiper-slide-duplicate,
body.accessible.no-images .swiper-slide.swiper-slide-duplicate {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* ПАНЕЛЬ УПРАВЛЕНИЯ */
.accessible-panel {
    display: none;
    background: #333;
    border-bottom: 2px solid #fff;
    padding: 15px;
    font-size: 16px;
    font-family: Arial, sans-serif;
}

body.accessible .accessible-panel {
    display: block;
}

/* Важные переопределения для элементов */
body.accessible .container {
    max-width: 100% !important;
    padding: 0 20px !important;
}

body.accessible * {
    box-shadow: none !important;
    text-shadow: none !important;
}
