/* ==========================================================================
   Services page
   Requires theme.css first (banner, breadcrumbs, buttons, eyebrow).
   ========================================================================== */

.sv-page {
  padding: var(--ims-section) 0;
  background: var(--ims-surface);
}

/* ---- Grid ---------------------------------------------------------------
   Cards stretch to the tallest in their row, so a long description never
   leaves its neighbours floating with ragged bottoms.
   ------------------------------------------------------------------------ */

.sv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--ims-gap-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-grid__cell {
  display: flex;
}

/* ---- Card --------------------------------------------------------------- */

.sv-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--ims-paper);
  border: 1px solid var(--ims-rule);
  transition: border-color 200ms ease;
}

.sv-card:hover {
  border-color: var(--ims-ink);
}

.sv-card__media {
  position: relative;
  overflow: hidden;
  background: var(--ims-surface-2);
}

/* A real <img> with object-fit, not a background div — so the photo has alt
   text, lazy loads, and can actually be found in an image search. */
.sv-card__img {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 400ms ease;
}

.sv-card:hover .sv-card__img {
  transform: scale(1.04);
}

.sv-card__icon {
  position: absolute;
  bottom: 0;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: var(--ims-brand);
  transform: translateY(50%);
}

.sv-card__icon img {
  display: block;
  width: 30px;
  height: auto;
}

.sv-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 46px 24px 26px;
}

.sv-card__title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ims-ink);
}

.sv-card__summary {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--ims-brand);
}

.sv-card__text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--ims-ink-soft);
}

/* Pushes the link to the bottom edge whatever the copy length */
.sv-card__foot {
  margin: auto 0 0;
  padding-top: 16px;
  font-size: 14px;
  border-top: 1px solid var(--ims-rule);
}

/* ---- Call to action ----------------------------------------------------- */

.sv-cta {
  padding: 72px 0;
  background: var(--ims-deep);
}

.sv-cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ims-gap-lg);
}

.sv-cta__title {
  margin: 0 0 8px;
  font-size: 26px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ims-ink-invert);
}

.sv-cta__lead {
  margin: 0;
  font-size: 15px;
  color: var(--ims-ink-invert-soft);
}

.sv-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- Breakpoints -------------------------------------------------------- */

@media (max-width: 767px) {
  .sv-page { padding: var(--ims-section-sm) 0; }

  .sv-card__img { height: 180px; }
  .sv-card__body { padding: 42px 20px 24px; }
  .sv-card__title { font-size: 18px; }

  .sv-cta { padding: 52px 0; }
  .sv-cta__title { font-size: 21px; }
  .sv-cta__actions .ims-btn { flex: 1 1 auto; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-card,
  .sv-card__img {
    transition: none;
  }

  .sv-card:hover .sv-card__img { transform: none; }
}
