// 'containers
// ---- ---- ---- ---- ----

.container {
  margin: 0 auto;
  padding: 0 8%;

  &.small {
    max-width: 1250px;
  }
}

.split {
  padding-left: 8%;

  &.split-alt {
    flex-direction: row-reverse;
    padding-left: 0;
    padding-right: 8%;

    .text-container {
      margin-right: 0;
      margin-left: 4.375rem;
    }
  }

  .text-container {
    margin-top: 2rem;
    margin-right: 4.375rem;
    width: 35%;
  }

  h2 {
    margin-bottom: 2.5rem;
  }

  .button {
    margin-top: 2.5rem;
    width: 370px;
  }
}

// 'layouts
// ---- ---- ---- ---- ----

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-space {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-start {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

.padded {
  padding-top: size(130);
  padding-bottom: size(130);

  &.small {
    padding-top: 6.25rem;
    padding-bottom: 6.25rem;
  }

  &.no-bot {
    padding-bottom: 0;
  }
}

.bot-spacer {
  padding-bottom: size(130);
}

.bot-spacer-60 {
  padding-bottom: 3.75rem;
}

.top-spacer-60 {
  margin-top: 3.75rem;
}

.text-basic {
  h1 {
    margin-bottom: 3.75rem;
  }

  h2 {
    margin-bottom: 2.5rem;
    text-transform: uppercase;
  }

  p {
    margin: 0;
  }

  &.text-short {
    width: 58%;
  }
}

.w-40 {
  width: 40%;
}

.swiper-horizontal > .swiper-scrollbar {
  height: 8px !important;
}

.swiper-scrollbar-drag {
  background: $blue-1 !important;
}

// 'announcement
// ---- ---- ---- ---- ----

.announcement {
  background: $red-1;

  .preview-text {
    padding: 2rem 0;
    color: $white;
    display: block;
    font-size: 1.25rem;
    margin: 0;
    text-align: center;
  }

  .announcement-desc {
    display: none;
    background: $white;
    padding: 5rem 0 6.25rem;
    position: relative;

    .button {
      margin-top: 2rem;
    }
  }

  .img-container {
    margin-right: 2.5rem;
    width: 40%;

    img {
      display: block;
      margin: 0 auto;
    }
  }

  .hide-announcement {
    color: $red-1;
    position: absolute;
    bottom: 0;
    left: 50%;
    padding: 1.25rem;
    transform: translateX(-50%);
  }
}

// 'header
// ---- ---- ---- ---- ----

header {
  background: $blue-1;
  height: 165px;
  padding: 2rem 0;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9;

  nav a {
    color: $white;
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
  }
}

// 'navigation
// ---- ---- ---- ---- ----

.toggle-nav {
  display: none;
}

.top-nav {
  nav {
    li {
      margin-right: 3.125rem;

      &:last-child {
        margin-right: 0;
      }
    }
  }
}

.main-nav {
  margin-top: 1.875rem;

  nav {
    ul:not(.sub-nav) {
      li {
        flex: 1;
        margin-right: 1.875rem;

        &:nth-last-child(3) {
          margin-right: 0;
        }

        &.hidden-link {
          display: none;
        }
      }

      .nav-link {
        display: block;
        border-top: 1px solid rgba(255, 255, 255, 0.5);
        padding-top: 1rem;
        position: relative;

        &:after {
          content: '';
          display: block;
          border-top: 1px solid $white;
          position: absolute;
          top: 0;
          left: 0;
          transition: all ease-in-out 0.3s;
          width: 0;
        }

        &:hover:after {
          width: 100%;
        }

        &.nav-hover {
          display: flex;
          align-items: center;
          justify-content: space-between;
        }
      }
    }

    .subnav-hover:hover {
      > .sub-nav {
        display: block;
      }
    }

    ul.sub-nav {
      box-shadow: 1px 1px 8px 0px rgba(0, 0, 0, 0.1);
      border-top: 20px solid $blue-1;
      display: none;
      background: $white;
      position: absolute;
      top: 88%;
      min-width: 350px;

      &:before {
        content: '';
        border-left: 0 solid transparent;
        border-right: 10px solid transparent;
        border-bottom: 25px solid #fff;
        height: 0;
        width: 0;
        position: absolute;
        top: -20px;
      }

      li {
        margin-right: 0;
      }

      a {
        color: $black;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1.25rem;
        transition: all ease-in-out 0.2s;

        .nav-arrow {
          opacity: 0;
        }

        &:hover {
          background: $grey-1;
          color: $red-1;

          .nav-arrow {
            opacity: 1;
          }
        }
      }
    }
  }
}

// 'get in touch
// ---- ---- ---- ---- ----

.ft-contact {
  background: $grey-1;

  .ft-contact-info {
    width: 50%;

    .text-container {
      margin-top: 3.75rem;

      h2 {
        margin-top: 1.25rem;
      }

      .flex-start {
        p {
          line-height: normal;
          margin-right: 3.75rem;

          a {
            color: $black;
            font-size: 1rem;
            text-decoration: underline;
          }

          &:last-child {
            margin-right: 0;

            a {
              font-size: 1.125rem;
              text-decoration: underline;
            }
          }
        }
      }
    }
  }

  .ft-departments {
    width: 50%;

    h1 {
      margin-left: 0.5rem;
    }

    .flex-start {
      flex-wrap: wrap;
      margin-top: 3.125rem;
    }

    .button {
      align-self: stretch;
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 0.5rem;
      text-decoration: underline;
      text-transform: none;
      width: calc(50% - 1rem);
    }
  }
}

// 'carousel
// ---- ---- ---- ---- ----

.split-carousel {
  background: $blue-1;
  height: auto;
  min-height: 100vh;

  &.split-grey {
    background: $grey-3;

    .text-container {
      color: $black;

      div {
        h2 {
          border: none;
        }
      }
    }
  }

  .text-container {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    color: $white;
    padding-right: 8%;
    padding-bottom: 0;
    padding-left: 8%;
    width: 50%;

    div {
      margin: auto 0;
      padding-right: size(200);

      h2 {
        display: inline-block;
        border-bottom: 5px solid $white;
        padding-bottom: 0.25rem;
        text-transform: uppercase;
      }
    }
  }

  .img-container {
    height: 100vh;
    overflow: hidden;
    width: 50%;

    img {
      display: block;
      height: 100%;
      object-fit: cover;
    }
  }
}

// 'testimonials
// ---- ---- ---- ---- ----

.testimonials {
  background: url(../images/testimonials-city-grid-bg.jpg) no-repeat center center;
  background-size: cover;
  padding: 5rem 0;
  position: relative;

  h1 {
    color: $white;
    padding-left: 8%;
  }

  .testimonial-carousel {
    margin-top: 5rem;
    padding-bottom: 5rem;
    overflow-y: auto;

    .card {
      box-sizing: border-box;
      flex: 1 0 auto;
      // margin: 0 2rem;
      margin: auto;
      width: 785px;
    }
  }
}

// 'footer
// ---- ---- ---- ---- ----

.badge {
  display: inline-block;
  color: $black;
  opacity: 0.6;
  margin-top: 5rem;
}

footer {
  .flex-space {
    align-items: flex-start;
  }

  .ft-nav {
    ul {
      margin-right: 4.375rem;

      &:last-child {
        margin-right: 0;
      }

      li {
        margin-bottom: 0.875rem;

        &:last-child {
          margin-bottom: 0;
        }
      }
    }

    a {
      color: $black;
      font-size: 1.125rem;
      font-weight: bold;
      text-transform: uppercase;
      transition: all 0.1s ease-in;

      &.ft-nav-link {
        color: $grey-2;
      }

      &:hover {
        color: $red-1;
      }
    }
  }

  .ft-logo {
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }

  .certifications {
    margin-top: auto;
  }
}

// 'certifications
// ---- ---- ---- ---- ----

.certifications {
  img {
    display: block;

    &:first-child {
      margin-right: 1.25rem;
    }
  }

  &.w-40 {
    margin-top: 3.75rem;
  }
}

// 'banners
// ---- ---- ---- ---- ----

.blue-banner {
  background: $blue-1;

  .container {
    color: $white;
    text-align: center;
  }

  h1 {
    text-transform: uppercase;
    margin: 3.125rem auto 2rem;
  }
}

.form-cv {
  margin-top: 3.125rem;

  select {
    margin-bottom: 3.125rem;
    max-width: 485px;
    padding: 0.5rem 2rem;
    width: 100%;
  }
}

// 'desktop md
// ---- ---- ---- ---- ----

@media screen and (max-width: $screen-desktop) {
  .container {
    padding: 0 6%;
  }

  .padded {
    padding-top: 6.25rem;
    padding-bottom: 6.25rem;
  }

  .bot-spacer {
    margin-bottom: 6.25rem;
  }
}

// 'laptop
// ---- ---- ---- ---- ----

@media screen and (max-width: $screen-laptop) {
  .padded {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .announcement {
    .flex-center {
      flex-direction: column;
    }

    .announcement-desc {
      .button {
        margin-top: 1rem;
      }
    }
  }

  .text-basic {
    h1 {
      margin-bottom: 2.5rem;
    }
  }

  .split-carousel {
    min-height: 0;

    .swiper-slide {
      height: auto !important;
    }

    .img-container {
      height: auto;
      align-self: stretch;
    }

    .text-container {
      padding: 5%;
      width: 60%;

      div {
        margin-top: 1.25rem;
        padding-right: 0;
      }
    }
  }

  .testimonials {
    .testimonial-carousel {
      margin-top: 1.25rem;
      padding-bottom: 1.25rem;
    }
  }

  footer {
    .ft-nav {
      ul {
        margin-right: 2.5rem;

        &:last-of-type {
          margin-right: 0;
        }

        li {
          line-height: normal;
          max-width: 300px;
        }
      }
    }
  }
}

// 'tablet ls
// ---- ---- ---- ---- ----

@media screen and (max-width: $screen-tablet-ls) {
  .container {
    padding: 0 5%;
  }

  .bot-spacer {
    margin-bottom: 5rem;
  }

  // layout
  .text-basic {
    &.text-short {
      width: 75%;
    }
  }

  .split {
    padding-left: 5%;

    h2 {
      margin-bottom: 0;
    }

    .text-container {
      margin-right: 3.125rem;
      width: 45%;
    }

    .img-container {
      width: 55%;
    }

    .button {
      min-width: 300px;
      width: auto;
    }

    &.split-alt {
      padding-right: 5%;

      .text-container {
        margin-left: 3.125rem;
      }
    }
  }

  // footer
  footer {
    .flex-space {
      flex-direction: column;
    }

    .ft-nav {
      margin: 2.5rem 0 0;
      width: 100%;
    }

    .certifications {
      margin-top: 2.5rem;
    }
  }

  .ft-contact {
    .ft-contact-info {
      margin-right: 1.5625rem;
      width: 45%;
    }

    .ft-departments {
      margin-left: 1.5625rem;
      width: 55%;
    }
  }
}

// 'tablet pt
// ---- ---- ---- ---- ----

@media screen and (max-width: $screen-tablet-pt) {
  // container
  .container {
    padding: 0 3%;
  }

  .padded {
    padding-top: 3.75rem;
    padding-bottom: 3.75rem;
  }

  .bot-spacer {
    margin-bottom: 3.75rem;
  }

  // layout
  .split {
    padding-left: 3%;

    &.split-alt {
      padding-right: 3%;
    }
  }

  .text-basic {
    h1 {
      margin-bottom: 2rem;
    }

    h2 {
      margin-bottom: 1.5rem;
    }
  }

  .split-carousel {
    .carousel-item {
      flex-direction: column;
    }

    .text-container {
      padding: 3.125rem;
      width: auto;
    }

    .img-container {
      height: 350px;
      width: 100%;

      img {
        width: 100%;
      }
    }
  }

  // header
  header {
    height: auto;

    nav a {
      font-size: 1rem;
    }
  }

  // navigation
  .nav-container {
    display: none;
    align-items: center;
    justify-content: center;
    background: $blue-3;
    position: fixed;
    top: 0;
    right: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    z-index: 8;

    &.active {
      display: flex;
    }

    .main-nav {
      margin-top: 0;

      ul {
        flex-direction: column;
        align-items: center;
        justify-content: center;

        &:not(.sub-nav) {
          li {
            margin-right: 0;
            margin-bottom: 1rem;

            &.hidden-link {
              display: block;
            }
          }

          .nav-link {
            font-size: 1.5625rem;
            border: none;

            &:hover {
              &:after {
                display: none;
              }

              opacity: 0.8;
            }

            i {
              display: none;
            }
          }
        }

        &.sub-nav {
          display: none !important;
        }
      }
    }
  }

  .top-nav {
    display: flex;
    align-items: center;
    justify-content: center;

    nav {
      li {
        display: none;
        margin-right: 0;

        &:first-child {
          display: block;
        }
      }
    }
  }

  .toggle-nav {
    display: inline-block;
    color: $white;
    margin-left: 1rem;
    position: relative;
    z-index: 9;
  }
}

// 'tablet small
// ---- ---- ---- ---- ----

@media screen and (max-width: $screen-tablet-sm) {
  // navigation
  .nav-container {
    .main-nav {
      ul {
        &:not(.sub-nav) {
          .nav-link {
            font-size: 1.5rem;
            padding-top: 0;
          }
        }
      }
    }
  }

  // layout
  .split {
    flex-direction: column-reverse !important;
    margin-bottom: 3.125rem;
    padding: 0 3% !important;

    .text-container {
      margin: 5rem auto 0 !important;
      width: 100%;
    }

    .button {
      margin-top: 2rem;
    }
  }

  .text-basic {
    width: 100% !important;
  }

  // footer
  .ft-contact {
    .container {
      flex-direction: column;
    }

    .ft-contact-info {
      margin: 0 0.5rem;
      width: 100%;

      .text-container {
        margin-top: 1.5rem;
      }
    }

    .ft-departments {
      margin: 2rem 0 0;
      width: 100%;

      .flex-start {
        margin-top: 1.5rem;
      }
    }
  }

  footer {
    .ft-nav {
      display: none;
    }
  }
}

// 'mobile
// ---- ---- ---- ---- ----

@media screen and (max-width: $screen-mobile) {
  .padded {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .bot-spacer {
    margin-bottom: 3.125rem;
  }

  .bot-spacer-60 {
    padding-bottom: 2rem;
  }

  .text-basic {
    h1,
    h2 {
      margin-bottom: 1rem;
    }
  }

  .certifications.w-40 {
    margin-top: 2rem;
  }

  .split-carousel {
    .text-container {
      padding: 0 1.25rem;

      div h2 {
        border-bottom: 2px solid $white;
      }
    }
  }

  .industry-carousel {
    padding-top: 2rem !important;

    .swiper-button-next,
    .swiper-button-prev {
      top: auto;
      bottom: 14%;
    }

    .text-container {
      margin: auto;
    }

    .img-container {
      margin-top: auto;
    }
  }

  // navigation
  .nav-container {
    .main-nav {
      ul {
        &:not(.sub-nav) {
          .nav-link {
            font-size: 1.25rem;
            padding-top: 0;
          }
        }
      }
    }
  }

  .top-nav {
    nav {
      display: none;
    }
  }

  // announcement
  .announcement {
    .preview-text {
      font-size: 1rem;
      width: 90%;
      padding: 1rem 0;
      margin: 0 auto;
    }

    .announcement-desc {
      padding: 1.25rem 0.625rem 5rem;
    }
  }

  // banner
  .blue-banner {
    h1 {
      margin: 2rem auto;
    }
  }

  // footer
  .ft-contact {
    .ft-departments {
      .flex-start {
        flex-direction: column;
      }

      .button {
        margin: 0.625rem 0 0;
        padding: 1rem 0.625rem;
        font-size: 1rem;
        width: 100%;
      }
    }
  }
}
