/* Анимации */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.slide-in {
  animation: slideIn 0.5s ease forwards;
}

.pulse {
  animation: pulse 2s ease infinite;
}

/* Back-to-top кнопка */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary, #2A5B9A);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--transition-normal) var(--ease-quick),
              transform var(--transition-normal) var(--ease-quick),
              background var(--transition-fast),
              box-shadow var(--transition-fast);
  z-index: 150;
  cursor: pointer;
  border: none;
  font-size: 1.2rem;
  box-shadow: 0 4px 14px rgba(42, 91, 154, 0.3);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent, #E67E22);
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
  transform: translateY(-2px);
}

.back-to-top:active {
  transform: scale(0.92) translateY(0);
  transition-duration: var(--transition-fast);
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary, #2A5B9A), var(--accent, #E67E22));
  width: 0%;
  transition: none;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(230, 126, 34, 0.5);
}
