.acf-bf-card-grid {
  padding: 2.8rem 20px;
  background: #fff;
  text-align: center;
}

.bf-card-grid-container {
  max-width: 1200px;
  margin: 0 auto;
}

.bf-card-grid-heading {
  margin: 0 0 2.6rem;
  font-size: clamp(36px, 6vw, 60px);
  line-height: .95;
  text-transform: uppercase;
}

.bf-card-grid-subheading {
  margin-top: 42px;
  font-size: 20px;
}

.bf-card-grid-list {
    display: grid;
    gap: 3rem 1rem;
}

.bf-card-grid-list--2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 820px;
  margin: 0 auto;
}
.bf-card-grid-list--3 {
    grid-template-columns: repeat(3, 1fr);
	    max-width: 1000px;
    margin: auto;
}

.bf-card-grid-list--3 {
  grid-template-columns: repeat(6, 1fr);
}

.bf-card-grid-list--3 > .bf-card-item {
  grid-column: span 2;
}

/* when the last row has 2 cards, center them */
.bf-card-grid-list--3 > .bf-card-item:nth-last-child(2):nth-child(3n + 1) {
  grid-column: 2 / span 2;
}

.bf-card-grid-list--3 > .bf-card-item:last-child:nth-child(3n + 2) {
  grid-column: 4 / span 2;
}

/* When there are exactly 2 cards total, center the pair */
.bf-card-grid-list--3:has(> .bf-card-item:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

.bf-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.bf-card-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 205px;
  border-radius: 4px;
  overflow: hidden;
}

.bf-card-media img {
  max-width: 58%;
  max-height: 115px;
  display: block;
}

.bf-card-title {
  margin: 22px 0 0;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
}

.bf-card-button {
  margin-top: 20px;
}
.bf-card-item--transparent .bf-card-media {
  min-height: 0 !important;
  height: auto !important;
  background: transparent !important;
  border-radius: 0;
  overflow: visible;
  padding: 0;
}

.bf-card-item--transparent .bf-card-media img {
  max-height: 115px;
  width: auto;
  display: block;
}

.bf-card-item--transparent .bf-card-title {
  margin-top: 2rem;
}
@media (max-width: 900px) {

  .bf-card-grid-list--2,
  .bf-card-grid-list--3 {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin: 0 auto;
  }

  .bf-card-grid-list--3 > .bf-card-item {
    grid-column: auto !important;
  }

  .bf-card-media {
    min-height: 175px;
  }
}
.bf-card-grid-button-wrap {
  margin-top: 42px;
}
.bf-card-item--transparent .bf-card-link {
  width: 100%;
}

.bf-card-item--transparent .bf-card-media {
  min-height: 0 !important;
}