.list {
  min-height: 200px;
  padding: 20px 0;
}

.list__top-buttons {
  display: grid;
  gap: 10px 20px;
  grid-template-columns: repeat(auto-fit, minmax(0, max-content));
  justify-content: flex-end;
  margin: 0 0 20px 0;
}

.list__item {
  padding: 20px 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 20px;
  border-bottom: 1px solid var(--border-color);
}

.list__item--main {
  grid-template-columns: 1fr 1fr;
}

.list__item--no-photo {
  grid-template-columns: 100%;
}

.list__photo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 136px;
  height: 85px;
}

.list__photo:hover {
  border: none;
}

.list__photo-image {
  border-radius: 4px;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
}

.list__head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.list__head > * {
  margin-bottom: 12px;
}

:root.root--special .list__item {
  border-color: var(--special-text-color);
}

@media (hover: hover) {
  .list__title > a:hover {
    text-decoration: underline;
    text-decoration-color: var(--primary-color-25);
  }
}

@media screen and (max-width: 735px) {
  .list__item {
    grid-template-columns: 100%;
  }

  .list__photo {
    width: 100%;
    height: auto;
    aspect-ratio: calc(136 / 85);
  }

  .list__photo-picture {
    width: 100%;
    height: 100%;
  }

  .list__photo-image {
    width: 100%;
    object-fit: contain;
  }
}

@media screen and (min-width: 736px) {
  :where(.list__item--main) .list__photo {
    height: auto;
    width: auto;
    max-height: 340px;
    max-width: 544px;
  }
}
