/* Core Services Section with Enhanced Hover Effects */
.services-section {
  padding: 100px 0;
  background: #f8fafc;
  perspective: 1200px;
}

.services-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #1e293b;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #3b82f6;
}

.section-subtitle {
  color: #64748b;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 1.1rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.service-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  height: 380px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

.service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-origin: center center;
}

/* Initial title position (bottom of card) */
.service-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: var(--accent-color);
  color: white;
  font-size: 1.4rem;
  text-align: center;
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 2;
}

/* Hover overlay with content */
.service-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  opacity: 0;
  transition: all 0.6s ease;
  z-index: 3;
}

/* Hover effects */
.service-card:hover {
  transform: scale(1.05) translateZ(30px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  z-index: 10;
}

.service-card:hover .service-image {
  transform: scale(1.1);
}

.service-card:hover .service-title {
  transform: translateY(100%);
  opacity: 0;
}

.service-card:hover .service-overlay {
  opacity: 1;
}

/* Overlay content styling */
.service-name {
  color: white;
  font-size: 1.6rem;
  margin-bottom: 15px;
  text-align: center;
  transform: translateY(20px);
  transition: all 0.5s ease;
  opacity: 0;
}

.service-description {
  color: rgba(255,255,255,0.9);
  text-align: center;
  margin-bottom: 25px;
  line-height: 1.6;
  transform: translateY(20px);
  transition: all 0.5s ease 0.1s;
  opacity: 0;
}

.service-btn {
  padding: 12px 30px;
  background:var(--accent-color);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transform: translateY(20px);
  transition: all 0.5s ease 0.2s;
  opacity: 0;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.service-btn:hover {
  background:black;
  transform: translateY(0) scale(1.05);
}

/* Animate in overlay content on hover */
.service-card:hover .service-name,
.service-card:hover .service-description,
.service-card:hover .service-btn {
  transform: translateY(0);
  opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .service-card {
    height: 320px;
  }
}

@media (max-width: 768px) {
  .services-section {
    padding: 80px 0;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }
  
  .section-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 2rem;
  }
  
  .service-card {
    height: 280px;
  }
}