/* Global */

:root {
  --dark-blue: #3b4c58;
  --dark-blue-shadow: 0 4px 12px #08152d;
  --nav-background-light: #ecedee;
  --list-border-light: #aebbc6;
  --list-border-dark: rgba(255, 255, 255, 0.2);
  --menu-border-radius: 0px 0px 6px 6px;
  --header-height: 90px;
  --img-white-filter: brightness(0) invert(1);
  --icon-image-size: 28px;
}
header {
  left: 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9999;
}
/* overlay search */
body.no-scroll {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

.overlay-search {
  display: none;
  position: fixed;
  z-index: 8888;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding-top: 180px;
  background: #f6f6f6;
}

.overlay-search form {
  position: relative;
  width: 80%;
  float: left;
  height: 70px;
}

.overlay-search input {
  width: 100%;
  height: 70px;
  font-size: 40px;
  border: none;
  border-bottom: 1px solid #a30721;
  background: 0 0;
}

.overlay-search button {
  position: absolute;
  top: 4px;
  right: 0;
  border: none;
  background: 0 0;
  color: #a30721;
  font-size: 35px;
}

.overlay-search .close-overlay {
  width: 20%;
  float: left;
  text-align: right;
  cursor: pointer;
}

.overlay-search .close-overlay img {
  padding-top: 5px;
  -webkit-transition: opacity .8s cubic-bezier(.19,1,.22,1);
  -moz-transition: opacity .8s cubic-bezier(.19,1,.22,1);
  -ms-transition: opacity .8s cubic-bezier(.19,1,.22,1);
  -o-transition: opacity .8s cubic-bezier(.19,1,.22,1);
  transition: opacity .8s cubic-bezier(.19,1,.22,1);
}


/* utilizing specific selectors to limit styles to this module only */
.overlay-search {
  .grid {
    margin: 0px auto !important;
    width: 1068px !important;
    max-width: 98% !important;
    text-align: center;
    font-size: 0px;
    box-sizing: border-box;
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .grid__item {
    display: inline-block;
    vertical-align: top;
    margin-left: 1.75% !important;
    margin-right: 1.75% !important;
    padding-top: 60px;
    padding-bottom: 60px;
  }

  .one-whole.hard.grid__item {
    width: 100% !important;
  }

  .hard,
  .hard--ends {
    padding-top: 0px !important;
    margin-top: 0px !important;
    padding-bottom: 0px !important;
    margin-bottom: 0px !important;
  }
}

/* Navigation */
nav {
  font-family: "Montserrat", sans-serif;
  background: var(--dark-blue);
  display: grid;
  grid-template-columns: auto 1fr auto;
  column-gap: 1rem;
  grid-template-rows: var(--header-height) auto;
  align-items: center;

  p {
    color: var(--white);
  }

  ul,
  li {
    list-style-type: none;
    margin: 0;
    padding: 0;

    &.hide {
      display: none;
    }
  }

  /* Searchbar */
  .searchbar {
    .search-wrapper {
      background: none;
      border: none;
      padding: 0;
      width: 100%;
      cursor: default;

      &:focus {
        outline: none;
      }
    }

    form,
    input,
    button[type="submit"] {
      pointer-events: auto;
    }
  }

  #trigger {
    border: none;
    background: transparent;
    color: var(--white);
    font-size: 28px;
    margin-right: 20px;
  }

  a.request-quote {
    background: var(--tertiary);
    cursor: pointer;
    border: 0;
    border-radius: 10px;
    color: var(--white);
    display: inline-block;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    min-width: auto;
    padding: 10px 20px;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: var(--dark-blue-shadow);
    &:hover {
      color: var(--white);
      filter: brightness(0.85);
    }
  }
}

.nav-logo-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 20px;
}

.nav-icon-list {
  display: none;
}

.mobile-nav-icon-list {
  justify-self: end;

  ul {
    display: none;
  }
}

.main-nav-container {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  grid-column: 2 / 3;
  grid-row: 1;
}

#main-nav {
  grid-column: 1 / -1;
  grid-row: 2;
  background: var(--nav-background-light);
  height: calc(100% - var(--header-height));
  overflow-y: scroll;
  padding-bottom: 45px;
  position: fixed;
  top: var(--header-height);
  width: 100%;
  z-index: 8888;

  #dummy-href {
    display: none;
  }

  li,
  button {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.25rem;
    text-transform: uppercase;
    color: var(--dark-blue);
  }

  li {
    form {
      display: flex;
      border-bottom: 1px solid var(--list-border-light);
      padding: 1rem 0;
      margin: 0 1.5rem;

      button {
        width: auto;
        border-bottom: none;
        margin-left: 0;
        margin-right: 1rem;
        padding: 0;
        font-size: 20px;
        img {
          width: var(--icon-image-size);
          height: var(--icon-image-size);
        }
      }

      input {
        width: 200px;
      }
    }
  }

  &.show li a {
    display: block;
    color: var(--dark-blue);
    text-decoration: none;
    margin: 0 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--list-border-light);
  }

  .contact-us {
    span {
      font-weight: 500;
      text-transform: none;
    }
    img {
      width: var(--icon-image-size);
      height: var(--icon-image-size);
    }
  }

  li button {
    width: calc(100% - 3rem);
    cursor: pointer;
    border: 0;
    text-align: inherit;
    text-transform: inherit;
    text-decoration: none;
    margin: 0 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--list-border-light);
    background: none;
    font: inherit;
    display: flex;
    align-items: center;
  }

  ul.menu-depth-2 li {
    font-weight: 600;
    text-transform: none;
    background-color: var(--white);
  }

  ul.menu-depth-3 {
    a {
      padding-left: 1rem;
    }

    li {
      font-weight: 400;
      text-transform: none;
      font-style: italic;
    }
  }
}

/* Arrow icon styles */
.nav-link-arrow {
  padding-left: 0.5rem;
  width: 16px;
  font-weight: 700;
}

.established-description {
  display: none;
}

button[aria-expanded="true"] .fa-angle-right:before {
  content: "\f107"; /* fa-angle-down */
}

#trigger[aria-expanded="false"] i:before {
  content: "\f0c9"; /* fa-bars */
}

#trigger[aria-expanded="true"] i:before {
  content: "\f00d"; /* fa-times */
}

@media (min-width: 1068px) {
  nav {
    display: flex;
    height: var(--header-height);
    justify-content: center;
    
    .nav-logo-container {
      margin-left: 0;
    }

    #trigger {
      display: none;
    }

    .searchbar {
      display: none;
    }

    .established-description {
      font-style: italic;
      font-weight: 300;
      display: block;
      margin-bottom: 0;
      margin-top: 0;
      color: var(--white);
    }

    .mobile-nav-icon-list {
      display: none;
    }

    .nav-icon-list {
      display: flex;
      align-items: center;
      gap: 1rem;
      order: 2;

      li,
      a {
        color: var(--white);
      }

      img {
        width: var(--icon-image-size);
        height: var(--icon-image-size);
        filter: var(--img-white-filter);
      }

      .btn-search {
        button {
          border: none;
          background: transparent;
          color: var(--white);
          padding: 0;
        }
      }

      ul {
        display: flex;
        gap: 0.5rem;
        align-items: center;
      }
    }
  }

  .request-quote {
    grid-column: 3 / 4;
    grid-row: 1;
  }

  #main-nav {
    flex-direction: row;
    grid-column: 2 / 3;
    grid-row: 1;
    margin: 0;
    background: transparent;
    display: flex;
    height: unset;
    padding-bottom: 0;
    position: static;
    width: auto;
    overflow-y: unset;

    &.show li a {
      color: var(--white);
      text-decoration: none;
      margin: 0 1.5rem;
      border-bottom: none;
      padding: 0.5rem 1rem;
    }

    #searchform {
      display: none;
    }

    .contact-us {
      display: none;
    }

    > li {
      position: relative;

      > a,
      > button {
        color: inherit;
        margin: 0;
        padding: 0.5rem 1rem;
        border: none;
        text-decoration: none;
        background: none;
        width: auto;
        display: flex;
        align-items: center;
      }
    }

    li {
      color: var(--white);

      > a,
      > button {
        display: flex;
      }

      &:hover {
        background: var(--white);
        color: var(--dark-blue);
        border-radius: 6px;
      }

      button {
        white-space: nowrap;
        text-transform: inherit;
        color: inherit;
        border-bottom: none;
      }
    }

    li.dropdown {
      &:hover {
        border-radius: 6px 6px 0 0;
      }
    }

    ul.menu-depth-2 li {
      font-weight: 700;
      border-bottom: 1px solid var(--list-border-dark);

      &:first-child:not(.dropdown) {
        border-top-right-radius: 6px;
      }

      &:hover {
        background: var(--white);
        color: var(--dark-blue);
        border-radius: 0px;
      }
    }

    ul.menu-depth-3 li {
      font-weight: 700;
      text-transform: none;
      font-style: normal;
      &:first-child {
        border-top-right-radius: 6px;
      }
    }

    ul.menu-depth-2,
    ul.menu-depth-3 {
      background: var(--dark-blue);
      color: var(--white);
      border-radius: var(--menu-border-radius);

      li {
        background: transparent;

        &:last-child {
          border-bottom: 0;
          border-radius: var(--menu-border-radius);
        }

        a,
        button {
          display: block;
          color: inherit;
          margin: 0 1.5rem;
          padding: 1rem 0;
          text-decoration: none;

          &:hover {
            color: var(--dark-blue);
          }
        }

        button {
          width: calc(100% - 3rem);
          display: flex;
          align-items: center;
        }
      }
    }

    .menu-depth-2 {
      position: absolute;
      top: 100%;
      left: 0;
      min-width: 200px;
      z-index: 100;

      &.show {
        display: block;
      }

      li {
        position: relative;
      }
    }

    .menu-depth-3 {
      position: absolute;
      top: 0;
      left: 100%;
      min-width: 200px;
      z-index: 101;

      &.show {
        display: block;
        border-top-right-radius: 6px;
      }
    }
  }

  button[aria-expanded="true"] .fa-angle-right:before {
    content: "\f107";
  }
}
@media (min-width: 1068px) and (max-width: 1200px) {
  nav {    
    column-gap: .5rem;
 
    a.request-quote {
      font-size: 14px;
    }
    
    #main-nav{
      li {
        font-size: 14px;      
      }
  }
}
