/*!
 * ===========================
 * Author: Steve Gotthardt
 * Created: 11/2026
 * ===========================
 */

:root {
  /* with top message banner */
  /*--header-height-small: 190px;
  --header-height-medium: 214px;
  --header-height-large: 225px;
  --header-height-xlarge: 237px;*/
  
  --header-height-small: 108px;
  --header-height-medium: 108px;
  --header-height-large: 113px;
  --header-height-xlarge: 149px;
}

@keyframes fadeInFromLeft {
  from {
    transform:translateX(-15%);
    opacity:0;
  }
  to {
    transform:translateX(0);
    opacity:1;
  }
}
@keyframes fadeInFromRight {
  from {
    transform:translateX(15%);
    opacity:0;
  }
  to {
    transform:translateX(0);
    opacity:1;
  }
}
@keyframes scrollIconBounce {
  0% {
    transform:translate(-50%, 0);
  }
  50% {
    transform:translate(-50%, -12px);
  }
  100% {
    transform:translate(-50%, 0);
  }
}

main#top {
  padding-bottom:0;
}
.title-block {
  margin-bottom:0;
  height:calc(100vh - var(--header-height-small));
  display:flex;
  align-items: center;
  @media screen and (min-width: 768px) {
    height:calc(100vh - var(--header-height-medium));
  }
  @media screen and (min-width: 960px) {
    height:calc(100vh - var(--header-height-large));
  }
  @media screen and (min-width: 1200px) {
    height:calc(100vh - var(--header-height-xlarge));
  }
  &::before, &::after {
    content:"";
    position:absolute;
    width:100%;
    height:100%;
    top:0;
    left:0;
  }
  &::before {
    background: linear-gradient(to bottom, rgba(0,0,0,0.25) 0%,rgba(0,0,0,0) 100%);
    @media screen and (min-width: 1376px) {
      background: linear-gradient(to left, rgba(0,0,0,0.25) 0%,rgba(0,0,0,0) 100%);
    }
  }
  &::after {
    background-image:url(/images/default-source/site-images/logos/ifebp-globe-logo-white.svg);
    background-repeat:no-repeat;
    background-position:center center;
    background-size:50%;
    left:50%;
    transform:translate(-50%, 0);
    opacity:.1;
    @media screen and (min-width:1376px){
      background-size:600px;
      background-position: 95% center;
    }
  }
  .page-bounds {
    width:100%;
    height:100%;    
    .title-block__content {
      display:flex;
      flex-direction:column;
      justify-content: center;
      align-items:start;
      gap:18px;
      position:relative;
      background:none;
      width:100%; 
      height:100%;
      max-width:1280px;      
      img {
        margin:0;
        width:100%;
        max-width:750px;
      }
      p {
        max-width:90ch;
      }
    }
  }  
}
.scroll-icon-container {
  display:none;
  position:absolute;
  bottom:0;
  left:50%;
  opacity:.5;
  div {
    position:absolute;
    bottom:24px;
    left:50%;
    color:white;
    font-size:36px;
    line-height:0;
  }
}

.container {
  position:relative;
  padding:84px 24px;
  @media (min-width:768px) {
    padding:108px 48px;
  }
  @media (min-width:1376px) {
    padding-left:0;
    padding-right:0;
  }
  .grid, .grid__unit {
    width:100%;
    padding:0;
    margin:0;
    position:relative;
  }
  .grid {
    display:grid;
    grid-template-areas: "image" "text";
    grid-gap:48px;
    align-items: center;
    @media (min-width:768px) {
      grid-template-columns: 1fr 1fr;
      grid-template-areas: "image text";
      grid-gap:48px;
    }
    .grid__unit {
      display:flex;
      &:first-of-type {
        grid-area:image;
        justify-content: center;
        @media (min-width:768px) {
          justify-content: end;
        }
      }
      &:last-of-type {
        grid-area:text;
        justify-content: center;
        @media (min-width:768px) {
          justify-content: start;
        }
      }
      img {
        margin:0;
        border-radius:0 50px;
        max-height:300px;
        filter:drop-shadow(5px 5px 5px rgba(0,0,0,.15));
      }
      h2, p {
        text-align:center;
        font-weight:700;
        @media (min-width:768px) {
          text-align:start;
        }
      }
      h2 {
        font-family: "Barlow Semi Condensed", sans-serif;
        display:flex;
        flex-direction:column; 
        margin-bottom:18px;
        @media (min-width:768px) {
          font-size:48px;
          line-height:52px;
          flex-direction:row;
          align-items:end;
        }
        &::before {
          font-size:56px;
          line-height:1;
          font-family: "Font Awesome 6 Pro";
          font-weight: 100;
          display:block;
          margin:0 0 18px 0;
          @media (min-width:768px) {
            display:inline;
            margin:0 18px 0 0;
          }          
        }
      }
    }    
  }
  &.reverse{
    .grid {
      @media (min-width:768px) {
        grid-template-areas: "text image";
      }
      .grid__unit {
        &:first-of-type {
          @media (min-width:768px) {
            text-align:end;
            justify-content: start;
          }        
        }
        h2, p {
          @media (min-width:768px) {
            text-align:end;
            justify-content: end;
          }
        }
      }      
    }    
  }
  &:not(.reverse) {
    background-blend-mode: saturation;
    background-size: cover;
    background-repeat: no-repeat;    
    color:white;
    &::before {
      position: absolute;
      content: "";
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      opacity: 0.9;
    }
    h2 {
      color:white;
    }
  }
  &.webcasts {
    background: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 1)), url(/images/default-source/site-images/education---events/virtual-education/webcasts.jpg);
    background-attachment: fixed;
    background-position: center;
    &::before {
      background:#7E9F38;
    }    
    h2::before { 
      content: "\f0ac"; 
    }
  }
  &.elearning {
    h2::before { 
      content: "\f8cc"; 
    }
  }
  &.conferences {
    background: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 1)), url(/images/default-source/site-images/education---events/virtual-education/virtual-conference.jpg);  
    background-attachment: fixed;
    background-position: center;
    &::before {
      background:#E27508;
    }    
    h2::before { 
      content: "\f390"; 
    }
  }
  &.onsite {
    h2::before { 
      content: "\e4da"; 
    }
  }
  &.team {
    background: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 1)), url(/images/default-source/site-images/education---events/virtual-education/team-training.jpg);
    background-attachment: fixed;
    background-position: center;
    &::before {
      background-color:#9D6BA7;
    }
    h2::before { 
      content: "\f0c0"; 
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-icon-container {
    display:block;
    div {
      animation:scrollIconBounce 1s ease-in-out infinite;
    }
  }
  .container {
    .grid .grid__unit {
      &:first-of-type {
        @media (min-width:768px) {
          animation:fadeInFromLeft ease-in-out both;
          animation-timeline:view();
          animation-range:entry 0% cover 40%;
        }
      }
      &:last-of-type {
        @media (min-width:768px) {
          animation:fadeInFromRight ease-in-out both;
          animation-timeline:view();
          animation-range:entry 0% cover 40%;
        }
      }
    }
    &.reverse {
      .grid .grid__unit {
        &:first-of-type {
          @media (min-width:768px) {
            animation:fadeInFromRight ease-in-out both;
            animation-timeline:view();
            animation-range:entry 0% cover 40%;
          }
        }
        &:last-of-type {
          @media (min-width:768px) {
            animation:fadeInFromLeft ease-in-out both;
            animation-timeline:view();
            animation-range:entry 0% cover 40%;
          }
        }        
      }
    }
  }  
}