.ref-card {
  display: grid;
  gap: 18px;
}

/* ---- Gallery ---- */

.ref-bg-wrap,
.ref-gallery-wrap,
.ref-list-wrap {
  display: grid;
  gap: 12px;
}

.ref-gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));

  /* ✅ make all rows the same height */
  grid-auto-rows: 1fr;
  align-items: stretch;
}

/* The card for each logo */
.ref-logo {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;

  /* ✅ fill the row height consistently */
  height: 100%;

  display: grid;
  place-items: center;
  padding: 12px;
  overflow: hidden;
}

/* The image must scale but never crop */
.ref-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ✅ never crop */
  object-position: center;
  display: block;

  /* prevent any old inline transform from previous experiments */
  transform: none !important;
}

/* ---- Divider + List ---- */

.ref-divider {
  margin-top: 6px;
  height: 1px;
  border-top: 1px solid var(--brand);
  opacity: 0.9;
}

.ref-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}
.contact-h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.25;
}

/* ---- Responsive columns ---- */

@media (max-width: 900px) {
  .ref-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 650px) {
  .ref-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== References background blocks ===== */
.ref-bg {
  margin: 0 auto 24px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ref-bg-img {
  width: 100%;
  height: auto; /* full image ratio */
  display: block;
  /* shows full image */
}
/* ===== References CTA ===== */

.ref-cta-card {
  text-align: center;
}

.ref-cta-lead {
  margin-top: 8px;
  margin-bottom: 20px;
  font-size: 15px;
}

.ref-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
