/* Services section styles */
.services {
  position: relative;
  background: linear-gradient(135deg, var(--dark) 0, #0d2137 100%);
  color: #fff;
  overflow: hidden;
}

/* Layered gradients for depth */
.services::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.15) 0%, transparent 50%, rgba(2, 132, 199, 0.1) 100%);
  z-index: 0;
  pointer-events: none;
}

.services::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at top right, rgba(6, 182, 212, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at bottom left, rgba(3, 105, 161, 0.1) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.services > .container {
  position: relative;
  z-index: 1;
}

.services .section-header .gradient-divider {
  width: 100px;
  height: 6px;
  background: linear-gradient(90deg, var(--brand) 0, var(--brandAccent) 50%, var(--brandMedium) 100%);
  margin: 0 auto var(--spacing-md);
  border-radius: 3px;
  box-shadow: 0 0 20px rgba(8, 145, 178, 0.6),
              0 0 40px rgba(6, 182, 212, 0.3);
}

.services .section-header h2 {
  color: #fff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.services .section-intro {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.15rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
  align-items: stretch;
}

.service-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  padding: var(--spacing-md) var(--spacing-lg);
  border-radius: var(--radius);
  border: 2px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  height: 100%;
  align-items: stretch;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 
              0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  /* Adding scroll animation support - only animates when section is visible */
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  will-change: opacity, transform;
  transition: opacity var(--anim-duration) ease-out, transform var(--anim-duration) ease-out, border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
  contain: layout style paint;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand) 0, var(--brandMedium) 100%);
  transform: scaleY(0);
  transition: transform var(--transition);
}

.service-card:hover::before {
  transform: scaleY(1);
}

.section-reveal.visible .service-card {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--brand);
  transform: translate3d(0, -8px, 0);
  box-shadow: 0 16px 48px rgba(0, 188, 212, 0.5),
              0 0 30px rgba(8, 145, 178, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.service-card:nth-child(1) {
  transition-delay: 0.2s;
}

.service-card:nth-child(2) {
  transition-delay: 0.35s;
}

.service-card:nth-child(3) {
  transition-delay: 0.5s;
}

.service-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 0.5rem;
  color: var(--brand);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 145, 178, 0.15);
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 188, 212, 0.3),
              0 0 20px rgba(8, 145, 178, 0.2);
}

.service-card:hover .service-icon {
  transform: scale(1.15) rotate(5deg);
  background: rgba(8, 145, 178, 0.25);
  box-shadow: 0 6px 24px rgba(0, 188, 212, 0.5),
              0 0 30px rgba(6, 182, 212, 0.4);
}

.service-card h3 {
  color: #fff;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
  text-align: center;
  line-height: 1.3;
  min-height: 3.12rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.service-card > p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  margin-top: 0;
  flex-grow: 1;
  min-height: 4.5rem;
  font-weight: 400;
}

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

.service-features li {
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: 0.4rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
  line-height: 1.5;
  font-weight: 400;
}

.service-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brandAccent);
  font-weight: 700;
  font-size: 1.2rem;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
}

/* Adding mobile responsive styles for services section */
@media (max-width: 768px) {
  .services {
    padding: 2rem 0;
  }

  .services .section-header h2 {
    font-size: clamp(2rem, 6vw, 3rem);
  }

  .services .section-intro {
    font-size: 1rem;
    padding: 0 var(--spacing-sm);
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .service-card {
    padding: var(--spacing-md);
  }

  .service-card h3 {
    font-size: 1.2rem;
    min-height: auto;
  }

  .service-card > p {
    font-size: 0.9rem;
    min-height: auto;
  }

  .service-icon {
    width: 50px;
    height: 50px;
  }

  .service-features li {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .service-card {
    padding: 1.25rem;
  }

  .service-card h3 {
    font-size: 1.1rem;
  }

  .service-card > p {
    font-size: 0.85rem;
  }
}
