
/* ------------ ------------ CUSTOM-BLOCK-ABOUT ------------ ------------ */

.custom-block-about {
  color: white;
  padding: 1rem 1rem;
  margin: 0 -15px;
  display: none;
  background-color: #39434E;
  position: relative;
}

.custom-block-about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 180px;
  z-index: 0;
  overflow: hidden;
  background: url(../../assets/images/bg-about-ictp.webp);
  background-size: 100% auto;
  background-position: top center;
  background-repeat: no-repeat;
}

.view-taxonomy-term .custom-block-about { margin-top: 2rem; }

.view-taxonomy-term .custom-block-about .overlay {
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  background-position: center center;
  height: 100%;
  width: 100%;
}
.custom-block-about.block-hecap .overlay { background-image: url(../../assets/images/bg-hecap.webp); }
.custom-block-about.block-cmsp .overlay { background-image: url(../../assets/images/bg-cmsp.webp); }
.custom-block-about.block-math .overlay { background-image: url(../../assets/images/bg-math.webp); }
.custom-block-about.block-sti .overlay { background-image: url(../../assets/images/bg-sti.webp); }
.custom-block-about.block-qls .overlay { background-image: url(../../assets/images/bg-qls.webp); }
.custom-block-about.block-esp .overlay { background-image: url(../../assets/images/bg-esp.webp); }

.custom-block-about .overlay:before {
  content: '';
  position: absolute;
  display: block;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-repeat: no-repeat;
  background-size: cover;
}

.custom-block-about.block-hecap .overlay:before { background-image: url(../../assets/images/filigrana_banner_HECAP.webp); }
.custom-block-about.block-cmsp .overlay:before { background-image: url(../../assets/images/filigrana_banner_CMSP.webp); }
.custom-block-about.block-math .overlay:before { background-image: url(../../assets/images/filigrana_banner_MATH.webp); }
.custom-block-about.block-sti .overlay:before { background-image: url(../../assets/images/filigrana_banner_STI.webp); }
.custom-block-about.block-qls .overlay:before { background-image: url(../../assets/images/filigrana_banner_QLS.webp); }
.custom-block-about.block-esp .overlay:before { background-image: url(../../assets/images/filigrana_banner_ESP.webp); }

.custom-block-about .overlay:after {
  content: '';
  position: absolute;
  display: block;
  top: 50%;
  left: 0;
  width: 100%;
  height: 50px;
  transform: translateY(-50%);
  z-index: 3;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  background-image: url(../../assets/loghi/small_banner_logo.png);
}

body.section-hecap .custom-block-about.block-hecap,
body.section-cmsp .custom-block-about.block-cmsp,
body.section-math .custom-block-about.block-math,
body.section-esp .custom-block-about.block-esp,
body.section-sti .custom-block-about.block-sti,
body.section-qls .custom-block-about.block-qls {
  height: 20vh;
  padding: 0;
}

@media (min-width: 1024px) {
  body.section-hecap .custom-block-about.block-hecap,
  body.section-cmsp .custom-block-about.block-cmsp,
  body.section-math .custom-block-about.block-math,
  body.section-esp .custom-block-about.block-esp,
  body.section-sti .custom-block-about.block-sti,
  body.section-qls .custom-block-about.block-qls {
    height: 40vh;
  }
}


body.section-hecap .custom-block-about.block-hecap img,
body.section-cmsp .custom-block-about.block-cmsp img,
body.section-math .custom-block-about.block-math img,
body.section-esp .custom-block-about.block-esp img,
body.section-sti .custom-block-about.block-sti img,
body.section-qls .custom-block-about.block-qls img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  object-position: center center;
  max-height: unset;
}

body.front-page .custom-block-about,
body.section-hecap .custom-block-about.block-hecap,
body.section-cmsp .custom-block-about.block-cmsp,
body.section-math .custom-block-about.block-math,
body.section-esp .custom-block-about.block-esp,
body.section-sti .custom-block-about.block-sti,
body.section-qls .custom-block-about.block-qls {
  display: block;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

body.front-page .custom-block-about { 
  margin: 4rem 0 1rem 0; 
  position: relative;
}

body.section-hecap .custom-block-about.block-hecap .custom-about-block,
body.section-cmsp .custom-block-about.block-cmsp .custom-about-block,
body.section-math .custom-block-about.block-math .custom-about-block,
body.section-esp .custom-block-about.block-esp .custom-about-block,
body.section-sti .custom-block-about.block-sti .custom-about-block,
body.section-qls .custom-block-about.block-qls .custom-about-block {
  grid-template-columns: 1fr;
}

.taxonomy-term .view-display-id-block_1.view-carousel .swiper-wrapper .subtitle .discover-link,
body.section-hecap .custom-block-about.block-hecap .container > a,
body.section-cmsp .custom-block-about.block-cmsp .container > a,
body.section-math .custom-block-about.block-math .container > a,
body.section-esp .custom-block-about.block-esp .container > a,
body.section-sti .custom-block-about.block-sti .container > a,
body.section-qls .custom-block-about.block-qls .container > a {
  color: #fff;
  display: block;
  width: fit-content;
  margin: 1rem 0;
  font-size: 20px;
  font-weight: 400;
  padding-right: 2.5rem;
  /* padding-left: 1rem; */
  background-position: calc(100% - .5rem) center;
  background-size: 1.25rem 1.25rem;
  background-image: url(../../assets/icons/icon_arrow_right_w.svg);
  background-repeat: no-repeat;
  transition: all 300ms ease;
}

.taxonomy-term .view-display-id-block_1.view-carousel .swiper-wrapper .subtitle .discover-link:hover,
body.section-hecap .custom-block-about.block-hecap .container > a:hover,
body.section-cmsp .custom-block-about.block-cmsp .container > a:hover,
body.section-math .custom-block-about.block-math .container > a:hover,
body.section-esp .custom-block-about.block-esp .container > a:hover,
body.section-sti .custom-block-about.block-sti .container > a:hover,
body.section-qls .custom-block-about.block-qls .container > a:hover {
  transition: all 300ms ease;
  background-position: right center;
}

.section-hecap .taxonomy-term .view-display-id-block_1.view-carousel .swiper-wrapper .subtitle .discover-link,
body.section-hecap .custom-block-about.block-hecap .container > a { background-image: url(../../assets/icons/icon_arrow_right_hecap.svg); }
.section-cmsp .taxonomy-term .view-display-id-block_1.view-carousel .swiper-wrapper .subtitle .discover-link,
body.section-cmsp .custom-block-about.block-cmsp .container > a { background-image: url(../../assets/icons/icon_arrow_right_cmsp.svg); }
.section-math .taxonomy-term .view-display-id-block_1.view-carousel .swiper-wrapper .subtitle .discover-link,
body.section-math .custom-block-about.block-math .container > a { background-image: url(../../assets/icons/icon_arrow_right_math.svg); }
.section-esp .taxonomy-term .view-display-id-block_1.view-carousel .swiper-wrapper .subtitle .discover-link,
body.section-esp .custom-block-about.block-esp .container > a { background-image: url(../../assets/icons/icon_arrow_right_esp.svg); }
.section-sti .taxonomy-term .view-display-id-block_1.view-carousel .swiper-wrapper .subtitle .discover-link,
body.section-sti .custom-block-about.block-sti .container > a { background-image: url(../../assets/icons/icon_arrow_right_sti.svg); }
.section-qls .taxonomy-term .view-display-id-block_1.view-carousel .swiper-wrapper .subtitle .discover-link,
body.section-qls .custom-block-about.block-qls .container > a { background-image: url(../../assets/icons/icon_arrow_right_qls.svg); }

.custom-block-about .toflex {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  width: 90%;
}

.custom-block-about h3 {
  font-size: 1em;
  line-height: 1em;
  margin: 0;
  font-weight: 700;
}

.custom-block-about .subtitle {
  font-size: 0.8125rem;
  line-height: 1em;
  color: white;
  position: relative;
  display: block;
  margin: 0;
  width: fit-content;
}

.custom-block-about .subtitle::after {
  content: '';
  position: absolute;
  display: block;
  top: 50%;
  right: -2rem;
  transform: translateY(-50%);
  background-image: url(../../assets/icons/icon_arrow_right_w.svg);
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center center;
  width: 1.25em;
  height: 1.25em;
  transition: all 300ms ease;
}

.custom-block-about .subtitle:hover::after {
  transform: translateY(-50%) translateX(10px);
  transition: all 300ms ease;
}

.custom-block-about hr { display: none; }

.custom-block-about .container { 
  padding: 0; 
  z-index: 1;
  position: relative;
}

.custom-block-about .logo-mobile { display: block; }
.custom-block-about .logo-desktop { display: none; }

.custom-block-about img {
  max-height: 80px;
  width: 100%;
  object-fit: contain;
  margin: 0 auto;
}

/* ------------ ------------ CUSTOM-ABOUT-BLOCK ------------ ------------ */

.custom-about-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.custom-about-block > p {
  font-size: 20px;
  font-weight: 500;
  color: #FFF;
  line-height: 1.8em;
  margin-bottom: 2rem;
  text-align: center;
}

.custom-about-block > p span {
  background-color: var(--main_blue);
  padding: 0 2px;
}

.custom-about-block h4 {
  font-size: 18px;
  text-align: center;
}

.logos-grid {
  display: grid;
  grid-template-columns: 1fr;
  text-align: center;
  gap: 40px;
}

.logos {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.logos a { margin-bottom: 40px; }


/* CUSTOM PER SEZIONI */
.taxonomy-term .custom-block-about { position: relative; }

.taxonomy-term .custom-block-about:before {
  content: "";
  width: 100%;
  opacity: 1;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
  position: absolute;
}

.taxonomy-term[about="/hecap"] .custom-block-about p span { background-color: var(--hecap); }
.taxonomy-term[about="/hecap"] .custom-block-about:before { background-image: linear-gradient(170deg, transparent, var(--hecap)); }

.taxonomy-term[about="/cmsp"] .custom-block-about p span { background-color: var(--cmsp); }
.taxonomy-term[about="/cmsp"] .custom-block-about:before { background-image: linear-gradient(170deg, transparent, var(--cmsp)); }

.taxonomy-term[about="/sti"] .custom-block-about p span { background-color: var(--sti); }
.taxonomy-term[about="/sti"] .custom-block-about:before { background-image: linear-gradient(170deg, transparent, var(--sti)); }

.taxonomy-term[about="/math"] .custom-block-about p span { background-color: var(--math); }
.taxonomy-term[about="/math"] .custom-block-about:before { background-image: linear-gradient(170deg, transparent, var(--math)); }
.taxonomy-term[about="/qls"] .custom-block-about p span { background-color: var(--qls); }
.taxonomy-term[about="/qls"] .custom-block-about:before { background-image: linear-gradient(170deg, transparent, var(--qls)); }
.taxonomy-term[about="/esp"] .custom-block-about p span { background-color: var(--esp); }
.taxonomy-term[about="/esp"] .custom-block-about:before { background-image: linear-gradient(170deg, transparent, var(--esp)); }



@media (min-width: 1024px) {
  body.front-page .custom-block-about { 
    margin: 7rem 0 1rem 0; 
    padding: 40px 1rem;
    background: url(../../assets/images/bg-about-ictp.webp);
    background-size: cover;
    background-position: center;
  }

  .custom-block-about::before { display: none; }
  
  .custom-block-about .toflex { display: block; width: 100%; }

  .custom-block-about h3 {
    font-size: 1.5em;
    margin: 0;
    font-weight: 700;
  }

  .custom-block-about hr { display: block; }
  
  .custom-block-about .subtitle {
    font-size: 16px;
    color: white;
    position: relative;
    display: block;
    margin: 1em 0;
    width: fit-content;
  }
  
  .custom-block-about .logo-mobile { display: none; }
  .custom-block-about .logo-desktop { display: block; }

  .custom-block-about img {
    max-height: 90px;
    width: unset;
    object-fit: unset;
    margin: 0 auto;
  }
  
  .custom-block-about .custom-about-block {
    grid-template-columns: 2.5fr 1fr;
    gap: 100px;
  }

  .custom-about-block {
    grid-template-columns: 4fr 3fr;
    gap: 100px;
    padding: 40px 1rem;
  }

  .custom-about-block h4 { text-align: left; }

  .custom-about-block > p { 
    font-size: 1.875rem; 
    text-align: left;
    font-weight: 300;
  }

  .custom-about-block p span {
    font-weight: 500;
    background-color: var( --main_blue );
    padding: 4px 9px;
  }

  .logos-grid { text-align: right; }

  .logos-grid > div:first-child {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .logos-grid > div:first-child img {
    max-height: none;
    width: 100%;
    height: auto;
  }

  .logos {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
  }

  .logos a { margin-bottom: 0; }
  
  body.section-hecap .custom-block-about.block-hecap .custom-about-block,
  body.section-cmsp .custom-block-about.block-cmsp .custom-about-block,
  body.section-math .custom-block-about.block-math .custom-about-block,
  body.section-esp .custom-block-about.block-esp .custom-about-block,
  body.section-sti .custom-block-about.block-sti .custom-about-block,
  body.section-qls .custom-block-about.block-qls .custom-about-block {
    padding-right: 25%;
  }

  
  .custom-block-about .overlay:after { height: 80px; }

}


@media (min-width: 1300px) {
  .custom-about-block {
    grid-template-columns: 3.4fr 1fr;
    gap: 130px;
    margin-top: 5rem; 
  }
  .custom-about-block > p { font-size: 2.25rem; }

  body.section-hecap .custom-block-about.block-hecap .custom-about-block,
  body.section-cmsp .custom-block-about.block-cmsp .custom-about-block,
  body.section-math .custom-block-about.block-math .custom-about-block,
  body.section-esp .custom-block-about.block-esp .custom-about-block,
  body.section-sti .custom-block-about.block-sti .custom-about-block,
  body.section-qls .custom-block-about.block-qls .custom-about-block {
    margin-bottom: 2rem;
    margin-top: 0;
  }

  .custom-block-about { padding: 3rem 0; }
}


@media (min-width: 1700px) {
  .custom-about-block > p { font-size: 2.5rem; }
}