/************************************************************************************
MOBILE MENU ACTIVE
*************************************************************************************/
/* change max-width to trigger mobile menu active class */

/* ensure #nav and #searchform is visible on desktop version */
body:not(.mobile_menu_active) #main-nav,
body:not(.mobile_menu_active) #headerwrap #searchform {
	display: block !important;
}

/************************************************************************************
HEADER
*************************************************************************************/
/* reset absolute elements to static */
.mobile_menu_active .social-widget,
.mobile_menu_active #site-logo,
.mobile_menu_active #site-description  {
	position: static !important;
	float: none;
	clear: both;
}

/* social-wrap */
.mobile_menu_active #social-wrap {
	position: static;
}
.mobile_menu_active .social-widget > div.rss,
.mobile_menu_active .social-widget .widget {
	margin-left: 0;
}
				
/* site logo */
.mobile_menu_active #site-logo {
	text-align: left;
}

/* site description */
.mobile_menu_active #site-description {
	margin: 0 0 10px;
}

/************************************************************************************
MOBILE NAV BUTTON
*************************************************************************************/
.mobile_menu_active .mobile-button {
	position: relative;
	width: 32px;
	height: 30px;
	margin-bottom: 3px;
	margin-right: 3px;
	display: block;
	float: right;
	cursor: pointer;
	background-color: #eee;
	border-radius: 5px;
}
.mobile_menu_active .mobile-button:before {
	content: "\f0c9";
	font: normal 21px/1em FontAwesome;
	color: #000;
	position: absolute;
	top: 50%;
	left: 50%;
	margin: -.5em 0 0 -.5em;
	width: 1em;
	height: 1em;
	text-align: center;
}
.mobile_menu_active .mobile-button.active:before {
	color: #555;
}

/************************************************************************************
MAIN NAV (MOBILE)
*************************************************************************************/
.mobile_menu_active #main-nav-wrap {
	position: absolute;
	top: 10px;
	right: 0;
	z-index: 1000;
}

/* main nav */
.mobile_menu_active #main-nav {
	clear: both;
	float: right;
	position: static;
	width: 160px;
	height: auto;
	z-index: 1000;
	margin: 0;
	padding: 10px 5px;
	background-color: #fff;
	border: solid 1px #999;
	display: none; /* visibility will be toggled with jquery */
	box-shadow: 1px 2px 0 rgba(0,0,0,.2);
	border-radius: 5px;
}
.mobile_menu_active #main-nav li {
	clear: both;
	float: none;
	text-align: left;
	margin: 5px 0 5px 10px;
	padding: 0;
	border: none;
	box-shadow: none;
}
.mobile_menu_active #main-nav a,
.mobile_menu_active #main-nav ul a {
	font: inherit;
	text-transform: inherit;
	background: none;
	width: auto;
	display: inline;
	padding: 0;
	color: #666;
	border: none;
	text-shadow: none;
	box-shadow: none;
}
.mobile_menu_active #main-nav a:hover,
.mobile_menu_active #main-nav ul a:hover {
	background: none;
	color: #000;
}

/* dropdown */
.mobile_menu_active #main-nav ul {
	position: static;
	display: block;
	margin: 0;
	padding: 0;
	background: none;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

/************************************************************************************
SEARCH FORM
*************************************************************************************/
.mobile_menu_active #searchform-wrap {
	position: absolute;
	top: 10px;
	right: 42px;
	z-index: 1000;
}
.mobile_menu_active #search-icon:before {
	content: "\f002";
	font-size: 19px;
}
.mobile_menu_active #headerwrap #searchform {
	clear: both;
	float: right;
	width: auto;
	min-width: 65px;
	max-width: 160px;
	position: static;
	overflow: hidden;
	background-color: #fff;
	border: solid 1px #999;
	padding: 5px;
	display: none; /* visibility will be toggled with jquery */
	border-radius: 5px;
	box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.mobile_menu_active #headerwrap #searchform #s {
	background-color: #ddd !important;
	color: #444 !important;
	padding-left: 8px;
}

@media screen and (max-width: 980px) {

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	#pagewrap {
		max-width: 100%;
	}

	.pagewidth,
	.full_width .themify_builder_row .row_inner {
		max-width: 94%;
	}
	.full_width .module-layout-part .themify_builder_row.fullwidth .row_inner,
	.full_width .themify_builder_row.fullwidth .row_inner {
		max-width:100%;
	}
		
	/* content */
	#content {
		width: 67.8%;
	}
	
	/* sidebar */
	#sidebar {
		width: 26.2%;
	}
	#sidebar .secondary {
		width: 47%;
	}

	/* loops-wrapper */
	.loops-wrapper {
		max-width: 105%;
	}
	
	/************************************************************************************
	GRID
	*************************************************************************************/
	.col4-1,
	.col4-2,
	.col4-3,
	.col3-1,
	.col3-2,
	.col2-1
	{
		margin-left: 2%;
	}
	.col4-1 {
		max-width: 23%;
	}
	.col4-2, .col2-1 {
		max-width: 48%;
	}
	.col4-3 {
		max-width: 72%;
	}
	.col3-1 {
		max-width: 31%;
	}
	.col3-2 {
		max-width: 62%;
	}
	
}

@media screen and (max-width: 768px) {

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	#content {
		width: 100%;
		max-width: 100%;
		float: none;
		clear: both;
	}
	
	/* sidebar */
	#sidebar {
		width: 100%;
		max-width: 100%;
		float: none;
		clear: both;
	}
	#sidebar .secondary {
		width: 48%;
	}
	
	/************************************************************************************
	POST
	*************************************************************************************/
	/* list large image */
	.list-large-image .post-image {
		float: none;
		margin-right: 0;
	}
	.list-large-image .post-content {
		overflow: visible;
		float: none;
	}

}

@media screen and (max-width: 680px) {

	/************************************************************************************
	TIMELINE
	*************************************************************************************/
	.timeline .loops-timeline {
		padding-right: 0;
	}
	.timeline .timeline-nav-wrap {
		position: relative;
	}
	.timeline .timeline-nav {
		margin: -10px 0 20px 0;
		padding: 0;
		width: auto;
		max-width: 100%;
		background: none;
		border: none;
		position: relative;
		z-index: 200;
		text-align: center;
		box-shadow: none;
	}
	.timeline .timeline-nav li {
		display: inline-block;
		margin: 0 0 5px;
		padding: 0;
		list-style: none;
		position: relative;
	}
	
	/* main level link */
	.timeline .timeline-nav a {
		color: #444;
		display: block;
		padding: 4px 10px;
		font-size: 100%;
		margin: 0;
		text-decoration: none;
		position: relative;
		z-index: 10000;
	
		background-color: #dedddd;
		border: solid 1px #919191;
		border-radius: 5px;
		box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 1px 1px rgba(0,0,0,.2);
	}
	/* main level link :hover */
	.timeline .timeline-nav a:hover {
		color: #000;
		background-color: #eee;
	}
	
	/* sub-levels link */
	.timeline .timeline-nav ul a {
		color: #666;
		line-height: 140%;
		padding: 3px 6px 3px 12px;
		margin: 0;
		display: block;
		width: 90px;
		text-shadow: none;
		background: none;
		border: none;
		border-radius: 0;
		box-shadow: none;
	}
	/* sub-levels link :hover */
	.timeline .timeline-nav ul a:hover {
		background-color: #F3F3F3;
		color: #000;
	}
	/* dropdown ul */
	.timeline .timeline-nav ul {
		margin: 2px 0 0;
		padding: 5px 0;
		list-style: none;
		position: absolute;
		background-color: #fff;
		border: solid 1px #ccc;
		text-align: left;
		z-index: 100;
		box-shadow: 0 1px 2px rgba(0,0,0,.3);
		border-radius: 5px;
	}
	.timeline .timeline-nav ul li {
		background: none;
		padding: 0;
		margin: 0;
		float: none;
	}
	/* sub-levels dropdown */
	.timeline .timeline-nav ul ul {
		left: 190px;
		top: -2px;
	}
	/* show dropdown ul */
	.timeline .timeline-nav li:hover > ul {
		display: block;
	}

	/* timeline post */
	.timeline {
		text-align: center;
	}
	.timeline .post {
		width: 100%;
		max-width: 100%;
		clear: both;
		float: none;
		z-index: 100;
		text-align: left;
		display: inline-block;
	}
	.timeline .post-inner {
		margin-right: 0 !important;
		margin-left: 0 !important;
		position: relative;
	}
	
	/* post arrow */
	.timeline .post-arrow {
		display: none;
	}
	
	/* post dot */
	.timeline .post-dot {
		display: none;
	}
	
	/* post date */
	.timeline .post-date {
		margin-left: -80px;		
	}
	
	/* post alt */
	.timeline .alt.second {
		margin-top: 0;
	}

	/************************************************************************************
	LOAD MORE BUTTON
	*************************************************************************************/
	#load-more a {
		margin-left: 0;
	}

	/************************************************************************************
	FOOTER
	*************************************************************************************/
	/* footer nav */
	#footernav-wrap {
		width: 100%;
		float: none;
	}
	#footer-nav {
		padding: 0;
	}
	
	/* footer text */
	.footer-text {
		width: 100%;
		float: none;
		text-align: left;
		margin-top: 15px;
		clear: both;
	}

	/* disable webkit text size adjust (for iPhone) */
	html {
		-webkit-text-size-adjust: none;
	}

	/************************************************************************************
	GRID
	*************************************************************************************/
	.col4-1,
	.col4-2, .col2-1,
	.col4-3,
	.col3-1,
	.col3-2	 {
		margin-left: 0;
		width: 100%;
		max-width: 100%;
	}
			
	/************************************************************************************
	LAYOUTS
	*************************************************************************************/
	/* loops-wrapper */
	.loops-wrapper {
		margin-left: 0 !important;
		width: auto !important;
	}

	/* post */
	.loops-wrapper.grid4 .post,
	.loops-wrapper.grid3 .post,
	.loops-wrapper.grid2 .post,
	.post {
		width: 100% !important;
		margin-left: 0 !important;
		float: none !important;
		position: static !important;
	}
	.sidebar1 .loops-wrapper.grid4 .post,
	.sidebar1 .loops-wrapper.grid3 .post,
	.sidebar1 .loops-wrapper.grid2 .post {
		margin-left: 0 !important;
	}

	/************************************************************************************
	POST
	*************************************************************************************/
	/* post */
	.post {
		width: auto !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		float: none !important;
	}
	
	/* post image */
	.post-image {
		float: none !important;
		margin-right: 0 !important;
		margin-left: 0 !important;
	}

	/* post content */
	.post-content {
		overflow: visible !important;
		float: none !important;
	}

	/************************************************************************************
	POST NAV
	*************************************************************************************/
	.post-nav .prev, .post-nav .next {
		display: block;
		width: 100%;
		clear: both;
		margin-bottom: 10px;
	}
	
	/************************************************************************************
	COMMENTS
	*************************************************************************************/
	.commentlist {
		padding-left: 0;
	}
	.commentlist .commententry {
		clear: left;
	}
	.commentlist .avatar {
		float: left;
		width: 40px;
		height: 40px;
		margin: 0 10px 10px 0;
	}
	
	/************************************************************************************
	WOOCOMMERCE SUPPORT
	*************************************************************************************/
	.woocommerce #content div.product div.images,
	.woocommerce #content div.product div.summary {
		float: none !important;
		width: 100% !important;
	}

}

/* Responsive Gallery items */
@media screen and (max-width: 1024px) {
	.gallery-columns-5 .gallery-item:nth-of-type(5n),
	.gallery-columns-6 .gallery-item:nth-of-type(6n),
	.gallery-columns-7 .gallery-item:nth-of-type(7n),
	.gallery-columns-8 .gallery-item:nth-of-type(8n),
	.gallery-columns-9 .gallery-item:nth-of-type(9n) {
		margin-right: 1.5%;
	}
	.gallery-columns-5 .gallery-item:nth-of-type(4n+1),
	.gallery-columns-6 .gallery-item:nth-of-type(4n+1),
	.gallery-columns-7 .gallery-item:nth-of-type(4n+1),
	.gallery-columns-8 .gallery-item:nth-of-type(4n+1),
	.gallery-columns-9 .gallery-item:nth-of-type(4n+1) {
		clear: left;
	}
	.gallery-columns-5 .gallery-item:nth-of-type(4n),
	.gallery-columns-6 .gallery-item:nth-of-type(4n),
	.gallery-columns-7 .gallery-item:nth-of-type(4n),
	.gallery-columns-8 .gallery-item:nth-of-type(4n),
	.gallery-columns-9 .gallery-item:nth-of-type(4n) {
		margin-right: 0;
	}
	.gallery-columns-5 .gallery-item + br,
	.gallery-columns-6 .gallery-item + br,
	.gallery-columns-7 .gallery-item + br,
	.gallery-columns-8 .gallery-item + br,
	.gallery-columns-9 .gallery-item + br {
		display: none;
	}
	
	/* clear none gallery item different sizes */
	.gallery-columns-5 .gallery-item:nth-of-type(5n + 1),
	.gallery-columns-6 .gallery-item:nth-of-type(6n + 1),
	.gallery-columns-7 .gallery-item:nth-of-type(7n + 1),
	.gallery-columns-8 .gallery-item:nth-of-type(8n + 1),
	.gallery-columns-9 .gallery-item:nth-of-type(9n + 1) {
		clear: none;
	}

	/* gallery column 5,6,7,8 and 9 */
	.gallery-columns-5 .gallery-item,
	.gallery-columns-6 .gallery-item,
	.gallery-columns-7 .gallery-item,
	.gallery-columns-8 .gallery-item,
	.gallery-columns-9 .gallery-item {
		width: 23.8%;
	}
}
@media screen and (max-width: 680px) {
	.gallery-columns-3 .gallery-item + br {
		display: none;
	}
	.gallery-columns-3 .gallery-item:nth-of-type(3n) {
		margin-right: 1.5%;
	}

	.gallery-columns-3 .gallery-item,
	.gallery-columns-4 .gallery-item,
	.gallery-columns-5 .gallery-item,
	.gallery-columns-6 .gallery-item,
	.gallery-columns-7 .gallery-item,
	.gallery-columns-8 .gallery-item,
	.gallery-columns-9 .gallery-item {
		width: 49.2%;
	}
	.gallery-columns-3 .gallery-item:nth-of-type(2n),
	.gallery-columns-4 .gallery-item:nth-of-type(2n),
	.gallery-columns-5 .gallery-item:nth-of-type(2n),
	.gallery-columns-6 .gallery-item:nth-of-type(2n),
	.gallery-columns-7 .gallery-item:nth-of-type(2n),
	.gallery-columns-8 .gallery-item:nth-of-type(2n),
	.gallery-columns-9 .gallery-item:nth-of-type(2n) {
		margin-right: 0;
	}
	
	/* clear none gallery item different sizes */
	.gallery-columns-4 .gallery-item:nth-of-type(4n + 1),
	.gallery-columns-3 .gallery-item:nth-of-type(3n + 1),
	.gallery-columns-2 .gallery-item:nth-of-type(2n + 1) {
		clear: none;
	}
}
@media screen and (max-width: 600px) {
	body.admin-bar #headerwrap {
		top: 46px;
	}
	.admin-bar #wpadminbar {
		position: fixed;
	}
	.timeline .timeline-nav-wrap {
		margin-top: 46px;
	}
}