/************************************************************************************
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 */
.mobile_menu_active #header {
	height: auto !important;
}
/* reset absolute elements to static */
.mobile_menu_active .social-widget,
.mobile_menu_active .header-widget,
.mobile_menu_active #site-logo,
.mobile_menu_active #site-description,
.mobile_menu_active #nav-bar {
	position: static !important;
	float: none;
	clear: both;
}
/* header */
.mobile_menu_active .social-widget .widget {
	padding: 0 0 20px;
}
.mobile_menu_active .social-widget .rss {
	padding: 0 0 20px;
}
.mobile_menu_active #header #searchform {
	padding: 10px 0;
	position: absolute;
	top: -10px;
	right: 0;
	z-index: 103;
}
.mobile_menu_active #header #searchform #s {
	width: 50px;
	text-align: right;
}
.mobile_menu_active #header #searchform #s:focus {
	width: 150px;
}
.mobile_menu_active #site-logo {
	margin: 15px 100px 10px 0;
}
.mobile_menu_active #site-description {
	margin: 0 0 15px;
}
/************************************************************************************
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 '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;
}
.mobile_menu_active #headerwrap #main-nav .page_item_has_children > a .sub-arrow,
.mobile_menu_active #headerwrap #main-nav .menu-item-has-children > a .sub-arrow {
	display: none !important;
}

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

/* main nav */
.mobile_menu_active #main-nav {
	clear: both;
	position: static;
	width: 210px;
	height: auto;
	z-index: 1000;
	padding: 10px;
	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: 78vh;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}
.mobile_menu_active #main-nav li {
	clear: both;
	float: none;
	margin: 5px 0 5px 10px;
	padding: 0;
	border: none;
	box-shadow: none;
}
.mobile_menu_active #nav-bar,
.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 #nav-bar a:hover,
.mobile_menu_active #nav-bar ul a:hover,
.mobile_menu_active #nav-bar li:hover,
.mobile_menu_active #main-nav a:hover, 
.mobile_menu_active #main-nav ul a:hover {
	background: none;
	color: #000;
}
.mobile_menu_active #main-nav .current_page_item{
	background:none;
}

/* 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: 0px;
	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;
	padding-left: 8px;
}
@media screen and (max-width: 1200px) {
	#headerwrap #site-logo a img{
		height: auto;
	}
}
@media screen and (max-width: 980px) {

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	#pagewrap {
		max-width: 100%;
	}
	
	#pagewrap,
	.full_width .module_row > .row_inner,
	.full_width .module-layout-part .module_row.fullwidth_row_container > .row_inner {
		width: 95%;
	}
	.full_width .module-layout-part .module_row.fullwidth > .row_inner,
	.full_width .module_row.fullwidth > .row_inner {
		max-width:100%;
	}
	/* header */
	#header {
		margin-bottom: 15px;
	}
	/* slider */
	#header-slider {
		padding: 0 35px 0 25px;
	}
	#header-slider .slides li {
		margin: .8em;
	}
	#header-slider img {
		max-width: 97%;
		height: auto;
	}
	#header-slider .carousel-nav-wrap .carousel-prev{
		left: -26px;
	}
	#header-slider .carousel-nav-wrap .carousel-next{
		right: -36px;
	}
	#content {
		width: 68%;
		padding: 3% 4%;
	}
	#sidebar {
		width: 30%;
	}
	/* footer grid */
	#footer .col2-1 {
		width: 48%;
		margin: 1% 2% 1% 0;
	}
	#footer .col3-1 {
		width: 31.2%;
		margin: 1% 2% 2% 0;
	}
	#footer .col4-1 {
		width: 23%;
		margin: 1% 2% 2% 0;
	}
	
	/************************************************************************************
	LAYOUTS
	*************************************************************************************/	
	/* grid4 */
	.loops-wrapper.grid4 .post {
		width: 23%;
		margin-left: 2.5%;
	}

	/* grid3 */
	.loops-wrapper.grid3 .post {
		width: 31.2%;
		margin-left: 3%;
	}
	
	/* grid2 */
	.loops-wrapper.grid2 .post,
	.loops-wrapper.grid2-thumb .post {
		width: 48.2%;
		margin-left: 3.5%;
	}

}

/* smaller than 720 */
@media screen and (max-width: 720px) {
	#pagewrap,
	.full_width .module_row .row_inner,
	.full_width .module-layout-part .module_row.fullwidth_row_container .row_inner {
		width: 90%;
	}
	#content {
		width: auto;
		float: none;
		padding: 5%;
	}
	/* post title */
	.post-title {
		font-size: 150%;
		line-height: 120%;
		padding-top: 0;
	}
	/* commentlist */
	.commentlist ul {
		margin-left: 20px;
	}
	.next-prev-comment {
		position: static;
		margin: 0 0 5px;
	}
	.commententry {
		clear: both;
	}
	/* sidebar */
	#sidebar {
		width: 100%;
	}
	/* footer */
	#footer .col4-1, #footer .col4-3, #footer .col3-2, #footer .col3-1, #footer .col2-1 {
		float: none;
		width: auto;
		margin: 0;
	}
	#footer-nav {
		text-align: center;
		padding-top: 10px;
		margin-bottom: 0;
	}
	#footer .footer-text {
		text-align: center;
		padding-top: 10px;
	}
	
	/************************************************************************************
	LAYOUTS
	*************************************************************************************/	
	/* grid4 */
	.loops-wrapper.grid4 .post,
	.sidebar1 .loops-wrapper.grid4 .post {
		width: auto;
		float: none;
		margin-left: 0;
	}

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

}

/* smaller than 560 */
@media screen and (max-width: 680px) {
	html {
    		-webkit-text-size-adjust: none;
	}
	#pagewrap,
	.full_width .module_row .row_inner,
	.full_width .module-layout-part .module_row.fullwidth_row_container .row_inner {
		width: 95%;
	}
	#header-slider {
		margin-bottom: 10px;
	}
	/* post date */
	.post-date {
		width: 44px;
	}
	/* post-nav */
	.post-nav .prev,
	.post-nav .next {
		width: auto;
		margin-bottom: 10px;
	}
	/* post title */
	.post-title {
		font-size: 140%;
		line-height: 130%;
	}
	
	/* 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%;
	}
	
	/************************************************************************************
	POST
	*************************************************************************************/
	/* post */
	.post {
		width: auto !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		float: none !important;
	}
		
	/************************************************************************************
	WOOCOMMERCE SUPPORT
	*************************************************************************************/
	.woocommerce #content div.product div.images,
	.woocommerce #content div.product div.summary {
		float: none !important;
		width: 100% !important;
	}
}