/* =================================== */
/*  4. Header
/* =================================== */

#header {
  @include transition(all .5s ease);
  .navbar {
    padding: 0px;
	min-height:70px;
  }
  .logo {
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-item-align: stretch;
    align-self: stretch;
  }
}


/*=== 4.1 Main Navigation ===*/

.navbar-light .navbar-nav {
  .active > .nav-link {
    color: #0c2f55;
  }
  .nav-link {
    &.active, &.show {
      color: #0c2f55;
    }
  }
  .show > .nav-link {
    color: #0c2f55;
  }
}

.primary-menu {
  display: -webkit-box !important;
  display: -ms-flexbox !important;
  display: flex !important;
  height: auto !important;
  -webkit-box-ordinal-group: 0;
  -ms-flex-item-align: stretch;
  align-self: stretch;
  background: #fff;
  border-bottom:1px solid #efefef;
  &.bg-transparent {
    position: absolute;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    box-shadow: none;
	border-bottom: 1px solid rgba(250, 250, 250, 0.3);
  }
   &.sticky-on{
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 1020;
	left: 0;
	@include box-shadow(0px 0px 10px rgba(0, 0, 0, 0.05));
	-webkit-animation: slide-down 0.7s;
	-moz-animation: slide-down 0.7s;
	animation: slide-down 0.7s;
	@-webkit-keyframes slide-down { 0% { opacity:0; transform:translateY(-100%);}100% { opacity:1; transform:translateY(0);}}
	@-moz-keyframes slide-down { 0% { opacity:0; transform:translateY(-100%);}100% { opacity:1; transform:translateY(0);}}
	@keyframes slide-down { 0% { opacity:0; transform:translateY(-100%);}100% { opacity:1; transform:translateY(0);}}
	 
	 .none-on-sticky{
		display:none!important;
	 }
   }

  ul.navbar-nav > li {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    height: 100%;
	
	+ li {
    margin-left: 2px;
	}
    a {
      display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
      -webkit-box-align: center;
      -ms-flex-align: center;
      align-items: center;
    }
	
    > a:not(.btn) {
      height: 70px;
      padding:0px 0.85em;
      color: #252b33;
	  @include transition(all .2s ease);
      position: relative;
	  position:relative;
    }
	
    &:hover > a:not(.btn), & > a.active:not(.btn) {
      color: $primary-color;
	  text-decoration:none;
	  @include transition(all .2s ease);
    }
	a.btn{padding: 0.4rem 1.4rem;}
    &.dropdown {
      .dropdown-menu li {
        > a:not(.btn) {
          padding: 8px 0px;
          background-color: transparent;
		  text-transform: none;
          color: #777;
		  @include transition(all .2s ease);
        }
        &:hover > a:not(.btn) {
          color: $primary-color;
		  @include transition(all .2s ease);
        }
      }
	  &:hover > a:after {
        clear: both;
        content: ' ';
        display: block;
        width: 0;
        height: 0;
        border-style: solid;
        border-color: transparent transparent #fff transparent;
        position: absolute;
        border-width: 0px 7px 6px 7px;
        bottom: 0px;
        left: 50%;
        margin: 0 0 0 -5px;
        z-index: 1022;
      }
      .dropdown-menu {
		@include box-shadow(0px 0px 12px rgba(0, 0, 0, 0.176));
        border: 0px none;
        padding: 10px 15px;
        min-width: 220px;
        margin: 0;
        font-size: 14px;
        font-size: 0.875rem;
		z-index:1021;
      }
	  > .dropdown-toggle .arrow {
      display: none;
	  
    }
    }
  }
  .dropdown-menu-right {
    left: auto !important;
    right: 100% !important;
  }
  ul.navbar-nav > li {
    &.dropdown-mega {
      position: static;
      > .dropdown-menu {
        width: 100%;
        padding: 20px 20px;
        margin-left: 0px !important;
      }
      .dropdown-mega-content > .row > div {
        padding: 5px 5px 5px 20px;
        border-right: 1px solid #eee;
        &:last-child {
          border-right: 0;
        }
      }
      .sub-title {
        display: block;
        font-size: 16px;
        margin-top: 1rem;
        padding-bottom: 5px;
      }
      .dropdown-mega-submenu {
        list-style-type: none;
        padding-left: 0px;
      }
    }
	a.btn{font-size:14px; padding: 0.65rem 2rem; text-transform:uppercase;}
    &.dropdown {
      .dropdown-menu {
        .dropdown-menu {
          left: 100%;
          margin-top: -40px;
        }
        .dropdown-toggle:after {
          border-top: .4em solid transparent;
          border-right: 0;
          border-bottom: 0.4em solid transparent;
          border-left: 0.4em solid;
        }
      }
      .dropdown-toggle .arrow {
        position: absolute;
        min-width: 30px;
        height: 100%;
        right: 0px;
        top: 0;
        @include transition(all .2s ease);
        &:after {
          content: " ";
          position: absolute;
          top: 50%;
          left: 50%;
          border-color: #000;
          border-top: 1px solid;
          border-right: 1px solid;
          width: 6px;
          height: 6px;
          -webkit-transform: translate(-50%, -50%) rotate(45deg);
          transform: translate(-50%, -50%) rotate(45deg);
        }
      }
    }
  }
  .dropdown-toggle:after {
    content: none;
  }
  
  &.navbar-line-under-text ul.navbar-nav > li {
	> a:not(.btn):after {
		position: absolute;
		content: "";
		height: 2px;
		width: 0;
		left: 50%;
		right: 0;
		bottom: 14px;
		background-color: transparent;
		color:#fff;
		border-bottom: 2px solid $primary-color;
		@include transition(all .3s ease-in-out);
		transform: translate(-50%,0) translateZ(0);
		-webkit-transform: translate(-50%,0) translateZ(0);
		}
		& > a:hover:not(.logo):after, & > a.active:after{
		width:calc(100% - 0.99em);
		}
	}
  
}

/*== Color Options ==*/

.primary-menu.navbar-text-light .navbar-toggler span {background:#fff;}

.primary-menu.navbar-text-light .navbar-nav > li{
  > a:not(.btn) {
    color: #fff;
  }
  &:hover > a:not(.btn), & > a.active:not(.btn) {
    color: rgba(250, 250, 250, 0.75);
  }
}

.primary-menu.navbar-text-light.navbar-line-under-text .navbar-nav > li{
	& > a:not(.logo):after, & > a.active:after{
  border-color:rgba(250, 250, 250, 0.60);
  }
}

.primary-menu {
  &.navbar-dropdown-dark ul.navbar-nav > li {
    &.dropdown {
      .dropdown-menu {
        background-color: #252A2C;
        color: #fff;
        .dropdown-menu {
          background-color: #272c2e;
        }
      }
      &:hover > a:after {
        border-color: transparent transparent #252A2C transparent;
      }
      .dropdown-menu li {
        > a:not(.btn) {
          color: rgba(250, 250, 250, 0.8);
        }
        &:hover > a:not(.btn) {
          color: rgba(250, 250, 250, 1);
		  font-weight:600;
        }
      }
    }
    &.dropdown-mega .dropdown-mega-content > .row > div {
      border-color: #3a3a3a;
    }
  }
  &.navbar-dropdown-primary ul.navbar-nav > li {
    &.dropdown {
      .dropdown-menu {
        background-color: $primary-color;
        color: #fff;
        .dropdown-menu {
          background-color: $primary-color;
        }
      }
      &:hover > a:after {
        border-color: transparent transparent $primary-color transparent;
      }
      .dropdown-menu li {
        > a:not(.btn) {
          color: rgba(250, 250, 250, 0.95);
        }
        &:hover > a:not(.btn) {
          color: rgba(250, 250, 250, 1);
		  font-weight:600;
        }
      }
    }
    &.dropdown-mega .dropdown-mega-content > .row > div {
      border-color: rgba(250, 250, 250, 0.2);
    }
  }
}


/* Hamburger Menu Button */
.navbar-toggler {
  width: 25px;
  height: 30px;
  padding: 10px;
  margin: 18px 15px;
  position: relative;
  border:none;
  @include rotate(0deg);
  @include transition(.5s ease-in-out);
  cursor: pointer;
  display: block;
  span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #3c3636;
    border-radius: 2px;
    opacity: 1;
    left: 0;
	@include rotate(0deg);
	@include transition(.25s ease-in-out);
    &:nth-child(1) {
      top: 7px;
      -webkit-transform-origin: left center;
      -moz-transform-origin: left center;
      -o-transform-origin: left center;
      transform-origin: left center;
    }
    &:nth-child(2) {
      top: 14px;
      -webkit-transform-origin: left center;
      -moz-transform-origin: left center;
      -o-transform-origin: left center;
      transform-origin: left center;
    }
    &:nth-child(3) {
      top: 21px;
      -webkit-transform-origin: left center;
      -moz-transform-origin: left center;
      -o-transform-origin: left center;
      transform-origin: left center;
	  
    }
  }
  &.show span {
    &:nth-child(1) {
      top: 4px;
      left: 3px;
  	  @include rotate(45deg);
    }
    &:nth-child(2) {
      width: 0%;
      opacity: 0;
    }
    &:nth-child(3) {
      top: 22px;
      left: 3px;
  	  @include rotate(-45deg);
    }
  }
  
}

.navbar-accordion{position:initial;}


// For Responsive Navbar
@mixin navbar-responsive {

.navbar-collapse {
  position: absolute;
  top: 99%;
  right: 0;
  left: 0;
  background: #fff;
  margin-top: 0px;
  z-index: 1000;
  @include box-shadow(0px 0px 15px rgba(0, 0, 0, 0.1));
  .navbar-nav {
    overflow: hidden;
    overflow-y: auto;
    max-height: 65vh;
    padding: 15px;
  }
}
ul.navbar-nav {
  li {
    display: block;
    border-bottom: 1px solid #eee;
    margin: 0;
    padding: 0;
    &:last-child {
      border: none;
    }
	+ li {
		margin-left: 0px;
	}
    &.dropdown > .dropdown-toggle > .arrow.show:after {
      -webkit-transform: translate(-50%, -50%) rotate(-45deg);
      transform: translate(-50%, -50%) rotate(-45deg);
	  @include transition(all .2s ease);
    }
	> a:hover:after, > a.active:after {
		content: none!important;
		width:0px!important;
	}
	&.dropdown{
	> .dropdown-toggle .arrow {
      display: block;
	  
    }
	}
  }
  
  > li {
    > a:not(.btn) {
      height: auto;
      padding: 8px 0;
      position: relative;
    }
    &.dropdown {
      .dropdown-menu li > a:not(.btn) {
        padding: 8px 0;
        position: relative;
      }
      &:hover > a:after {
        content: none;
      }
      .dropdown-toggle .arrow:after {
        -webkit-transform: translate(-50%, -50%) rotate(134deg);
        transform: translate(-50%, -50%) rotate(134deg);
		@include transition(all .2s ease);
      }
    }
  }
  > li {
    &.dropdown .dropdown-menu {
      margin: 0;
	  @include box-shadow(none);
      border: none;
      padding: 0px 0px 0px 15px;
      .dropdown-menu {
        margin: 0;
      }
    }
	&.dropdown-mega {
      .dropdown-mega-content > .row > div {
        padding: 0px 15px;
      }
    }
  }
  
}

&.navbar-text-light .navbar-collapse{background:rgba(0,0,0,0.95);}

&.navbar-text-light .navbar-collapse ul.navbar-nav li{
	border-color:rgba(250,250,250,0.15);
}


&.navbar-dropdown-dark .navbar-collapse {
  background-color: #252A2C;
}

&.navbar-dropdown-primary .navbar-collapse {
  background-color: $primary-color;
}

  &.navbar-dropdown-primary ul.navbar-nav > li.dropdown .dropdown-menu .dropdown-menu {
    background-color: $primary-color;
  }
  &.navbar-dropdown-dark ul.navbar-nav {
    li {
      border-color: #444;
    }
    > li {
      > a {
        color: #a3a2a2;
      }
      &:hover > a {
        color: #fff;
      }
    }
  }
  &.navbar-dropdown-primary ul.navbar-nav {
    li {
      border-color: rgba(250, 250, 250, 0.2);
    }
    > li {
      > a {
        color: rgba(250, 250, 250, 0.8);
      }
      &:hover > a {
        color: #fff;
      }
    }
  }

}

.navbar-expand-none{
	@include navbar-responsive;
}


@include media-breakpoint-down(xs) {
	.navbar-expand-sm{
		@include navbar-responsive;
	}
}

@include media-breakpoint-down(sm) {
	.navbar-expand-md{
		@include navbar-responsive;
	}
}

@include media-breakpoint-down(md) {
	.navbar-expand-lg{
		@include navbar-responsive;
	}
}
@include media-breakpoint-down(lg) {
	.navbar-expand-xl{
		@include navbar-responsive;
	}
}