/**
 * @file
 * Grids for paragraphs that lay out their own cards.
 */

.price-cards,
.testimonials,
.cta-cards .view-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.price-cards--2,
.testimonials--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.price-cards--3,
.cta-cards .view-content {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-cards--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.price-cards--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.price-cards--5 .price {
  font-size: 1.75rem;
}

.testimonials--1 {
  max-width: 47.5rem;
}

.section--split .testimonials--1,
.section--split-reverse .testimonials--1 {
  max-width: none;
}

/* Each row wrapper stretches to the tallest card in the row; the card fills
   its wrapper, so all the cards in a row are the same height. */
.cta-cards .view-content > * {
  display: flex;
}

.cta-cards .cta-card {
  flex: 1;
}

.cta-cards .cta-card .links-row {
  margin-top: 0;
}

/* Prices, in price cards and call to action cards. */
.price {
  margin: 0 0 0.5rem;
  color: var(--jh-ink);
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
}

.price__per {
  color: var(--jh-muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.cta-card .price {
  /* Prices and links line up along the bottom of the row of cards. */
  margin: auto 0 0.25rem;
  padding-top: 0.5rem;
  font-size: 1.75rem;
}

@media (max-width: 820px) {
  .price-cards--2,
  .price-cards--3,
  .testimonials--2,
  .cta-cards .view-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .price-cards--4,
  .price-cards--5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
