.services-section {
  position: relative;
  overflow: hidden;
}

.service-card {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(157, 78, 221, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.1), rgba(90, 24, 154, 0.1));
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
}

.service-card:hover {
  transform: translateY(-20px) scale(1.03) rotateX(10deg);
  box-shadow: 0 20px 40px rgba(157, 78, 221, 0.3);
  border-color: rgba(157, 78, 221, 0.3);
}

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

.service-icon {
  position: relative;
  z-index: 1;
  transition: transform 0.5s ease, color 0.5s ease;
}

.service-card:hover .service-icon {
  transform: translateZ(30px) scale(1.2);
  color: #5a189a;
}

.service-title {
  position: relative;
  z-index: 1;
  transition: transform 0.5s ease, color 0.5s ease;
}

.service-card:hover .service-title {
  transform: translateZ(20px);
  color: #9d4edd;
}

.service-description {
  position: relative;
  z-index: 1;
  transition: transform 0.5s ease;
}

.service-card:hover .service-description {
  transform: translateZ(10px);
}

.service-btn {
  position: relative;
  z-index: 1;
  overflow: hidden;
  transition: all 0.4s ease;
}

.service-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.7s ease;
}

.service-card:hover .service-btn::before {
  left: 100%;
}

.service-card:nth-child(1):hover {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.1), rgba(90, 24, 154, 0.2));
}

.service-card:nth-child(2):hover {
  background: linear-gradient(135deg, rgba(90, 24, 154, 0.1), rgba(123, 44, 191, 0.2));
}

.service-card:nth-child(3):hover {
  background: linear-gradient(135deg, rgba(123, 44, 191, 0.1), rgba(157, 78, 221, 0.2));
}

.service-card:nth-child(4):hover {
  background: linear-gradient(135deg, rgba(157, 78, 221, 0.1), rgba(90, 24, 154, 0.2));
}

.service-card:nth-child(5):hover {
  background: linear-gradient(135deg, rgba(90, 24, 154, 0.1), rgba(123, 44, 191, 0.2));
}

/* Fix modal positioning */
.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  margin: 0 auto;
  position: relative;
  top: 0;
  left: 0;
  transform: none;
}

.modal.active .modal-content {
  transform: none;
}

@media (max-width: 768px) {
  .service-card:hover {
    transform: translateY(-10px) scale(1.02) rotateX(5deg);
  }
}