// SoSocial Navigation
.so-social-menu-wrapper {
@include outer-container;
    position: relative;
}

li.user-login {
    width: 100%;
    @include MQ(L) {
		 width: auto;
	}
    
}

.so-social-main-header {
	/* Force Hardware Acceleration in WebKit */
	@include transform(translateZ(0));
	will-change: transform;
}

.so-social-main-header {
	position: relative;
	@include transition(transform .3s);

	@include MQ(maxL) {
		&.nav-is-visible {
			@include transform(translateX(-$nav-width-S));
		}

		.nav-on-left &.nav-is-visible {
			@include transform(translateX($nav-width-S));
		}
	}
}

.so-social-main-content {
	//min-height: 100vh;
	z-index: 2000;
    width: 100%;
}

.so-social-main-header {
	height: $header-height-S;
	background: $white;
	z-index: 3;
   min-height: 60px;
	.nav-is-fixed & {
		/* add .nav-is-fixed class to body if you want a fixed navigation on > 1170px */
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
	}

	@include MQ(L) {
		height: $header-height-L;
		@include clearfix;
	}
}

.so-social-logo {
	position: absolute;
	left: 5%;
    top: 0%;
    z-index: 100;
	img {
		display: block;
        margin-top: 17px;
         width: 100px;
    height: 30px;
        @include MQ(L) {
		   width: 150px;
    height: 45px;
            margin-top: 20px;
	}
	}

	@include MQ(maxL) {
		.nav-on-left & {
			left: auto;
			right: 5%;
		}
	}

	@include MQ(L) {
		//top: 26px;
		left: 4em;
	}
}

.so-social-header-buttons {
	position: absolute;
	display: inline-block;
	top: 7px;
	right: 5%;
	li {
		display: inline-block;
	}

	@include MQ(maxL) {
		.nav-on-left & {
			right: auto;
			left: 5%;

			li {
				float: right;
			}
		}
	}

	@include MQ(L) {
		top: 18px;
		right: 4em;
	}
}

.so-social-search-trigger, .so-social-nav-trigger {
	position: relative;
	display: block;
    float: left;
	width: 44px;
	height: 44px;
	overflow: hidden;
	white-space: nowrap;
	/* hide text */
	color: transparent;
	z-index: 3;
}

.so-social-search-trigger {
position: absolute;
    top: 0em;
    right: 3em;
@include MQ(L) {
		right: 0.1em
	}
	&::before, &::after {
		/* search icon */
		content: '';
		position: absolute;
		@include transition(opacity .3s);
		/* Force Hardware Acceleration in WebKit */
		@include transform(translateZ(0));
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
	}

	&::before {
		/* lens */
		top: 11px;
		left: 11px;
		width: 18px;
		height: 18px;
		border-radius: 50%;
		border: 3px solid $sosocial-earth;
	}

	&::after {
		/* handle */
		height: 3px;
		width: 8px;
		background: $sosocial-earth;
		bottom: 14px;
		right: 11px;
		@include transform(rotate(45deg));
	}

	span {
		/* container for the X icon */
		position: absolute;
		height: 100%;
		width: 100%;
		top: 0;
		left: 0;
	}

	span::before, span::after {
		/* close icon */
		content: '';
		position: absolute;
		display: inline-block;
		height: 3px;
		width: 22px;
		top: 50%;
		margin-top: -2px;
		left: 50%;
		margin-left: -11px;
		background: $sosocial-earth;
		opacity: 0;
		/* Force Hardware Acceleration in WebKit */
		@include transform(translateZ(0));
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
		@include transition(opacity .3s, transform .3s);
	}

	span::before {
		@include transform(rotate(45deg));
	}

	span::after {
		@include transform(rotate(-45deg));
	}

	&.search-is-visible {
		&::before, &::after {
			/* hide search icon */
			opacity: 0;
		}

		span::before, span::after {
			/* show close icon */
			opacity: 1;
		}

		span::before {
			@include transform(rotate(135deg));
		}

		span::after {
			@include transform(rotate(45deg));
		}
	}
}

.so-social-nav-trigger {
position: absolute;
    right: 0.1em;
    top: 0em;
	span, span::before, span::after {
		/* hamburger icon in CSS */
		position: absolute;
		display: inline-block;
		height: 3px;
		width: 24px;
		background: $sosocial-earth;
	}

	span {
		/* line in the center */
		position: absolute;
		top: 50%;
		right: 10px;
		margin-top: -2px;
		@include transition(background .3s .3s);
	}

	span::before, span::after {
		/* other 2 lines */
		content: '';
		right: 0;
		/* Force Hardware Acceleration in WebKit */
		@include transform(translateZ(0));
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
		@include transform-origin(0% 50%);
		@include transition(transform .3s .3s);
	}

	span::before {
		/* menu icon top line */
		top: -6px;
	}

	span::after {
		/* menu icon bottom line */
		top: 6px;
	}

	&.nav-is-visible {
		span {
			/* hide line in the center */
			background: rgba($sosocial-earth, 0);
		}

		span::before, span::after {
			/* keep visible other 2 lines */
			background: rgba($sosocial-earth, 1);
		}

		span::before {
			@include transform(translateX(4px) translateY(-3px) rotate(45deg));
		}

		span::after {
			@include transform(translateX(4px) translateY(2px) rotate(-45deg));
		}
	}

	@include MQ(L) {
		display: none;
	}
}

.so-social-primary-nav, .so-social-primary-nav ul {
	position: fixed;
    @include MQ(L) {
		position: relative;
	}
	top: 0;
	right: 0;
	height: 100%;
	width: $nav-width-S;
	background: $sosocial-earth;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	z-index: 1;
	/* Force Hardware Acceleration in WebKit */
	@include transform(translateZ(0));

	@include transform(translateX(0));
	@include transition(transform .3s);

	a {
		display: block;
		height: 50px;
		line-height: 50px;
		padding: 0 20px;
		color: $white;
        font-weight: 900;
		-webkit-font-smoothing: antialiased;
  		-moz-osx-font-smoothing: grayscale;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
		border-bottom: 1px solid lighten($sosocial-earth, 5%);
		@include transform(translateZ(0));
		will-change: transform, opacity;
		@include transition(transform .3s, opacity .3s);
	}

	&.is-hidden {
		/* secondary navigations hidden by default */
		@include transform(translateX(100%));
	}

	&.moves-out > li > a {
		/* push the navigation items to the left - and lower down opacity - when secondary nav slides in */
		@include transform(translateX(-100%));
		opacity: 0;
	}
}

@include MQ(maxL) {
	.nav-on-left .so-social-primary-nav, .nav-on-left .so-social-primary-nav ul {
		right: auto;
		left: 0;
	}
}

.so-social-primary-nav {

	.see-all a {
		/* different style for the See all button on mobile and tablet */
		color: $brand;
        span {
        color: $sosocial-light-orange
        }
	}

	.so-social-nav-gallery .so-social-nav-item, .so-social-nav-icons .so-social-nav-item {
		/* items with picture (or icon) and title */
		height: 80px;
		line-height: 80px;

		h3 {
			overflow: hidden;
			text-overflow: ellipsis;
		}
	}

	.so-social-nav-gallery .so-social-nav-item {
		padding-left: 90px;

		img {
			position: absolute;
			display: block;
			height: 40px;
			width: auto;
			left: 20px;
			top: 50%;
			margin-top: -20px;
		}
	}

	.so-social-nav-icons .so-social-nav-item {
		padding-left: 75px;

		p {
			color: $sosocial-earth;
			font-size: 1.3rem;
			/* hide description on small devices */
			display: none;
		}

		&::before {
			/* item icon */
			content:'';
			display: block;
			position: absolute;
			left: 20px;
			top: 50%;
			margin-top: -20px;
			width: 40px;
			height: 40px;
			background-repeat: no-repeat;
			background-position: center center;
			background-size: 40px 40px;
		}

		&.item-1::before {
			background-image: url('../img/line-icon-1.svg');
		}

		&.item-2::before {
			background-image: url('../img/line-icon-2.svg');
		}

		&.item-3::before {
			background-image: url('../img/line-icon-3.svg');
		}

		&.item-4::before {
			background-image: url('../img/line-icon-4.svg');
		}

		&.item-5::before {
			background-image: url('../img/line-icon-5.svg');
		}

		&.item-6::before {
			background-image: url('../img/line-icon-6.svg');
		}

		&.item-7::before {
			background-image: url('../img/line-icon-7.svg');
		}

		&.item-8::before {
			background-image: url('../img/line-icon-8.svg');
		}
	}

	@include MQ(maxL) {
		/* by default .so-social-primary-nav is hidden - trick for iOS devices where you can see the navigation if you pull down */
		visibility: hidden;
		@include transition(visibility 0s .3s);

		&.nav-is-visible {
			visibility: visible;
			@include transition(visibility 0s 0s);
		}
	}
}

@include MQ(L) {
	.so-social-primary-nav {
		padding: 0 150px 0 0;
		height: auto;
		width: auto;
		float: right;
		overflow: visible;
		background: transparent;
		@include clearfix;

		&.moves-out > li > a {
			/* reset mobile style */
			@include transform(translateX(0));
			opacity: 1;
		}
        .button-group {
        margin-top: 16px;
        }
		ul {
			position: static;
			height: auto;
			width: auto;
			background: transparent;
			overflow: visible;
			z-index: 3;

			&.is-hidden {
				/* reset mobile style */
				@include transform(translateX(0));
			}

			&.moves-out > li > a {
				/* reset mobile style */
				@include transform(translateX(0));
				opacity: 1;
			}
		}

		> li {
			float: left;
			margin-left: 1.5em;
		}

		> li > a {
			/* main navigation buttons style */
			position: relative;
			display: inline-block;
			height: $header-height-L;
			line-height: $header-height-L;
			padding: 0 10px;
			color: $sosocial-earth;
			overflow: visible;
			border-bottom: none;
			@include transition(color .3s, box-shadow .3s);

			&:hover {
				color: $brand;
			}

			&.selected {
				color: $brand;
				box-shadow: inset 0 -2px 0 $brand;
			}
		}

		.go-back, .see-all {
			display: none;
		}

		.so-social-secondary-nav, .so-social-nav-gallery, .so-social-nav-icons {
			/* dropdown menu style */
			position: absolute;
			top: $header-height-L;
            z-index: 9999;
			width: 100vw;
			background: $white;
			padding: 0 64px 80px;
			box-shadow: inset 0 1px 0 $sosocial-warm-gray, 0 3px 6px rgba(#000, .05);
			@include transform(translateX(0));
			@include clearfix;
			-webkit-transition: opacity .3s 0s, visibility 0s 0s;
			-moz-transition: opacity .3s 0s, visibility 0s 0s;
			transition: opacity .3s 0s, visibility 0s 0s;

			&.is-hidden {
				opacity: 0;
				visibility: hidden;
				-webkit-transition: opacity .3s 0s, visibility 0s .3s;
				-moz-transition: opacity .3s 0s, visibility 0s .3s;
				transition: opacity .3s 0s, visibility 0s .3s;
			}

			> .see-all {
				/* this is the BIG See all button at the bottom of the dropdown menu */
				display: block;
				position: absolute;
				left: 0;
				bottom: 0;
				height: 80px;
				width: 100%;
				overflow: hidden;
				/* reset some inherited style */
				margin: 0;
				padding: 0;

				a {
					position: absolute;
					width: 100%;
					height: 100%;
					top: 0;
					left: 0;
					font-size: 2.2rem;
					font-weight: bold;
					text-align: center;
					line-height: 80px;
                    z-index: 100;
					border-top: 1px solid $sosocial-warm-gray;
					/* reset some inherited style */
					border-bottom: none;
					margin: 0;
					padding: 0;
					@include transition(color .2s, background .2s, border .2s);

					&:hover {
						background: $sosocial-earth;
						border-color: $sosocial-earth;
						color: $white;
					}
				}
			}
		}

      .so-social-nav-gallery {
        padding-top: 4em;
      }
        
		.so-social-secondary-nav {

			> li {
				/* change the height according to your needs - you can even set height: auto */
				height: 340px;
				/* here you set the number of columns - use width percentage */
				@include column(.23); // see partials > _layout.scss
				margin-right: 2.66%;
				border-right: 1px solid $sosocial-warm-gray;
				overflow: hidden;
				overflow-x: hidden;
				overflow-y: auto;
                position: relative;
                z-index: 999;
				-webkit-overflow-scrolling: touch;
padding-top: 2em;
				&:nth-child(4n+2) {
					/* +2 because we have 2 list items with display:none */
					margin-right: 0;
					border-right: none;
				}

				> a {
					/* secondary nav title */
					color: $brand;
					font-weight: bold;
					font-size: 1.6rem;
					margin-bottom: .6em;
				}
			}

			a {
				height: 30px;
				line-height: 30px;
				padding: 0 18% 0 0;
				color: $sosocial-earth;
				border-bottom: none;
				font-size: 1.4rem;

				&:hover {
					color: $brand;
				}
			}

			ul {
				/* Force Hardware Acceleration in WebKit */
				@include transform(translateZ(0));
			}

			ul ul {
				/* tertiary navigation */
				position: absolute;
				top: 0;
				left: 0;
				height: 100%;
				width: 100%;

				&.is-hidden {
					@include transform(translateX(100%));
				}

				.go-back {
					display: block;

					a {
						color: transparent;
					}
				}

				.see-all {
					display: block;
				}
			}

			.moves-out > li > a {
				/* push the navigation items to the left - and lower down opacity - when tertiary nav slides in */
				@include transform(translateX(-100%));
			}
		}

		.so-social-nav-gallery {
			li {
				/* set here number of columns - use width percentage */
				@include column(.22);
				margin: 0 4% 40px 0;

				&:nth-child(4n+2) {
					/* +2 because we have two additional list items with display:none */
					margin-right: 0;
				}
			}

			.so-social-nav-item {
				border-bottom: none;
				padding: 0;
				height: auto;
				line-height: 1.2;

				img {
					position: static;
					margin-top: 0;
					height: auto;
					width: 100%;
					margin-bottom: .6em;
				}

				h3 {
					color: $brand;
					font-weight: bold;
					padding: 0 .4em;
				}
			}
		}

		.so-social-nav-icons {
			li {
				/* set here number of columns - use width percentage */
				@include column(.32);
				margin: 0 2% 20px 0;

				&:nth-child(3n+2) {
					/* +2 because we have two additional list items with display:none */
					margin-right: 0;
				}
			}

			.so-social-nav-item {
				border-bottom: none;
				height: 80px;
				line-height: 1.2;
				padding: 24px 0 0 85px;

				&:hover {
					background: lighten($sosocial-warm-gray, 8%);
				}

				h3 {
					color: $brand;
					font-weight: bold;
				}

				p {
					display: block;
				}

				&::before {
					left: 25px;
				}
			}
		}
	}
}

.has-children > a, .go-back a {
	position: relative;

	&::before, &::after {
		/* arrow icon in CSS - for element with nested unordered lists */
		content: '';
		position: absolute;
		top: 50%;
		margin-top: -1px;
		display: inline-block;
		height: 2px;
		width: 10px;
		background: lighten($sosocial-earth, 10%);
		-webkit-backface-visibility: hidden;
		backface-visibility: hidden;
	}

	&::before {
		@include transform(rotate(45deg));
	}

	&::after {
		@include transform(rotate(-45deg));
	}

	@include MQ(L) {
		&::before, &::after {
			background: darken($sosocial-warm-gray, 10%);
		}

		&:hover::before, &:hover::after {
			background: $brand;
		}
	}
}

.has-children > a {
	padding-right: 40px;
    span.second-level-title {
    text-transform: uppercase;
    letter-spacing: 2px;
        font-weight: 900;
        font-size: 0.9em;
    }
	&::before, &::after {
		/* arrow goes on the right side - children navigation */
		right: 20px;
		@include transform-origin(9px 50%);
	}
}

.so-social-primary-nav .go-back a {
	padding-left: 40px;

	&::before, &::after {
		/* arrow goes on the left side - go back button */
		left: 20px;
		@include transform-origin(1px 50%);
	}
}

@include MQ(L) {

	.has-children > a {
		&::before, &::after {
			right: 15%;
		}
	}

	.so-social-primary-nav > .has-children > a {
		/* main navigation arrows on larger devices */
		padding-right: 30px !important;
		&::before, &::after {
			width: 9px;
			@include transform-origin(50% 50%);
			background: darken($sosocial-warm-gray, 10%);
			-webkit-backface-visibility: hidden;
			backface-visibility: hidden;
			@include transition(width .3s, transform .3s);
		}

		&::before {
			right: 12px;
		}

		&::after {
			right: 7px;
		}

		&.selected::before, &.selected::after {
			width: 14px;
		}

		&.selected::before {
			@include transform(translateX(5px) rotate(-45deg));
		}

		&.selected::after {
			@include transform(rotate(45deg));
		}
	} 

	.so-social-secondary-nav > .has-children > a::before, .so-social-secondary-nav > .has-children > a::after {
		/* remove arrows on secondary nav titles */
		display: none;
	}

	.so-social-primary-nav .go-back a {
		padding-left: 20px;

		&::before, &::after {
			left: 1px;
		}
	}
}

.so-social-search {
	position: absolute;
	height: $search-height-S;
	width: 100%;
	top: $header-height-S;
	left: 0;
	z-index: 3;
	opacity: 0;
	visibility: hidden;
	-webkit-transition: opacity .3s 0s, visibility 0s .3s;
	-moz-transition: opacity .3s 0s, visibility 0s .3s;
	transition: opacity .3s 0s, visibility 0s .3s;

	form {
		height: 100%;
		width: 100%;
	}

	input {
		border-radius: 0;
		border: none;
		background: $white;
		height: 100%;
		width: 100%;
		padding: 0 5%;
		box-shadow: inset 0 1px 0 $sosocial-warm-gray, 0 3px 6px rgba(#000, .05);
		@include appearance(none);

		@include placeholder {
			color: darken($sosocial-warm-gray, 10%);
		}

		&:focus {
			outline: none;
            box-shadow: none !important;
		}
	}

	&.is-visible {
		opacity: 1;
		visibility: visible;
		-webkit-transition: opacity .3s 0s, visibility 0s 0s;
		-moz-transition: opacity .3s 0s, visibility 0s 0s;
		transition: opacity .3s 0s, visibility 0s 0s;
	}

	.nav-is-fixed & {
		position: fixed;
	}

	@include MQ(L) {
		height: $search-height-L;
		top: $header-height-L;

		input {
			padding: 0 2em;
			font-size: 3.2rem;
			font-weight: 300;

			@include placeholder {
				
			}
		}
	}
}

.so-social-overlay {
	/* shadow layer visible when navigation is active */
	position: fixed;
	z-index: 2;
	height: 100%;
	width: 100%;
	top: 0;
	left: 0;
	cursor: pointer;
	background-color: rgba($brand, .8);
	visibility: hidden;
	opacity: 0;
	@include backface-visibility(hidden);
	@include transition(opacity .3s 0s, visibility 0s .3s, transform .3s 0s);
	
	&.is-visible {
		opacity: 1;
		visibility: visible;
		@include transition(opacity .3s 0s, visibility 0s 0s, transform .3s 0s);
	}

	@include MQ(maxL) {
		&.is-visible {
			@include transform(translateX(-$nav-width-S));
		}
		.nav-on-left &.is-visible {
			@include transform(translateX($nav-width-S));
		}
		&.is-visible.search-is-visible, .nav-on-left &.is-visible.search-is-visible {
			@include transform(translateX(0));
		}
	}
}

/* -------------------------------- 

support for no js 

-------------------------------- */

.no-js .so-social-primary-nav {
	position: relative;
	height: auto;
	width: 100%;
	overflow: visible;
	visibility: visible;
	z-index: 2;
}

.no-js .so-social-search {
	position: relative;
	top: 0;
	opacity: 1;
	visibility: visible;
}

@include MQ(L) {
	.no-js .so-social-primary-nav {
		position: absolute;
		z-index: 3;
		display: inline-block;
		width: auto;
		top: 0;
		right: 150px;
		padding: 0;
	}

	.no-js .nav-is-fixed .so-social-primary-nav {
		position: relative;
	}
}