.services {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: transparent;
  z-index: 1; /* Ensure it's above any background elements */
  padding-top: 80px; /* Add space for navbar if needed */
  will-change: transform;
  contain: content;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
  z-index: 2; /* Increase z-index to ensure visibility */
  background: linear-gradient(
    to bottom,
    rgba(2, 3, 16, 0.7),
    rgba(7, 11, 40, 0.7)
  );
  backdrop-filter: blur(10px);
}

.service-card {
  position: relative;
  background: rgba(7, 11, 40, 0.9); /* Increase opacity for better visibility */
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 229, 255, 0.2); /* Make border more visible */
  padding: 2.5rem;
  overflow: hidden;
  border-radius: 12px; /* Ensure border radius is applied */
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2); /* Add more pronounced shadow */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
  contain: content;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(0, 229, 255, 0.3),
    transparent
  );
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at top right,
    rgba(0, 229, 255, 0.1),
    transparent 70%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.service-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    rgba(0, 229, 255, 0.1),
    rgba(0, 229, 255, 0.05)
  );
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
  border-radius: 16px;
  font-size: 2rem;
  position: relative;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.service-icon::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(45deg, transparent, var(--accent-color), transparent);
  border-radius: 16px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  pointer-events: none;
}

.service-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle at center,
    var(--accent-glow),
    transparent 70%
  );
  filter: blur(15px);
  opacity: 0.5;
}

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

.service-features li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  position: relative;
  color: var(--text-secondary);
}

.service-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

/* Add hardware acceleration for smoother animations */
.neon-button,
.glass-panel {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.page-header {
  position: relative;
  padding: 4rem 2rem;
  background: linear-gradient(
    180deg,
    rgba(7, 11, 40, 0.8) 0%,
    rgba(2, 3, 16, 0.8) 100%
  );
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at center,
    rgba(0, 229, 255, 0.1),
    transparent 70%
  );
  animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
}

.learn-more-btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  background-color: rgba(0, 229, 255, 0.2);
  color: var(--text-color);
  border: 1px solid rgba(0, 229, 255, 0.5);
  border-radius: 25px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.learn-more-btn:hover {
  background-color: rgba(0, 229, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.learn-more-btn:active {
  transform: translateY(1px);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

/* About hero section */
.about-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 4rem 2rem;
  background-image: url('/src/assets/images/CyberImg2.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #ffffff;
  overflow: hidden;
  z-index: 1;
}

.about-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 23, 0.8);
  z-index: -1;
}

.about-hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, #ffffff, var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

.about-hero p {
  font-size: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
  color: #e0e0e0;
}

.services-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.services-intro {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-color);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .about-hero h1 {
    font-size: 2.5rem;
  }
  
  .about-hero p {
    font-size: 1.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .services * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}