/* ============================================
   accessibility.css — версия с исправленным контрастом
   ============================================ */

/* Контейнер в шапке */
.header__a11y {
  display: flex;
  align-items: center;
  margin-left: 16px;
  position: relative;
}

/* Кнопка: только иконка */
#a11yShow {
  position: static;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, transform 0.2s;
}
#a11yShow:hover, #a11yShow:focus {
  opacity: 0.7;
  transform: scale(1.1);
  outline: none;
}
#a11yShow svg {
  display: block;
  stroke: currentColor;
}

/* Выпадающее меню */
.a11y-toggle {
  position: absolute;
  top: 36px;
  left: 0;
  z-index: 10000;
  display: none;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  min-width: 150px;
  font-family: Arial, sans-serif;
}
.a11y-toggle.is-open { display: flex; }
.a11y-toggle button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #333;
  cursor: pointer;
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.a11y-toggle button:hover, .a11y-toggle button:focus {
  background: #eee;
  color: #000;
  outline: none;
}
.a11y-toggle button.active {
  background: #003366;
  color: #fff;
  font-weight: 600;
}

/* === Крупный шрифт === */
html.a11y a:not(.u-btn) { font-size: 1.25rem; }
html.a11y .btn1, html.a11y .btn-second1 { font-size: 1.1rem; }
html.a11y .section-title { font-size: 1.5rem; }
html.a11y p { font-size: 1.15rem; }
html.a11y h2 { font-size: 1.5rem; }
html.a11y h3 { font-size: 1.3rem; }
html.a11y h4 { font-size: 1.2rem; }
html.a11y h5 { font-size: 1.1rem; }
html.a11y .header__phone a { font-size: 1.3rem; }

@media (max-width: 991px) {
  html.a11y a:not(.u-btn) { font-size: 1.15rem; }
  html.a11y .section-title { font-size: 1.35rem; }
  html.a11y p { font-size: 1.1rem; }
}
@media (max-width: 767px) {
  html.a11y a:not(.u-btn) { font-size: 1.1rem; }
  html.a11y .section-title { font-size: 1.2rem; }
  html.a11y p { font-size: 1.05rem; }
}
@media (max-width: 575px) {
  html.a11y a:not(.u-btn) { font-size: 1rem; }
  html.a11y .section-title { font-size: 1.1rem; }
  html.a11y p { font-size: 1rem; }
  .a11y-toggle button { font-size: 12px; padding: 6px 10px; }
  #a11yShow { width: 28px; height: 28px; }
}

/* ========================================
   ВЫСОКИЙ КОНТРАСТ
   ======================================== */

/* Фон и базовый текст */
html.a11y.high-contrast,
html.a11y.high-contrast body {
  background: #000 !important;
  color: #fff !important;
}

/* Секции — все на чёрном фоне */
html.a11y.high-contrast .header,
html.a11y.high-contrast .hero,
html.a11y.high-contrast .about,
html.a11y.high-contrast .advantages,
html.a11y.high-contrast .doctors,
html.a11y.high-contrast .gallery,
html.a11y.high-contrast .price-preview,
html.a11y.high-contrast .call-form,
html.a11y.high-contrast .contacts,
html.a11y.high-contrast .prices {
  background: #000 !important;
  color: #fff !important;
}

/* Шапка */
html.a11y.high-contrast .header {
  border-bottom: 2px solid #fff !important;
  box-shadow: none !important;
}
html.a11y.high-contrast .header__top { border-bottom: 1px solid #555 !important; }

/* Заголовки — белые */
html.a11y.high-contrast h1,
html.a11y.high-contrast h2,
html.a11y.high-contrast h3,
html.a11y.high-contrast h4,
html.a11y.high-contrast h5,
html.a11y.high-contrast .section-title,
html.a11y.high-contrast .hero__title,
html.a11y.high-contrast .call-form__title,
html.a11y.high-contrast .contacts__card-title,
html.a11y.high-contrast .prices__card-title {
  color: #fff !important;
}

/* Обычный текст — белый */
html.a11y.high-contrast p,
html.a11y.high-contrast span,
html.a11y.high-contrast li,
html.a11y.high-contrast .hero__intro,
html.a11y.high-contrast .about__intro,
html.a11y.high-contrast .about__card__desc,
html.a11y.high-contrast .advantage__desc,
html.a11y.high-contrast .doctors__intro,
html.a11y.high-contrast .gallery__intro,
html.a11y.high-contrast .price-preview__intro,
html.a11y.high-contrast .call-form__subtitle,
html.a11y.high-contrast .call-form__checkbox-text,
html.a11y.high-contrast .contact-item__label,
html.a11y.high-contrast .footer__logo-desc,
html.a11y.high-contrast .doctor-card__exp,
html.a11y.high-contrast .about__card__title,
html.a11y.high-contrast .advantage__title,
html.a11y.high-contrast .prices__intro,
html.a11y.high-contrast .prices__disclaimer {
  color: #fff !important;
}

/* Подзаголовки — светло-серые */
html.a11y.high-contrast .header__phone p,
html.a11y.high-contrast .header__logo p,
html.a11y.high-contrast .footer__logo-tagline,
html.a11y.high-contrast .footer__copyright,
html.a11y.high-contrast .footer__disclaimer,
html.a11y.high-contrast .contacts__legal,
html.a11y.high-contrast .contact-item__label {
  color: #ccc !important;
}

/* Ссылки — жёлтые с подчёркиванием */
html.a11y.high-contrast a {
  color: #ff0 !important;
  text-decoration: underline !important;
}
html.a11y.high-contrast a:hover {
  background: #ff0 !important;
  color: #000 !important;
  text-decoration: none !important;
}

/* Навигация */
html.a11y.high-contrast .header__nav a {
  color: #ff0 !important;
  text-decoration: none !important;
}
html.a11y.high-contrast .header__nav a:hover {
  text-decoration: underline !important;
}
html.a11y.high-contrast .header__nav a.active {
  color: #ff0 !important;
  font-weight: 700 !important;
  border-bottom: 3px solid #ff0 !important;
}

/* Кнопки */
html.a11y.high-contrast a.btn1,
html.a11y.high-contrast button.btn1,
html.a11y.high-contrast .call-form__btn,
html.a11y.high-contrast .header__cta .btn1,
html.a11y.high-contrast .hero__btns .btn1,
html.a11y.high-contrast .header__top-btn,
html.a11y.high-contrast .modal-submit {
  background: #ff0 !important;
  background-image: none !important;
  color: #000 !important;
  border: 2px solid #ff0 !important;
  font-weight: 700 !important;
  box-shadow: none !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  padding: 14px 32px !important;
}
html.a11y.high-contrast a.btn1:hover,
html.a11y.high-contrast button.btn1:hover,
html.a11y.high-contrast .call-form__btn:hover,
html.a11y.high-contrast .header__cta .btn1:hover,
html.a11y.high-contrast .hero__btns .btn1:hover,
html.a11y.high-contrast .header__top-btn:hover,
html.a11y.high-contrast .modal-submit:hover {
  background: #000 !important;
  background-image: none !important;
  color: #ff0 !important;
  border: 2px solid #ff0 !important;
  transform: none !important;
}

/* Вторичные кнопки */
html.a11y.high-contrast a.btn-second1,
html.a11y.high-contrast button.btn-second1,
html.a11y.high-contrast .hero__btns .btn-second1 {
  background: transparent !important;
  background-image: none !important;
  color: #ff0 !important;
  border: 2px solid #ff0 !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}
html.a11y.high-contrast a.btn-second1:hover,
html.a11y.high-contrast button.btn-second1:hover,
html.a11y.high-contrast .hero__btns .btn-second1:hover {
  background: #ff0 !important;
  background-image: none !important;
  color: #000 !important;
}

/* Логотип */
html.a11y.high-contrast .header__logo h1 { color: #fff !important; }
html.a11y.high-contrast .header__phone a { color: #fff !important; }
html.a11y.high-contrast .header__info-value { color: #fff !important; }
html.a11y.high-contrast .header__info-label { color: #ccc !important; }

/* Карты врачей */
html.a11y.high-contrast .doctor-card {
  background: #111 !important;
  border: 2px solid #fff !important;
  box-shadow: none !important;
}
html.a11y.high-contrast .doctor-card__name { color: #fff !important; }
html.a11y.high-contrast .doctor-card__spec { color: #ff0 !important; }

/* Карточки «О нас» */
html.a11y.high-contrast .about__card {
  background: #111 !important;
  border: 2px solid #fff !important;
}
html.a11y.high-contrast .about__card__icon {
  background: #ff0 !important;
  color: #000 !important;
  border: 2px solid #ff0 !important;
}

/* Иконки преимуществ */
html.a11y.high-contrast .advantage__icon {
  background: #ff0 !important;
  color: #000 !important;
}

/* Иконки контактов */
html.a11y.high-contrast .contact-item__icon {
  background: #ff0 !important;
  color: #000 !important;
}
html.a11y.high-contrast .contact-item__value,
html.a11y.high-contrast .contact-item__value a { color: #fff !important; }
html.a11y.high-contrast .contact-item__value a { text-decoration: underline !important; }

/* Карточка контактов */
html.a11y.high-contrast .contacts__card {
  background: #111 !important;
  border: 2px solid #fff !important;
}
html.a11y.high-contrast .contacts__legal {
  border-top: 1px solid #555 !important;
  color: #ccc !important;
}

/* Форма ввода */
html.a11y.high-contrast .call-form__input,
html.a11y.high-contrast .modal-field input {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}
html.a11y.high-contrast .call-form__input:focus,
html.a11y.high-contrast .modal-field input:focus {
  border-color: #ff0 !important;
  outline: none !important;
}
html.a11y.high-contrast .call-form__label,
html.a11y.high-contrast .modal-field label { color: #fff !important; }
html.a11y.high-contrast .call-form__checkbox { accent-color: #ff0 !important; }

/* Подвал */
html.a11y.high-contrast .footer {
  background: #000 !important;
  color: #ccc !important;
  border-top: 2px solid #fff !important;
}
html.a11y.high-contrast .footer__col-title { color: #ff0 !important; }
html.a11y.high-contrast .footer__col-links a { color: #ff0 !important; }
html.a11y.high-contrast .footer__bottom { border-top: 1px solid #555 !important; }

/* Cookie-баннер */
html.a11y.high-contrast .cookie-banner {
  background: #000 !important;
  border-top: 2px solid #fff !important;
}
html.a11y.high-contrast .cookie-banner p { color: #fff !important; }
html.a11y.high-contrast .cookie-banner a { color: #ff0 !important; }
html.a11y.high-contrast .cookie-banner button { background: #ff0 !important; color: #000 !important; }

/* Панель доступности в режиме контраста */
html.a11y.high-contrast #a11yPanel {
  background: #000 !important;
  border: 2px solid #ff0 !important;
}
html.a11y.high-contrast #a11yPanel button {
  background: #000 !important;
  color: #ff0 !important;
  border: 1px solid #ff0 !important;
}
html.a11y.high-contrast #a11yPanel button:hover {
  background: #ff0 !important;
  color: #000 !important;
}
html.a11y.high-contrast #a11yPanel button.active {
  background: #ff0 !important;
  color: #000 !important;
}

/* Картинки НЕ инвертируем */
html.a11y.high-contrast .hero__img img,
html.a11y.high-contrast .gallery__item,
html.a11y.high-contrast .call-form__img,
html.a11y.high-contrast .doctor-card img,
html.a11y.high-contrast .header__logo img,
html.a11y.high-contrast .header__social img,
html.a11y.high-contrast .header__social-link svg,
html.a11y.high-contrast .footer__logo-link img {
  filter: none !important;
  -webkit-filter: none !important;
}

/* Галерея */
html.a11y.high-contrast .gallery__item {
  border: 2px solid #fff !important;
  box-shadow: none !important;
}

/* Картинка в форме */
html.a11y.high-contrast .call-form__img {
  border: 2px solid #fff !important;
  box-shadow: none !important;
}

/* Карты */
html.a11y.high-contrast .contacts__map {
  border: 2px solid #fff !important;
  box-shadow: none !important;
}

/* Модальное окно */
html.a11y.high-contrast .modal-overlay { background: rgba(0,0,0,0.8) !important; }
html.a11y.high-contrast .modal-box {
  background: #111 !important;
  border: 2px solid #fff !important;
}
html.a11y.high-contrast .modal-title { color: #fff !important; }
html.a11y.high-contrast .modal-subtitle { color: #ccc !important; }
html.a11y.high-contrast .modal-checkbox-row span { color: #fff !important; }
html.a11y.high-contrast .modal-close { color: #ff0 !important; }
html.a11y.high-contrast .modal-close:hover { color: #fff !important; }

/* === Таблицы прайса в режиме контраста === */
html.a11y.high-contrast .prices__card {
  background: #111 !important;
  border: 2px solid #fff !important;
  box-shadow: none !important;
}
html.a11y.high-contrast .prices__card-title {
  background: #111 !important;
  color: #fff !important;
  border-bottom: 2px solid #fff !important;
}
html.a11y.high-contrast .prices__table th { color: #ccc !important; }
html.a11y.high-contrast .prices__table td { color: #fff !important; }
html.a11y.high-contrast .prices__num { color: #aaa !important; }
html.a11y.high-contrast .prices__name { color: #fff !important; }
html.a11y.high-contrast .prices__price { color: #ff0 !important; }
html.a11y.high-contrast .prices__table tr td { border-bottom: 1px solid #333 !important; }
html.a11y.high-contrast .prices__table tr:hover td { background: #1a1a1a !important; }

/* === Чёрно-белый режим === */
html.a11y.mono body {
  filter: grayscale(100%) !important;
  -webkit-filter: grayscale(100%) !important;
}
/* === Крупный шрифт для таблиц прайса === */
html.a11y .price-table th { font-size: 1.1rem !important; }
html.a11y .price-table td { font-size: 1.15rem !important; }
html.a11y .price-table__caption { font-size: 1.4rem !important; }

@media (max-width: 767px) {
  html.a11y .price-table th { font-size: 1rem !important; }
  html.a11y .price-table td { font-size: 1.05rem !important; }
}

/* === Высокий контраст для таблиц прайса === */
html.a11y.high-contrast .price-table {
  box-shadow: none !important;
  border: 2px solid #fff !important;
  border-radius: 16px !important;
}
html.a11y.high-contrast .price-table__caption {
  background: #ff0 !important;
  color: #000 !important;
}
html.a11y.high-contrast .price-table th {
  background: #111 !important;
  color: #ff0 !important;
  border-bottom: 2px solid #ff0 !important;
}
html.a11y.high-contrast .price-table td {
  background: #000 !important;
  color: #fff !important;
  border-bottom: 1px solid #333 !important;
}
html.a11y.high-contrast .price-table tr:hover td {
  background: #1a1a1a !important;
}
html.a11y.high-contrast .price-table td:last-child {
  color: #ff0 !important;
}
/* === Лицензии в режиме контраста === */
html.a11y.high-contrast .licenses {
  background: #000 !important;
  color: #fff !important;
}
html.a11y.high-contrast .licenses__intro {
  color: #fff !important;
}
html.a11y.high-contrast .licenses__item {
  border: 2px solid #fff !important;
  box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}
html.a11y.high-contrast .licenses__item:hover {
  border-color: #ff0 !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Лайтбокс в режиме контраста */
html.a11y.high-contrast .lightbox {
  background: rgba(0,0,0,0.92) !important;
}
html.a11y.high-contrast .lightbox__image {
  border: 2px solid #fff !important;
  box-shadow: none !important;
  filter: none !important;
  -webkit-filter: none !important;
}
html.a11y.high-contrast .lightbox__close {
  color: #ff0 !important;
}
html.a11y.high-contrast .lightbox__close:hover {
  color: #fff !important;
}
