/* =====================================================
   MedSina — Performance fix: remove GPU-heavy effects
   ===================================================== */

/* ---- Kill all backdrop-filter (very expensive) ---- */
.feature-card,
.persona-card,
.upload-zone,
.faq-item,
.upload-text .format-tag {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ---- Remove filter:blur on pseudo-elements ---- */
.features::before,
.features::after {
  filter: none !important;
  animation: none !important;
  display: none !important;
}

/* ---- Limit background decoration animations ---- */

/* DNA: wave only 2 pairs instead of all 10 */
.ms-dna-pair,
.ms-pdna-pair,
.ms-faq-dna-pair {
  animation: none !important;
}

/* Keep only one subtle drift for crosses/pills/misc */
.ms-cross-1,.ms-cross-2,.ms-cross-3,.ms-cross-4,.ms-cross-5,.ms-cross-6,
.ms-pcross,.ms-faq-cross,.ms-ppill,.ms-faq-pill,.ms-med-cross,
.ms-pill-1,.ms-pill-2,.ms-pill-3,
.ms-pp1,.ms-pp2,.ms-pp3,
.ms-fp1,.ms-fp2,.ms-fp3,
.ms-med-icon,
.ms-bubble,
.ms-b1,.ms-b2,.ms-b3,
.ms-heart-icon {
  animation: none !important;
}

/* Atom rings: keep spinning but slow down */
.ms-atom-ring,
.ms-faq-atom-ring {
  animation-duration: 20s !important;
}

/* Blob drift: stop (was causing repaints on large areas) */
.ms-atom,
.ms-atom-1,
.ms-atom-2,
.ms-fatom1,
.ms-fatom2 {
  animation: none !important;
}
.ms-atom-ring { animation: ms-atom-spin 20s linear infinite !important }
.ms-atom-1 .ms-atom-ring:nth-child(2),
.ms-atom-2 .ms-atom-ring:nth-child(2),
.ms-fatom1 .ms-faq-atom-ring:nth-child(2),
.ms-fatom2 .ms-faq-atom-ring:nth-child(2) {
  animation: ms-atom-spin-r 28s linear infinite !important;
}

/* Step icon rings: remove pulsing rings (very heavy - they scale+opacity) */
.step-icon::before,
.step-icon::after {
  display: none !important;
}

/* Step icon: keep gradient bg animation but slow it */
.step-icon {
  animation: ms-gradient-bg 8s ease infinite !important;
  box-shadow: 0 8px 32px rgba(37,99,235,.3) !important;
}

/* Featured persona card: slow gradient */
.persona-featured {
  animation: ms-gradient-bg 10s ease infinite !important;
}

/* Emoji float: keep but simplify */
.persona-emoji {
  animation: ms-emoji-float 5s ease-in-out infinite !important;
}

/* Upload widget glow: remove */
.upload-demo-widget::before {
  animation: none !important;
  background: linear-gradient(135deg,#2563eb33,#0d948833) !important;
}

/* Upload icon bounce: keep but slow */
.upload-icon-wrap {
  animation: ms-upload-bounce 3s ease-in-out infinite !important;
}

/* Stethoscope: stop, just static */
.ms-steth-svg,
.ms-faq-steth {
  animation: none !important;
}

/* Heart beat: keep but no filter */
.ms-heart-icon {
  animation: ms-heart-beat 2.5s ease-in-out infinite !important;
}

/* Featured badge glow: remove box-shadow animation */
.persona-featured-badge {
  animation: none !important;
}

/* Step glow: remove */
.step-icon {
  animation: ms-gradient-bg 8s ease infinite !important;
}

/* Section blob drifts: stop */
.ms-steth-1,
.ms-steth-2,
.ms-faq-steth {
  animation: none !important;
}

/* Remove will-change where it was added incorrectly */
* { will-change: auto }
.feature-card,
.persona-card,
.step-icon {
  will-change: transform;
}

/* ---- Force GPU compositing only on key elements ---- */
.step-icon,
.feature-icon-wrap,
.persona-card,
.persona-emoji {
  transform: translateZ(0);
}

/* ---- Smooth scroll performance ---- */
.ms-med-bg,
.ms-upload-bg,
.ms-personas-bg,
.ms-faq-bg {
  /* Don't repaint on scroll */
  contain: strict;
}

/* ---- Убираем тяжёлый backdrop-filter только на картах (не navbar) ---- */
.feature-card,
.persona-card,
.upload-zone,
.faq-item,
.upload-text .format-tag,
.features::before,
.features::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ---- Медицинский фон: contain чтобы не вызывать layout при скролле ---- */
.ms-med-bg *, .ms-upload-bg *, .ms-personas-bg *, .ms-faq-bg * {
  animation-play-state: paused;
}

/* ---- Отключаем transition на box-shadow (дорогой repaint) ---- */
.feature-card, .persona-card, .faq-item, .step {
  transition: transform .2s ease !important;
}
