/* Homepage material cards only. The popular-ranges disclosure keeps its layout. */
body[data-editorial-family="home"] .editorial-materials > .shell > .home-category-photos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

body[data-editorial-family="home"] .home-category-photos > a.category-card.link-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 0;
}

body[data-editorial-family="home"] .home-category-photos > a.category-card > img.category-thumb {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 68%;
  border-radius: 2px;
  margin: 0;
}

body[data-editorial-family="home"] .home-category-photos > a.category-card[href="/hybrid/"] > img {
  object-position: center 55%;
}

body[data-editorial-family="home"] .home-category-photos > a.category-card > span:first-of-type {
  display: block;
  margin: 12px 0 0;
}

body[data-editorial-family="home"] .home-category-photos > a.category-card:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

@media (min-width: 768px) and (max-width: 1199px) {
  body[data-editorial-family="home"] .editorial-materials > .shell > .home-category-photos {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  body[data-editorial-family="home"] .home-category-photos > a.category-card { grid-column: span 2; }
  body[data-editorial-family="home"] .home-category-photos > a.category-card:nth-child(4) { grid-column: 2 / span 2; }
}

@media (max-width: 767px) {
  body[data-editorial-family="home"] .editorial-materials > .shell > .home-category-photos {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
}
