/* Enhanced services.css - Styles specific to the services page */

/* Services Intro Section with Background Design */
.services-intro {
  padding: 90px 0 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.services-intro-content {
  position: relative;
  z-index: 2;
}

.services-intro-content h2 {
  font-size: 2.5rem;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.services-intro-content p {
  max-width: 800px;
  margin: 0 auto 40px;
  color: var(--text-medium);
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Enhanced Service Filters */
.service-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 10px 0;
  justify-content: center;
  padding-top: 20px;
}

.filter-btn {
  padding: 12px 25px;
  background-color: #f8fafc;
  border: 2px solid transparent;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: var(--text-medium);
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
  background-color: #e2e8f0;
  color: var(--text-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); /* Match home page gradient */
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

/* 
 * Services List section
 
 * Container for service cards with pattern matching home page
 */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  margin: 40px 0;
  padding: 0 20px; /* horizontal padding for better spacing */
  flex-wrap: wrap;
  
}

/* 
 * Container width adjustment 
 * Ensures proper layout of service cards
 */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  
}

/* 
 * Redesigned Service Card with Hover Flip Effect
 * Interactive flip cards with front/back views
 */

.service-card {
  position: relative;
  height: 320px; /* Increased height for more content */
  overflow: hidden;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  transition: all 0.4s ease;
  border: 1px solid rgba(226, 232, 240, 0.8); /* Matching home page card style */
  
}

.service-card:hover {
  transform: translateY(-10px); /* Matching home page card hover effect */
  box-shadow: var(--shadow-lg);
  border-color: rgba(203, 213, 225, 0.3);
}

/* Front: static background image with gradient overlay */
.service-front {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.service-front::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60%;

}

.service-title {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  color: #fff;
  padding: 25px;
  z-index: 2;
}

/* 
 * Back content with slide-up animation
 * Appears on hover with consistent layout
 */
.service-back {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--bg-white);
  transition: bottom 0.4s ease;
  z-index: 3;
  padding: 25px;
  /* Removed flex layout as we're now using absolute positioning for button */
}

/* Show back content on hover */
.service-card:hover .service-back {
  bottom: 0;
}

/* Back of card styling with consistent text size */
.service-back h3 {
  margin-top: 0;
  color: var(--text-dark);
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 12px;
  font-size: 1.4rem;
}

.service-back h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: #ff6b00;
}

/* FIXED: Smaller text size and adjusted margins */
.service-back p {
  color: var(--text-medium);
  line-height: 1.5;
  font-size: 0.85rem; /* Further reduced text size for better fit */
  margin-bottom: 15px; /* Consistent spacing */
  max-height: 150px; /* Limit the maximum height */
  overflow-y: auto; /* Add scrolling if text exceeds max height */
}

/* FIXED: Consistent button positioning and styling */
.service-back .btn {
  position: absolute; /* Absolute positioning ensures consistent placement */
  bottom: 25px; /* Fixed distance from bottom */
  left: 25px; /* Aligned with left padding */
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); /* Match home page button style */
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  box-shadow: var(--shadow-sm);
  display: inline-block;
  font-size: 0.9rem;
}

.service-back .btn:hover {
  background: var(--accent-color); /* Match home page accent color */
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(109, 40, 217, 0.2); /* Using accent color from home page */
}

/* Animation for filtering with smooth transitions */
.filtering-animation {
  animation: filterPulse 0.5s ease;
}

@keyframes filterPulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 
 * Service Process Section
 * Visual representation of the service implementation steps
 */
.service-process {
  padding: 80px 0;
  background-color: var(--bg-white);
  position: relative;
  overflow: hidden;
  /* Using dot pattern similar to home page but with orange accent to match benefit icons */
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff6b00' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.service-process::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.1) 0%, transparent 70%);
  top: -150px;
  right: -150px;
  border-radius: 50%;
  z-index: 0;
}

.service-process .section-title {
  position: relative;
  z-index: 2;
}

/* Enhanced Process Steps with Home Page Styling */
.process-steps {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

/* Connection Line */
.process-steps::before {
  content: '';
  position: absolute;
  top: 50px;
  left: 140px;
  right: 140px;
  height: 2px;
  background: linear-gradient(to right, 
    #1e40af 0%, 
    #6d28d9 33%, 
    #9333ea 66%, 
    #db2777 100%
  );
  z-index: -1;
}

/* Process Step Item */
.process-step {
  flex: 1;
  text-align: center;
  padding: 0 15px;
  position: relative;
  z-index: 1;
  max-width: 250px;
  margin: 0 auto;
}

/* Step Number Circle */
.step-number {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #1e40af, #db2777);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 2.2rem;
  font-weight: 700;
  position: relative;
  box-shadow: 0 10px 20px rgba(109, 40, 217, 0.3);
  z-index: 2;
  transition: all 0.3s ease;
}

/* Step Content */
.step-content {
  padding: 0 10px;
}

.process-step h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-dark);
  font-weight: 600;
}

.process-step p {
  color: var(--text-medium);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Hover effects */
.process-step:hover .step-number {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 30px rgba(109, 40, 217, 0.4);
}

/* 
 * Benefits Section
 * Highlights the advantages of choosing VSRT services
 */
.benefits-section {
  padding: 90px 0;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-white);
  /* Using wave pattern from home page CTA section but with lighter opacity */
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ff6b00' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");

}

/* Benefits Section Styling */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

.benefit-card {
  background-color: var(--bg-white);
  border-radius: var(--border-radius-md);
  padding: 35px 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
  height: 100%;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.benefit-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, #1e40af, #db2777);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 25px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 15px rgba(109, 40, 217, 0.2);
}

.benefit-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  border-color: rgba(203, 213, 225, 0.3);
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 30px rgba(109, 40, 217, 0.3);
}

.benefit-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-dark);
  font-weight: 600;
  position: relative;
  padding-bottom: 10px;
}

.benefit-card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 2px;
  background: linear-gradient(to right, #1e40af, #db2777);
  transition: all 0.3s ease;
}

.benefit-card:hover h3::after {
  width: 60px;
}

.benefit-card p {
  color: var(--text-medium);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 
 * CTA Section
 * Call-to-action with pattern matching home page CTA
 */
.cta-section {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.9)), url('https://images.unsplash.com/photo-1569958308182-76db0b0da53b?q=80&w=1200&auto=format&fit=crop') center/cover no-repeat;
  background-attachment: fixed;
  padding: 90px 0;
  color: var(--text-white);
  text-align: center;
  overflow: hidden;
}

/* Adding pattern overlay from home page CTA */
.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10zm10 8c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm40 40c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.1;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.cta-content p {
  font-size: 1.2rem;
  margin-bottom: 35px;
  opacity: 0.9;
}

.btn-primary {
  /* Matching gradient style from home page */
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 14px 30px;
  border-radius: var(--border-radius-md);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-block;
  transition: all 0.3s ease;
  border: none;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(109, 40, 217, 0.2); /* Using accent color from home page */
}

/* 
 * Animation & Visibility Classes
 * Controls for smooth scroll-triggered animations
 */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Animation delays for staggered effects */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* 
 * Responsive Adjustments
 * Ensures proper display across different screen sizes
 */
@media (max-width: 992px) {
  .process-steps::before {
    display: none;
  }
  
  .process-steps {
    flex-wrap: wrap;
    gap: 40px;
  }
  
  .process-step {
    flex: 0 0 45%;
  }
  
  .benefit-card {
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .services-intro-content h2 {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .filter-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
  
  .service-card {
    height: 350px; /* Keep consistent with the main card height */
  }
  
  .service-front {
    background-position: center 20%;
  }
  
  .service-back {
    padding: 20px;
  }
  
  /* Adjust button position for smaller screens */
  .service-back .btn {
    bottom: 20px;
    left: 20px;
  }
  
  .process-step {
    flex: 0 0 100%;
  }
  
  .step-number {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
  }
  
  .benefit-icon {
    width: 80px;
    height: 80px;
    font-size: 1.7rem;
  }
}

@media (max-width: 300px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .service-card {
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .benefit-card {
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .cta-content h2 {
    font-size: 2rem;
  }


}