/* Homepage tool directory. Ported from the gif.pi7.org pattern.
   Grid rather than flex + percentage widths: equal columns, equal-height cards,
   and no orphan card stranded on its own row when a section has an odd count. */

.indexsec {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 8px;
}

.indexsec > p {
  font-size: 15px;
  line-height: 1.6;
  color: #4d4d4d;
  margin: 0 0 30px;
}

.indexsec h2 {
  font-size: 19px;
  color: #262626;
  margin: 34px 0 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e4f0;
  text-align: left;
}

.indexsec h2 + p {
  margin-bottom: 16px;
  font-size: 14px;
  color: #4d4d4d;
}

/* Fixed 2 columns rather than auto-fill. The sections hold 2, 4 and 3 cards, so
   with two columns only the last section ends on a half-empty row - which is the
   least awkward place for it. Three columns would strand a card in every
   section. */
.homeViews {
  padding: 0;
  margin: 16px 0 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.homeViews li {
  margin: 0;
  padding: 0;
  border: 1px solid #d5d8ea;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.homeViews li:hover {
  background: #f7f8ff;
  border-color: var(--pcolor);
  box-shadow: 0 3px 10px rgba(73, 86, 165, .13);
  transform: translateY(-2px);
}

.homeViews li > a {
  display: block;
  height: 100%;
  /* Required alongside height:100% - without it the padding is added on top of
     the full grid track and the card overflows into the row below. */
  box-sizing: border-box;
  padding: 16px 18px;
  text-align: left;
}

.homeViews b {
  display: block;
  color: var(--pcolor);
  font-size: 16px;
  margin-bottom: 7px;
}

.homeViews p {
  color: #4d4d4d;
  font-weight: normal;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  text-align: left; /* justify makes ugly rivers of whitespace in narrow cards */
}

@media only screen and (max-width: 600px) {
  .indexsec {
    padding: .5vw 3vw;
  }

  .homeViews {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .indexsec h2 {
    margin-top: 26px;
  }
}
