/* ========= Services grid (centered & tidy) ========= */
.container.services-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr)); /* desktop */
  gap: 28px;
  max-width: 1120px;
  margin: 0 auto;
  align-items: stretch;
  justify-content: center;   /* center final incomplete row */
  justify-items: center;     /* center cards within each column */
}

/* Responsive columns */
@media (max-width: 1100px) {
  .container.services-grid { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}
@media (max-width: 640px) {
  .container.services-grid { grid-template-columns: 1fr; }
}

/* ========= Cards (equal size + polished) ========= */
.container.services-grid .card1 {
  position: relative;
  width: 100%;
  height: 320px;                 /* ⬅️ equal height for all cards */
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(248,250,252,.92);
  backdrop-filter: saturate(1.1) blur(2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  overflow: hidden;
  text-decoration: none;
  z-index: 0;                    /* stack context for pseudo below */
  transition: box-shadow .25s ease, transform .2s ease, background .2s ease;
}
.container.services-grid .card1:hover{
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(0,0,0,.18);
}

/* ========= Internal layout (locks alignment) ========= */
.container.services-grid .card1 .card-body {
  position: relative;            /* ensure content sits above splash */
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 28px;
  gap: 0;                        /* we’ll control spacing explicitly below */
}

/* Headings aligned: reserve space equal to ~2 lines so paragraphs start together */
.container.services-grid #cardheading {
  margin: 0 0 30px 0;            /* uniform gap to paragraph */
  font-weight: 700;
  letter-spacing: .2px;
  color: #262626;
  line-height: 1.25;
  font-size: 1.375rem;           /* ~22px */
  min-height: 2.6em;             /* ⬅️ forces all paragraphs to start same level */
  display: flex;
  align-items: flex-end;
}

/* Body text (normalized margins so they don't drift) */
.container.services-grid .card-text.small {
  margin: 0 0 18px 0;            /* uniform gap above the CTA row */
  color: #334155;
  line-height: 1.45;
  flex: 0 0 auto;                /* don't consume the flexible spacer */
}

/* “more info →” row: neutral gray + perfectly aligned across cards */
.container.services-grid .hover-text {
  margin-top: auto;              /* ⬅️ pins to bottom baseline */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #6b7280;                /* keep gray (not blue) */
  font-weight: 600;
  text-decoration: none;
}
.container.services-grid .hover-text .more-link { text-decoration: underline; }
/* If any anchors remain in this row, inherit the gray colour */
.container.services-grid .hover-text a { color: inherit; }

/* Corner badge (kept) */
.go-corner{
  display:flex;align-items:center;justify-content:center;
  position:absolute;top:0;right:0;width:32px;height:32px;
  background:#a4b142;border-radius:0 4px 0 32px; overflow:hidden;
}
.go-arrow{margin-top:-4px;margin-right:-4px;color:#fff;font-family:courier,sans-serif}

/* ========= Hover splash stays BEHIND text ========= */
.container.services-grid .card1::before{
  content:"";
  position:absolute;top:-16px;right:-16px;
  width:32px;height:32px;border-radius:32px;
  background:#a4b142;
  transform:scale(1);transform-origin:50% 50%;
  transition:transform .25s ease-out;
  z-index: 0;                    /* ⬅️ BELOW content */
}
.container.services-grid .card1:hover::before{ transform:scale(21); }

/* On hover: make text darker (black-ish) so it’s readable on green */
.container.services-grid .card1:hover #cardheading     { color:#111827; } /* slate-900 */
.container.services-grid .card1:hover .card-text.small { color:#1f2937; } /* slate-800 */
.container.services-grid .card1:hover .hover-text      { color:#111827; }

/* ========= Normalizations to defeat stray inline spacing (safe) ========= */
.container.services-grid .card1 p { margin-left: 0; margin-right: 0; }
.container.services-grid .card1 svg { vertical-align: -1px; } /* nicer arrow alignment */

/* Center a single leftover card in the last row (3-column grid) */
.container.services-grid > a:nth-last-child(1):nth-child(3n + 1) {
  grid-column: 2; /* put it in the middle track */
}
