/* Styling for the Tools & Resources page (resources.qmd) */

.res-heading {
  margin-top: 2.2rem;
  font-size: 1.35rem;
}

/* One entry: icon on the left, text on the right. `position: relative` keeps the
   title's stretched link (which makes the whole entry clickable) inside the entry. */
.res-item {
  position: relative;
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.res-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.res-title {
  font-weight: 600;
  color: var(--bs-body-color);
  text-decoration: none;
}

.res-item:hover .res-title {
  color: var(--bs-primary);
}

.res-desc {
  font-size: 0.9em;
  color: var(--bs-secondary-color);
}

/* Paper the resource is described in */
.res-meta {
  font-size: 0.8em;
  color: var(--bs-tertiary-color);
}

/* The paper link sits above the stretched title link, so it can be clicked separately */
.res-paper {
  position: relative;
  z-index: 2;
  color: var(--bs-secondary-color);
}

.res-paper:hover {
  color: var(--bs-primary);
}

/* Round icon (Bootstrap icon, logo, picture or tutorial step number; font-size is for the numbers) */
.res-icon {
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
  font-size: 1.05rem;
  font-weight: 600;
}

.res-icon i {
  font-size: 1.15rem;
}

/* Logos in lists (e.g. protocols.io) are used as a stencil, filled with the same grey
   as the icon-font icons (e.g. GitHub), so all icons match in colour and size.
   The logo file should be a dark shape on a transparent background. */
.res-logo {
  width: 1.15rem;
  height: 1.15rem;
  background-color: currentColor;
  -webkit-mask: var(--logo) center / contain no-repeat;
  mask: var(--logo) center / contain no-repeat;
}

/* A picture (e.g. mitoChEP) fills the whole round icon */
.res-icon img.res-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Tiles (web resources): cards, three in a row; one per row on phones */
.res-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.res-tiles .res-item {
  padding: 1rem 1.1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
}

.res-tiles .res-item:hover {
  border-color: var(--bs-primary);
}

/* Featured entry (ProteomeHD): a large tile spanning the whole row, with logo */
.res-tiles .res-featured {
  grid-column: 1 / -1;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem 1.5rem;
}

.res-featured-logo {
  flex: none;
  width: 6rem;
}

.res-featured .res-title {
  font-size: 1.3rem;
}

.res-featured .res-desc {
  font-size: 1em;
}

/* All other entries: a simple list, separated by spacing only */
.res-list .res-item {
  padding: 0.75rem 0;
}

/* Phones: logo above the text in the featured card; tiles stacked */
@media (max-width: 767.98px) {
  .res-tiles {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .res-tiles .res-featured {
    flex-direction: column;
    align-items: flex-start;
  }
}
