/* Кастомные анимации для проекта */

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

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

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

/* Классы для применения анимаций */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out forwards;
}

.animate-pulse-custom {
  animation: pulse 2s ease-in-out infinite;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out forwards;
}

.animate-count-up {
  animation: countUp 0.8s ease-out forwards;
}

/* Задержки для последовательной анимации */
.delay-100 {
  animation-delay: 0.1s;
  opacity: 0;
}

.delay-200 {
  animation-delay: 0.2s;
  opacity: 0;
}

.delay-300 {
  animation-delay: 0.3s;
  opacity: 0;
}

.delay-400 {
  animation-delay: 0.4s;
  opacity: 0;
}

/* Плавное появление при скролле */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Анимация для статистики */
.stat-number {
  transition: transform 0.3s ease;
}

.stat-number:hover {
  transform: scale(1.1);
}

/* Плавное открытие бургер-меню */
.burger-menu-transition {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Анимация для карточек команды */
.team-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
  transform: translateY(-5px);
}

/* Анимация для отзывов */
.testimonial-card {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Плавное появление cookie banner */
.cookie-banner-enter {
  animation: slideInUp 0.4s ease-out forwards;
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Анимация для кнопок */
.btn-hover {
  transition: all 0.3s ease;
}

.btn-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Активная ссылка навигации (Главная на главной странице) */
.nav-link--active {
  color: #2563eb;
  font-weight: 600;
  border-bottom: 2px solid #2563eb;
}

/* Стили для бургер-меню */
[data-burger-menu] {
  transition: transform 0.3s ease-in-out;
}

[data-burger-menu].active {
  transform: translateX(0);
}

[data-burger-overlay].active {
  opacity: 1;
  pointer-events: auto;
}

[data-burger-toggle].active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

[data-burger-toggle].active span:nth-child(2) {
  opacity: 0;
}

[data-burger-toggle].active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Стили для Swiper навигации */
.testimonials-swiper .swiper-button-prev,
.testimonials-swiper .swiper-button-next {
  color: #3b82f6;
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.testimonials-swiper .swiper-button-prev:after,
.testimonials-swiper .swiper-button-next:after {
  font-size: 18px;
  font-weight: bold;
}

.testimonials-swiper .swiper-button-prev:hover,
.testimonials-swiper .swiper-button-next:hover {
  background: #3b82f6;
  color: white;
}

/* Адаптивность: минимальные области нажатия и переносы */
@media (max-width: 640px) {
  .testimonials-swiper .swiper-button-prev,
  .testimonials-swiper .swiper-button-next {
    width: 40px;
    height: 40px;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* Предотвращение горизонтального скролла на мобильных */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* FAQ: скрытый ответ по умолчанию, раскрытие по клику */
[data-faq-body] {
  display: none;
  overflow: hidden;
}

.faq-item--open [data-faq-body] {
  display: block;
}

.faq-item [data-faq-heading] {
  cursor: pointer;
  user-select: none;
}

.faq-item [data-faq-heading]:hover {
  color: #2563eb;
}

.faq-item--open .faq-item__icon {
  transform: rotate(180deg);
}
