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

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

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

@keyframes grow {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

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

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

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@keyframes bridgeBuild {
  0% {
    clip-path: inset(0 100% 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

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

.animate-fade-out {
  animation: fadeOut 0.4s ease-in forwards;
}

.animate-grow {
  animation: grow 0.5s ease-out forwards;
}

.animate-shimmer {
  animation: shimmer 2s infinite linear;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  background-size: 1000px 100%;
}

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

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out forwards;
}

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

.animate-bridge-build {
  animation: bridgeBuild 1s ease-out forwards;
}

/* Стили для табов */
.tab-button.active {
  border-bottom-color: #4A90E2;
  color: #4A90E2;
}

@media (max-width: 640px) {
  .tab-button {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}

/* Стили для FAQ */
.faq-icon {
  transition: transform 0.3s ease;
}

.faq-question.active {
  background-color: #F5F5F5;
}

.faq-answer {
  animation: fadeIn 0.3s ease-out;
}

/* Стили для валидации формы */
input.error,
textarea.error {
  border-color: #B7410E;
  background-color: #fff5f5;
}

.error-message {
  animation: fadeIn 0.3s ease-out;
}

/* Стили для уведомления об успешной отправке */
#success-notification {
  animation: slideInRight 0.4s ease-out forwards;
}

#success-notification.animate-fade-out {
  animation: fadeOut 0.4s ease-in forwards;
}

@media (max-width: 640px) {
  #success-notification {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
    padding: 1rem;
  }
}
