@media screen and (max-width: 1200px) {
	#headerwrap #site-logo a img{
		height: auto;
	}
}
@media screen and (max-width: 1150px) {

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

	#pagewrap {
		max-width: 92%;
		padding: 2% 3% 10px;
		margin-bottom: 10%;
	}
	.full_width .module-layout-part .themify_builder_row.fullwidth > .row_inner,
	.full_width .themify_builder_row.fullwidth > .row_inner {
		max-width:100%;
	}
		
	/* content */
	#content {
		margin: 7% 0 5%;
	}
	.sidebar1 #content {
		max-width: 67.8%;
	}
	
	/* sidebar */
	#sidebar {
		margin: 7% 0 5%;
		max-width: 26.2%;
	}
	#sidebar .secondary {
		max-width: 47%;
	}
	
	/************************************************************************************
	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 .post {
		width: 48%;
		margin-left: 3.75%;
	}
}

@media screen and (max-width: 780px) {
	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	.sidebar1 #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%;
	}

}

@media screen and (max-width: 680px) {
	
	/************************************************************************************
	GRID
	*************************************************************************************/
	.col4-1,
	.col4-2, .col2-1,
	.col4-3,
	.col3-1,
	.col3-2	 {
		margin-left: 0;
		width: 100%;
		max-width: 100%;
	}

	/************************************************************************************
	LAYOUTS
	*************************************************************************************/
	/* list post */
	.loops-wrapper.list-post .post,
	.single .list-post .post {
		padding-left: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	.loops-wrapper.list-post .post-meta,
	.single .list-post .post-meta {
		width: 100%;
		text-align: left;
		position: static;
	}
	.loops-wrapper.list-post .post-meta span,
	.single .list-post .post-meta span {
		display: inline;
		margin: 0 5px 0 0;
	}
	.loops-wrapper.list-post .post-icon,
	.single .list-post .post-icon {
		width: 27px;
		height: 30px;
		display: block;
		float: left;
		margin: 2px 14px 5px 0;
		border: none;
		position: static;
	}

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

	/************************************************************************************
	LAYOUTS
	*************************************************************************************/
	/* grid4 */
	.loops-wrapper.grid4 .post {
		font-size: 100%;
	}

	/* grid2 */
	.loops-wrapper.grid2 .post,
	.sidebar1 .loops-wrapper.grid2 .post {
		width: 100%;
		margin-left: 0;
		float: none;
	}
	
	/* post */
	.post {
		width: auto !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		float: none !important;
	}
	
	/* post title */
	.post-title {
		margin: 0 0 2px !important;
		padding-top: 4px;
		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 NAV
	*************************************************************************************/
	.footer-nav {
		margin: 0 auto 20px;
		width: 100%;
	}
	.footer-nav a {
		margin: 0 4px;
	}
	
	/************************************************************************************
	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;
	}
}

/************************************************************************************
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 #headerwrap #site-logo,
.mobile_menu_active #headerwrap #site-description,
.mobile_menu_active #headerwrap #main-nav  {
	position: static;
	float: none;
	clear: both;
}

/* header */
.mobile_menu_active #header {
	height: auto !important;
	min-height: 0;
	padding: 0;
	padding-top: 20px;
}
.mobile_menu_active #header .hgroup {
	text-align: left;
}

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

/* site description */
.mobile_menu_active #site-description {
	text-align: left;
	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 '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_menu_active #main-nav-wrap {
	position: absolute;
	top: 4px;
	right: 0;
	z-index: 1000;
}

/* main nav */
.mobile_menu_active #headerwrap #main-nav {
	clear: both;
	position: static;
	width: 160px;
	height: auto;
	z-index: 1000;
	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 #headerwrap #main-nav li {
	clear: both;
	float: none;
	margin: 5px 0 5px 10px;
	padding: 0;
	border: none;
	box-shadow: none;
	display:block;
	text-align:left;
}
.mobile_menu_active #headerwrap #main-nav a, 
.mobile_menu_active #headerwrap #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 #headerwrap #main-nav a:hover, 
.mobile_menu_active #headerwrap #main-nav ul a:hover {
	background: none;
	color: #000;
}

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

/************************************************************************************
SEARCH FORM
*************************************************************************************/
.mobile_menu_active #searchform-wrap {
	position: absolute;
	top: 4px;
	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;
	width: 126px;
	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;
	width: 110px;
}

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