/* ===== Общие доработки сайта «Жемчуг» (подключается на всех страницах) ===== */

/* убираем горизонтальную прокрутку на узких экранах */
html,body{overflow-x:clip;max-width:100%}

/* блок преимуществ на главной — в один столбец на мобильных (перебиваем инлайновое правило ≤820px) */
@media(max-width:620px){ .adv-grid{grid-template-columns:1fr !important;gap:16px !important} }

/* --- (5) Логотип не сжимается на узких экранах; ужимается кнопка «Записаться» --- */
header a:has(img[alt="Жемчуг"]){flex:0 0 auto}
header img[alt="Жемчуг"]{flex:none;width:auto !important;max-width:none !important}
@media(max-width:440px){
  .btn-primary{padding:9px 13px !important;font-size:13px !important}
  header > div{gap:12px !important}
}
@media(max-width:360px){
  .btn-primary{padding:8px 11px !important;font-size:12px !important}
  header > div{gap:10px !important;padding-left:14px !important;padding-right:14px !important}
}

/* --- (6) Кнопка «Версия для слабовидящих» видна и на мобильных (компактная иконка) --- */
@media(max-width:620px){
  .topbar-a11y{display:inline-flex !important;align-items:center;font-size:0 !important;opacity:1 !important}
  .topbar-a11y::after{content:"👁";font-size:16px}
}

/* --- (4) Соц-иконки: ровный размер вместо букв --- */
a.soc svg{display:block;width:20px;height:20px}
a.soc-msgr svg{width:20px !important;height:20px !important}

/* кнопка «Сертификат 500₽» (квиз) в CTA-блоках */
.cert-btn{transition:background .15s}
.cert-btn:hover{background:#df8593}

/* мессенджеры в шапке: на десктопе — иконки в хедере, на мобиле — в бургер-меню */
.hdr-msgr a{transition:transform .15s}.hdr-msgr a:hover{transform:translateY(-1px)}
@media(max-width:820px){ .hdr-msgr{display:none !important} }

/* иконки мессенджеров в баннере (герое) после кнопки «Позвонить» — только мобильная версия */
.hero-msgr{display:none !important;transition:transform .15s}
@media(max-width:820px){ .hero-msgr{display:inline-flex !important} }
.hero-msgr:hover{transform:translateY(-2px)}
.hero-msgr svg{width:24px !important;height:24px !important}

/* чекбокс согласия в формах */
.consent-check{display:flex;gap:9px;align-items:flex-start;font-size:12.5px;color:#5C7480;line-height:1.4;text-align:left;cursor:pointer}
.consent-check input{margin-top:2px;flex:none;width:16px;height:16px;accent-color:#1C7CB8;cursor:pointer}
.consent-check a{color:#14608F;font-weight:700;text-decoration:underline}

/* cookie-уведомление */
#cookieNote{position:fixed;left:16px;right:16px;bottom:16px;max-width:620px;margin:0 auto;z-index:200;
  background:#0F3A50;color:#DCEAF2;border-radius:16px;padding:15px 18px;
  display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:center;
  box-shadow:0 20px 50px -16px rgba(0,0,0,.5);font-family:'Manrope',system-ui,sans-serif;font-size:13.5px;line-height:1.45}
#cookieNote span{flex:1;min-width:200px}
#cookieNote a{color:#9CD7EF;text-decoration:underline}
#cookieNote button{flex:none;background:#1C7CB8;color:#fff;border:none;border-radius:30px;
  padding:10px 22px;font-weight:700;font-size:14px;cursor:pointer;font-family:inherit;transition:background .15s}
#cookieNote button:hover{background:#14608F}
.legal-link:hover{color:#fff !important}

/* --- (6) Версия для слабовидящих: чёрно-белый высококонтрастный режим --- */
html.a11y body{zoom:var(--a11y-zoom,1.18)}
/* убираем цвета, фоновые картинки/градиенты, тени и анимации */
html.a11y *{
  background-image:none !important;
  box-shadow:none !important;
  text-shadow:none !important;
  animation:none !important;
  transition:none !important;
}
html.a11y, html.a11y body{background:#fff !important}
html.a11y *:not(a):not(button):not(svg):not(path){
  color:#000 !important; background-color:#fff !important; border-color:#000 !important;
}
/* ссылки — синие подчёркнутые на белом */
html.a11y a, html.a11y a *{color:#0a32a0 !important; background-color:#fff !important; text-decoration:underline !important}
/* кнопки и кнопки-ссылки — белым по чёрному, с рамкой */
html.a11y button, html.a11y .btn-primary, html.a11y .btn-outline, html.a11y .price-btn,
html.a11y .floatcta, html.a11y .foot-cta, html.a11y .cert-btn, html.a11y a.soc, html.a11y #burger{
  color:#fff !important; background:#000 !important; border:2px solid #000 !important; text-decoration:none !important;
}
html.a11y a.soc svg{color:#fff !important}
html.a11y #burger span{background:#fff !important}
/* изображения — без цвета */
html.a11y img{filter:grayscale(1) contrast(1.05)}

/* плавающая кнопка выхода из режима */
#a11yExit{position:fixed;left:50%;transform:translateX(-50%);bottom:20px;z-index:400;
  background:#0F3A50;color:#fff;border:none;cursor:pointer;border-radius:40px;
  padding:11px 20px;font:700 14px Manrope,system-ui,sans-serif;
  box-shadow:0 12px 30px -10px rgba(15,58,80,.8);display:flex;align-items:center;gap:8px}
#a11yExit:hover{background:#14608F}
#a11yBtns{display:inline-flex;gap:6px;margin-left:4px}
#a11yBtns button{width:30px;height:30px;border-radius:50%;border:1px solid rgba(255,255,255,.5);
  background:transparent;color:#fff;cursor:pointer;font:700 13px Manrope,system-ui,sans-serif;line-height:1}
#a11yBtns button:hover{background:rgba(255,255,255,.18)}

/* --- Производительность: дорогой backdrop-filter тормозит ввод в модалке/лайтбоксе --- */
[style*="backdrop-filter:blur(5px)"]{backdrop-filter:none !important;-webkit-backdrop-filter:none !important;background:rgba(15,58,80,.62) !important}
[style*="backdrop-filter:blur(4px)"]{backdrop-filter:none !important;-webkit-backdrop-filter:none !important}
header[style*="backdrop-filter:blur(10px)"]{backdrop-filter:none !important;-webkit-backdrop-filter:none !important}
/* пока открыта модалка — останавливаем фоновые анимации (иначе полупрозрачный оверлей перерисовывается на каждый кадр) */
html.modal-open *{animation-play-state:paused !important}
/* надёжная блокировка прокрутки фона + гарантированно без размытия (главные причины лагов) */
html.modal-open, html.modal-open body{overflow:hidden !important}
html.modal-open #bookingModal{backdrop-filter:none !important;-webkit-backdrop-filter:none !important}
