/* Кастомные анимации для проекта [site-name] */

/* Fade-in анимация */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade-out анимация */
@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Рост элемента (как рост каньона) */
@keyframes grow {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Мерцание (как свет в каньоне) */
@keyframes shimmer {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
  100% {
    opacity: 1;
  }
}

/* Спуск в глубину (вертикальное движение) */
@keyframes descend {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Восход (движение снизу вверх) */
@keyframes ascend {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Пульсация (как эхо в каньоне) */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Скольжение слева */
@keyframes slideInLeft {
  from {
    transform: translateX(-50px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Скольжение справа */
@keyframes slideInRight {
  from {
    transform: translateX(50px);
    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-in-out;
}

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

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

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

.animate-descend {
  animation: descend 0.8s ease-out;
}

.animate-ascend {
  animation: ascend 0.8s ease-out;
}

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

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

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

.animate-rotate {
  animation: rotate 2s linear infinite;
}

/* Плавное появление при скролле */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  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: #CD5C5C;
  border-bottom-color: #CD5C5C;
}

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

/* Стили для FAQ */
.faq-question {
  cursor: pointer;
  user-select: none;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.faq-answer:not(.hidden) {
  max-height: 500px;
  animation: fadeIn 0.3s ease-in-out;
}

/* Стили для ошибок формы */
input.border-red-500,
textarea.border-red-500 {
  border-color: #ef4444;
}

input:focus.border-red-500,
textarea:focus.border-red-500 {
  border-color: #ef4444;
  ring-color: #ef4444;
}

/* Стили для уведомления об успехе */
.success-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 400px;
  width: calc(100% - 40px);
  opacity: 0;
  transform: translateX(400px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.success-notification.show {
  opacity: 1;
  transform: translateX(0);
}

.success-notification-content {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s ease-out;
}

.success-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: white;
}

.success-notification-text {
  flex: 1;
}

.success-title {
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 4px 0;
  color: white;
}

.success-message {
  font-size: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 640px) {
  .success-notification {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
    max-width: none;
  }

  .success-notification-content {
    padding: 14px 16px;
  }

  .success-title {
    font-size: 15px;
  }

  .success-message {
    font-size: 13px;
  }
}
