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

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

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

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

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

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

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

@keyframes shimmer {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

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

@keyframes pageTurn {
  0% {
    transform: perspective(1000px) rotateY(0deg);
  }
  50% {
    transform: perspective(1000px) rotateY(-10deg);
  }
  100% {
    transform: perspective(1000px) rotateY(0deg);
  }
}

@keyframes timeFlow {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

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

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out;
}

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

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

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

.animate-shimmer {
  animation: shimmer 3s ease-in-out infinite;
}

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

.animate-page-turn {
  animation: pageTurn 2s ease-in-out infinite;
}

.animate-time-flow {
  animation: timeFlow 4s linear infinite;
}

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

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

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

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

/* Плавное появление при скролле */
.fade-in-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

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

[data-tab-panel] {
  transition: opacity 0.3s ease-in-out;
  animation: fadeIn 0.3s ease-in-out;
}

/* Стили для валидации формы */
.error-message {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #A0522D;
}

input.border-rust-iron,
textarea.border-rust-iron {
  border-color: #A0522D;
}

input.ring-rust-iron,
textarea.ring-rust-iron {
  box-shadow: 0 0 0 2px rgba(160, 82, 45, 0.2);
}

/* Стили для FAQ */
.faq-answer {
  animation: fadeIn 0.3s ease-in-out;
}

.faq-icon {
  transition: transform 0.3s ease-in-out;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
  /* Улучшение отступов на мобильных */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Табы на мобильных - вертикальный скролл если нужно */
  [data-tab-button] {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  /* Улучшение читаемости текста на маленьких экранах */
  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.75rem;
  }

  /* Улучшение отступов в секциях */
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}
