/* Homepage only: clear photos framed by a title and a single-line caption. */
.home-solution-grid .photo-tile {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  grid-template-rows: auto 1fr auto;
  column-gap: 8px;
  align-items: start;
  justify-content: stretch;
  min-height: 210px;
  padding: 20px;
}

.home-solution-grid .photo-tile h3 {
  grid-column: 1;
  grid-row: 1;
  margin: 0;
  padding: 0;
  font-size: clamp(18px, 1.3vw, 20px);
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .3);
}

.home-solution-grid .photo-tile .arrow {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  inset: auto;
  justify-self: end;
  font-size: 22px;
  line-height: 1;
}

.home-solution-grid .photo-tile p {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  width: 100%;
  max-width: none;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  white-space: nowrap;
  color: #fff;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .35);
}

/* Keep the middle of the photograph clear; shade only behind the text. */
.home-solution-grid .photo-tile::before,
.home-solution-grid .photo-tile:hover::before {
  filter: none;
}

.home-solution-grid .photo-tile::after,
.home-solution-grid .photo-tile:hover::after {
  background: linear-gradient(180deg,
    rgba(7, 24, 44, .78) 0%,
    rgba(7, 24, 44, .48) 25%,
    rgba(7, 24, 44, 0) 45%,
    rgba(7, 24, 44, 0) 64%,
    rgba(7, 24, 44, .68) 82%,
    rgba(7, 24, 44, .86) 100%);
}

.home-solution-grid .photo-tile:hover::before {
  transform: scale(1.04);
}

.home-solution-grid .photo-tile:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: -3px;
}

/* Switch columns before the full titles or captions would become cramped. */
@media (max-width: 1279px) {
  .home-solution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .home-solution-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .home-solution-grid .photo-tile {
    min-height: 200px;
    padding: 18px;
  }
  .home-solutions h2 {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-solution-grid .photo-tile::before,
  .home-solution-grid .photo-tile:hover::before {
    transform: none;
    transition: none;
  }
}
