/* Additional Animations and Visual Enhancements */

/* Animated Background Elements */
.animated-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: -1;
}

.animated-shape {
  position: absolute;
  opacity: 0.05;
  animation: float 15s ease-in-out infinite alternate;
}

.shape-1 {
  top: 15%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: var(--primary);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation-delay: 0s;
}

.shape-2 {
  bottom: 10%;
  right: 10%;
  width: 200px;
  height: 200px;
  background: var(--secondary);
  border-radius: 58% 42% 38% 62% / 42% 55% 45% 58%;
  animation-delay: 3s;
}

.shape-3 {
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  background: var(--primary-light);
  border-radius: 41% 59% 41% 59% / 59% 41% 59% 41%;
  animation-delay: 6s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    transform: translate(30px, 30px) rotate(15deg) scale(1.1);
  }
}

/* Enhanced Hero Section */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(0, 119, 182, 0.8), rgba(0, 180, 216, 0.8)), url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: linear-gradient(to top, var(--background), transparent);
  z-index: 1;
}

.hero-content h1 {
  animation: fadeInUp 1s ease;
  background: linear-gradient(to right, #ffffff, #f0f0f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.hero-content p {
  animation: fadeInUp 1.2s ease;
}

.hero-btns {
  animation: fadeInUp 1.4s ease;
}

.hero-image {
  position: relative;
  animation: floatImage 3s ease-in-out infinite alternate;
}

.hero-image img {
  max-width: 100%;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.2));
}

/* Enhanced Feature Cards */
.feature-card {
  position: relative;
  overflow: hidden;
  z-index: 1;
  border-radius: 15px;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.1), rgba(0, 119, 182, 0.05));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.feature-card:hover {
  transform: translateY(-15px) scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  position: relative;
  transition: all 0.5s ease;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: white;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 20px rgba(0, 180, 216, 0.3);
}

.feature-icon i {
  transition: all 0.5s ease;
}

.feature-card:hover .feature-icon i {
  transform: scale(1.2);
}

/* Enhanced Chat Interface Animations */
.chat-messages {
  position: relative;
}

.message {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInMessage 0.5s forwards;
}

.message:nth-child(1) { animation-delay: 0.2s; }
.message:nth-child(2) { animation-delay: 0.4s; }
.message:nth-child(3) { animation-delay: 0.6s; }
.message:nth-child(4) { animation-delay: 0.8s; }
.message:nth-child(5) { animation-delay: 1.0s; }
.message:nth-child(6) { animation-delay: 1.2s; }

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

.quick-replies {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInMessage 0.5s forwards 1.4s;
}

.quick-replies button {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.quick-replies button:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 180, 216, 0.3);
}

.quick-replies button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.quick-replies button:hover::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

/* Enhanced B2B Section */
.vendor-dashboard {
  position: relative;
  transition: all 0.5s ease;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.vendor-dashboard:hover {
  transform: rotateY(5deg) translateZ(20px);
  box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.2);
}

.dashboard-header {
  position: relative;
  overflow: hidden;
}

.dashboard-header::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shine 6s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(30deg); }
  20%, 100% { transform: translateX(100%) rotate(30deg); }
}

.whatsapp-message {
  opacity: 0;
  animation: fadeInMessage 0.5s forwards;
}

.whatsapp-message:nth-child(1) { animation-delay: 0.3s; }
.whatsapp-message:nth-child(2) { animation-delay: 0.6s; }
.whatsapp-message:nth-child(3) { animation-delay: 0.9s; }
.whatsapp-message:nth-child(4) { animation-delay: 1.2s; }

.whatsapp-booking {
  opacity: 0;
  animation: fadeInMessage 0.5s forwards 1.5s;
}

.booking-card {
  transition: all 0.3s ease;
}

.booking-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.booking-status {
  position: relative;
  overflow: hidden;
}

.booking-status::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* Enhanced Testimonial Cards */
.testimonial-card {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.testimonial-card:hover::before {
  transform: scaleX(1);
}

.testimonial-card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.testimonial-rating i {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInStars 0.3s forwards;
}

.testimonial-rating i:nth-child(1) { animation-delay: 0.1s; }
.testimonial-rating i:nth-child(2) { animation-delay: 0.2s; }
.testimonial-rating i:nth-child(3) { animation-delay: 0.3s; }
.testimonial-rating i:nth-child(4) { animation-delay: 0.4s; }
.testimonial-rating i:nth-child(5) { animation-delay: 0.5s; }

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

.testimonial-avatar {
  border: 3px solid white;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced CTA Section */
.cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../images/pattern.svg');
  background-size: cover;
  opacity: 0.05;
  animation: moveBg 30s linear infinite;
}

@keyframes moveBg {
  0% { background-position: 0 0; }
  100% { background-position: 100% 100%; }
}

.cta .btn {
  position: relative;
  overflow: hidden;
}

.cta .btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.cta .btn:hover::after {
  animation: ripple 1s ease-out;
}

/* Enhanced Footer */
.footer {
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--primary), var(--secondary), var(--primary));
  background-size: 200% 100%;
  animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

.footer-social a {
  position: relative;
  overflow: hidden;
}

.footer-social a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s ease;
  z-index: -1;
}

.footer-social a:hover::before {
  transform: scale(1);
}

.footer-links a {
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.footer-links a:hover::after {
  width: 100%;
}

/* Scroll Animations */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  padding-top: 10px;
  z-index: 10;
}

.scroll-indicator::before {
  content: '';
  width: 4px;
  height: 8px;
  background: white;
  border-radius: 2px;
  animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(15px); opacity: 0; }
}

/* Floating Elements Animation */
.floating {
  animation: floating 3s ease-in-out infinite alternate;
}

.floating-slow {
  animation: floating 5s ease-in-out infinite alternate;
}

.floating-fast {
  animation: floating 2s ease-in-out infinite alternate;
}

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

/* Pulse Animation for Badges and CTAs */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 180, 216, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(0, 180, 216, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 180, 216, 0);
  }
}

/* Improved Responsive Styles */
@media screen and (max-width: 992px) {
  .animated-shape {
    opacity: 0.03;
  }
  
  .testimonials-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media screen and (max-width: 768px) {
  .hero h1 {
    font-size: 2.8rem;
  }
  
  .feature-card:hover {
    transform: translateY(-10px) scale(1.02);
  }
  
  .testimonial-card:hover {
    transform: translateY(-10px);
  }
}

@media screen and (max-width: 576px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .animated-shape {
    display: none;
  }
}
