/*
 * This file is organised like this:
 *
 * - discovery_stream
 *
 *   - list_layout
 *     - title_row
 *     - list_item
 *       - artwork_item
 *       - article_item
 *       - exhibition_item
 *       - event_item
 *       - page_item
 *       - learning_resource_item
 *       - artist_item
 */


.discovery_stream {
  /*
   * Desired margin: 5rem;
   * Children all have 3rem margin top.
   * So actual margin: 5rem - 3rem = 2rem.
   */
  margin-top: 3rem;
  overflow: hidden;/* to support negative margins and overlflowing col padding*/
  clear: both;
}

@media (max-width: 768px) {
  .discovery_stream {
    margin-top: 1rem;
  }
}

.discovery_stream.inverted {
  background: #000;
  color: #fff;
  padding: 2rem 2rem 5rem 2rem;/*desired (5rem) - first child margin (3rem)*/
  margin-top: 5rem;
}

@media (max-width: 768px) {
  .discovery_stream.inverted {
    padding: 3rem 1rem 3rem;
  }
}

.discovery_stream.background_image {
  background-position: center;
  background-size: cover;
  padding: 10rem 0 10rem;
}

.discovery_stream.background_image .row {
  background: #fff;
  overflow: hidden;
}

.discovery_stream.background_image .row:first-child {
  padding-top: 2rem;/*desired (5rem) - first child margin (3rem)*/
}

.discovery_stream.background_image .row:last-child {
  padding-bottom: 5rem;
}

.discovery_stream.background_image.inverted .row {
  background: #000;
}

@media (max-width: 768px) {
  .discovery_stream.background_image {
    background-image: none !important;
    padding: 0;
  }
  .discovery_stream.background_image .row {
    margin-top: 0;
    margin-bottom: 0;
    background: none;
    padding-bottom: 0;
  }
  .discovery_stream.background_image .row:first-child {
    padding-top: 0rem;
  }
  .discovery_stream.background_image .row:last-child {
    padding-bottom: 0rem;
  }
}




/*
 * title row
 */

.discovery_stream .title_row {
  margin-top: 3rem;
}

.discovery_stream .title_row:after {
  clear: both;
  content: " ";
  height: 0;
  display: block;
}

@media (max-width: 768px) {
  .discovery_stream.inverted .title_row,
  .discovery_stream.background_image .title_row {
    margin-top: 0rem;
  }
}

.discovery_stream .title_row h2 {
  font-size: inherit;
  line-height: inherit;
  margin: inherit;
}

.discovery_stream .title_row .title_link {
  color: inherit;
  text-decoration: none;
}

.discovery_stream .title_row .title_link:hover {
  opacity: 0.655;
}

.discovery_stream .title_row .link {
  display: inline-block;
  text-decoration: none;
  position: relative;
  z-index: 0;
  user-select: none;
  cursor: pointer;
  opacity: 0.655;
}

.discovery_stream .title_row .link:hover {
  opacity: 1;
}

.discovery_stream .title_row .link_text {
  display: inline-block;
  white-space: nowrap;
  transition: color 200ms;
}

.discovery_stream .title_row .link_text:after {
  display: inline-block;
  width: 0.58em;
  height: 0.58em;
  content: " ";
  margin-left: 0.2rem;
  background: url('./images/navigate_right_black.svg') 50%/contain no-repeat;
}

.discovery_stream.inverted .title_row .link_text:after {
  background: url('./images/navigate_right.svg') 50%/contain no-repeat;
}

.discovery_stream .title_row .heading_col {
  display: inline-block;
}

@media (max-width: 768px) {
  .discovery_stream .title_row .heading_col {
    display: block;
  }
}

.discovery_stream .title_row .link_col {
  display: inline-block;
  margin-left: 1.2rem;
}

@media (max-width: 768px) {
  .discovery_stream .title_row .link_col {
    display: block;
    margin-left: 0;
  }
}


/*
 * list layout
 */

.discovery_stream .list_layout {
  overflow: hidden;/*only way to disable margin collapse on title*/
}




.discovery_stream .list_layout:first-child {
  margin-top: 0;
}

.discovery_stream .list_layout_col {
  margin-top: 3rem;
}

@media (max-width: 2560px) {
  .discovery_stream .list_layout_col {
    margin-top: 2.5rem;
  }
}

@media (max-width: 1260px) {
  .discovery_stream .list_layout_col {
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .discovery_stream .list_layout_col {
    margin-top: 1rem;
  }
}

.discovery_stream .list_layout_col.clear {
  clear: left;
}

@media (max-width: 768px) {
  .discovery_stream .list_layout_col.clear {
    clear: none;
  }
}

@media (max-width: 768px) {
  .discovery_stream .list_layout_col:nth-of-type(2n+1) {
    clear: left;
  }
}

@media (max-width: 768px) {
  .discovery_stream .mobile2col .list_layout_col {
    width: 50%;
  }
}


/*
 * list item
 */

/* Don't prefix with discovery stream. This can be used in FeaturedContent */

.list_item .img {
  width: 100%;
  height: auto;
  display: block;
}

.list_item .img_aspect {
  padding-top: 66.666%;
  position: relative;
}

.list_item .img_aspect .img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.list_item .text {
  padding-right: 1rem;
}

.list_item .title {
  margin-top: 40px;
  margin-bottom: 40px;
}

@media (max-width: 2560px) {
  .list_item .title {
    margin-top: 30px;
    margin-bottom: 30px;
  }
}

@media (max-width: 1260px) {
  .list_item .title {
    margin-top: 25px;
    margin-bottom: 25px;
  }
}

@media (max-width: 768px) {
  .list_item .title {
    margin-top: 10px;
    margin-bottom: 10px;
  }
}



.list_item .link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.list_item .link:hover .text {
  opacity: 0.655;
}

/*
.list_item .text_part {
  padding: 2rem 20px;
  box-sizing: border-box;
  min-height: 15rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .list_item .text_part {
    padding: 2rem 40px;
  }
}
*/



/*
 * artwork item
 */

.list_item.artwork_item .link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.list_item.artwork_item .artist {
  text-decoration: none;
  color: inherit;
}

.list_item.artwork_item .img_cont {
  padding-top: 66.666%;
  position: relative;
  background: #f5f5f5;
}

.list_item.artwork_item .img_cont .img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
 

/*
 * article item
 */



/*
 * exhibition item
 */

.list_item.exhibition_item .link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.list_item.exhibition_item .touring_exhibition_tag {
  margin-top: 1rem;
}


/*
 * event item
 */

.list_item.event_item {
  position: relative;
}

.list_item.event_item .label {
  display: inline-block;
  vertical-align: middle;
  text-transform: capitalize;
}


/*
 * page item
 */

.list_item.page_item .link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.list_item.page_item .detail *:first-child {
  margin-top: 0;
}


/*
 * learning resource item
 */


.list_item.learning_resource_item .img_cont {
  position: relative;
}

.list_item.learning_resource_item .overlay {
  display: block;
  position: absolute;
  right: 0.5rem;
  background: #fff;
  color: #000;
  padding: 0.25em 0.3rem;
  font-size: 0.7rem;
  line-height: 0.7rem;
  border: 1px solid #ccc;
  min-width: 4rem;
  text-align: center;
}

.list_item.learning_resource_item .label {
  display: inline-block;
  vertical-align: middle;
}

.list_item.learning_resource_item .summary p {
  margin: 0;
}

.list_item.learning_resource_item .part {
}

.list_item.learning_resource_item .part a {
  color: #000;
}

.list_item.learning_resource_item .part a:hover {
  opacity: 0.655;
}

.discovery_stream.inverted .list_item.learning_resource_item .part a {
  color: #fff;
}

.list_item.learning_resource_item .curr_areas {
}

.list_item.learning_resource_item .curr_area {
  display: inline;
  margin-right: 0.5rem;
  color: #000;
}

.list_item.learning_resource_item .curr_area:hover {
  opacity: 0.655;
}

.discovery_stream.inverted .list_item.learning_resource_item .curr_area {
  color: #fff;
}


/*
 * artist item
 */


.list_item.artist_item .img_cont {
  padding-top: 66.666%;
  position: relative;
  background: #f5f5f5;
}

.list_item.artist_item .img_cont .img {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.list_item.artist_item .name {
  color: inherit;
  text-decoration: none;
}


/*
 * color
 */

.discovery_stream.orange .list_item {
  background: #ef833a;
}

.discovery_stream.bronze .list_item {
  background: #a6957e;
}

.discovery_stream.navy .list_item {
  background: #103f52;
  color: #fff;
}

.discovery_stream.yellow .list_item {
  background: #edc81a;
}

.discovery_stream.olive .list_item {
  background: #b3a400;
}

.discovery_stream.warm_grey .list_item {
  background: #3a4337;
  color: #fff;
}

.discovery_stream.green .list_item {
  background: #23a7a2;
}

.discovery_stream.teal .list_item {
  background: #3b8c8b;
}

.discovery_stream.brown .list_item {
  background: #5c5a4a;
  color: #fff;
}

