/**
 * EcommercePro Tools - Animation Styles
 * Additional CSS for scroll animations and mobile menu states
 */

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animations for grid items */
.features-grid .feature-card:nth-child(1) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(2) { transition-delay: 0.2s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.3s; }
.features-grid .feature-card:nth-child(4) { transition-delay: 0.4s; }
.features-grid .feature-card:nth-child(5) { transition-delay: 0.5s; }
.features-grid .feature-card:nth-child(6) { transition-delay: 0.6s; }

.contact-info .contact-item:nth-child(1) { transition-delay: 0.1s; }
.contact-info .contact-item:nth-child(2) { transition-delay: 0.2s; }
.contact-info .contact-item:nth-child(3) { transition-delay: 0.3s; }

.contact-form .form-group:nth-child(1) { transition-delay: 0.1s; }
.contact-form .form-group:nth-child(2) { transition-delay: 0.2s; }
.contact-form .form-group:nth-child(3) { transition-delay: 0.3s; }
.contact-form .form-group:nth-child(4) { transition-delay: 0.4s; }

.pricing-grid .pricing-card:nth-child(1) { transition-delay: 0.1s; }
.pricing-grid .pricing-card:nth-child(2) { transition-delay: 0.2s; }
.pricing-grid .pricing-card:nth-child(3) { transition-delay: 0.3s; }

/* Mobile menu animations */
.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile menu overlay */
@media (max-width: 767px) {
  .mobile-menu-open .navbar-menu {
    display: flex;
    position: fixed;
    top: 100%;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-background);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: var(--spacing-8);
    z-index: 40;
    border-top: 1px solid var(--color-border);
    animation: slideDown 0.3s ease-out;
  }

  .mobile-menu-open .navbar-nav {
    flex-direction: column;
    gap: var(--spacing-6);
    margin-bottom: var(--spacing-8);
  }

  .mobile-menu-open .navbar-nav a {
    font-size: var(--font-size-lg);
    padding: var(--spacing-3);
  }
}

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

/* Navbar scroll state */
.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--color-border);
}

[data-theme="dark"] .navbar.scrolled {
  background-color: rgba(17, 24, 39, 0.95);
}

/* Button hover animations */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

/* Focus styles for better accessibility */
.mouse-user :focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

/* Loading states */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  to {
    left: 100%;
  }
}

/* Modal animations */
.modal.modal-open .modal-overlay {
  animation: fadeIn 0.3s ease-out;
}

.modal.modal-open .modal-content {
  animation: modalSlideIn 0.3s ease-out;
}

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

/* Modal close animation */
.modal-close:hover {
  animation: pulse 0.3s ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

/* Legal links hover animation */
[data-modal] {
  position: relative;
  transition: all var(--transition-fast);
}

[data-modal]:hover {
  transform: translateX(4px);
}

[data-modal]::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

[data-modal]:hover::before {
  width: 100%;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .feature-card,
  .contact-item,
  .form-group,
  .pricing-card {
    transition: none !important;
    animation: none !important;
  }

  .hero-title,
  .hero-description,
  .hero-stats,
  .hero-visual {
    animation: none !important;
  }

  .modal.modal-open .modal-overlay,
  .modal.modal-open .modal-content,
  .modal-close,
  [data-modal] {
    animation: none !important;
    transition: none !important;
  }
} 