/* Modern Animation Styles */

/* Custom Cursor - Less blue */
.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: width 0.3s, height 0.3s, border-color 0.3s;
  transform: translate(-50%, -50%);
  display: block;
  opacity: 1;
  mix-blend-mode: difference;
}

.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transition: width 0.3s, height 0.3s, background 0.3s;
  transform: translate(-50%, -50%);
  display: block;
  opacity: 1;
  mix-blend-mode: difference;
}

.custom-cursor.cursor-hover {
  width: 60px;
  height: 60px;
  border-color: #239af4;
  mix-blend-mode: normal;
  background: rgba(35,154,244,0.1);
}

.cursor-dot.cursor-hover {
  width: 12px;
  height: 12px;
  background: #239af4;
  mix-blend-mode: normal;
}



/* Ripple Effect */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.btn, .card {
  position: relative;
  overflow: hidden;
}

/* Floating Particles Background - Black not blue */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.15;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #1a1a1a;
  border-radius: 50%;
  animation: float-particle 20s infinite;
}

@keyframes float-particle {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0;
  }
}

/* Scroll Progress Bar - Keep blue as accent */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #1a1a1a, #239af4);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Navbar Scroll Behavior */
nav {
  transition: transform 0.3s ease;
}

nav.scroll-down {
  transform: translateY(-100%);
}

nav.scroll-up {
  transform: translateY(0);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Magnetic Button Effect */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Card 3D Tilt Effect */
.solutions-cards .card,
.products-cards .card {
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.solutions-cards .card:hover,
.products-cards .card:hover {
  transform: translateY(-12px) rotateX(5deg);
}

/* Animated Gradient Background */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.products-section {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef, #f8f9fa);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
}

/* Glowing Effect on Hover */
.card {
  position: relative;
}

.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  background: radial-gradient(circle at center, rgba(35,154,244,0.1), transparent);
  pointer-events: none;
}

.card:hover::after {
  opacity: 1;
}

/* Text Reveal Animation */
.title, .subtitle, .description {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.subtitle { animation-delay: 0.1s; }
.title { animation-delay: 0.2s; }
.description { animation-delay: 0.3s; }

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

/* Floating Animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.solutions-cards .card img {
  animation: float 3s ease-in-out infinite;
}

.solutions-cards .card:nth-child(2) img {
  animation-delay: 0.5s;
}

.solutions-cards .card:nth-child(3) img {
  animation-delay: 1s;
}

.solutions-cards .card:nth-child(4) img {
  animation-delay: 1.5s;
}

/* Shimmer Effect */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.card:hover {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.3) 50%, 
    rgba(255,255,255,0) 100%
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Pulse Animation for Key Points */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.key-points span {
  animation: pulse 2s ease-in-out infinite;
}

.key-points span:nth-child(2) {
  animation-delay: 0.3s;
}

.key-points span:nth-child(3) {
  animation-delay: 0.6s;
}

/* Smooth Image Reveal */
.products-cards .card img {
  overflow: hidden;
  position: relative;
}

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

.products-cards .card:hover img::before {
  left: 100%;
}

/* Tab Active Indicator Animation */
.solutions-nav ul li a {
  position: relative;
}

.solutions-nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 3px;
  background: #239af4;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.solutions-nav ul li a:hover::after {
  width: 100%;
}

.solutions-nav ul li a.active::after {
  width: 100%;
}

/* Scroll-to-Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #239af4, #1a7bc4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(100px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(35,154,244,0.4);
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(35,154,244,0.6);
}

/* Loading Animation */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #239af4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .scroll-progress {
    display: none;
  }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .card::after,
  .card:hover {
    animation: none;
  }
  
  .solutions-cards .card img {
    animation: none;
  }
  
  .scroll-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
}
