/* Services Page Styles */
:root {
   --primary-color: #ffba30;
   --secondary-color: #31c5ff;
   --accent-color: #3bf6dd;
   --text-color: #1f2937;
   --light-gray: #f3f4f6;
   --border-color: #e5e7eb;
   --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
   --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
   --transition: all 0.3s ease;
   
  /* Color Palette */
  --cnc-color: #3b82f6;      /* Blue */
  --manual-color: #10b981;   /* Green */
  --specialty-color: #f59e0b; /* Amber */
  --additive-color: #8b5cf6; /* Purple */
  --additional-color: #ec4899; /* Pink */
  
  /* Gradient Colors */
  --cnc-gradient: linear-gradient(135deg, #3b82f6, #60a5fa);
  --manual-gradient: linear-gradient(135deg, #10b981, #34d399);
  --specialty-gradient: linear-gradient(135deg, #f59e0b, #fbbf24);
  --additive-gradient: linear-gradient(135deg, #8b5cf6, #a78bfa);
  --additional-gradient: linear-gradient(135deg, #ec4899, #f472b6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: linear-gradient(135deg, #f0f7ff 0%, #f0fdf4 50%, #fffbeb 100%);
  background-attachment: fixed;
}

.services-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

/* Header Styles */
.services-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.services-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #10b981, #f59e0b, #8b5cf6, #ec4899);
  border-radius: 24px 24px 0 0;
}

.services-header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  background:  var(--primary-color);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.services-header p {
  font-size: 1.25rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
}

/* Services Grid */
.services-grid {
  display: flex;
  flex-direction: column;
  gap: 4rem;
}

.service-category {
  position: relative;
  padding: 2rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Category Specific Backgrounds */
.cnc-section {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(96, 165, 250, 0.05));
}

.manual-section {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(52, 211, 153, 0.05));
}

.specialty-section {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(251, 191, 36, 0.05));
}

.additive-section {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(167, 139, 250, 0.05));
}

.additional-section {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.05), rgba(244, 114, 182, 0.05));
}

.category-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  display: inline-block;
  position: relative;
}

/* Category Specific Title Underlines */
.cnc-section .category-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--cnc-gradient);
}

.manual-section .category-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--manual-gradient);
}

.specialty-section .category-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--specialty-gradient);
}

.additive-section .category-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--additive-gradient);
}

.additional-section .category-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--additional-gradient);
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.service-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Only apply transitions if user hasn't requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .service-card {
      transition: var(--transition);
  }
}

/* Category Specific Card Styles */
@media (prefers-reduced-motion: no-preference) {
  .cnc-card:hover {
      border-color: var(--cnc-color);
      box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
  }

  .manual-card:hover {
      border-color: var(--manual-color);
      box-shadow: 0 10px 25px rgba(16, 185, 129, 0.15);
  }

  .specialty-card:hover {
      border-color: var(--specialty-color);
      box-shadow: 0 10px 25px rgba(245, 158, 11, 0.15);
  }

  .additive-card:hover {
      border-color: var(--additive-color);
      box-shadow: 0 10px 25px rgba(139, 92, 246, 0.15);
  }

  .additional-card:hover {
      border-color: var(--additional-color);
      box-shadow: 0 10px 25px rgba(236, 72, 153, 0.15);
  }
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  .card-icon {
      transition: transform 0.3s ease;
  }

  .service-card:hover .card-icon {
      transform: scale(1.1) rotate(5deg);
  }
}

/* Category Specific Icon Colors */
.cnc-card .card-icon {
  background: var(--cnc-gradient);
}

.manual-card .card-icon {
  background: var(--manual-gradient);
}

.specialty-card .card-icon {
  background: var(--specialty-gradient);
}

.additive-card .card-icon {
  background: var(--additive-gradient);
}

.additional-card .card-icon {
  background: var(--additional-gradient);
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.service-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  .service-card h3 {
      transition: color 0.3s ease;
  }
}

/* Category Specific Title Colors on Hover */
@media (prefers-reduced-motion: no-preference) {
  .cnc-card:hover h3 {
      color: var(--cnc-color);
  }

  .manual-card:hover h3 {
      color: var(--manual-color);
  }

  .specialty-card:hover h3 {
      color: var(--specialty-color);
  }

  .additive-card:hover h3 {
      color: var(--additive-color);
  }

  .additional-card:hover h3 {
      color: var(--additional-color);
  }
}

.service-card p {
  color: #6b7280;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-features li {
  color: #4b5563;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
}

.service-features li::before {
  content: '✓';
  margin-right: 0.75rem;
  font-weight: 700;
}

/* Category Specific Checkmark Colors */
.cnc-card .service-features li::before {
  color: var(--cnc-color);
}

.manual-card .service-features li::before {
  color: var(--manual-color);
}

.specialty-card .service-features li::before {
  color: var(--specialty-color);
}

.additive-card .service-features li::before {
  color: var(--additive-color);
}

.additional-card .service-features li::before {
  color: var(--additional-color);
}

/* Card Hover Effect */
.card-hover-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  transform: scaleX(0);
  transform-origin: left;
}

@media (prefers-reduced-motion: no-preference) {
  .card-hover-effect {
      transition: transform 0.3s ease;
  }

  .service-card:hover .card-hover-effect {
      transform: scaleX(1);
  }
}

.cnc-card .card-hover-effect {
  background: var(--cnc-gradient);
}

.manual-card .card-hover-effect {
  background: var(--manual-gradient);
}

.specialty-card .card-hover-effect {
  background: var(--specialty-gradient);
}

.additive-card .card-hover-effect {
  background: var(--additive-gradient);
}

.additional-card .card-hover-effect {
  background: var(--additional-gradient);
}

/* CTA Section */
.services-cta {
  text-align: center;
  margin-top: 6rem;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--additive-color));
  border-radius: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.services-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
  transform: rotate(30deg);
}

.services-cta h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.services-cta p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .cta-button {
      transition: var(--transition);
  }

  .cta-button:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
      background: #f8fafc;
  }
}

/* Animation keyframes - only apply if user hasn't requested reduced motion */
@media (prefers-reduced-motion: no-preference) {
  @keyframes fadeInUp {
      from {
          opacity: 0;
          transform: translateY(20px);
      }
      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .service-card {
      animation: fadeInUp 0.6s ease forwards;
      opacity: 0;
  }

  .service-card:nth-child(1) { animation-delay: 0.1s; }
  .service-card:nth-child(2) { animation-delay: 0.2s; }
  .service-card:nth-child(3) { animation-delay: 0.3s; }
  .service-card:nth-child(4) { animation-delay: 0.4s; }
  .service-card:nth-child(5) { animation-delay: 0.5s; }
  .service-card:nth-child(6) { animation-delay: 0.6s; }
  .service-card:nth-child(7) { animation-delay: 0.7s; }
  .service-card:nth-child(8) { animation-delay: 0.8s; }
  .service-card:nth-child(9) { animation-delay: 0.9s; }

  /* Category title animation */
  .category-title {
      opacity: 0;
      transform: translateX(-20px);
      transition: all 0.6s ease;
  }

  .category-title.visible {
      opacity: 1;
      transform: translateX(0);
  }
}

/* If reduced motion is preferred, cards are visible by default */
@media (prefers-reduced-motion: reduce) {
  .service-card {
      opacity: 1;
  }
  
  .category-title {
      opacity: 1;
      transform: translateX(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .services-container {
      padding: 2rem 1rem;
  }

  .services-header h1 {
      font-size: 2.5rem;
  }

  .category-title {
      font-size: 1.75rem;
  }

  .service-cards {
      grid-template-columns: 1fr;
  }

  .services-cta {
      padding: 3rem 1.5rem;
  }

  .services-cta h2 {
      font-size: 2rem;
  }
}

/* Background Pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background-image: 
      radial-gradient(circle at 15% 15%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 85% 25%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 75% 85%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
      radial-gradient(circle at 25% 75%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  z-index: -1;
}