
/* --------------- HIGHLIGHTED RELATED PAGE --------------- */

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child {
  overflow: hidden;
  border: none;
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 30px 2rem;
}

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child:after {
  content: url(../../assets/filigrane/filigrana-logo-ictp.png);
  position: absolute;
  z-index: -2;
  top: 40%;
  left: 3rem;
  opacity: .7;
  transform: translateY(-50%);
  width: 28%;
  display: flex;
  align-items: center;
  justify-content: center;
} 

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related  .field-content article:first-child .image +  .tile-content,
body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related  .field-content article:first-child .image +  .tile-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  width: 100%;
}

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related  .field-content article:first-child .tile-content {
  justify-content: flex-start;
  margin-top: 16px;
 }

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child  .image+  .tile-content * {
  color: #FFF;
}

/* on HIGHLIGHTED image takes full space */
body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image:after {
  background-color: #00000061;
  position: absolute;
  width: 100%;
  height: 100%;
  content: "";
  top: 0;
  left: 0;
  z-index: 1;
}

/* on HIGHLIGHTED put image as background */
body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child img {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .footer-related-content a {
  background: none;
}
body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .footer-related-content {
  margin-top: 20px;
}

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .footer-related-content {
  margin-bottom: 0px;
}

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .subtitle,
body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .title,
body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .body,
body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .footer-related-content {
  display: block;
}

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .body {
  display: none;
}

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .title {
  margin-bottom: 5px;
}

body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .body p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5rem;
}


body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image + .tile-content .footer-related-content a:after{
  content: url(../../assets/icons/icon_arrow_right_w.svg);
}


/*summary*/
body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .summary {
  display: block;
}
body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .summary div {
  font-size: 14px;
  font-weight: 400;
}

/*NO IMAGE*/
/* body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child{
  background-color: var(--light_gray);
} */



@media (min-width: 1024px) {
  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image + .tile-content .footer-related-content a:after {
    content: url(../../assets/icons/icon_arrow_right.svg);
    height: 14px;
    right: 18px;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child {
    height: 350px;
    padding: 2rem;
  }
}


@media (min-width: 1024px) {
  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child {
    border: 1px solid var(--border_gray);
    position: relative;
    max-width: unset;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    background-color: transparent;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image {
    height: 350px;
    width: 350px;
    position: relative;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .tile-content {
    padding: 20px;
    justify-content: flex-start;
  }


  /* content if there is an image */
  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image + .tile-content {
    width: calc(100% - 416px);
    padding-right: 230px;
  }

  /* content if there's no image */
  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .tile-content:first-child {
    width: 100%;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child:after { top: 50%; }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image:after { display: none; }
  
  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image+ .tile-content *,
  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .tile-content * {
    color: var(--text_color);
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image+ .tile-content {
    margin-top: 16px;
     margin-left: auto;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child  .tile-content {
    margin-left: auto;
    margin-right: 0;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .tile-content .footer-related-content {
    margin-top: auto;
    margin-bottom: 40px;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .tile-content .footer-related-content a {
    border-color: #dddddd;
    display: block;
    width: fit-content;
    height: unset;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .tile-content .footer-related-content a::after {
    content: url(../../assets/icons/icon_arrow_right.svg);
    width: 1.5em;
    height: 1.5em;
  }
}


@media (min-width: 1400px) {
  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child {
    min-height: 380px;
    display: flex;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .image {
    height: 380px;
    width: 380px;
  }

  body.highlight-first-related:not(.page-article) .block-views-blockrelated-content-related .field-content article:first-child .tile-content {
    width: calc(100% - 390px);
    padding: 30px;
    justify-content: flex-start;
  }
}
