.services-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #111;
  font-size: 5rem;
  font-weight: 700;
  text-align: center;
  margin-top: 40px;
  margin-bottom: 60px;
  position: relative;
  display: inline-block;
}

/* container trick to center */
.services-heading-wrapper {
  text-align: center;
}

/* centered underline */
.services-heading::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -12px;
  width: 110px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #111, #4c6f52);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: underlinePulse 2.5s ease-in-out infinite alternate;
}

@keyframes underlinePulse {
  0% { width: 70px; opacity: .85; }
  100% { width: 140px; opacity: 1; }
}

/* Card + image */
.service-card {
  max-width: 280px;
  margin: 0 auto;
}

.service-img-wrap {
  position: relative;
  overflow: visible;
}

.service-img {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
}

.fix {
    margin-top: -150px !important;
}

/* White label overlapping the image */
.service-label {
  position: absolute;
  left: 0;
  bottom: -40px;             /* keeps all bottoms aligned */
  padding: 10px 18px;
  background-color: #ffffff;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);

  /* NEW: make all labels same height */
  height: 72px;              /* tweak until the tallest title fits */
  display: flex;
  align-items: center;       /* vertically center text inside */
  box-sizing: border-box;

  transition:
    transform 0.35s cubic-bezier(.22,1,.36,1),
    box-shadow 0.35s ease,
    background-color 0.35s ease;
}

.service-label:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.28);
  background-color: #ffffff;
}

.service-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: 1.3rem;
  text-align: left;          /* or center if you prefer */
}

/* Body text under the label */
.service-text {
  margin-top: 55px;              /* makes room for overlapping label */
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.96rem;
  line-height: 1.8;
  color: #222222;
  background-color: lightblue;
  border-radius: 16px; /* adjust roundness */
  padding: 10px;

  transition: box-shadow 0.25s ease, transform 0.25s ease;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.12);
}

.service-text:hover {
  transform: translateY(-4px);
  box-shadow:
    0 8px 20px rgba(0, 120, 255, 0.25),
    0 18px 40px rgba(0, 120, 255, 0.35);
}

/* Optional: stack on small screens */
@media (max-width: 1000px) {
  .fix {
      margin-top: 0 !important;
  }

  .services-table {
    border-spacing: 0 40px;
    width: 100%;
  }

  .services-table tr {
    display: block;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 2.4rem 2.4rem;   /* row gap | column gap */
  }

  .services-table td {
    width: 100%;
    display: block;
    padding: 2rem;
  }

  .service-cell {
    display: block;
    width: 100%;
  }

  .service-card {
    max-width: 360px;
  }
}

@media (max-width: 900px) {
  .services-heading {
    margin-left: 1.5rem;
  }
}

@media (max-width: 600px) {
  .services-table tr {
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem 1rem !important;
  }
}

@media (max-width: 500px) {
    .services-heading {
    font-size: 4rem !important;
  }
}