/* Кастомные анимации */

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

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

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

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

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

@keyframes wave {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes morph {
  0%, 100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  }
  34% {
    border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
  }
  67% {
    border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

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

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

.animate-slide-down {
  animation: slideDown 0.8s ease-out;
}

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

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

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

.animate-morph {
  animation: morph 8s ease-in-out infinite;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

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

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

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

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

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

/* Active navigation link */
nav a.active {
  color: #006994;
  font-weight: 600;
}

/* Active footer link */
footer nav a.active {
  color: #ffffff;
  font-weight: 600;
}

/* Tabs styles */
.tab-button.active {
  background-color: white;
  color: #006994;
  border-bottom-color: #006994;
}

.tab-content {
  display: block;
}

.tab-content.hidden {
  display: none;
}

/* Mobile responsive adjustments for tabs */
@media (max-width: 640px) {
  .tab-button {
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
    min-width: 100px;
  }

  .tab-content-wrapper {
    padding: 1rem;
  }

  .tab-content h3 {
    font-size: 1.25rem;
  }

  .tab-content p {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
}

/* General mobile improvements */
@media (max-width: 768px) {
  /* Better spacing for sections */
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  /* Hero section adjustments */
  .hero-section h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  /* Better text readability */
  p {
    line-height: 1.7;
  }

  /* Footer adjustments */
  footer .grid {
    gap: 2rem;
  }

  /* Team cards spacing */
  .team-card {
    margin-bottom: 1.5rem;
  }

  /* Testimonials spacing */
  .testimonial-card {
    margin-bottom: 1.5rem;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .tab-button {
    font-size: 0.8125rem;
    padding: 0.625rem 0.375rem;
    min-width: 90px;
  }
}

/* FAQ icon rotation */
.faq-icon.rotate-180 {
  transform: rotate(180deg);
}

/* Success notification styles */
#success-notification {
  animation: slideInRight 0.3s ease-out;
}

#success-notification.hidden {
  animation: slideOutRight 0.3s ease-out;
}

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

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

/* Form error styles */
input.border-red-500,
textarea.border-red-500 {
  border-color: #ef4444;
}

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