/* Clients Section */
.clients {
  padding: var(--spacing-lg) var(--spacing-md); /* 60px 20px */
  background-color: var(--background); /* #f9f9f9 */
  text-align: center;
  overflow: hidden;
}

.clients-container {
  max-width: var(--container-width); /* 1200px */
  margin: 0 auto;
}

.clients h2 {
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--primary); /* Optional, for branding */
  opacity: 0;
  transform: translateY(-30px);
  animation: fadeDown 1s ease forwards;
}

/* Grid Layout */
.client-card-box {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-lg); /* 50px */
  justify-items: center;
  align-items: center;
}

/* Card Style */
.client-card {
  background: var(--white);
  padding: var(--spacing-md); /* 20px */
  border-radius: var(--radius-md); /* 12px approx */
  box-shadow: var(--shadow-md); /* Use existing variable or define new if needed */
  transition: var(--transition);
  width: 150px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--text);

  /* Animation start state */
  opacity: 0;
  transform: scale(0.8);
  animation: zoomFade 0.8s ease forwards;
}

/* Hover Effect */
.client-card:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Sequential animation for cards */
.client-card:nth-child(1)  { animation-delay: 0.2s; }
.client-card:nth-child(2)  { animation-delay: 0.4s; }
.client-card:nth-child(3)  { animation-delay: 0.6s; }
.client-card:nth-child(4)  { animation-delay: 0.8s; }
.client-card:nth-child(5)  { animation-delay: 1s; }
.client-card:nth-child(6)  { animation-delay: 1.2s; }
.client-card:nth-child(7)  { animation-delay: 1.4s; }
.client-card:nth-child(8)  { animation-delay: 1.6s; }
.client-card:nth-child(9)  { animation-delay: 1.8s; }
.client-card:nth-child(10) { animation-delay: 2s; }
.client-card:nth-child(11) { animation-delay: 2.2s; }
.client-card:nth-child(12) { animation-delay: 2.4s; }

/* Animations */
@keyframes fadeDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomFade {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .client-card-box {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--spacing-md); /* 30px */
  }

  .client-card {
    width: 120px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .clients {
    padding: var(--spacing-lg) var(--spacing-sm); /* 40px 15px */
  }

  .client-card-box {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--spacing-sm); /* 20px */
  }

  .client-card {
    width: 100px;
    height: 70px;
    font-size: var(--fs-sm); /* 0.875rem */
  }
}
