.Services_section {
  position: relative;
  background-color: #f8fafc;
  overflow: hidden;
}

.Services_section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--services-bg);
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0.55;
  pointer-events: none;
}

.Services_inner {
  position: relative;
  z-index: 1;
  padding: 5.5rem 0 6.5rem;
}

.Services_intro {
  max-width: 44rem;
  margin: 0 auto 3.25rem;
  text-align: center;
}

.Services_eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.95rem;
}

.Services_eyebrow i {
  color: var(--color-primary);
  font-size: 1.35rem;
}

.Services_title {
  margin-bottom: 1rem;
}

.Services_intro p {
  margin: 0 auto;
  max-width: 38rem;
  color: var(--color-muted);
  font-weight: 500;
  line-height: 1.7;
}

.Services_grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1.75rem 1.5rem;
  align-items: stretch;
}

.Services_card {
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(20, 35, 60, 0.06);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(7, 30, 62, 0.08);
  animation: fadeInUp 0.65s ease both;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

/* Row 2: center the last two cards */
.Services_card:nth-child(4) {
  grid-column: 2 / span 2;
}

.Services_card:nth-child(5) {
  grid-column: 4 / span 2;
}

.Services_card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 44px rgba(7, 30, 62, 0.14);
}

.Services_cardLink {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.Services_media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #dce3ea;
}

.Services_media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 35, 60, 0.35),
    transparent 50%
  );
  pointer-events: none;
}

.Services_media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.Services_card:hover .Services_media img {
  transform: scale(1.07);
}

.Services_body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
  padding: 1.5rem 1.4rem 1.6rem;
}

.Services_card h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0;
  color: #0f172a;
}

.Services_card p {
  margin: 0;
  color: var(--color-muted);
  font-weight: 500;
  font-size: 0.95rem;
  line-height: 1.6;
  flex: 1;
}

.Services_cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.92rem;
  transition: color 0.2s ease, gap 0.2s ease;
}

.Services_card:hover .Services_cta {
  color: var(--color-secondary);
  gap: 0.55rem;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .Services_card,
  .Services_media img {
    animation: none;
    transition: none;
  }
}

@media (max-width: 1199px) {
  .Services_grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem;
  }

  .Services_card,
  .Services_card:nth-child(4),
  .Services_card:nth-child(5) {
    grid-column: auto;
  }

  .Services_card:last-child {
    grid-column: 1 / -1;
    max-width: 28rem;
    justify-self: center;
    width: 100%;
  }
}

@media (max-width: 767px) {
  .Services_inner {
    padding: 4.25rem 0 5rem;
  }

  .Services_intro {
    margin-bottom: 2.25rem;
  }

  .Services_grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }

  .Services_card:last-child {
    max-width: none;
  }

  .Services_media {
    aspect-ratio: 5 / 4;
  }

  .Services_body {
    padding: 1.25rem 1.15rem 1.35rem;
  }

  .Services_card {
    border-radius: 1.25rem;
  }
}

