*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font: inherit; color: inherit; }

/* ===== STICKY CTA ===== */
.sticky-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background: var(--color-coral-500);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border-radius: 50px;
  box-shadow: 0 6px 24px rgba(229, 83, 61, 0.35), 0 2px 8px rgba(0,0,0,0.1);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
.sticky-cta.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 88, 10, 0.45), 0 4px 12px rgba(0,0,0,0.12);
}
.sticky-cta svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .sticky-cta {
    bottom: 16px;
    right: 16px;
    padding: 12px 20px;
    font-size: 14px;
  }
}

/* ===== STICKY CHAT ===== */
@keyframes chatSpin {
  0%   { transform: rotate(0deg) scale(1); }
  10%  { transform: rotate(360deg) scale(1.08); }
  14%  { transform: rotate(360deg) scale(1); }
  100% { transform: rotate(360deg) scale(1); }
}
.sticky-chat {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
.sticky-chat.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-chat.visible .sticky-chat__logo {
  animation: chatSpin 5s ease-in-out infinite;
}
.sticky-chat:hover .sticky-chat__logo {
  animation: none;
  transform: scale(1.1);
  transition: transform 0.2s ease;
}
.sticky-chat__logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(229,83,61,0.45));
}
@media (max-width: 767px) {
  .sticky-chat {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
  }
  .sticky-chat__logo { width: 46px; height: 46px; }
}

/* ===== FOOTER BRAND ROW ===== */
.footer__brand-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.footer__brand-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.footer__brand-row .footer__brand-logo {
  height: 95px;
  width: auto;
  margin-bottom: 16px;
  filter: none;
}
.footer__brand-row .footer__brand-text {
  margin: 0;
}
.footer__download-img {
  width: 180px;
  height: auto;
  border-radius: 12px;
  flex-shrink: 0;
}

/* ===== FOOTER PAYMENT ICONS ===== */
.footer__payments {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.pay-icon {
  width: 60px;
  height: 40px;
  border-radius: 6px;
}

/* Sticky CTA — B2B variant (teal) */
.sticky-cta.sticky-cta--b2b {
  background: var(--color-teal-500);
  box-shadow: 0 8px 28px rgba(15, 64, 64, 0.32);
}
.sticky-cta.sticky-cta--b2b:hover {
  background: var(--color-teal-600);
}

/* ===== FOUC PREVENTION =====
   Скрываем переводимые тексты до выполнения setLang()
   html.lang-ready снимается сразу после setLang() в app.js и doctors.html
   Таймаут 300ms — failsafe если JS упадёт */
html:not(.lang-ready) [data-i18n],
html:not(.lang-ready) [data-i18n-html],
html:not(.lang-ready) [data-i18n-placeholder] {
  visibility: hidden;
}

/* Failsafe: анимация снимает скрытие через 500ms если JS не добавил lang-ready */
html:not(.lang-ready) [data-i18n],
html:not(.lang-ready) [data-i18n-html] {
  animation: langReveal 0s 500ms forwards;
}
@keyframes langReveal { to { visibility: visible; } }
