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

/* ensure #nav is visible on desktop version */
body:not(.mobile_menu_active) #main-nav {
	display: block !important;
}
body:not(.mobile_menu_active) #menu-icon span {
	display: none;
}

/************************************************************************************
HEADER
*************************************************************************************/
/* header */
.mobile_menu_active #header {
	height: auto;
}

/* reset absolute elements to static */
.mobile_menu_active .topbar-widget,
.mobile_menu_active #site-logo,
.mobile_menu_active #site-description,
.mobile_menu_active #main-nav {
	position: static;
}
.mobile_menu_active .topbar-widget .widget,
.mobile_menu_active .topbar-widget .rss {
	margin: 1.5em 0;
	float: none;
	display: inline-block;
	vertical-align: top;
}
.mobile_menu_active .topbar-widget ul {
	float: none;
	margin-bottom: 0;
}

/* site logo */
.mobile_menu_active #site-logo {
	max-width: 210px;
	margin-top: 20px;
	line-height: 1.4em;
	font-size: 1.55em;
}

.mobile_menu_active .mobile-button {
	background: #c3c3c3;
	border-radius: 5px;
	width: 32px;
	height: 30px;
	display: block;
	position: absolute;
	right: 0;
	top: 14px;
	cursor: pointer;
	z-index: 99;
}
.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;
}

/************************************************************************************
MAIN NAV (MOBILE)
*************************************************************************************/
.mobile_menu_active #headerwrap nav {
	position: relative;
}

/* main nav */
.mobile_menu_active #main-nav {
	clear: both;
	position: absolute;
	top: 0;
	right: 0;
	left: auto;
	bottom: auto;
	width: 250px;
	z-index: 1000;
	padding: 10px 2.5em;
	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;
	margin-top: 2.9em;
}
.mobile_menu_active #main-nav li {
	clear: both;
	float: none;
	display: block;
	padding: 0;
}
.mobile_menu_active #main-nav a,
.mobile_menu_active #main-nav ul a {
	font: inherit;
	text-transform: inherit;
	background: none;
	width: auto;
	display: block;
	padding: 0;
	color: #666;
	border: none;
	text-shadow: none;
	box-shadow: none;
	margin: 0.5em 0;
}
.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;
}
.mobile_menu_active #main-nav ul {
	padding-left: 1em;
}

/* searchform */
.mobile_menu_active #header #searchform {
	left: auto;
	right: 0;
	top: 10px;
	text-align: right;
}
.mobile_menu_active #header #searchform #s {
	width: 45px;
	transition: all 0.5s ease;
}
.mobile_menu_active #headerwrap #searchform #s:focus,
.mobile_menu_active #headerwrap #searchform #s:hover {
	width: 160px;
	outline: 0;
}
.mobile_menu_active #main-nav .sub-arrow {
	display: none !important;
}
@media screen and (max-width: 1200px) {
	#headerwrap #site-logo a img{
		height: auto;
	}
}
@media screen and (max-width: 977px) {

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	#pagewrap {
		max-width: 96%;
	}
	#content {
		width: 69%;
	}
	#sidebar {
		width: 26%;
	}
	.full_width .module-layout-part .themify_builder_row.fullwidth > .row_inner,
	.full_width .themify_builder_row.fullwidth > .row_inner {
		max-width:100%;
	}
}

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

	/************************************************************************************
	POST LAYOUTS
	*************************************************************************************/
	.loops-wrapper.grid4 .post {
		width: 48.4%; /* change grid4 to 2 columns */
	}
	.loops-wrapper.grid4 .post:nth-of-type(2n+1) {
		margin-left: 0;
		clear: left;
	}
	
	.post-image .themify_lightbox {
		display: block;
	}

}

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

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	#pagewrap {
		max-width: 90%;
	}
	/* content & sidebar */
	#pagewrap #content ,
	#pagewrap #sidebar {
		width: 100%;
		max-width: 100%;
		float: none;
		clear: both;
	}
	  
	/************************************************************************************
	POST LAYOUTS
	*************************************************************************************/
	.loops-wrapper.grid2 .post,
	.loops-wrapper.grid3 .post,
	.loops-wrapper.grid4 .post {
		clear: none;
	}
	.loops-wrapper .post-image img {
		width: 100%;
	}
	.sidebar-left .loops-wrapper.list-post {
		width: auto;
		padding-left: 0;
	}
	
	/************************************************************************************
	FOOTER
	*************************************************************************************/
	.footer-text .one,
	.footer-text .two {
		float: none;
		text-align: center;
	}

}

@media screen and (max-width: 680px) {
	
	/************************************************************************************
	HEADING
	*************************************************************************************/
	.page-title,
	h1 {
		font-size: 2.2em;
	}
	h2 {
		font-size: 2em;
	}
	h3 {
		font-size: 1.6em;
	}
	h4 {
		font-size: 1.4em;
	}
	h5 {
		font-size: 1.2em;
	}
	h6 {
		font-size: 1.1em;
	}

	/************************************************************************************
	GRID
	*************************************************************************************/
	.col4-1,
	.col4-2, .col2-1,
	.col4-3,
	.col3-1,
	.col3-2	 {
		margin-left: 0;
		width: 100%;
		max-width: 100%;
	}

	/************************************************************************************
	POST LAYOUTS
	*************************************************************************************/
	/* all post */
	.shortcode.loops-wrapper.list-post .post,
	.shortcode.loops-wrapper.grid4 .post,
	.shortcode.loops-wrapper.grid3 .post,
	.shortcode.loops-wrapper.grid2 .post,
	.shortcode.grid2-thumb .post,
	.shortcode.list-thumb-image .post,
	.shortcode.list-large-image .post,
	.loops-wrapper.list-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.list-large-image .post {
		width: 100%;
		margin-left: 0;
		float: none;
	}

	/* all post title */
	.post-title,
	.loops-wrapper.list-post .post-title,
	.loops-wrapper.grid4 .post-title,
	.loops-wrapper.grid3 .post-title,
	.loops-wrapper.grid2 .post-title,
	.loops-wrapper.grid2-thumb .post-title,
	.loops-wrapper.list-thumb-image .post-title,
	.loops-wrapper.list-large-image .post-title,
	.loops-wrapper.slider .post-title {
		font-size: 2.3em;
	}

	/* all post image */
	.loops-wrapper.list-post .post-image,
	.loops-wrapper.grid4 .post-image,
	.loops-wrapper.grid3 .post-image,
	.loops-wrapper.grid2 .post-image,
	.loops-wrapper.list-large-image .post-image {
		float: none;
		position: static;
		width: auto;
		overflow: visible;
	}
	
	.loops-wrapper.list-large-image .post-video,
	.loops-wrapper.list-large-image .post-image {
		max-width: none;
		margin-right: 0;
		float: none;
	}

	/* all post content */
	.loops-wrapper.grid2-thumb .post-content,
	.loops-wrapper.list-thumb-image .post-content {
		overflow: visible;
	}

	/* slider post */
	.loops-wrapper.slider .post-content {
		position: static;
		background-color: #000;
		padding-top: 10px;
		padding-bottom: 5px;
	}
	.loops-wrapper.slider .post-meta {
		position: static;
	}
	
	.loops-wrapper.list-post .post,
	.single .list-post .post {
		padding: 0;
	}
  
	/* single post date wrap */
	.loops-wrapper.list-post .post-date-wrap,
	.single .list-post .post-date-wrap {
		position: static;
		float: left;
		width: 88px;
		padding-top: 0.5em;
		padding-right: 12px;
	}
	.loops-wrapper.list-post .entry-content,
	.single .list-post .entry-content {
		clear: both;
	}
	.loops-wrapper.list-post .post-title,
	.single .list-post .post-title {
		padding-left: 105px;
		font-size: 2em;
	}
	.loops-wrapper.list-post .post-date,
	.single .list-post .post-date {
		margin: 0 0 8px;
	}
	.loops-wrapper.list-post .post-date .day,
	.single .list-post .post-date .day {
		font-size: 33px;
	}
	.loops-wrapper.list-post .post-date .month,
	.single .list-post .post-date .month {
		font-size: 15px;
	}

	.slides li {
		margin-right: 15px;
	}

	/************************************************************************************
	POST NAV
	*************************************************************************************/
	.post-nav .prev, 
	.post-nav .next {
		margin-bottom: 20px;
	}
	
	/************************************************************************************
	COMMENTS
	*************************************************************************************/
	.commentlist {
		padding-left: 0;
	}
	.commentlist .commententry {
		clear: left;
	}
	.commentlist .avatar {
		float: left;
		width: 40px;
		height: 40px;
		margin: 0 1em 1em 0;
	}
	.comment-title, .comment-reply-title {
		font-size: 1.4em;
	}
	#respond #cancel-comment-reply-link {
		top: 38px;
	}

}

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