%home-bg-clip {
  @media screen and (min-width: $tablet) {
    $right-bottom: 100% 25%;
    $left-bottom: 0% 60%;
    -webkit-clip-path: polygon(0 0, 100% 0, $right-bottom, $left-bottom);
    clip-path: polygon(0 0, 100% 0, $right-bottom, $left-bottom);
  }
}

.home-header {
  @extend %gradient-bg;
  background-color: transparent;
  padding-top: 7rem;
  padding-bottom: 5rem;
  align-items: flex-end;
  justify-content: center;

  &--logo {
    text-align: center;

    img {
      width: 100%;
      height: auto;
      padding-bottom: 2rem;

      @media screen and (min-width: $tablet) {
        width: auto;
        height: 14rem;
        padding-bottom: 0.5rem;
      }
    }

    @media screen and (min-width: $tablet) {
      text-align: left;
    }
  }

  &--intro {
    flex-flow: column;

    p, h1, h1 > strong { color: #fff; }

    p { 
      margin: 1rem 0 2rem; 

      @media screen and (min-width: $tablet) {
        margin-bottom: 1rem;
      }
    }

    @media screen and (min-width: $tablet) {
      padding-left: 2rem;
    }
  }
}

.home-projects {
  position: relative;
  overflow: hidden;
  justify-content: flex-start;
  @extend %section-margin;
  padding-top: 0 !important;

  &:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -10;

    @extend %gradient-bg;
    @extend %home-bg-clip;
  }

  @media screen and (max-width: $tablet) {
    padding-bottom: 3rem;
  }

  @media screen and (min-width: $tablet) {
    .is-extra-child {
      margin-top: 2rem !important;
    }
  }

  .project {
    @include generate-post-margin($tablet, 2);
    @include generate-post-margin($desktop, 4);
    align-content: stretch;
    flex-flow: column;

    > a { display: inline-flex; }

    @media screen and (max-width: $desktop) {
      margin-bottom: 2rem !important;
    }

    &--p {
      padding: 0.75rem 0;
      color: $text;
    }

    &--title {
      display: flex;
      align-items: center;
      vertical-align: middle;

      span {
        color: $primary;
      }
    }

    &--icon-svg {
      background-color: rgba($primary, 0.15);
      border-radius: $radius-rounded;
      font-size: 1.25rem;
      flex: 0 0 3rem;
      height: 3rem;
      display: inline-flex;
      justify-content: center;
      align-items: center;
      margin-right: 0.75rem;
      color: #fff;
    }

    &--star > span {
      color: $text;
      font-weight: 600;
      display: inline-flex;
      align-items: center;

      &:first-child { margin-right: 1.75rem; }

      span {
        color: $primary;
        margin-right: 0.5rem;
        font-size: 1.5rem;
      }
    }
  }

  > div.tile {
    justify-content: center;
    padding-top: 1rem;
    text-align: center;
    
    .button {
      font-size: 0.90rem;
      border: none;
      color: $primary;
      @extend .is-uppercase;
      @extend .has-text-weight-bold;
    }

    @media screen and (min-width: $tablet) {
      justify-content: flex-end;
    }
  }
}

.events {
  @extend %section-margin;
  justify-content: flex-start;
  $current-bg: rgba($primary, 0.2);

  .title { @extend %backendbr-styled-title; }

  p {
    padding: 1rem 0;
  }

  .block {
    $block-padding: 2rem;
    color: $text;
    margin-bottom: 2rem !important;
    padding: $block-padding 0;
    @include generate-post-margin($tablet, 2);
    @include generate-post-margin($desktop, 3);

    h4, p, ul, > div {
      padding-left: $block-padding;
      padding-right: $block-padding;
    }

    p {
      color: #333;
      display: flex;
      align-content: center;
      align-items: center;

      span, i {
        display: inline-block;
      }

      i {
        @extend %basic-shadow;
        color: $primary;
        background-color: #fff;
        border-radius: $radius-rounded;
        font-size: 1rem;
        padding: 0.5rem;
        margin-right: 1rem;
      }
    }

    > div {
      border-top: 1px solid $current-bg;
      padding-top: 2rem;
      margin-top: 1rem;
    }

    .button {
      background-color: $primary;
      color: #fff;
      padding: 1.5rem 1rem;
      width: 100%;

      &:hover { border-color: $primary; }

      @media screen and (min-width: $tablet) {
        padding: 1rem;
        width: auto;
      }
    }

    @media screen and (min-width: $tablet) {
      margin-bottom: 0 !important;
    }
  }

  ul {
    padding-top: 0.75rem;

    li.chip {
      color: darken($primary, 5%);
      background-color: $current-bg;
      border-radius: $radius-rounded;
      display: inline-block;
      padding: 0.3rem 0.85rem;
      margin-right: 0.5rem;
      margin-bottom: 0.75rem;
      font-size: 0.75rem;
      text-transform: uppercase;

      i { padding-right: 0.5rem; }
    }
  }
}

.partners {
  @extend %section-margin;

  h2 {
    @extend %backendbr-styled-title;
    padding-bottom: 1rem;
  }

  > section {
    justify-content: flex-start;
    align-items: center;
  }

  .tile.is-flex-one-quarter {
    flex-grow: 0;
    flex-shrink: 0;

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