/*-- -------------------------- -->
<---     Mobile Navigation      -->
<--- -------------------------- -*/

/* Mobile - 1023px */
@media only screen and (max-width: 63.9375rem) {
  body {
    &.cs-open {
      overflow: hidden;
    }
  }

  #cs-navigation {
    /* remove the font family so the Stitch inherits the fonts from your global stylesheet */
    // font-family: "Roboto", "Arial", sans-serif;
    width: 100%;
    padding: (12/16rem) (16/16rem);
    /* prevents padding from affecting height and width */
    box-sizing: border-box;
    background-color: #fff;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    position: fixed;
    z-index: 10000;

    &:before {
      content: "";
      width: 100%;
      height: 0vh;
      background: rgba(0, 0, 0, 0.6);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
      position: absolute;
      display: block;
      top: 100%;
      right: 0;
      z-index: -1100;
      opacity: 0;
      transition: height 0.5s, opacity 0.5s;
    }

    &.cs-active {
      &:before {
        height: 150vh;
        opacity: 1;
      }

      .cs-ul-wrapper {
        opacity: 1;
        transform: scaleY(1);
        transition-delay: 0.15s;
      }

      .cs-li {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .cs-container {
      width: 100%;
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }

    .cs-logo {
      width: 40%;
      max-width: (146/16rem);
      height: 100%;
      margin: 0 auto 0 0;
      padding: 0;
      /* prevents padding from affecting height and width */
      box-sizing: border-box;
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 10;

      img {
        width: 100%;
        height: 100%;
        /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */
        object-fit: contain;
      }
    }

    .cs-toggle {
      /* 44px - 48px */
      width: clamp(2.75rem, 6vw, 3rem);
      height: clamp(2.75rem, 6vw, 3rem);
      margin: 0 0 0 auto;
      border-radius: (4/16rem);
      background-color: transparent;
      border: none;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .cs-active {
      .cs-line1 {
        top: 50%;
        transform: translate(-50%, -50%) rotate(225deg);
      }

      .cs-line2 {
        top: 50%;
        transform-origin: center;
        transform: translate(-50%, -50%) translateY(0) rotate(-225deg);
      }

      .cs-line3 {
        bottom: 100%;
        opacity: 0;
      }
    }

    .cs-box {
      /* 24px - 28px */
      width: clamp(1.5rem, 2vw, 1.75rem);
      /* 14px - 16px */
      height: clamp(0.875rem, 1.5vw, 1rem);
      position: relative;
    }

    .cs-line {
      width: 100%;
      height: 2px;
      border-radius: 2px;
      background-color: #1a1a1a;
      position: absolute;
      left: 50%;
      transform: translateX(-50%);
    }

    .cs-line1 {
      top: 0;
      transform-origin: center;
      transition: transform 0.5s, top 0.3s, left 0.3s;
      animation-duration: 0.7s;
      animation-timing-function: ease;
      animation-fill-mode: forwards;
      animation-direction: normal;
    }

    .cs-line2 {
      top: 50%;
      transform: translateX(-50%) translateY(-50%);
      transition: top 0.3s, left 0.3s, transform 0.5s;
      animation-duration: 0.7s;
      animation-timing-function: ease;
      animation-fill-mode: forwards;
      animation-direction: normal;
    }

    .cs-line3 {
      bottom: 0;
      transition: bottom 0.3s, opacity 0.3s;
    }

    .cs-ul-wrapper {
      width: 100%;
      height: auto;
      padding-bottom: (48/20em);
      opacity: 0;
      background-color: #fff;
      box-shadow: inset rgba(0, 0, 0, 0.2) 0px 8px 24px;
      overflow: hidden;
      position: absolute;
      top: 100%;
      left: 0;
      z-index: -1;
      transform: scaleY(0);
      transform-origin: top;
      transition: transform 0.4s, opacity 0.3s;
    }

    .cs-ul {
      margin: 0;
      padding: (48/16rem) 0 0 0;
      width: 100%;
      height: auto;
      max-height: 65vh;
      overflow: overlay;
      display: flex;
      justify-content: flex-start;
      flex-direction: column;
      align-items: center;
      gap: (20/16rem);
    }

    .cs-li {
      width: 100%;
      text-align: center;
      list-style: none;
      margin-right: 0;
      /* transition from these values */
      transform: translateY(-70/16rem);
      opacity: 0;
      transition: transform 0.6s, opacity 0.9s;

      &:nth-of-type(1) {
        transition-delay: 0.05s;
      }
      &:nth-of-type(2) {
        transition-delay: 0.1s;
      }
      &:nth-of-type(3) {
        transition-delay: 0.15s;
      }
      &:nth-of-type(4) {
        transition-delay: 0.2s;
      }
      &:nth-of-type(5) {
        transition-delay: 0.25s;
      }
      &:nth-of-type(6) {
        transition-delay: 0.3s;
      }
      &:nth-of-type(7) {
        transition-delay: 0.35s;
      }
      &:nth-of-type(8) {
        transition-delay: 0.4s;
      }
      &:nth-of-type(9) {
        transition-delay: 0.45s;
      }
      &:nth-of-type(10) {
        transition-delay: 0.5s;
      }
      &:nth-of-type(11) {
        transition-delay: 0.55s;
      }
      &:nth-of-type(12) {
        transition-delay: 0.6s;
      }
      &:nth-of-type(13) {
        transition-delay: 0.65s;
      }
    }

    .cs-li-link {
      /* 16px - 24px */
      font-size: clamp(1rem, 2.5vw, 1.5rem);
      line-height: 1.2em;
      text-decoration: none;
      margin: 0;
      color: var(--headerColor);
      display: inline-block;
      position: relative;

      &:before {
        /* active state underline */
        content: "";
        width: 100%;
        height: 1px;
        background: currentColor;
        opacity: 1;
        position: absolute;
        display: none;
        bottom: (-2/16rem);
        left: 0;
      }

      &.cs-active {
        &:before {
          display: block;
        }
      }
    }

    .cs-button-solid {
      display: none;
    }
  }
}

/*-- -------------------------- -->
<---     Navigation Dropdown    -->
<--- -------------------------- -*/

/* Mobile - 1023px */
@media only screen and (max-width: 63.9375rem) {
  #cs-navigation {
    .cs-li {
      text-align: center;
      width: 100%;
      display: block;
    }

    .cs-dropdown {
      position: relative;
      color: var(--bodyTextColorWhite);
      &.cs-active {
        .cs-drop-ul {
          height: auto;
          opacity: 1;
          visibility: visible;
          margin: (12/16rem) 0 0 0;
          padding: (12/16rem) 0;
        }

        .cs-drop-link {
          opacity: 1;
        }
      }

      .cs-li-link {
        position: relative;
        transition: opacity 0.3s;
      }
    }

    .cs-drop-icon {
      width: (15/16rem);
      height: auto;
      position: absolute;
      top: 50%;
      right: (-20/16rem);
      transform: translateY(-50%);
    }

    .cs-drop-ul {
      width: 100%;
      height: 0;
      margin: 0;
      padding: 0;
      background-color: var(--primary);
      overflow: hidden;
      opacity: 0;
      visibility: hidden;
      display: flex;
      justify-content: flex-start;
      flex-direction: column;
      align-items: center;
      gap: (12/16rem);
      transition: padding 0.3s, margin 0.3s, height 0.3s, opacity 0.3s,
        visibility 0.3s;
    }

    .cs-drop-li {
      list-style: none;
    }

    .cs-li-link {
      &.cs-drop-link {
        /* 14px - 16px */
        font-size: clamp(0.875rem, 2vw, 1.25rem);
        color: #fff;
      }
    }
  }
}

/* Desktop - 1024px */
@media only screen and (min-width: 64rem) {
  #cs-navigation {
    .cs-dropdown {
      position: relative;
      &:hover {
        cursor: pointer;
        .cs-drop-ul {
          transform: scaleY(1);
          opacity: 1;
          visibility: visible;
        }

        .cs-drop-li {
          opacity: 1;
          transform: translateY(0);
        }
      }
    }

    .cs-drop-icon {
      width: (15/16rem);
      height: auto;
      display: inline-block;
    }

    .cs-drop-ul {
      min-width: (200/16rem);
      margin: 0;
      padding: 0;
      background-color: #fff;
      overflow: hidden;
      opacity: 0;
      visibility: hidden;
      box-shadow: rgba(149, 157, 165, 0.2) 0px 10px 16px;
      border-bottom: 5px solid var(--primary);
      /* if you have 8 or more links in your dropdown nav, uncomment the columns property to make the list into 2 even columns. Change it to 3 or 4 if you need extra columns. Then remove the transition delays on the cs-drop-li so they don't have weird scattered animations */
      // columns: 2;
      position: absolute;
      top: 100%;
      z-index: -100;
      transform: scaleY(0);
      transform-origin: top;
      transition: transform 0.3s, visibility 0.3s, opacity 0.3s;
    }

    .cs-drop-li {
      list-style: none;
      font-size: (16/16rem);
      text-decoration: none;
      opacity: 0;
      width: 100%;
      height: auto;
      color: var(--bodyTextColor);
      display: block;
      transform: translateY(-10/16rem);
      transition: opacity 0.6s, transform 0.6s;

      &:nth-of-type(1) {
        transition-delay: 0.05s;
      }
      &:nth-of-type(2) {
        transition-delay: 0.1s;
      }
      &:nth-of-type(3) {
        transition-delay: 0.15s;
      }
      &:nth-of-type(4) {
        transition-delay: 0.2s;
      }
      &:nth-of-type(5) {
        transition-delay: 0.25s;
      }
      &:nth-of-type(6) {
        transition-delay: 0.3s;
      }
      &:nth-of-type(7) {
        transition-delay: 0.35s;
      }
      &:nth-of-type(8) {
        transition-delay: 0.4s;
      }
      &:nth-of-type(9) {
        transition-delay: 0.45s;
      }
    }

    .cs-li-link {
      &.cs-drop-link {
        white-space: nowrap;
        width: 100%;
        font-size: (16/16rem);
        line-height: 1.5em;
        text-decoration: none;
        padding: (12/16rem);
        /* prevents padding from affecting height and width */
        box-sizing: border-box;
        color: var(--bodyTextColor);
        display: block;
        transition: color 0.3s, background-color 0.3s;

        &:hover {
          background-color: #f7f7f7;
        }

        &:before {
          display: none;
        }
      }
    }
  }
}

/*-- -------------------------- -->
<---     Desktop Navigation     -->
<--- -------------------------- -*/

/* Small Desktop - 1024px */
@media only screen and (min-width: 64rem) {
  #cs-navigation {
    /* remove the font family so the Stitch inherits the fonts from your global stylesheet */
    font-family: "Roboto", "Arial", sans-serif;
    width: 100%;
    padding: 0 (16/16rem);
    /* prevents padding from affecting height and width */
    box-sizing: border-box;
    background-color: #fff;
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
    position: fixed;
    z-index: 10000;

    .cs-container {
      width: 100%;
      max-width: (1280/16rem);
      margin: auto;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      gap: (24/16rem);
    }

    .cs-toggle {
      display: none;
    }

    .cs-logo {
      width: 18.4%;
      max-width: (350/16rem);
      height: (65/16rem);
      /* margin-right auto pushes everything away from it to the right */
      margin: 0 auto 0 0;
      padding: 0;
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 100;

      img {
        width: 100%;
        height: 100%;
        /* ensures the image never overflows the container. It stays contained within it's width and height and expands to fill it then stops once it reaches an edge */
        object-fit: contain;
      }
    }

    .cs-ul {
      width: 100%;
      margin: 0;
      padding: 0;
      display: flex;
      justify-content: flex-start;
      align-items: center;
      /* 20px - 36px */
      gap: clamp(1.25rem, 2.6vw, 2.25rem);
    }

    .cs-li {
      list-style: none;
      padding: (32/16rem) 0;
      /* prevent flexbox from squishing it */
      flex: none;
    }

    .cs-li-link {
      /* 14px - 16px */
      font-size: clamp(0.875rem, 1vw, 1rem);
      line-height: 1.5em;
      text-decoration: none;
      margin: 0;
      color: var(--bodyTextColor);
      display: block;
      position: relative;
      &:hover {
        &:before {
          width: 100%;
        }
      }

      &.cs-active {
        &:before {
          width: 100%;
        }
      }

      &:before {
        /* active state underline */
        content: "";
        width: 0%;
        height: 2px;
        background: var(--primary);
        opacity: 1;
        position: absolute;
        display: block;
        bottom: (0/16rem);
        left: 0;
        transition: width 0.3s;
      }
    }

    .cs-button-solid {
      font-size: (16/16rem);
      /* 46px - 56px */
      line-height: clamp(2.875em, 5.5vw, 3.5em);
      text-decoration: none;
      font-weight: 700;
      text-align: center;
      margin: 0;
      color: #fff;
      min-width: (150/16rem);
      padding: 0 (24/16rem);
      background-color: var(--primary);
      border-radius: (4/16rem);
      display: inline-block;
      position: relative;
      z-index: 1;
      /* prevents padding from adding to the width */
      box-sizing: border-box;

      &:before {
        content: "";
        position: absolute;
        height: 100%;
        width: 0%;
        background: #000;
        opacity: 1;
        top: 0;
        left: 0;
        z-index: -1;
        border-radius: (4/16rem);
        transition: width 0.3s;
      }

      &:hover {
        &:before {
          width: 100%;
        }
      }
    }
  }
}

/*-- -------------------------- -->
<---        Hero Section        -->
<--- -------------------------- -*/

/* Mobile */
@media only screen and (min-width: 0rem) {
  #hero {
    padding: (140/16rem) (16/16rem);

    .container {
      max-width: (1280/16rem);
      margin: auto;
    }

    .cs-title {
      color: var(--primary);
      font-size: (32/16rem);
    }
  }
}
