[data-component-id="intervarsity_base_9:resource_teaser_twig"] .resource-reference {
  display: flex;
  max-width: 720px;
  align-items: center;
  gap: 32px;
  width: 100%;
  flex-direction: column;
}

.resource-reference .ref-thumb {
  flex-shrink: 0;
  border-radius: 16px;
  box-shadow: 0px 0px 0px 0px #fff inset,
    0px 0px 0px 1px rgba(17, 24, 39, 0.1) inset;
  background-size: cover;
  background-repeat: no-repeat;
  aspect-ratio: 16/9;
}
.resource-reference .ref-link {
  min-height: 160px;
  height: 100%;
  width: 100%;
}

.resource-reference .ref-content {
  margin-right: auto;
}

.resource-reference .ref-body {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #4B5563;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
}

[data-component-id="intervarsity_base_9:resource_teaser_twig"] .ref-title {
  color: #006680;
  font-family: GaspoSlab, sans-serif;
  font-size: 24px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

[data-component-id="intervarsity_base_9:resource_teaser_twig"] .ref-title a {
  color: #006680;
  text-decoration: none;
}

[data-component-id="intervarsity_base_9:resource_teaser_twig"] .ref-tags {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

[data-component-id="intervarsity_base_9:resource_teaser_twig"] .ref-tags .ref-tag {
  display: flex;
  padding: 6px 12px;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 9999px;
  color: #4b5563;
  background: #f9fafb;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: 16px;
  text-decoration: none;
}
.ref-tags .ref-tag.only-staff {
  background: #FFF0F5;
  color: #801039;
}

 /* handle spacing in parent when the component is used in a view */
.view-content.row:has([data-component-id="intervarsity_base_9:resource_teaser_twig"]) {
  display: flex;
  gap: 24px;
  flex-direction: column;
  margin-bottom: 48px;
  margin-top: 48px;
}

.grid.sidescroll-group .group-wrapper h3 {
  padding-top: inherit;
}
.grid.sidescroll-group .views-row {
  padding: 0;
}
/* if the group wrapper is present but the side-scroll-group class is not, apply this: */
.view-duplicate-of-tvi-tag-terms- .group-wrapper {
  display: flex;
  gap: 24px;
  flex-direction: column;
  margin-top: 24px;
  margin-bottom: 48px;
}
/* otherwise, if both sidescroll-group and group-wrapper class are there, apply this */
.sidescroll-group.view.view-duplicate-of-tvi-tag-terms- .group-wrapper {
  flex-direction: row;
  /* below is a fix for behavior on firfox and arc browser */
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.5) transparent;
}

.sort-container {
  max-width: 700px;
  margin: auto;
}
.views-element-container._none.contextual-region.block.block-views.block-views-blocknew-search-with-filter-and-sorting-block-2 {
  max-width: 700px;
  margin: auto;
}

.sidescroll-group .views-row {
  width: 285px;
}

@media (min-width: 768px) {
  [data-component-id="intervarsity_base_9:resource_teaser_twig"] .resource-reference {
    flex-direction: row;
  }
  .sidescroll-group [data-component-id="intervarsity_base_9:resource_teaser_twig"] .resource-reference {
    flex-direction: column;
  }
  .resource-reference .ref-thumb {
    width: 160px;
    height: 160px;
  }
  .sidescroll-group .resource-reference .ref-thumb {
    width: inherit;
    height: inherit;
  }
  .resource-reference .ref-link {
    width: 160px;
  }
  .sidescroll-group .resource-reference .ref-link {
    width: inherit;
  }
}

@media (min-width: 1200px) {
  .resource-highlights-top-level [data-component-id="intervarsity_base_9:resource_teaser_twig"] {
    width: calc(50% - 12px);
  }
  /* two per row on main search page */
  /* .view-new-search-with-filter-and-sorting .view-content.row:has([data-component-id="intervarsity_base_9:resource_teaser_twig"]) {
    flex-direction: row;
  } */
  /* .view-new-search-with-filter-and-sorting .view-content > div {
    width: calc(50% - 12px);
  } */
}
