/* Related taxonomy navigation used only by /x category pages. */
body.x-directory-category-page .x-related-categories {
  display: grid;
  gap: 16px;
  width: 100%;
  margin-top: clamp(11px, 1.5vw, 19px);
  padding: clamp(18px, 2vw, 24px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 24px;
  background: #050505;
  box-sizing: border-box;
}

body.x-directory-category-page .x-related-categories-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  column-gap: clamp(14px, 2vw, 28px);
  row-gap: 4px;
}

body.x-directory-category-page .x-related-category-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 40px;
  padding: 6px 2px;
  color: rgba(255, 255, 255, .64);
  font: 400 11px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: 0;
  text-decoration: none;
  box-sizing: border-box;
  transition: color .16s ease;
}

body.x-directory-category-page .x-related-category-link:is(:hover, :focus-visible) {
  color: #fff;
  outline: none;
}

body.x-directory-category-page .x-related-category-icon {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, .58);
  box-sizing: border-box;
  transition: color .16s ease, transform .16s ease;
}

body.x-directory-category-page .x-related-category-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body.x-directory-category-page .x-related-category-link strong {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font: inherit;
  font-weight: 400;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.x-directory-category-page .x-related-category-link strong::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: -4px;
  left: 0;
  height: 1px;
  background: currentColor;
  opacity: .72;
  transition: right .2s ease;
}

body.x-directory-category-page .x-related-category-link:is(:hover, :focus-visible) .x-related-category-icon {
  color: #fff;
  transform: translateY(-1px);
}

body.x-directory-category-page .x-related-category-link:is(:hover, :focus-visible) strong::after {
  right: 0;
}

@media (max-width: 980px) {
  body.x-directory-category-page .x-related-categories-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  body.x-directory-category-page .x-related-categories {
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
  }

  body.x-directory-category-page .x-related-categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 14px;
    row-gap: 3px;
  }

  body.x-directory-category-page .x-related-category-link {
    gap: 8px;
    min-height: 38px;
    padding: 5px 0;
  }

  body.x-directory-category-page .x-related-category-icon {
    flex-basis: 22px;
    width: 22px;
    height: 22px;
  }

  body.x-directory-category-page .x-related-category-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 340px) {
  body.x-directory-category-page .x-related-categories-grid {
    grid-template-columns: 1fr;
  }
}
