.item-grid {
  display: grid;
  gap: var(--sp-cta-grid-gap);
  row-gap: .5rem;
  margin: 0 auto;
}

/* Desktop Grid */
@media (min-width: 1024px) {
  .item-grid {
    grid-template-columns: repeat(var(--sp-item-grid-columns), 1fr);
  }
}

/* Tablet Grid */
@media (min-width: 768px) and (max-width: 1023px) {
  .item-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Grid */
@media (max-width: 767px) {
  .item-grid {
    grid-template-columns: 1fr;
  }
}

.item-card {
  color: var(--sp-body-font-color);
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  overflow: hidden;
  text-decoration: none;
}

.item-card__inner {
  display: contents;
  text-align: center;
}

.item-card__image {
  grid-row: 1;
  aspect-ratio: 1/1;
  overflow: hidden;
  position: relative;
}

.item-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

h3.item-card__title {
  grid-row: 2;
  margin: 2rem 1rem 0 1rem;
  font-size: 2rem;
  font-weight: 600;
  line-height: normal;
  color: var(--sp-color-primary);
  text-align: center;
}

a.item-card:hover h3.item-card__title {
  color: var(--sp-color-secondary);
}

@media (max-width: 767px) {
  h3.item-card__title {
    margin: 1rem 1rem 0 1rem;
    font-size: 1.5rem;
  }
}

.item-card__subtitle {
  grid-row: 3;
  margin: 0 1rem 1.5rem 1rem;
  font-size: 1rem;
  color: #000;
  font-weight: 300;
  line-height: normal;
  text-align: center;
}

@media (max-width: 767px) {
  .item-card__subtitle {
    margin: 0 1rem;
    font-size: 1.3rem;
  }
}

.item-card__text {
  grid-row: 4;
}

.item-card__button {
  grid-row: 5;
  padding: 1rem 1rem 1.5rem 1rem;
  text-align: center;
}

@supports not (grid-template-rows: subgrid) {
  .item-card {
    display: flex;
    flex-direction: column;
  }

  .item-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
  }

  .item-card__image {
    flex-shrink: 0;
  }

  .item-card__title {
    flex-grow: 0;
  }

  .item-card__subtitle {
    flex-grow: 0;
  }

  .item-card__button {
    margin-top: auto;
  }
}
