/************************************************************************************
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
*************************************************************************************/
/* header */
.mobile_menu_active #header {
	height: auto !important;
}

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

/* site logo */
.mobile_menu_active #site-logo {
	font-size: 42px;
	text-align: left;
	padding: 15px 90px 10px 0;
	margin: 0;
	width: auto;
}

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

/* social widget */
.mobile_menu_active .social-widget {
	position: static !important;
	float: none;
	margin-bottom:10px;
	overflow:hidden;
	padding: 0;
}

/* header widget */
.mobile_menu_active .header-widget {
	position: static !important;
	float: none;
	text-align: left;
	clear: both;
	margin: 0;
}
.mobile_menu_active .header-widget .widget {
	margin: 0 0 10px;
}

/* top nav */
.mobile_menu_active #top-nav {
	padding-right: 0;
}
.mobile_menu_active #top-nav a {
	font-size: 85%;
	margin-right: 3px;
}

/************************************************************************************
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: 1px solid #ccc;
	border-radius: 5px;
}
.mobile_menu_active .mobile-button:before {
	content: '\f0c9';
	font: normal 21px/1em 'themify_theme_icons';
	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: 20px;
	right: 0;
	z-index: 1000;
}

/* main nav */
.mobile_menu_active #main-nav {
	clear: both;
	position: static;
	width: 220px;
	z-index: 1000;
	height: auto;
	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;
	max-height: 80vh;
	overflow: auto;
	-webkit-overflow-scrolling: touch;	
}
.mobile_menu_active #main-nav li {
	clear: both;
	float: none;
	margin: 8px 0 8px 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 span{
	display: none;
}
.mobile_menu_active #main-nav a .sub-arrow {
	display: none !important;
}
.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: 20px;
	right: 40px;
	z-index: 1000;
}
.mobile_menu_active #search-icon:before {
	content: '\e800';
	font-size: 19px;
}
.mobile_menu_active #header #searchform {
	clear: both;
	width: auto;
	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 #header #searchform #s {
	background-color: #ddd !important;
	color: #444 !important;
	float: right;
}
.mobile_menu_active #header #searchform input#s:focus {
	width: 150px;
}
@media screen and (max-width: 980px) {

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

	.pagewidth,
	.module_row > .row_inner {
		max-width: 94%;
	}
	.default_width #layout .module_row > .row_inner,
	.module-layout-part .module_row.fullwidth > .row_inner,
	.module_row.fullwidth > .row_inner {
		max-width:100%;
	}
	
	/************************************************************************************
	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%;
	}
	
	/************************************************************************************
	LAYOUTS
	*************************************************************************************/
	/* grid4 */
	.loops-wrapper.grid4 .post {
		width: 23.125%;
		margin-left: 2.5%;
	}

	/* grid3 */
	.loops-wrapper.grid3 .post {
		width: 31%;
		margin-left: 3.5%;
	}

	/* grid2 */
	.loops-wrapper.grid2-thumb .post,
	.loops-wrapper.grid2 .post {
		width: 48%;
		margin-left: 3.75%;
	}

}

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

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	/* reset all to fullwidth */
	#contentwrap,
	#content,
	#sidebar-alt, 
	#sidebar {
		width: 100% !important;
		float: none !important;
		clear: both !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	
	/************************************************************************************
	FOOTER
	*************************************************************************************/
	.footer-nav-wrap,
	.footer-text {
		width: 100%;
		float: none;
		clear: both;
		text-align: left;
	}

}

@media screen and (max-width: 680px) {
	
	/************************************************************************************
	LAYOUTS
	*************************************************************************************/
	/* grid4 */
	.loops-wrapper.grid4 .post,
	.sidebar1 .loops-wrapper.grid4 .post {
		width: 100%;
		margin-left: 0;
		float: none;
	}

	/* grid3 */
	.loops-wrapper.grid3 .post,
	.sidebar1 .loops-wrapper.grid3 .post {
		width: 100%;
		margin-left: 0;
		float: none;
	}

	/* 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%;
	}

	/************************************************************************************
	SLIDER
	*************************************************************************************/
	.slider {
		font-size: 90%;
	}

	/************************************************************************************
	LAYOUTS
	*************************************************************************************/
	/* post */
	.post {
		width: auto !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		float: none !important;
	}
	
	/* post title */
	.post-title {
		font-size: 2em !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;
	}

	/* commentlist sub-levels */
	.commentlist ul, .commentlist ol {
		margin: 0 0 0 7%;
	}

	/************************************************************************************
	FOOTER
	*************************************************************************************/
	#footer-logo {
		position: static !important;
	}
	.footer-nav {
		padding: 0;
	}
	
	/************************************************************************************
	WOOCOMMERCE SUPPORT
	*************************************************************************************/
	.woocommerce #content div.product div.images,
	.woocommerce #content div.product div.summary {
		float: none !important;
		width: 100% !important;
	}

}