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

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	.pagewidth,
	.full_width .themify_builder_row .row_inner {
		max-width: 94%;
	}
			
	/* content */
	#content {
		width: 67.8%;
	}
	
	/* sidebar */
	#sidebar {
		width: 26.2%;
	}
	#sidebar .secondary {
		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%;
	}
	
	/************************************************************************************
	SLIDE SHOW
	*************************************************************************************/
	#slider {
		width: 94%; /* same width as .pagewidth */
	}

	/************************************************************************************
	POST
	*************************************************************************************/
	/* loops-wrapper */
	.loops-wrapper.grid4,
	.loops-wrapper.grid3,
	.loops-wrapper.grid2,
	.loops-wrapper.grid2-thumb {
		max-width: 105%;
	}
	
}

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

	/* reset absolute elements to static */
	#header .social-widget, #site-logo, #site-description  {
		position: static !important;
		float: none;
		clear: both;
	}
	
	/* social-wrap */
	#social-wrap {
		position: static;
	}
	#header .social-widget {
		margin-left: 0;
	}
					
	/* site logo */
	#site-logo {
		text-align: left;
		margin: 5px 0;
	}

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

	/************************************************************************************
	MOBILE NAV BUTTON
	*************************************************************************************/
	.mobile-button {
		position: relative;
		width: 32px;
		height: 30px;
		margin-bottom: 3px;
		margin-right: 3px;
		display: block;
		float: right;
		cursor: pointer;
		background: #eee;
		border: 1px solid #ccc;
		border-radius: 5px;
	}
	.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-button.active:before {
		color: #555;
	}

	/************************************************************************************
	MAIN NAV (MOBILE)
	*************************************************************************************/
	#main-nav-wrap {
		position: absolute;
		top: 10px;
		right: 0;
		z-index: 1000;
	}
	
	/* main nav */
	#headerwrap #main-nav {
		clear: both;
		float: right;
		position: static;
		width: 160px;
		height: auto;
		z-index: 1000;
		margin: 0;
		padding: 10px 5px;
		background: #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;
	}
	#headerwrap #main-nav li {
		clear: both;
		float: none;
		margin: 5px 0 5px 10px;
		padding: 0;
		border: none;
		box-shadow: none;
	}
	#headerwrap #main-nav a, 
	#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;
	}
	#headerwrap #main-nav a:hover, 
	#headerwrap #main-nav ul a:hover {
		background: none;
		color: #000;
	}
	
	/* dropdown */
	#headerwrap #main-nav ul {
		position: static;
		display: block;
		margin: 0;
		padding: 0;
		background: none;
		border: none;
		border-radius: 0;
		box-shadow: none;
	}
	
	/************************************************************************************
	SEARCH FORM
	*************************************************************************************/
	#searchform-wrap {
		position: absolute;
		top: 10px;
		right: 42px;
		z-index: 1000;
	}
	#search-icon:before {
		content: "\f002";
		font-size: 19px;
	}
	
	#headerwrap #searchform {
		clear: both;
		float: right;
		width: auto;
		width: 160px \0;
		min-width: 65px;
		max-width: 160px;
		position: static;
		overflow: hidden;
		background: #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);
	}
	#headerwrap #searchform #s {
		background: #ddd !important;
		color: #444 !important;
		padding-left: 8px;
		width: 140px\9; /* for IE */
	}

	/************************************************************************************
	POST
	*************************************************************************************/
	/* list large image */
	.list-large-image .post-image {
		float: none;
		margin-right: 0;
	}
	.list-large-image .post-content {
		overflow: visible;
		float: none;
	}

	/* Post lightbox
	================================================ */
	.lightbox-direction-nav {
		top: inherit;
		bottom: 0;
	}
	.lightbox-direction-nav {
		font-size: 24px;
		width: 35px;
		height: 36px;
		padding-top: 6px; /* for center align text */
	}

}

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


	/************************************************************************************
	STRUCTURE
	*************************************************************************************/	
	/* reset 100% height */
	.slideshow #pagewrap,
	.slideshow #body,
	 body {
		height: auto;
	}

	/* push body down for header bar */
	body.slideshow {
		padding-top: 90px;
	}

	/* keep fullscreen mode 100% height */
	.fullscreen #pagewrap,
	.fullscreen #body,
	body.fullscreen {
		height: 100%;
		padding: 0;
	}
	
	
	/************************************************************************************
	SLIDER
	*************************************************************************************/
	#slider {
		background: #444;
	}
	.slides .slide-content {
		background: none;
	}

	/* hide slider direction nav on mobile */
	.flex-direction-nav {
		display: none;
	}	

	/* set slide content to static so it dipslays at the bottom */
	.slides .slide-content-wrap {
		position: static;
	}

	/************************************************************************************
	FOOTER
	*************************************************************************************/
	/* set footer to static position on mobile */
	.slideshow #footerwrap {
		position: static;
		margin-top: 60px;
	}

	/* footer text */
	.footer-text {
		width: 100%;
		float: none;
		text-align: left;
		clear: both;
	}

	.footer-text .one,
	.footer-text .two {
		float: none;
		clear: both;
	}

}

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

	/* 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 !important;
		width: 100% !important;
		max-width: 100% !important;
	}
			
	/************************************************************************************
	LAYOUTS
	*************************************************************************************/
	/* loops-wrapper */
	.loops-wrapper {
		margin-left: 0 !important;
		width: auto !important;
	}
		
	/************************************************************************************
	POST
	*************************************************************************************/
	/* post */
	.loops-wrapper.grid4 .post,
	.loops-wrapper.grid3 .post,
	.loops-wrapper.grid2 .post,
	.loops-wrapper.grid2-thumb .post,
	.loops-wrapper.list-thumb-image .post,
	.loops-wrapper.grid2-thumb .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;
	}

}

@media screen and (min-width: 769px) {

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

}