body {
 .nav.navbar-nav{
   display: inline-block;
 }

  .nav-global .secondary_menu {
    display: flex;
    justify-content: end;
    width: 100%;
  }
  
  .dropdown-toggle::after {
    display: none;
  }

  .navbar {
    padding-bottom: 0;
    padding-top: 0;
  }

  .nav-level-1.nav.navbar-nav {
    display: flow-root;
  }

  @include breakpoint ($tablet-start) {
    padding-top: 100px !important;
    @include transition(padding-top 0.2s ease);
    &.tiny-header {
      padding-top: 55px !important;
    }
  }
  @include breakpoint (0 $tablet-start) {
    padding-top: 80px !important;
    max-width: 100%;
  }
  &.toolbar-fixed {
    &.toolbar-horizontal {

      @include breakpoint ($tablet-start) {
        @include transition(padding-top 0.2s ease);
        padding-top: 140px !important;
        &.tiny-header {
          padding-top: 94px !important;
        }
      }
      .viewport,
      .top-navs {
        margin: 0 !important;
        .navbar-default {
          top: 40px !important;
        }
      }
      #search-box {
        top: 39px !important;
      }
      header#page-head.expanded-search {
        .nav-global {
          top: 127px !important;
        }
        .top-navs {
          .nav-wrapper {
            .main-nav.affix {
              top: 179px !important;
            }
          }
        }
        .main-nav.affix-top, .main-nav.affix {
          top: 210px !important;
          position: fixed;
        }
      }
      header#page-head .top-navs .nav-wrapper .main-nav.affix {
        top: 90px;
      }
      &.toolbar-tray-open {
        .nav-global {
          top: 70px !important;
          transition: 0.2s;
        }
        .viewport {
          margin-top: 30px !important;
          transition: 0.2s;
        }
        &.tiny-header {
          .nav-global {
            top: 75px !important;
            transition: 0.2s;
          }
          .viewport {
            margin-top: 30px !important;
            transition: 0.2s;
            .top-navs {
              .nav-wrapper {
                .main-nav.affix {
                  top: 175px !important;
                }
              }
            }
          }
        }
      }
    }
    &.toolbar-vertical {
      @include breakpoint (0 $tablet-start) {
        padding-top: 0 !important;
      }
    }
  }
}

#side-area {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 9999;
  top: 85px;
  left: 0;
  overflow: auto;
  transition: 0.2s;
  background-color: #0089d0;
  bottom: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  .toolbar-vertical & {
    top: 92px;
  }
  &.expanded-mobile {
    width: 100%;
  }
  .top-side {
    padding: 14px 0 7px;
    form {
      padding: 0 15px;
    }
  }
  .search-toggle {
    display: none;
  }
  a {
    color: #fffffb;
    line-height: 20px;
    @include cachet();
    font-size: 18px;
    font-weight: bold;
    padding: 12px 15px;
    display: block;
    text-transform: uppercase;
    &:hover,
    &:focus {
      background-color: #0060af;
      background: #0060af;
      text-decoration: none;
    }
  }
  ul {
    border-top: 1px solid #979797;
    margin: 0;
    padding-top: 7px;
    li {
      display: block;
      .dropdown-menu {
        min-height: 40px;
        background: none;
        &.open {
          display: block;
          background: none;
          position: static;
          float: none;
          border: none;
          margin: 0;
          box-shadow: none;
          border-radius: 0;
          border-bottom: 1px solid #979797;
          li {
            a {
              white-space: pre-wrap;
              .section-icon {
                display: none;
              }
            }
            &.menu-item-online-store---rewards {
              a {
                white-space: initial;
              }
            }
          }
        }
      }
    }
  }
  .section-icon {
    @include breakpoint (0 $tablet-start) {
      display: none;
    }
  }
}

.viewport {
  position: static;
  #main {
    transition: margin-left .2s;
    position: relative;
    .path-frontpage & {
      background: $white;
    }
  }
  &.expanded-mobile {
    &:after {
      opacity: 1;
    }
    #main {
      margin-left: 100%;
    }
  }
}

header#page-head {
  @include clearfix;
  width: 100%;
  @include cachet();
  @include breakpoint (0 $tablet-start) {
    position: relative;
  }
  .container-fluid {
    @media (min-width: 1200px) {
      padding-right: 100px;
      padding-left: 100px;
    }
  }
  .top-navs {
    height: auto !important;
    background-color: transparent;
    .nav-global {
      @include transition(top 0.2s linear);
      left: 0;
      position: fixed;
      top: 0;
      z-index: 999;
      margin-bottom: 0;
      border-radius: 0;
      background-color: $gray-light;
      min-height: 100px;
      width: 100%;
      @include breakpoint (0 $tablet-start) {
        min-height: 80px;
      }
      .navbar-header {
        padding: 5px 0 13px;
        .navbar-toggler {
          display: none;
        }
        @include breakpoint (0 $tablet-start) {
          width: 100%;
          padding: 0 !important;
          height: 52px !important;
          #block-openy-lily-branding {
            position: absolute;
            left: 50%;
            margin-left: -27px;
            margin-top: 5px;
            img {
              width: 54px !important;
            }
          }
          .navbar-toggler {
            display: block !important;
            float: left;
            position: relative;
            outline: 0 !important;
            margin-top: 8px;
            background: transparent;
            -webkit-transition: all .2s ease-out;
            -moz-transition: all .2s ease-out;
            -ms-transition: all .2s ease-out;
            transition: all .2s ease-out;
            padding: 9px 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            .icon-bar {
              height: 4px;
              border-radius: 4px;
              background: #bbb;
              display: block;
              transition-delay: 0.25s;
              width: 22px;
              + .icon-bar {
                margin-top: 2px;
              }
            }
            &:hover {
              background: #89c3f0;
              .icon-bar {
                background: #e4e4e4;
              }
            }
            &.expanded-mobile {
              .icon-bar {
                &:first-child {
                  -webkit-transform: translate(0, 6px) rotate(-35deg);
                  transform: translate(0, 6px) rotate(-35deg);
                  -webkit-transform-origin: 50%;
                  transform-origin: 50%;
                }
                &:nth-child(2) {
                  -webkit-transform: scale(0);
                  transform: scale(0);
                }
                &:nth-child(3) {
                  -webkit-transform: translate(0px, -6px) rotate(35deg);
                  transform: translate(0px, -6px) rotate(35deg);
                  -webkit-transform-origin: 50%;
                  transform-origin: 50%;
                }
              }
            }
          }
        }
      }
    }
    #block-topmenu2 {
      .expanded-menu + .dropdown-menu {
        display: block;
      }
    }
    .nav-wrapper {
      min-height: 62px;
      z-index: 998;
      display: none;
      @include breakpoint ($tablet-start) {
        display: block;
      }
      @include breakpoint (0 $tablet-start) {
        min-height: 0;
      }
      position: relative;
      .main-nav {
        width: 100%;
        z-index: 9999;
        @include transition(top 0.2s linear);
        &.affix {
          top: 100px;
        }
        #block-openy-lily-main-menu {
          width: 100%;
          background: rgba(0, 96, 175, 0.95);
          padding: 0 30px;
          @include breakpoint($desktop) {
            padding: 0 100px;
          }
          @include breakpoint (0 $tablet-start) {
            display: none !important;
          }
          .nav {
            float: none;
            li {
              a {
                font-size: 17px;
                color: white;
                padding: 21px 25px;
                @include transition(all 0.2s ease);
                &.expanded-menu + .dropdown-menu {
                  display: block;
                }
                @media screen and (max-width: 1199px) {
                  font-size: 15px;
                }
                &:hover {
                  text-decoration: none;
                }
              }

              &.nav-level-2 {
                float: none;
                display: table-cell;
                width: 1%;
                min-width: 4%;
                > a {
                  padding: 21px 0px;
                  i {
                    font-size: 12px;
                    margin-left: 5px;
                  }
                  &.expanded-menu,
                  &:hover {
                    background: rgba(255, 255, 255, 0.18);
                  }
                }
                &.menu-icon-1 {
                  a {
                    &:after {
                      font-family: 'Glyphicons Halflings';
                      font-style: normal;
                      font-weight: 400;
                      color: white;
                      line-height: 1;
                      -webkit-font-smoothing: antialiased;
                      content: "\e021";
                      vertical-align: bottom;
                      position: absolute;
                      top: -37px;
                      left: 0;
                      @include breakpoint ($desktop) {
                        display: none;
                      }
                    }
                  }
                  @media screen and (max-width: $desktop) {
                    min-width: 3%;
                    display: inline-block;
                    float: left;
                    position: relative;
                    overflow: hidden;
                    padding-top: 62px;
                    height: 62px;
                    padding-left: 6px;
                    &:hover {
                      background: rgba(255, 255, 255, 0.18);
                    }
                  }
                }
              }
              &.nav-level-3 {
                float: none;
                ul {
                  display: none;
                }
              }
            }
            &.nav-level-1 {
              text-align: center;
            }
            &.row-level-2 {
              background: rgba(255, 255, 255, 0.98);
              padding-top: 14px;
              padding-bottom: 14px;
              border: 1px solid rgba(0, 0, 0, 0.15);
              box-shadow: none;
              border-radius: 0;
              overflow-y: auto;
              li {
                width: 100%;
                padding: 0;
                a {
                  display: block;
                  font-size: 18px;
                  padding: 10px 24px;
                  text-overflow: initial;
                  white-space: normal;
                  color: #7d7b7b;
                  &:hover {
                    background: none;
                    color: #7d7b7b;
                  }
                  .section-icon {
                    display: none;
                  }
                }
              }
            }
          }
        }
      }
    }
    #block-topmenu2,
    #block-anonymoususersmenu--2,
    #block-anonymoususersmenu,
    #block-openy-lily-user-menu,
    #block-cccuseraccountmenu--2,
    #block-cccuseraccountmenu {
      @include breakpoint (0 $tablet-start) {
        display: none !important;
      }
      .nav {
        li {
          a {
            color: $gray-dark;
            border-top: 2px solid transparent;
            line-height: 68px;
            font-size: 16px;
            @include breakpoint (768px 991px) {
              margin-top: 0;
              padding: 15px 6px;
              font-size: 13px;
            }
            @include transition(all 0.2s linear);
            &:hover {
              border-top: 2px solid #aa228d;
              background-color: #fff;
              color: black;
            }
          }
          &.is-active {
            a {
              border-top: 2px solid #aa228d;
              background-color: #fff;
              color: black;
            }
          }
        }
      }
    }
    #block-cccuseraccountmenu,
    #block-cccuseraccountmenu--2 {
      ul {
        li {
          &:first-child {
            .welcome {
              background: none;
              border-top: 2px solid transparent;
              color: $gray-dark;
              cursor: default;
              &:hover {
                border-top: 2px solid transparent;
                color: $gray-dark;
                cursor: default;
              }
            }
          }
        }
      }
    }
    #block-topmenu2,
    #block-anonymoususersmenu,
    #block-anonymoususersmenu--2,
    #block-openy-lily-user-menu {
      h2 {
        display: none;
      }
      .nav {
        li {
          &:first-child {
            a {
              padding: 4px 15px;
              border-radius: 5px;
              background-color: $main-purple;
              text-transform: capitalize;
              font-weight: bold;
              font-size: 17px;
              line-height: 20px;
              color: white;
              text-shadow: none;
              margin: 36px 5px 0 0;
              border-top: none;
              &:hover {
                border-top: none;
                background-color: $dark-purple;
                color: white;
              }
            }
          }
        }
      }
    }
  }

  #block-openy-lily-branding {
    a {
      img {
        @include transition(all 0.2s linear);
        width: 85px;
        height: auto;
      }
    }
    .ymca-branding-slogan {
      @include cachet-medium();
      color: #0089d0;
      display: block;
      float: right;
      font-size: 8px;
      line-height: 10px;
      margin-top: 35px;
      @include transition(all 0.2s linear);
      .is-camp & {
        color: #f47820;
      }
      @include breakpoint (0 $tablet-start) {
        display: none;
      }
    }
  }

  &.tiny {
    #block-openy-lily-branding {
      .ymca-branding-slogan {
        font-size: 6px;
        line-height: 7px;
        margin-top: 21px;
      }
    }
    .top-navs {
      .nav-global {
        .navbar-header {
          padding: 5px 0 4px;
          #block-openy-lily-branding {
            a {
              img {
                width: 55px;
              }
            }
          }
        }
      }
      #block-topmenu2,
      #block-anonymoususersmenu,
      #block-anonymoususersmenu--2,
      #block-openy-lily-user-menu,
      #block-cccuseraccountmenu,
      #block-cccuseraccountmenu--2 {
        li {
          a {
            line-height: 68px;
          }
        }
      }
      #block-topmenu2,
      #block-openy-lily-user-menu,
      #block-anonymoususersmenu,
      #block-anonymoususersmenu--2 {
        ul {
          li {
            &:first-child {
              a {
                margin: 36px 5px 0 0;
              }
            }
          }
        }
      }
      #block-openy-lily-main-menu {
        .nav-level-2 {
          > a {
            padding: 21px 0;
          }
        }
      }
    }
  }

  &.expanded-search {
    .nav-global {
      top: 88px !important;
    }
    .main-nav.affix-top,
    .main-nav.affix {
      top: 171px !important;
      position: fixed;
      .path-frontpage & {
        top: 199px !important;
      }
    }
  }
  &.expanded-search.tiny {
    .main-nav.affix-top,
    .main-nav.affix {
      top: 140px !important;
    }
  }
}
.navbar-brand {
  position: absolute;
  display: block;
  overflow: hidden;
  box-sizing: content-box;
  margin: 12px 0 5px 0;
  padding: 5px 0 0 30px;
  width: 220px;
  height: 62%;
  background: url(../img/ymca-logo-full.svg) no-repeat 12px 0;
  background-size: contain;
  @include breakpoint(0 $tablet-start) {
    left: 35%;
    float: none;
    margin-left: -24px;
    padding: 0;
    height: 70%;
    background-position: left top;
    background-size: contain;
  }
}

.no-smil {
  .affix .navbar-brand {
    padding-top: 70px !important;
    background-image: url(../img/ymca-logo-full.png);
  }
  .navbar {
    background-color: #eeeeee;
  }
}

.csstransitions.no-smil .affix .navbar-brand {
  background-image: url(../img/ymca-logo-full.png);
}

// Google translate styles.
@include breakpoint($screen-sm) {
  .translated-ltr,
  .translated-rtl {
    header#page-head .top-navs {
      .nav-global {
        margin-top: 39px !important;
      }

      .nav-wrapper .main-nav.affix {
        top: 139px;
      }
    }
  }
}

// Custom styles for gtranslate language selector to match menu items
.d-none {
  display: none !important;
}

.secondary_menu {
  .block-openy-gtranslate-block {
    display: inline-block;
    margin-left: 0;
    
    @include breakpoint($screen-md) {
      display: flex;
      align-items: center;
    }
  }

  .openy-gtranslate-placeholder {
    display: inline-block;
    padding: 12px 15px;
    text-decoration: none;
    color: #555555;
    text-shadow: none;
    font-size: 14px;
    line-height: 1.42857143;
    cursor: pointer;
    vertical-align: middle;
    align-self: center;

    @include breakpoint($screen-sm) {
      padding-bottom: 12px;
      padding-top: 12px;
    }

    &:hover,
    &:focus {
      color: #555555;
      text-decoration: none;
      background-color: transparent;
    }
  }
}
