.navbar {
  position: relative;
  min-height: $navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)
  margin-bottom: $navbar-margin-bottom;
  border: 1px solid transparent;

  // Prevent floats from breaking the navbar
  @include clearfix;

  @media (min-width: $grid-float-breakpoint) {
    border-radius: $navbar-border-radius;
  }
}


// Navbar heading
//
// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy
// styling of responsive aspects.

.navbar-header {
  @include clearfix;

  @media (min-width: $grid-float-breakpoint) {
    float: left;
  }
}


// Navbar collapse (body)
//
// Group your navbar content into this for easy collapsing and expanding across
// various device sizes. By default, this content is collapsed when <768px, but
// will expand past that for a horizontal display.
//
// To start (on mobile devices) the navbar links, forms, and buttons are stacked
// vertically and include a `max-height` to overflow in case you have too much
// content for the user's viewport.

.navbar-collapse {
  overflow-x: visible;
  padding-right: $navbar-padding-horizontal;
  padding-left:  $navbar-padding-horizontal;
  border-top: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
  @include clearfix;
  -webkit-overflow-scrolling: touch;

  &.in {
    overflow-y: auto;
  }

  @media (min-width: $grid-float-breakpoint) {
    width: auto;
    border-top: 0;
    box-shadow: none;

    &.collapse {
      display: block;
      height: auto;
      padding-bottom: 0; // Override default setting
      overflow: visible;
    }

    &.in {
      overflow-y: visible;
    }

    // Undo the collapse side padding for navbars with containers to ensure
    // alignment of right-aligned contents.
    .navbar-fixed-top &,
    .navbar-static-top &,
    .navbar-fixed-bottom & {
      padding-left: 0;
      padding-right: 0;
    }
  }
}


// Both navbar header and collapse
//
// When a container is present, change the behavior of the header and collapse.

.container,
.container-fluid {
  > .navbar-header,
  > .navbar-collapse {
    margin-right: -$navbar-padding-horizontal;
    margin-left:  -$navbar-padding-horizontal;

    @media (min-width: $grid-float-breakpoint) {
      margin-right: 0;
      margin-left:  0;
    }
  }
}

// Brand/project name
.navbar-brand {
  float: left;
  padding: $navbar-padding-vertical $navbar-padding-horizontal;
  font-size: $font-size-large;
  line-height: $line-height-computed;
  height: $navbar-height;

  &:hover,
  &:focus {
    text-decoration: none;
  }

  > img {
    display: block;
  }

  @media (min-width: $grid-float-breakpoint) {
    .navbar > .container &,
    .navbar > .container-fluid & {
      margin-left: -$navbar-padding-horizontal;
    }
  }
}

// Navbar toggle
//
// Custom button for toggling the `.navbar-collapse`, powered by the collapse
// JavaScript plugin.

.navbar-toggle {
  position: relative;
  float: right;
  margin-right: $navbar-padding-horizontal;
  padding: 9px 10px;
  @include navbar-vertical-align(34px);
  background-color: transparent;
  background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214
  border: 1px solid transparent;
  border-radius: $border-radius-base;

  // We remove the `outline` here, but later compensate by attaching `:hover`
  // styles to `:focus`.
  &:focus {
    outline: 0;
  }

  // Bars
  .icon-bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
  }
  .icon-bar + .icon-bar {
    margin-top: 4px;
  }

  @media (min-width: $grid-float-breakpoint) {
    display: none;
  }
}

// Navbar nav links
// Builds on top of the `.nav` components with its own modifier class to make
// the nav the full height of the horizontal nav (above 768px).

.navbar-nav {
  margin: ($navbar-padding-vertical / 2) (-$navbar-padding-horizontal);

  > li > a {
    padding-top:    10px;
    padding-bottom: 10px;
    line-height: $line-height-computed;
  }

  @media (max-width: $grid-float-breakpoint-max) {
    // Dropdowns get custom display when collapsed
    .open .dropdown-menu {
      position: static;
      float: none;
      width: auto;
      margin-top: 0;
      background-color: transparent;
      border: 0;
      box-shadow: none;
      > li > a,
      .dropdown-header {
        padding: 5px 15px 5px 25px;
      }
      > li > a {
        line-height: $line-height-computed;
        &:hover,
        &:focus {
          background-image: none;
        }
      }
    }
  }

  // Uncollapse the nav
  @media (min-width: $grid-float-breakpoint) {
    float: left;
    margin: 0;

    > li {
      float: left;
      > a {
        padding-top:    $navbar-padding-vertical;
        padding-bottom: $navbar-padding-vertical;
      }
    }
  }
}

@media (min-width: $grid-float-breakpoint) {
  .navbar-left {
    float: left;
  }
  .navbar-right {
    float: right;
  margin-right: -$navbar-padding-horizontal;

    ~ .navbar-right {
      margin-right: 0;
    }
  }
}

// Default navbar
.navbar-default {
  background-color: $navbar-default-bg;
  border-color: $navbar-default-border;

  .navbar-brand {
    color: $navbar-default-brand-color;
    &:hover,
    &:focus {
      color: $navbar-default-brand-hover-color;
      background-color: $navbar-default-brand-hover-bg;
    }
  }

  .navbar-text {
    color: $navbar-default-color;
  }

  .navbar-nav {
    > li > a {
      color: $navbar-default-link-color;

      &:hover,
      &:focus {
        color: $navbar-default-link-hover-color;
        background-color: $navbar-default-link-hover-bg;
      }
    }
    > .active > a {
      &,
      &:hover,
      &:focus {
        color: $navbar-default-link-active-color;
        background-color: $navbar-default-link-active-bg;
      }
    }
    > .disabled > a {
      &,
      &:hover,
      &:focus {
        color: $navbar-default-link-disabled-color;
        background-color: $navbar-default-link-disabled-bg;
      }
    }
  }

  .navbar-toggle {
    border-color: $navbar-default-toggle-border-color;
    &:hover,
    &:focus {
      background-color: $navbar-default-toggle-hover-bg;
    }
    .icon-bar {
      background-color: $navbar-default-toggle-icon-bar-bg;
    }
  }

  .navbar-collapse,
  .navbar-form {
    border-color: $navbar-default-border;
  }

  // Dropdown menu items
  .navbar-nav {
    // Remove background color from open dropdown
    > .open > a {
      &,
      &:hover,
      &:focus {
        background-color: $navbar-default-link-active-bg;
        color: $navbar-default-link-active-color;
      }
    }

    @media (max-width: $grid-float-breakpoint-max) {
      // Dropdowns get custom display when collapsed
      .open .dropdown-menu {
        > li > a {
          color: $navbar-default-link-color;
          &:hover,
          &:focus {
            color: $navbar-default-link-hover-color;
            background-color: $navbar-default-link-hover-bg;
          }
        }
        > .active > a {
          &,
          &:hover,
          &:focus {
            color: $navbar-default-link-active-color;
            background-color: $navbar-default-link-active-bg;
          }
        }
        > .disabled > a {
          &,
          &:hover,
          &:focus {
            color: $navbar-default-link-disabled-color;
            background-color: $navbar-default-link-disabled-bg;
          }
        }
      }
    }
  }


  // Links in navbars
  //
  // Add a class to ensure links outside the navbar nav are colored correctly.

  .navbar-link {
    color: $navbar-default-link-color;
    &:hover {
      color: $navbar-default-link-hover-color;
    }
  }

  .btn-link {
    color: $navbar-default-link-color;
    &:hover,
    &:focus {
      color: $navbar-default-link-hover-color;
    }
    &[disabled],
    fieldset[disabled] & {
      &:hover,
      &:focus {
        color: $navbar-default-link-disabled-color;
      }
    }
  }
}

// End boostrap css used
// ##########################


// customize navbar bootstrap t-scroll
.navbar-default {
    border: none;
    background: #fff;
    @include border-radius(0);
    margin-bottom: 0;
    .navbar-brand {
        padding: 20px;
        font-weight: 400;
        font-family: 'Lato';
        color: $purple;
        font-size: 24px;
    }

    .navbar-nav {
        > li {
            > a {
                &, &:focus, &:hover, &:active {
                    color: #4b4b4b;
                    background: none;
                    padding: 20px;
                }
            }
            &.active {
                > a {
                    &, &:focus, &:hover, &:active {
                        background: none;
                    }
                }
                &:after {
                    content: "";
                    position: absolute;
                    bottom: 0;
                    left: 0;
                    right: 0;
                    margin: 0 auto;
                    width: 60%;
                    height: 4px;
                    background: $purple-light-35;
                    @include border-radius(8px)
                }
            }
        }
        .label {
            padding: 1px 3px 2px 3px;
            line-height: 1em;
            margin: 0;
            top: -15px;
            position: relative;
        }
    }
    @media (max-width: 767px) {
        .navbar-brand {
            padding: 15px 20px 20px 20px;
        }
        .navbar-nav {
            > li {
                padding: 0 15px;
                > a {
                    &, &:focus, &:hover, &:active {
                        background: #f7f8f9;
                        padding: 15px 20px;
                        @include border-radius(4px);
                        margin: 5px 0 8px 0;
                    }
                }
                &.active {
                    > a {
                        &, &:focus, &:hover, &:active {
                            background: $purple-light-35;
                            color: #fff;
                        }
                    }
                    &:after {
                        display: none;
                    }
                }
            }
            .label {
                top: -10px;
            }
        }
        .navbar-toggle {
            position: relative;
            padding-top: 15px;
            border: none;
            &, &:focus, &:hover, &:active {
                background: none;
            }
            .icon-bar {
                transform: rotate(135deg);
                transition-duration: 0.5s;
            }
            .icon-bar:nth-child(2) {
                display: none;
            }
            .icon-bar:nth-child(3) {
                margin-top: -2px;
                transform: rotate(-135deg);
            }
            &.collapsed {
                padding-top: 9px;
                border: none;
                .icon-bar {
                    transform: inherit;
                }
                .icon-bar:nth-child(2) {
                    display: block;
                }
                .icon-bar:nth-child(3) {
                    margin-top: 4px;
                }
            }
        }
        // amp navbar
        .amp-navbar-toggle,
        #amp-click-navbar-toggle {
            position: absolute;
            right: 0;
            top: 0;
        }
        #amp-click-navbar-toggle {
            width: 50px;
            height: 40px;
            margin: 5px 10px 8px 0;
            z-index: 999;
            outline: none;
            @include opacity(0);
        }
        #amp-click-navbar-toggle:checked ~ .amp-navbar-toggle {
            padding-top: 9px;
            border: none;
            top: 5px;
            .icon-bar {
                transform: rotate(135deg);
                transition-duration: 0.25s;
            }
            .icon-bar:nth-child(2) {
                display: none;
            }
            .icon-bar:nth-child(3) {
                margin-top: -2px;
                transform: rotate(-135deg);
            }
        }
        #amp-navbar-collapse {
            @include transition(max-height 0.5s);
            overflow: hidden;
            max-height: 0;
            border-top: 1px solid transparent;
        }
        #amp-click-navbar-toggle:checked ~ #amp-navbar-collapse {
            border-top: 1px solid #e7e7e7;
            display: block;
            max-height: 355px;
        }
        // amp navbar
    }
}


