/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  /* Hero section */
  section h1 {
    font-size: 2.5rem !important;
  }

  section p {
    font-size: 1rem !important;
  }

  /* Stats grid */
  section div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Features grid */
  section div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Footer grid */
  footer div[style*="grid-template-columns: 2fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Footer bottom row */
  footer div[style*="display: flex; justify-content: space-between"] {
    flex-direction: column !important;
    gap: 1rem !important;
    text-align: center !important;
  }

  /* Hero features list */
  section div[style*="display: flex; justify-content: center; gap: 2rem"] {
    flex-direction: column !important;
    gap: 1rem !important;
  }
}

/* Button hover effects */
button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

/* Link hover effects */
a:hover {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

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

/* Hero form responsive sizing */
.hero-form {
  max-width: 400px !important;
}

@media (min-width: 1400px) {
  .hero-form {
    max-width: 500px !important;
  }
}

@media (min-width: 1600px) {
  .hero-form {
    max-width: 600px !important;
  }
}

/* Infinite Scroll Carousel */
.my-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  animation: infiniteScroll 30s linear infinite;
  width: max-content;
  will-change: transform;
}

.my-carousel:hover .carousel-track {
  animation-play-state: paused;
}

@keyframes infiniteScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-400px * 6 - 1.5rem * 5));
  }
}

/* Mobile animation with smaller slide width */
@keyframes infiniteScrollMobile {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-300px * 6 - 1.5rem * 5));
  }
}

/* Large screen animations */
@keyframes infiniteScroll1400 {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-500px * 6 - 2rem * 5));
  }
}

@keyframes infiniteScroll1600 {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-600px * 6 - 2.5rem * 5));
  }
}

/* Responsive gap adjustments */
@media (min-width: 1400px) {
  .carousel-track {
    gap: 2rem;
    animation: infiniteScroll1400 30s linear infinite;
  }
}

@media (min-width: 1600px) {
  .carousel-track {
    gap: 2.5rem;
    animation: infiniteScroll1600 30s linear infinite;
  }
}

.my-slide {
  width: 400px;
  height: 280px;
  padding: 2rem 1.5rem;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-align: left;
  position: relative;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

/* Larger screens */
@media (min-width: 1200px) {
  .my-slide {
    width: 500px;
    height: 320px;
  }
}

@media (min-width: 1600px) {
  .my-slide {
    width: 600px;
    height: 360px;
  }
}

.my-slide:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.my-slide .feature-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Case Study Cards */
.case-study-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.case-study-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.1);
}

.case-study-card img:hover {
  transform: scale(1.05);
  transition: transform 0.7s ease;
}

/* Mobile responsive adjustments for carousel */
@media (max-width: 768px) {
  .carousel-track {
    animation: infiniteScrollMobile 30s linear infinite;
  }

  .my-slide {
    width: 300px;
    height: 200px;
    padding: 1.5rem 1rem;
  }

  .my-slide h3 {
    font-size: 1.25rem !important;
  }

  .my-slide p {
    font-size: 0.9rem !important;
  }

  .my-slide .feature-icon {
    width: 40px;
    height: 40px;
  }

  /* Stack case study cards on mobile */
  section
    div[style*="grid-template-columns: repeat(auto-fit, minmax(350px, 1fr))"] {
    grid-template-columns: 1fr !important;
  }
}
