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

/* Предотвращение бокового скролла */
html {
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

@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.9);
    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(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

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

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

.animate-shimmer {
  animation: shimmer 2s infinite;
  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-rotate {
  animation: rotate 2s linear infinite;
}

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

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

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

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

.delay-500 {
  animation-delay: 0.5s;
}

/* Активный класс для навигации */
nav a.active {
  position: relative;
}

nav a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: currentColor;
}

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

[data-tab-panel] {
  transition: opacity 0.3s ease;
}

/* Стили для FAQ */
[data-faq-item] {
  transition: all 0.3s ease;
}

[data-faq-item].faq-open [data-faq-question] svg {
  transform: rotate(180deg);
}

[data-faq-answer] {
  transition: all 0.3s ease;
}

/* Стили для формы */
.form-field {
  position: relative;
}

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

/* Стили для уведомления об успехе */
.success-notification {
  animation: slideInRight 0.4s ease-out;
}

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

/* Дополнительная защита от переполнения - только для предотвращения горизонтального скролла */
.container {
  max-width: 100%;
}
