/* Global Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(43, 110, 246, 0);
  }
  50% {
    box-shadow: 0 0 30px rgba(43, 110, 246, 0.4);
  }
}

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

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

/* Apply animations */
.hero-section {
  animation: fadeIn 0.8s ease-out;
}

.feature-card {
  animation: fadeIn 0.6s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

.testimonial-card {
  animation: slideInLeft 0.6s ease-out both;
}

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.3s; }
.testimonial-card:nth-child(3) { animation-delay: 0.5s; }

.cta-button {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(43, 110, 246, 0.3);
}

.cta-button:active {
  transform: translateY(-1px);
}

.pricing-card {
  animation: fadeIn 0.6s ease-out both;
  transition: all 0.3s ease;
}

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

.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(43, 110, 246, 0.15);
}

.navbar-item {
  position: relative;
  transition: color 0.3s ease;
}

.navbar-item::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #2b6ef6, #0d1d3b);
  transition: width 0.3s ease;
}

.navbar-item:hover::after {
  width: 100%;
}

.icon-button {
  transition: all 0.3s ease;
}

.icon-button:hover {
  background: #edf4ff;
  transform: scale(1.05);
}

.nav-item {
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item:hover {
  background: #edf4ff;
  transform: translateX(4px);
}

.summary-card {
  animation: fadeIn 0.6s ease-out both;
  transition: all 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(43, 110, 246, 0.1);
}

.page-card {
  animation: fadeIn 0.5s ease-out both;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.page-card:hover {
  transform: translateY(-6px);
  border-color: #2b6ef6;
  box-shadow: 0 8px 20px rgba(43, 110, 246, 0.15);
}

.table-row {
  animation: fadeIn 0.4s ease-out both;
}

.table-row:nth-child(1) { animation-delay: 0.05s; }
.table-row:nth-child(2) { animation-delay: 0.1s; }
.table-row:nth-child(3) { animation-delay: 0.15s; }
.table-row:nth-child(4) { animation-delay: 0.2s; }
.table-row:nth-child(5) { animation-delay: 0.25s; }

/* Loading animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #edf4ff;
  border-top-color: #2b6ef6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Smooth page transition */
.page {
  animation: fadeIn 0.5s ease-out;
}

/* Form input animations */
.form-group input:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(43, 110, 246, 0.1);
  animation: glow 0.6s ease-out;
}

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

.modal {
  animation: slideDown 0.3s ease-out;
}

/* Badge pulse */
.badge {
  animation: fadeIn 0.4s ease-out;
}

.badge.new {
  animation: pulse 2s ease-in-out infinite;
}

/* Stagger animations for list items */
.list-item {
  animation: fadeIn 0.5s ease-out both;
}

.list-item:nth-child(1) { animation-delay: 0s; }
.list-item:nth-child(2) { animation-delay: 0.1s; }
.list-item:nth-child(3) { animation-delay: 0.2s; }
.list-item:nth-child(4) { animation-delay: 0.3s; }
.list-item:nth-child(5) { animation-delay: 0.4s; }
.list-item:nth-child(6) { animation-delay: 0.5s; }

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Transition for all interactive elements */
button, a, input, select, textarea {
  transition: all 0.3s ease;
}

/* Hover effects for links */
a:not(.btn):not(.brand):not([class*="button"]) {
  position: relative;
  color: #2b6ef6;
}

a:not(.btn):not(.brand):not([class*="button"]):hover {
  opacity: 0.8;
}

/* Scale animation on click */
@keyframes scaleClick {
  0% { transform: scale(1); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

button:active {
  animation: scaleClick 0.3s ease-out;
}
