/* Анимации появления */
.fade-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Пульсация для бейджа */
.popular-badge {
  animation: bounce 2s ease infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
  60% { transform: translateY(-3px); }
}

/* Эффект при наведении на карточки */
.card {
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Анимация для кнопок */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}

.btn:active::after {
  width: 200px;
  height: 200px;
}

/* Анимация для бургер-меню */
.burger span {
  transition: all 0.3s ease;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 6px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -6px);
}

/* Анимация для иконок в футере */
.footer-social a {
  transition: transform 0.3s ease;
}

.footer-social a:hover {
  transform: translateY(-3px);
}

/* Анимация для хедера при скролле */
.header {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
  background-color: rgba(255,255,255,0.98);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

/* Анимация для выделения активного пункта меню */
.nav a.active {
  color: var(--color-secondary);
  position: relative;
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-secondary);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { width: 0; }
  to { width: 100%; }
}

/* Анимация для модальных окон */
.modal.active {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}