/************************************************************************************
MOBILE NAVIGATION
*************************************************************************************/
/* change max-width to trigger mobile menu (#headerwrap added to override Themify Customize output css) */

/************************************************************************************
HEADER
*************************************************************************************/
.mobile_menu_active #headerwrap #header {
	height: auto;
	padding: 1em 0;
}

/* reset absolute elements to static */
.mobile_menu_active #headerwrap .social-wrap {
	position: static;
	transform: none;
}
.mobile_menu_active #headerwrap #site-logo {
	position: static;
	float: none;
	clear: both;
	margin: 0;
	padding: 0;
}

/* site logo */
.mobile_menu_active #headerwrap #site-logo {
	font-size: 30px;
}

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

/* menu icon */
.mobile_menu_active #headerwrap #menu-icon {
	position: absolute;
	display: block;
	top: 50%;
	left: 0;
	text-decoration: none;
	color: inherit;
	transform: translateY(-50%);
}

/************************************************************************************
MENU PANEL
*************************************************************************************/
/* Mobile Menu Styles */
.mobile_menu_active .sidemenu {
	background-color: #fff;
	display: block;
	width: 300px;
	height: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 50px 25px 20px;
	position: fixed;
	top: 0;
	z-index: 111;
	transition: all .2s ease-in-out;
	box-sizing: border-box;
	left: -300px;
}
.mobile_menu_active .sidemenu-on {
	left: 0;
}
.mobile_menu_active.sidemenu-active {
	position: relative;
}
.mobile_menu_active.sidemenu-active,
.mobile_menu_active.sidemenu-active #headerwrap {
	left: 0;
	transition: all .2s ease-in-out;
}
.mobile_menu_active.sidemenu-right,
.mobile_menu_active.sidemenu-right #headerwrap {
	left: -300px;
}
.mobile_menu_active.sidemenu-left {
	left: 300px;
}
.mobile_menu_active.sidemenu-left .body-overlay {
	right: auto;
	left: 300px;
}

/* mobile menu panel link */
.mobile_menu_active #headerwrap #mobile-menu-panel a {
	color: #fff;
	text-decoration: none;
}

/* slide menu close */
.mobile_menu_active #headerwrap #menu-icon-close {
	position: absolute;
	display: block;
	color: inherit;
	text-decoration: none;
	top: 10px;
	right: 20px;
	font-size: 1.3em;
    min-width: 1.2em;
    min-height: 1.2em;
    transform-origin: center;
    transition: all .3s linear;
    transition-property: transform;
}
.mobile_menu_active #menu-icon-close:before,
.mobile_menu_active #menu-icon-close:after {
	content: '';
	display: block;
	border-top: 1px solid;
	position: absolute;
	left: 0;
	top: 50%;
	width: 100%;
}
.mobile_menu_active #menu-icon-close:before {
	transform: rotateZ(-45deg);
}
.mobile_menu_active #menu-icon-close:after {
	transform: rotateZ(45deg);
}
.mobile_menu_active.mobile-menu-visible #headerwrap #menu-icon-close:hover {
	transform: rotate(90deg);
	color: #000;
}

/* main nav */
.mobile_menu_active #headerwrap #main-nav {
	position: static;
	width: auto;
	height: auto;
	padding: 0;
	margin: 15px 0;
	background: none;
	border: none;
	text-align: left;
	float: none;
	clear: both;
	max-width: none;
	transform: none;
}
.mobile_menu_active #headerwrap #main-nav li {
	float: none;
	display: block;
	border: none;
	background: none;
	padding: 0;
	margin: 0;
	clear: both;
}
.mobile_menu_active #headerwrap #main-nav li {
	transition: all 400ms ease-in-out;
	transform: translate(40px, 0) !important;
	margin-left: 0;
	opacity: 0;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav li {
	opacity: 1;
	transform: translate(0, 0) !important;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(1) {
  transition-delay: 100ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(2) {
  transition-delay: 200ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(3) {
  transition-delay: 300ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(4) {
  transition-delay: 400ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(5) {
  transition-delay: 500ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(6) {
  transition-delay: 600ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(7) {
  transition-delay: 700ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(8) {
  transition-delay: 800ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(9) {
  transition-delay: 900ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(10) {
  transition-delay: 1000ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(11) {
  transition-delay: 1100ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(12) {
  transition-delay: 1200ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(13) {
  transition-delay: 1300ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(14) {
  transition-delay: 1400ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #main-nav > li:nth-child(15) {
  transition-delay: 1500ms;
}

/* sub level */
.mobile_menu_active #headerwrap #main-nav ul {
	position: static;
	width: auto;
	height: auto;		
	display: block;
	border: none;
	margin: 0;
	padding: 0 0 0 1em;
	background: none;
	visibility: visible;
	clear: both;
}
.mobile_menu_active #headerwrap #main-nav ul li {
	border: none;
	background: none;
	padding: 0;
	margin: 0;
}

/* menu link */
.mobile_menu_active #headerwrap #main-nav a, 
.mobile_menu_active #headerwrap #main-nav ul a {
	width: auto;
	display: block;
	border: none;
	padding: .6em 0;
	margin: 0;
	color: #000;
	font-size: 100%;
	line-height: 1.5em;
	background: none;
	text-decoration: none;
	border-bottom: solid 1px rgba(255,255,255,.3);
}
.mobile_menu_active #headerwrap #main-nav > li:last-child a {
	border: none;
}

/* sub level menu link */
.mobile_menu_active #headerwrap #main-nav ul a {
	font-weight: normal;
	font-size: .9em;
}

/* menu hover */
.mobile_menu_active #header #main-nav a:hover,
.mobile_menu_active #header #main-nav ul a:hover {
	color: inherit;
}

/* sub-menu icon */
.mobile_menu_active #headerwrap #main-nav .menu-item-has-children > a:after,
.mobile_menu_active #headerwrap #main-nav ul .menu-item-has-children > a:after {
	display: none;
}

/* current link */
.mobile_menu_active #headerwrap #main-nav .current_page_item > a, 
.mobile_menu_active #headerwrap #main-nav .current-menu-item > a {
	color: #000;
}

.mobile_menu_active #headerwrap #main-nav ul:after {
	display: none;
}
	
/* 
SEARCH FORM
================================================ */
.mobile_menu_active #headerwrap #searchform-wrap {
	float: none;
}
.mobile_menu_active #headerwrap #searchform {
	position: relative;
	left: auto;
	right: auto;
	top: auto;
	bottom: auto;
	float: none;
	clear: both;
	margin: 0 0 1em;
	padding: 0;
	width: auto;
	display: block;
}
.mobile_menu_active #headerwrap #searchform #s  {
	width: 100%;
	float: none;
	transition: none;
	position: static;
	background-color: #fff;
}
.mobile_menu_active #headerwrap #searchform .icon-search {
	float: none;
	padding: inherit;
}
.mobile_menu_active #headerwrap #searchform #s:focus,
.mobile_menu_active #headerwrap #searchform #s:hover,
.mobile_menu_active #headerwrap #searchform .icon-search:hover + #s {
	width: 100%;
	color: inherit;
}
.mobile_menu_active #headerwrap #searchform .icon-search:before {
	padding: 0 4px;
}
.mobile_menu_active #headerwrap #searchform-wrap,
.mobile_menu_active #headerwrap .social-widget {
	transition: all 400ms ease-in-out;
	transform: translate(0, 40px) !important;
	opacity: 0;
	transition-delay: 100ms;
}
.mobile_menu_active.mobile-menu-visible #headerwrap #searchform-wrap,
.mobile_menu_active.mobile-menu-visible #headerwrap .social-widget {
	opacity: 1;
	transform: translate(0, 0) !important;
}
.mobile_menu_active #headerwrap .social-widget {
	transition-delay: 200ms;
}

/* 
SOCIAL WIDGET
================================================ */
.mobile_menu_active #headerwrap .social-widget {
	margin: 0 0 1em;
	position: static;
	float: none;
}
.mobile_menu_active #headerwrap .social-widget .widgettitle {
	display: none;
	margin: 0 0 .4em;
}

/* Transparent Header */
.mobile_menu_active.transparent-header #headerwrap a,
.mobile_menu_active.transparent-header #headerwrap a:hover,
.mobile_menu_active.transparent-header #headerwrap #main-nav a:hover,
.mobile_menu_active.transparent-header #headerwrap #main-nav .current_page_item a,
.mobile_menu_active.transparent-header #headerwrap #main-nav .current-menu-item a {
	color: #000;
}
.mobile_menu_active.transparent-header #headerwrap.fixed-header #site-logo a,
.mobile_menu_active.transparent-header #headerwrap.fixed-header #menu-icon {
	color: #000;
}
.mobile_menu_active.transparent-header #headerwrap #menu-icon-close {
	color: #000;
}
.mobile_menu_active.transparent-header #headerwrap #searchform #s {
	border-color: #000;
	color: #000;
}
.mobile_menu_active.transparent-header #headerwrap #searchform .icon-search:before,
.mobile_menu_active.transparent-header #headerwrap #searchform:hover .icon-search:before {
	color: #000;
}

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

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	body #pagewrap {
		max-width: 100%;
	}
	.pagewidth,
	.full_width .themify_builder_row > .row_inner,
	.full_width .module-layout-part .themify_builder_row.fullwidth_row_container > .row_inner {
		max-width: 96%;
	}
	.full_width .module-layout-part .themify_builder_row.fullwidth > .row_inner,
	.full_width .themify_builder_row.fullwidth > .row_inner {
		max-width:100%;
	}
	#headerwrap #site-logo a img{
		height: auto;
	}
}

@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;
	}

	/*
	RESET PADDING ON SIDEBAR-NONE POST & PAGE
	================================================ */
	.page.sidebar-none:not(.has-builder) #content,
	.sidebar-none .loops-wrapper.list-post .post-content,
	.single-post.sidebar-none #content {
		padding-left: 0;
		padding-right: 0;
	}

}

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

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	.pagewidth,
	.full_width .themify_builder_row > .row_inner,
	.full_width .module-layout-part .themify_builder_row.fullwidth_row_container > .row_inner {
		max-width: 90%;
	}
	#pagewrap #content {
		width: 100%;
		max-width: 100%;
		float: none;
		clear: both;
	}
	
	/* sidebar */
	#pagewrap #sidebar {
		width: 100%;
		max-width: 100%;
		float: none;
		clear: both;
	}
	
	/* list post */
	.single-post .post-cattag-wrapper,
	.loops-wrapper.list-post .post-cattag-wrapper {
		padding-right: 7em;
		display: block;
		padding-left: 0;
		max-width: none;
	}
	.single-post .post-comment,
	.loops-wrapper.list-post .post-comment {
		margin-top: -2.5em;
	}

}

@media screen and (max-width: 680px) {
	
	/************************************************************************************
	HEADING
	*************************************************************************************/
	h1 {
		font-size: 1.8em;
	}
	h2 {
		font-size: 1.6em;
	}
	h3 {
		font-size: 1.4em;
	}
	h4 {
		font-size: 1.2em;
	}
	
	/************************************************************************************
	GRID
	*************************************************************************************/
	.col4-1,
	.col4-2, .col2-1,
	.col4-3,
	.col3-1,
	.col3-2	 {
		margin-left: 0;
		width: 100%;
		max-width: 100%;
	}

	/************************************************************************************
	PAGE
	*************************************************************************************/
	.page-category-title-wrap .page-category-title,
	.page-category-title-wrap .page-title, 
	.page-title {
		font-size: 2.2em;
	}
	.page-category-title-wrap .page-category-description {
		font-size: 1.1em;
	}

	/* page category wrapper */
	.transparent-header .page-category-title-wrap {
		padding-top: 24%;
	}
	
	/************************************************************************************
	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: 1.4em;
	}

	/* 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;
		margin: 0 0 1em;
		overflow: visible;
	}

	/* 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;
	}
	
	/************************************************************************************
	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 1em 1em 0;
	}
	#commentform p:nth-of-type(1),
	#commentform p:nth-of-type(2) {
		width: auto;
		float: none;
	}
	#commentform p:nth-of-type(1),
	#commentform p:nth-of-type(2) {
		padding: inherit;
	}
	.commentwrap .pagenav.top {
		position: static;
	}
	
	/* category title */
	.page-category-title {
		font-size: 2em;
	}

}

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

@media screen and (max-width: 600px) {
	.admin-bar #headerwrap,
	.admin-bar #headerwrap.fixed-header {
		top: 0;
	}
}