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


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

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

.color_cards .list_layout.row { margin: 0 -4px; width: calc(100% + 8px); } /* 0 - 4 */
@media (min-width: 768px)  { .color_cards .list_layout.row { margin: 0 -8px; width: calc(100% + 16px); } }/* 0 - 8 */
@media (min-width: 1024px) { .color_cards .list_layout.row { margin: 0 -10px; width: calc(100% + 20px); } }/* 0 - 10 */
@media (min-width: 1600px) { .color_cards .list_layout.row { margin: 0 -12px; width: calc(100% + 24px); } }/* 0 - 12 */




/*
 * title row
 */

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

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

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

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

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

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

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

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

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

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

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

.color_cards .title_row .heading_col {
  display: inline-block;
  width: 50%;
}

@media (max-width: 768px) {
  .color_cards .title_row .heading_col {
    width: 60%;
  }
}

.color_cards .title_row .link_col {
  display: inline-block;
  width: 50%;
  text-align: right;
}

@media (max-width: 768px) {
  .color_cards .title_row .link_col {
    width: 40%;
  }
}


/*
 * list layout
 */

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




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

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

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

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

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

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

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


/*
 * list item
 */

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

.color_cards .item .link {
  text-decoration: none;
}

.color_cards .item .text {
  padding: 2rem;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .color_cards .item .text {
    padding: 1rem;
  }
}

.color_cards .item {
  display: block;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

@media (max-width: 768px) {
  .color_cards .item {
    margin-top: 0;
  }
}


.color_cards .item .title {
  min-height: 4.4em;
}

@media (max-width: 1220px) {
  .color_cards .item .title {
    min-height: 4.4em;
  }
}

@media (max-width: 1023px) {
  .color_cards .item .title {
    min-height: 6.5em;
  }
}

@media (max-width: 768px) {
  .color_cards .item .title {
    min-height: 0;
  }
}


.color_cards .item .detail {
  transition: transform 500ms;
  transform: translateY(0.5rem);
  min-height: 6.2rem;
}

@media (max-width: 1220px) {
  .color_cards .item .detail {
    min-height: 8.3rem;
  }
}

@media (max-width: 1023px) {
  .color_cards .detail {
    min-height: 14.3rem;
  }
}

@media (max-width: 768px) {
  .color_cards .detail {
    min-height: 0;
  }
}

.color_cards .item:hover .detail {
  transform: translateY(0);
}

.color_cards .item .detail a {
  text-decoration: none;
}

.color_cards .item .image_cont {
  position: relative;
  transition: transform 500ms;
  transform: translateY(0.5rem);
  background: inherit;
}

.color_cards .item:hover .image_cont {
  transform: translateY(0);
}

.color_cards .item .image {
  display: block;
  width: 100%;
  height: auto;
}

.color_cards .item .image.desaturated {
  mix-blend-mode: multiply;
  filter: saturate(0);
}

.color_cards .item .image.saturated {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: opacity 500ms;
}

.color_cards .item:hover .image.saturated {
  opacity: 1;
}

.color_cards .item .link_text {
  margin-top: 0.5rem;
  display: block;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
}






/*
 * artwork item
 */

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

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

/*
 * article item
 */

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


/*
 * exhibition item
 */




/*
 * event item
 */

.color_cards .item.event_item {
  position: relative;
}

.color_cards .item.event_item .series_icon {
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.4rem;
  background: url('./images/series_icon.png') center/0.5rem no-repeat;
  display: inline-block;
  vertical-align: middle;
}

.color_cards.inverted .item.event_item .series_icon {
  background: url('./images/series_icon_inverted.png') center/0.5rem no-repeat;
}

.color_cards .item.event_item .label {
  display: inline-block;
  vertical-align: middle;
}


/*
 * page item
 */

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

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


/*
 * learning resource item
 */


.color_cards .item.learning_resource_item .img_cont {
  position: relative;
}

.color_cards .item.learning_resource_item .overlay {
  display: inline-block;
  margin-left: 0.3em;
}

.color_cards .item.learning_resource_item .text_link {
  text-decoration: none;
}

.color_cards .item.learning_resource_item .text_link:hover {
  opacity: 0.655;
}

.color_cards .item.learning_resource_item .label_cont {
  margin-top: 0.5rem;
}

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

.color_cards .item.learning_resource_item .resource_set_icon {
  height: 12px;
  width: 12px;
  margin-right: 0.4rem;
  background: url('./images/resource_set_icon.svg') center/0.5rem no-repeat;
  display: inline-block;
  vertical-align: middle;
}

.color_cards.inverted .item.learning_resource_item .resource_set_icon {
  background: url('./images/resource_set_icon_inverted.svg') center/0.5rem no-repeat;
}

.color_cards .item.learning_resource_item .part {
  margin-top: 0.5rem;
}

.color_cards .item.learning_resource_item .part a {
  color: #000;
}

.color_cards .item.learning_resource_item .part a:hover {
  opacity: 0.655;
}

.color_cards.inverted .item.learning_resource_item .part a {
  color: #fff;
}

.color_cards .item.learning_resource_item .curr_areas {
  margin-top: 0.5rem;
}

.color_cards .item.learning_resource_item .curr_area {
  display: inline;
  margin-right: 0.5rem;
  color: #000;
  text-decoration: underline;
}

.color_cards .item.learning_resource_item .curr_area:hover {
  opacity: 0.655;
}

.color_cards.inverted .item.learning_resource_item .curr_area {
  color: #fff;
}


/*
 * artist item
 */

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

.color_cards .item.artist_item .bio {
  margin-top: 0.5rem;
}

.color_cards .item.artist_item .button {
  margin-top: 1rem;
}


/*
 * color
 */

.color_cards.orange .item {
  background: #ef833a;
}

.color_cards.bronze .item {
  background: #a6957e;
}

.color_cards.navy .item {
  background: #103f52;
  color: #fff;
}

.color_cards.yellow .item {
  background: #edc81a;
}

.color_cards.olive .item {
  background: #b3a400;
}

.color_cards.warm_grey .item {
  background: #3a4337;
  color: #fff;
}

.color_cards.green .item {
  background: #23a7a2;
}

.color_cards.teal .item {
  background: #3b8c8b;
}

.color_cards.brown .item {
  background: #5c5a4a;
  color: #fff;
}

