.offices-page {
  width: 100%;
  background-color: #fff;
  color: $primary-color;
  font-size: 1.6rem;
  max-width: $max-width;
  margin: 0 auto;

  .map-area {
    width: 100%;
    position: relative;
    max-width: $max-width;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    display: block;
    height: 250px;
  }

  .overlay {
    background: url('../assets/img/round_shadow.png') no-repeat top;
    width: 100%;
    height: 38px;
    margin-top: -38px;
    position: relative;
    pointer-events: none;
    opacity: .4;
  }
}

.offices-page__intro {
  padding-top: 22px;
  padding-bottom: 0;
  margin-left: 8.33333333%;

  @include sm {
    margin-left: 0;
    width: 100%;
  }

  h1 {
    font-size: 3.4rem;
    line-height: 3.8rem;
  }
}

.offices-page__header {
  padding: 0 $gutter;
  display: flex;
  flex-direction: column;

  @include sm {
    padding: 0 $gutter-mobile;
  }
}

.offices-page__main-contact {
  margin-left: 8.33333333%;
  width: 29.16666667%;
  align-self: flex-end;
  margin-bottom: 20px;

  @include sm {
    margin-left: 0;
    align-self: flex-start;
    width: 100%;
  }

  h3 {
    font-size: 2.5rem;
    margin-bottom: 0;
    margin-top: 0;
    line-height: 3.1rem;
    color: $primary-color;
    font-weight: 700;
  }

  span {
    color: $secondary-color;
  }

  .contact {
    font-size: 1.4rem;
    font-weight: 700;
  }
}

.offices-page__offices {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 20px;
  line-height: 3.5rem;
  display: flex;

  .item-button {
    padding: 0 10px 0 2px;
    text-transform: none;
    color: $primary-color;
    width: auto;
    position: relative;
    background-color: transparent;
    font-size: 1.6rem;
    border: 2px solid #fff;
    border-radius: 20px;
    display: inline-block;
    text-align: center;
    line-height: 3.5rem;
    cursor: pointer;
    transition: all .1s linear;

    &.active {
      border: 2px solid $secondary-color;
      color: $secondary-color;
    }

    span {
      margin-left: 10px;
    }
  }
}

.offices-page__offices-title {
  margin-left: 4.16666667%;
  width: 16.66666667%;
  padding: 0;

  @include sm {
    margin-left: 0;
    width: auto;
    padding-left: $gutter-mobile;
    padding-right: 20px;
  }
}

.offices-page__filters {
  display: block;
  width: 80%;

  @include sm {
    display: none;
  }
}

.offices-page__mobile-filters {
  display: none;

  @include sm {
    display: block;
  }

  .filters-select {
    float: left;
    display: inline-block;
    position: relative;
    margin-right: 25px;
  }

  .filter-wrapper {
    position: relative;
  }

  .items-filter {
    color: $gray-70;
  }

  .open-filter {
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    position: relative;
    padding-left: 20px;
    text-transform: uppercase;

    &:before {
      content: " ";
      border-style: solid;
      border-width: 0 2px 2px 0;
      width: 7px;
      height: 7px;
      display: block;
      position: absolute;
      left: 6px;
      top: 1px;
      transform: rotate(45deg);
    }
  }

  .filter-data-holder {
    left: 0;
    padding-right: 0;
    margin-top: 4px;
    position: absolute;
    background: #fff;
    z-index: 999;
    box-shadow: 0 3px 7px 0 rgba(21,38,68,.25);
    min-width: 217px;
    max-height: 0;
    transition: all 0.1s;
    visibility: hidden;
    overflow: hidden;

    &.open {
      max-height: 310px;
      visibility: visible;
      overflow: visible;
    }

    ul {
      max-height: 300px;
      overflow-y: auto;
      overflow-x: hidden;
      min-width: 130px;
      padding: 13px 25px 16px;
      margin-top: 0;
      margin-bottom: 0;

      > li {
        display: block;
        padding: 6px 11px 4px 0;
      }
    }
  }

  .filter-data-holder-tip {
    position: absolute;
    left: 45%;
    top: -5px;
    width: 0;
    height: 0;
    border-color: transparent transparent #fff;
    border-style: solid;
    border-width: 0 4px 5px;
  }
}

.offices-page__results-container--no-results {
  font-weight: 700;
  padding: 70px 0;
  text-align: center;
}

.offices-page__results {
  margin-bottom: 100px;
  max-width: $max-width;
  margin-left: auto;
  margin-right: auto;
}

.offices-page__linkedin-area {
  overflow: hidden;
  background: $secondary-color;
  color: #fff;
  margin: 0;
  text-align: center;
  padding: 30px;

  > div {
    max-width: $max-width;
    margin: 0 auto;
  }

  h1 {
    margin: 10px 0;
    font-size: 4.8rem;
    line-height: 6.8rem;
    color: #fff;
  }

  p {
    font-size: 1.8rem;
  }

  a {
    margin: 10px 0 30px;
    background: #fff;
    display: inline-block;
    color: $primary-color;
    transition: all .25s ease-out;

    outline: 0;
    border: 0;
    text-align: center;
    height: 45px;
    font-size: 1.4rem;
    line-height: 4.5rem;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    padding: 0 40px;
    border-radius: 22px;
    text-decoration: none;
  }
}

.offices-page__results-container {
  display: flex;
  width: 87.5%;
  margin-left: 12.5%;
  padding: 0 10px;
  flex-wrap: wrap;

  > div {
    width: calc(100% / 3);
    padding: 0 10px;

    @include sm {
      width: 100%;
    }
  }

  @include md {
    width: 91.66666667%;
    margin-left: 4.16666667%;
  }

  @include sm {
    margin-left: 0;
    width: 100%;
    padding: 0 20px;
  }
}

.offices-page__results-container--no-results {
  display: block;
  width: 100%;
  margin-left: 0;
}

.office-tile {
  opacity: 0;
  transform: translateY(15%);
  transition: all 0.2s;
  margin-top: 30px;

  h2 {
    font-weight: 700;
    cursor: pointer;
    margin: 1rem 0;
    color: $primary-color;

    @include md {
      font-size: 2rem;
    }

    @include xs {
      font-size: 2.5rem;
    }
  }

  &.active {
    h2 {
      text-decoration: underline;
    }
  }

  .address {
    p {
      margin: 0;
    }
  }

  h3 {
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 2.4rem;
    line-height: 3.1rem;
    color: $primary-color;
    font-weight: 700;
  }

  .avatar-holder {
    background: none repeat scroll 0 0 #eee;
    cursor: pointer;
    height: 90px;
    max-width: 90px;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
  }

  .contact-name {
    font-size: 1.4rem;
    font-weight: 700;
    display: block;
  }

  .contact {
    font-size: 1.4rem;
    font-style: italic;
    color: $secondary-color;
    font-weight: 400;
  }
}

.office-marker {
  opacity: 0.8;
  transition: opacity 300ms ease-out;
  background-position: center center;
  background-size: 30px;
  background-repeat: no-repeat;
  background-image: url('../assets/img/svg/blue.svg');
}

.office-marker--headquarters {
  background-image: url('../assets/img/svg/blue-dark.svg');
}

.office-marker.office-headquarters {
  z-index: 1;
}

.office-marker:hover,
.office-marker.active {
  opacity: 1;
}
