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

	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	.pagewidth,
	.full_width .themify_builder_row .row_inner {
		max-width: 94%;
	}
	

	
}

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



	
	/*aggiunte per il responsive*/
	#subscribe-mobile{
		display: none;
		
		
	}
	
}

@media screen and (max-width: 760px) {
	
	/************************************************************************************
	HEADER
	*************************************************************************************/
	/* reset absolute elements to static */

	#search-icon {
		display: none;
	}


	/************************************************************************************
	MAIN NAV
	*************************************************************************************/
	#headerwrap #main-nav {
		margin: 10px 0;
	}
	
	/************************************************************************************
	CUSTOM POST TYPE SHORTCODE STYLES
	*************************************************************************************/
	/* portfolio details */
	.single .portfolio .post-inner {
		padding: 3%;
	}

}

@media screen and (max-width: 700px) {
	
	/************************************************************************************
	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: 49%;
	}
	
	/************************************************************************************
	SIDEBAR
	*************************************************************************************/
	.widget {
		margin-bottom: 1.5%;
	}
	#sidebar .secondary .widget {
		margin-bottom: 3.5%;
	}
	
}


@media screen and (max-width: 600px) {
	
	/************************************************************************************
	LAYOUTS
	*************************************************************************************/
	/* loops-wrapper */
	.loops-wrapper {
		width: auto !important;
	}

	/* portfolio-wrapper */
	.portfolio-wrapper {
		margin-left: 0 !important;
		width: auto !important;
	}

	/* grid3 */
	.loops-wrapper.grid3 .post {
		width: 100%;
		float: none;
	}
	
	/************************************************************************************
	POST VIDEO (css for fluid video)
	*************************************************************************************/
	.post-video {
		clear: both;
	}

}

@media screen and (max-width: 760px) and (min-width: 480px) {
	#img-logo{
		width: 180px;
	}
}

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

	/* disable webkit text size adjust (for iPhone) */
	html {
		-webkit-text-size-adjust: none;
	}
	
	/************************************************************************************
	STRUCTURE
	*************************************************************************************/
	#headerwrap{
		height: 50px;
		background-image: url("");
	}
	#img-logo{
		height: 45px;
	}
	#icon-menu{
		display: none;
	}
	#body {
		padding: 60px 0;
	}
	#content {
		overflow: hidden;
	}

	/************************************************************************************
	GRID
	*************************************************************************************/
	.col4-1,
	.col4-2, .col2-1,
	.col4-3,
	.col3-1,
	.col3-2	 {
		margin-left: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}
	
	/************************************************************************************
	MOBILE NAV BUTTON
	*************************************************************************************/
	.mobile-button {
		position: relative;
		width: 32px;
		height: 30px;
		margin-bottom: 3px;
		margin-right: 3px;
		display: block;
		float: right;
		cursor: pointer;
		background: #fff;
	}
	.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;
		right: 0;
		top: 20px;
	}
	
	/* main nav */
	#headerwrap #main-nav {
		clear: both;
		position: absolute;
		top: 26px;
		right: 3px;
		left: auto;
		bottom: auto;
		width: 180px;
		height: auto;
		z-index: 1000;
		padding: 10px 5px 0;
		background: #fff;
		display: none; /* visibility will be toggled with jquery */
		
	}
	#headerwrap #main-nav li {
		clear: both;
		float: none;
		margin: 5px 0 13px 10px;
		padding: 0;
		border: none;
		background: 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;
	}
	#headerwrap #main-nav a:hover, 
	#headerwrap #main-nav ul a:hover {
		background: none;
		color: #000;
	}
	
	/* current link */
	#headerwrap #main-nav .current_page_item,
	#headerwrap #main-nav .current-menu-item {
		background: none;
	}
	
	/* dropdown */
	#headerwrap #main-nav ul {
		position: static;
		display: block;
		margin: 10px 0 0;
		padding: 0;
		background: none;
	}
	#headerwrap #main-nav ul li {
		background: none;
	}

	/************************************************************************************
	MAIN NAV
	*************************************************************************************/
	#main-nav a {
		margin: 0 10px 5px 0;
		padding: 4px 7px;
	}
	
	/************************************************************************************
	POST
	*************************************************************************************/
	/* post */
	.post {
		max-width: 100% !important;
		margin-left: 0 !important;
		float: none !important;
	}
	.post:not(.portfolio-post) {
		width: auto !important;
	}
	.portfolio-post {
		width: 100% !important;
	}
	
	/* reset grid margin */
	.loops-wrapper.grid2 .post,
	.loops-wrapper.grid3 .post,
	.loops-wrapper.grid2.sidebar-none .post,
	.loops-wrapper.grid3.sidebar-none .post,
	.shortcode.portfolio .post,
	.sidebar-none .shortcode.portfolio .post,
	.portfolio.loops-wrapper.grid3 .post,
	.sidebar-none .portfolio.loops-wrapper.grid3 .post,
	.portfolio.loops-wrapper.grid2 .post,
	.sidebar-none .portfolio.loops-wrapper.grid2 .post {
		margin-bottom: 10px;
	}
	
	/* reset portfolio post tile flip width */
	body.sidebar1 .loops-wrapper.grid3 .portfolio-post .tile-flip,
	body.sidebar1 .loops-wrapper.grid2 .portfolio-post .tile-flip,
	body.sidebar-none .loops-wrapper.grid3 .portfolio-post .tile-flip,
	body.sidebar-none .loops-wrapper.grid2 .portfolio-post .tile-flip {
		width: 440px;
	}
	
	/************************************************************************************
	POST NAV
	*************************************************************************************/
	.post-nav .prev, .post-nav .next {
		display: block;
		width: 100%;
		clear: both;
		margin-bottom: 10px;
	}

	.single-portfolio .post-nav .prev, .post-nav .next {
		display: inline-block;
		width: auto;
		clear: none;
		margin-bottom: 5px;
	}
	
	/************************************************************************************
	COMMENTS
	*************************************************************************************/
	.commentlist {
		padding-left: 0;
	}
	.commentlist .commententry {
		clear: left;
	}
	.commentlist .avatar {
		float: left;
		width: 40px;
		height: 40px;
		margin: 0 10px 10px 0;
	}

	/************************************************************************************
	TILE
	*************************************************************************************/
	.tile.small {
		width: 145px;
		height: 145px;
	}
	.tile.medium {
		width: 300px;
		height: 145px;
	}
	.tile.large {
		width: 300px;
		height: 300px;
		overflow: auto;
	}
	.tile-post.image .tile-flip,
	.tile-post.map .tile-flip {
		height: 145px;
		width: 300px; /* tile large and medium */
	}
	.tile-post.small .tile-flip {
		width: 145px;
	}
	.tile-post.large .tile-flip {
		height: 300px;
	}
	
	/************************************************************************************
	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: 481px) {

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

}