/**
 * Main Footer
 */

.main-footer {
	background: #f7f7f7;
	
	.bg-wrap {
		position: relative;
		overflow: hidden;
		
		&:before {
			position: absolute;
			content: "";
			top: 0;
			left: 0;
			bottom: 0;
			right: 0;
			transform: translate3d(0, 0, 0);
			pointer-events: none;
		}
	}
	
}

.upper-footer {
	position: relative;
	padding-top: 65px;
	padding-bottom: 95px;
	
	@include breakpoint(medium) {
		padding-bottom: 40px;
	}
	
	.ts-row {
		margin: 0 -28px;
		
		@include breakpoint(medium) {
			margin: 0;
		}
	}
	
	// Undo the widget margin which is added to allow more than 3 widgets
	.widgets {
		margin-bottom: -65px;
	}
	
	.widget {
		padding: 0 28px;
		margin-bottom: 65px;
		
		// Single column on tablets and below
		@include breakpoint(medium) {
			margin-bottom: 55px;
			padding: 0;
		}
	}
	
	.widget-title {
		font-size: 15px;
		font-weight: 600;
		line-height: 1.3;
		text-transform: uppercase;
		padding-bottom: 13px;
		margin-bottom: 40px;
		border-bottom: 1px solid #ebebeb;
	}
	
	.widget-about .about-text {
		font-size: 15px;
	}
	
	.widget-posts .excerpt > p {
		color: #999;
	}
}

/* Dark Widgets */
.main-footer.dark {
	background: #020202;
	
	a {
		color: #ddd;
		
		&:hover {
			color: #fff;
		}
	}
	
	.widget {
		color: #989898;
	}
	
	.post-title,
	.product-title,
	.posts .post-title {
		color: #fff;
		font-weight: 400;
		-webkit-font-smoothing: initial;
	}
	
	.date-link {
		color: inherit;

		&:hover {
			color: inherit;
		}
	}

	.post-date {
		color: inherit;
	}
	
	.about-text {
		color: inherit;
	}
	
	.textwidget,
	.text {
		color: inherit;
	}
	
	.widget-title {
		border-bottom: 0;
		color: #fff;
		font-weight: 700;
	}
	
	// Widget about social
	.social-btn {
		background: #222;
		border: 1px solid rgba(#fff, 0.08);
	}
	
	.lower-footer {
		padding: 0;
		
		> .wrap {
			padding: 30px 0;
			border-top: 1px solid rgba(#fff, 0.16);
			text-align: center;
		}
	}
	
	.copyright {		
		font-weight: 500;

		a {
			color: #ddd;
		}
		
		a:hover {
			color: #fff;
		}
	}

	.back-to-top { 
		display: inline-block;
		color: #989898;
		font-size: 12px;
		font-family: $title-font;
		font-weight: 700;
		letter-spacing: 0;
		text-transform: uppercase;
		
		&:hover {
			color: #b4b4b4;
		}
		
		i {
			font-size: 13px;
			color: #b4b4b4;
		}
	}

	.social-strip {
		background: #1e1e1e;
		
		li {
			@include breakpoint(x-small) {
				margin-right: 22px;
			}
			
			@include breakpoint(large) {
				margin-right: 28px;
			}
		}
	}
	
	.social-link {
		color: #fff;
		
		&:hover {
			color: $main-color;
		}
		
		@include breakpoint(medium) {
			.fa {
				font-size: 15px;
			}
		
			.label {
				display: none;
			}
		}
	}
	
	// Other widgets
	.widget_links, 
	.widget_meta, 
	.widget_recent_comments, 
	.widget_recent_entries, 
	.widget_rss, 
	.widget_pages, 
	.widget_nav_menu, 
	.widget_categories,
	.widget_product_categories,
	.widget_archive {
		li,
		li > ul {
			border-color: rgba(#fff, 0.19);
		}
	}
	
	.widget_calendar thead {
		border-color: rgba(#fff, 0.19);
	}
}  

/* Instagram Footer */
.mid-footer {
	position: relative;

	.instagram-pics li {
		position: relative;
		float: left;
		width: 14.285714286%;
		
		// Remove some on medium devices
		@include breakpoint(medium) {
			width: 25%;
		
			&:nth-child(n+5) {
				display: none;
			}
		}
		
		@include breakpoint(x-small) {
			width: percentage(1/3);
			
			&:nth-child(-n+6) {
				display: block;
			}
		}
	}
	
	.instagram-pics img {
		display: block;
		width: 100%;
		transition: opacity 0.3s;
		will-change: opacity;
		
		// A hack to fix the sub-pixel flash
		-webkit-filter: blur(0);
	}
	
	li a:hover img {
		opacity: 0.9;
	}
	
	.clear {
		margin: 0;
	}
	
	a.overlay {
		position: absolute;
		display: block;
		top: 50%;
		left: 50%;
		padding: 0 18px;
		transform: translateX(-50%) translateY(-50%);
		z-index: 1;
	
		background: #fff;
		color: #535353;
		font-size: 14px;
		font-weight: 500;
		letter-spacing: 0;
		line-height: 35px;
		transition: none;
		-webkit-font-smoothing: antialiased;
		
		&:hover {
			color: #222;
		}
	}
	
	.fa-instagram {
		font-size: 15px;
		margin-right: 6px;
	}
	
	.fa-instagram:before {
		width: auto;
		display: inline;
	}
}


// Six images per row variation 
.mid-footer.six {
	@include breakpoint(false, medium) {
		.instagram-pics li {
			width: percentage(1/6);
		}
	}
}

/* Lower Footer - Copyright message & back to top */
 
.lower-footer {
	position: relative;
	padding: 25px 0;
	color: #b4b4b4;
	font-size: 13px;

	.copyright {
		float: left;
		max-width: 80%;
		max-width: calc(100% - 150px);
		margin-right: 200px;
		margin-bottom: 0;
		
		@include breakpoint(small) {
			display: block;
			float: none;
			max-width: initial;
			margin: 0;
			text-align: center;
		}
	}
	
	// Hyperlinks
	.copyright a {
		color: #999;
	}
	
	a:hover {
		color: #161616;
	}	

	.to-top {
		float: right;
		
		@include breakpoint(small) {
			float: none;
			display: block;
			margin-top: 10px;
			text-align: center;
		}
	}
}

.back-to-top {
	display: block;
	letter-spacing: -0.025em;
	color: #b4b4b4;

	// Arrow icon
	i {
		display: inline-block;
		vertical-align: middle;
		margin-top: -3px;
		margin-right: 2px;
		font-size: 14px;
	}
}

/**
 * Alternate high contrast footer 
 */
.contrast .lower-footer {
	padding: 0;
	background: #161616;
	
	.bottom {
		padding: 32px 0;
	}
	
	.copyright {
		margin-right: 50px;
		max-width: 50%;
		
		@include breakpoint(medium) {
			margin-right: 0;
			max-width: initial;
		}
	}
	
	a:hover {
		color: #fff;
	}
}

.contrast .mid-footer {
	// This will prevent any sub-pixel oddities causing white lines
	background: #161616;
}

.footer-logo {
	padding: 55px 0;
	text-align: center;
	border-bottom: 1px solid rgba(#fff, 0.1);
	line-height: 1;
}

// Social links for alternate footer
.lower-footer {

	.social-icons {
		float: right;
		font-family: $title-font;
		font-size: 11px;
		font-weight: 600;
		text-transform: uppercase;
		letter-spacing: 0.12em;
		
		@include breakpoint(medium) {
			float: none;
			margin: 0 auto;
			margin-top: 20px;
			text-align: center;
		}
				
		li:last-child .social-link:after {
			display: none;
		}
		
		.fa {
			margin-right: 6px;
			color: $main-color;
			font-size: 12px;
			-webkit-font-smoothing: subpixel-antialiased; 
		}
		
		.label {
			font-size: 11px;
		}
	}
	
	.social-link {
		color: #fafafa;
		
		// Separator
		&:after {
			content: "/";
			margin-left: 18px;
			margin-right: 4px;
			font-size: 10px;
			font-weight: 400;
			color: #b4b4b4;
			-webkit-font-smoothing: antialiased;	
		}
		
		&:hover {
			opacity: 0.9;
		}
	}
}


// Social strip for footer
.main-footer .social-strip {
	position: relative;
	padding: 24px 0;
	text-align: center;
	
	li {
		margin-right: 48px;
	}
	
	li:last-child {
		margin-right: 0;
	}
	
	.social-link {
		font-family: $title-font;
		font-size: 11px;
		font-weight: 700;
		text-transform: uppercase;
		letter-spacing: 0.13em;
	}
	
	.label {
		display: inline-block;
		vertical-align: middle;
		margin-left: 7px;
	}
	
	.fa {
		font-size: 13px;
	}
}

/**
 * Alternate light footer
 */
.main-footer.alt {
	background: #fff;

	@include breakpoint(false, medium) {
		.instagram-pics li {
			width: percentage(1/6);		
		}
	}
	
	.upper-footer {
		padding-top: 75px;
		padding-bottom: 80px;
		
		@include breakpoint(medium) {
			padding-bottom: 20px;
		}
	}
	
	.lower-footer {
		padding: 0;
		
		> .wrap {
			padding: 30px 0;
			border-top: 1px solid #ebebeb;
			
			@include breakpoint(large) {
				padding: 30px 35px;
			}
		}
	}	

	.copyright {
		@include breakpoint(medium) {
			float: none;
			margin-right: 0;
			max-width: initial;
			text-align: center;
		}
	}
	
	.social-icons .label {
		color: #b4b4b4;
	}
	
	.social-link:after {
		color: #ebebeb;
	}
}

/**
 * Stylish Dark footer
 */
.main-footer.stylish {
	background: #020202;

	
	.upper-footer {
		padding-top: 75px;
		padding-bottom: 80px;
		
		@include breakpoint(medium) {
			padding-bottom: 20px;
		}
	}
	
	.widget-title {
		color: #8d8d8d;
		position: relative;
		
		&:after {
			content: "";
			position: absolute;
			top: 100%;
			left: 0;
			width: 36px;
			border-bottom: 1px solid rgba(#fff, 0.16);
				
		}
	}
	
	.lower-footer {
		> .wrap {
			@include breakpoint(large) {
				padding: 30px 35px;
			}
		}
	}
	
	.footer-logo {
		border: 0;
		margin-top: -20px;
		padding: 42px 0;
	}

	.copyright {
		float: none;
		margin-right: 0;
		max-width: initial;
		color: #999;
		
		a {
			color: #b4b4b4;
		}
		
		a:hover {
			color: inherit;
			color: #ccc;
		}
	}
	
	.to-top {
		margin-top: 40px;
		float: none;
	}
}

.main-footer.stylish-b {
	.social-strip {
		background: transparent;
		padding: 32px 0;
		padding-top: 25px;
	}
}

/**
 * Magazine/Classic Footer
 */
.main-footer.classic {
	background: #1d1d1d;
	
	.widget-title {
		margin-bottom: 37px;
		padding-bottom: 0;
		font-size: 17px;
	}
	
	.lower-footer > .wrap {
		border-color: rgba(255, 255, 255, 0.12);
	}
	
	.upper-footer {
		padding-top: 60px;
		padding-bottom: 60px;
	}
	
	.lower-footer {
		color: #7a7a7a;
	}
}

/**
 * Bold Footer
 */
.main-footer.bold {
	
	.upper-footer {
		padding-top: 75px;
		padding-bottom: 80px;
		
		@include breakpoint(medium) {
			padding-bottom: 20px;
		}

		@include breakpoint(small) {
			padding-top: 55px;
		}
	}
	
	.widget-title {
		padding-bottom: 0;
		font-size: 19px;
		text-transform: none;
		font-weight: 600;
	}
	
	.lower-footer {
		> .wrap {
			border: 0;
			padding: 60px 35px;
			text-align: center;
			
			@include breakpoint(large) {
				padding: 30px 35px;
			}
			
			@include breakpoint(x-small) {
				padding: 30px 15px;
			}
		}
	}
	
	// Footer links
	.links {
		margin-bottom: 40px - 14px;

		.menu {
			display: flex;
			justify-content: center;
			flex-wrap: wrap;
		}
		
		.menu-item {
			margin-bottom: 14px;
			margin-right: 35px;
			font-family: $title-font;
			font-size: 14px;
			font-weight: 500;
			letter-spacing: 0.075em;
			text-transform: uppercase;
			
			@include breakpoint(medium) {
				font-size: 13px;
				margin-right: 30px;
			}
			
			@include breakpoint(small) {
				font-size: 12px;
				margin-right: 24px;
			}
		}
		
		.menu-item:last-child {
			margin-right: 0;
		}
	}
	
	.footer-logo {
		border: 0;
		margin-top: -20px;
		padding: 42px 0;
	}
	
	.lower-footer {
		.social-icons {
			float: none;
			margin-bottom: 38px;
			
			.label {
				display: none;
			}
			
			.fa {
				margin-right: 0;
				margin-top: 1px;
				color: #fff;
				font-size: 21px;
				line-height: inherit;
				
				@include breakpoint(small) {
					font-size: 16px;
				}
			}
		}
		
		.social-link {
			display: inline-block;
			width: 50px;
			height: 50px;
			line-height: 50px;
			text-align: center;
			border-radius: 50%;
			background: rgba(#fff, 0.11);
			
			@include breakpoint(small) {
				width: 36px;
				height: 36px;
				line-height: 36px;
			}
			
			&:hover {
				background: rgba(#fff, 0.2);
			}
			
			&:after {
				display: none;
			}
		}
	}

	.copyright {
		float: none;
		margin-right: 0;
		margin-bottom: 34px;
		max-width: initial;
		color: #666;
		font-family: $title-font;
		font-size: 12px;
		letter-spacing: 0.1em;
		text-transform: uppercase;
		
		a {
			color: #b4b4b4;
		}
		
		a:hover {
			color: inherit;
			color: #ccc;
		}
	}
	
	.to-top {
		float: none;
		
		i {
			color: #666;
		}
	}
	
	.back-to-top {
		color: #666;
		font-size: 12px;
		font-weight: 500;
		letter-spacing: 0.1em;
		text-transform: uppercase;
	}
}

// Light variation of bold
.main-footer.bold-light {
	-webkit-font-smoothing: antialiased;

	.widget-title {
		padding-bottom: 11px;
	}
	
	.lower-footer {
		padding: 0;

		> .wrap {
			padding: 50px 35px;
			padding-top: 55px;
		}

		.social-link {
			background: #000;
			background: $main-color;
			box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.2);

			&:hover {
				background: #000;
				opacity: 0.8;
			}
		}
	}

	.links {
		a:hover {
			opacity: 0.75;
		}
	}

	.copyright {
		color: #616161;
		font-weight: 500;
		letter-spacing: 0.11em;
	}

	.copyright a {
		color: #111;

		&:hover {
			color: inherit;
		}
	}

	.back-to-top:hover {
		color: #111;
	}
}