.services {
  padding: var(--spacing-lg) var(--spacing-sm);
  background-color: var(--light-bg);
  text-align: center;
  overflow: hidden;
}

.services-container {
  max-width: var(--container-width);
  margin: 0 auto;
}

.services h2 {
  font-size: 2.5rem;
  margin-bottom: 50px;
  color: var(--text-dark);
  opacity: 0;
  transform: translateY(-30px);
  animation: fadeDown 1s ease forwards;
}

/* Grid Layout */
.service-card-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 100px 30px;
  justify-items: center;
  align-items: start;
}

/* Card Style */
.service-card {
  background: var(--white);
  padding: 30px 20px;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 25px var(--shadow-light);
  transition: transform 0.3s var(--transition), box-shadow 0.3s var(--transition);
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* animation start state */
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.8s ease forwards;
}

/* Hover */
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 35px var(--shadow-dark);
}

.service-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
  opacity: 0;
  transform: scale(0.5);
  animation: popIn 0.8s ease forwards;
}

/* Card Content */
.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: var(--text-dark);
}

.service-card p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Sequential Animation Delay for Cards */
.service-card:nth-child(1) { animation-delay: 0.2s; }
.service-card:nth-child(2) { animation-delay: 0.4s; }
.service-card:nth-child(3) { animation-delay: 0.6s; }
.service-card:nth-child(4) { animation-delay: 0.8s; }
.service-card:nth-child(5) { animation-delay: 1s; }
.service-card:nth-child(6) { animation-delay: 1.2s; }

/* Sequential Animation Delay for Icons */
.service-card:nth-child(1) .service-icon { animation-delay: 0.3s; }
.service-card:nth-child(2) .service-icon { animation-delay: 0.5s; }
.service-card:nth-child(3) .service-icon { animation-delay: 0.7s; }
.service-card:nth-child(4) .service-icon { animation-delay: 0.9s; }
.service-card:nth-child(5) .service-icon { animation-delay: 1.1s; }
.service-card:nth-child(6) .service-icon { animation-delay: 1.3s; }

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

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

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

/* Responsive */
@media (max-width: 1024px) {
  .service-card-box {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 20px;
  }
}

@media (max-width: 768px) {
  .service-card-box {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}
