/*  For screen sizes less than 600px wide  */

html {
	background-image: none;
}

body {
	padding-bottom: 0.3em;
}

#content, #header, #footer {
	width: 100%;
	border-radius: 0;
}
	#logo {
		margin: 1.2em 2.5%;
	}
	#navi {
		width: 100%;
		font-size: 100%;
	}
		#navi .navigation .sub-menu .current_page_item a {
			background-color: inherit;
			border-radius: 0;
			box-shadow: none;
		}

#content_outer {
	padding: 0;
}
	body.attachment #content.air {
		padding-top: 1em;
	}
	#content.air {
		padding-bottom: 0;
	}
		#content.air div.gallery {
			width: 95%;
			margin: 0 auto;
		}
		#content.air .boxed {
			border-radius: 0;
		}
			#content.air h1.boxed {
				margin-bottom: 0.5em;
				box-shadow: inset 0 10px 5px -5px rgba( 0, 0, 0, 0.1 );
			}
			#content.air .gallery + .boxed {
				margin-top: 1.5em;
			}

	#main_outer {
		max-width: 100% !important;
		padding: 1.5em 0 0 0;
	}
		#main {
			width: auto;
			margin: 0 !important;
			padding: 0 2.5%;
		}
		
			#main .post-post {
				max-width: 100%;
			}

			#main figure,
			#main figure img,
			#main img {
				max-width: 100%;
				height: auto;

				padding: 0;
				margin: 0;
			}
			#main figure figcaption {
				margin-right: 0;
			}

#footer_outer {
	border-top: none;
	padding: 0 2.5%;
	margin-top: 1.5em;
}
	#footer {
		padding: 0;
	}

/*  Clear all floats and center-align
 *
 */
#main figure[style*="float"],
.alignleft,
.alignright,
.aligncenter {
	display: block;
	float: none !important;
	text-align: center;
	margin: 0 auto !important;
}

/*  Home page  */
body.home #main {
	width: 95%;
	margin: 0 auto !important;
}

/*  Widget areas  */
.widgets_outer .widgets {
	width: 95%;
}

/*  Attachments  */
#attachment {
	width: 95%;
	margin: 0.5em auto;
}
	#attachment_navi {
		font-size: 90%;
		margin-bottom: 0;
	}
	body.attachment .boxed {
		padding: 1em 0;
		margin: 1em 0 -1em 0;
	}
	body.attachment .boxed {
		margin-bottom: 1em;
	}

/*  Elements and templates  */
blockquote {
	max-width: 90%;
}

figure {
	width: 100% !important;
	text-align: center;
}
	#content figure a {
		max-width: 100% !important;
	}

	.gallery figure {
		width: 100%; !important;
		padding: 0;
		margin: 0;
	}

	#content.air .gallery-item {
		margin: 0 0 0.5em 0;
	}

ul.columnlist {
	-moz-column-gap: 1em;
	-webkit-column-gap: 1em;
	column-gap: 1em;

	-moz-column-count: 2;
	-webkit-column-count: 2;
	column-count: 2;
}

#main figure,
#main figure img,
#main img {
	margin-top: 0.5em;
	margin-bottom: 0.5em;
}

.boxed {
	padding: 1.5em 2.5% !important;
}
	h1.boxed {
		padding: 0.3em 2.5% !important;
	}

.hb {
	margin: 0 -2.5% !important;
	padding-right: 2.5% !important;
	padding-left: 2.5% !important;
}

/*  Featured images  */
.featured {
	width: 95%;
	margin: 0 auto;
}


/*  WordPress admin bar  */
#wpadminbar, #wp-toolbar {
	display: none;
}

body.admin-bar {
	margin-top: -46px !important;
}

/*  NAVIGATION
 *
 */

.navigation.nd {
	border-left: none;
	margin-bottom: -1px;
}
	.navigation.nd .menu {
		border-top: 1px solid rgba( 0, 0, 0, 0.2 );
	}
		.navigation.nd .menu li {
			float: none;
			width: 100%;
			height: auto;

			position: static;
		}
			.navigation.nd .menu li a {
				padding: 0.5em 2.5%;
			}
			.navigation.nd .menu > li {
				border: none;
				border-top: 1px solid rgba( 255, 255, 255, 0.2 );
				border-bottom: 1px solid rgba( 0, 0, 0, 0.2 );
			}
				.navigation.nd .menu > li:hover > a {
					padding-bottom: 0.5em;
					background: none;
				}

			.navigation.nd .menu .sub-menu {
				position: static;
				border-radius: 0;
				width: 100%;

				background-color: #fff !important;
			}
				.navigation.nd .menu li:hover .sub-menu {
					display: none;
				}

				.navigation.nd .menu li.current_page_ancestor:hover .sub-menu,
				.navigation.nd .menu li.current_page_ancestor .sub-menu {
					display: block;
					position: static;
					margin: 0;
					padding: 0;
				}
					.navigation.nd .menu li .sub-menu:after {
						content: "";
						display: block;
						height: 0;
						clear: both;
						visibility: hidden;
					}
					.navigation.nd .menu li .sub-menu li {
						float: left;
						display: block;
						width: 50%;
						margin: 0 !important;
					}
						.navigation.nd .sub-menu li:first-child {
							padding-left: 0;
						}
						.navigation.nd .menu li .sub-menu li a {
							display: block;
							width: 90%;
							padding: 0.25em 5%;
						}

.navigation.nd .menu li { display: none; }
.navigation.nd .menu li.current-menu-ancestor,
.navigation.nd .menu li.open { display: block; }

/*  Horizontal navigation  */
.navigation.nh .menu .menu-item-has-children {
	width: 47% !important;
}
	.navigation.nh .menu .menu-item-has-children:nth-child(3n+3) {
		margin-right: 2%;
		border-right: 1px solid rgba( 0, 0, 0, 0.10 );
	}
	.navigation.nh .menu .menu-item-has-children:nth-child(even) {
		margin-right: 0;
		border-right: none;
	}

	/* If a menu in the first column is the last one,
	 * fill the rest of the space to keep preferred alignment
	 */
	.navigation.nh .menu .menu-item-has-children:last-child:nth-child(2n+1) {
		margin-right: 51%;
		border-right: none;
	}

/*  JS popup navigation  */
#navi.open .navigation.nd .menu li.current-menu-ancestor-hidden .sub-menu { display: none; }
#navi.open .navigation.nd .menu li { display: block; }

#opennavi {
	position: relative;
	display: block;
	height: 0;
	top: 0;
	right: 2.5%;

	margin-top: -3em;
	margin-right: -5px;

	padding: 4px 0 0 0;

	width: 32px;
	height: 32px;

	overflow: hidden;

	background: transparent url(images/menu.png) 50% 50% no-repeat;
}
	#navi .expand {
		display: none;

		position: relative;
		right: 2.5%;
		top: 0;

		float: right;
		z-index: 2000;

		height: 32px;
		width: 32px;
		padding: 0;
		margin-right: -4px;

		background: transparent url(images/menu_arrow.png) 50% 50% no-repeat;
	}
		#navi.open .expand {
			display: block;
			transition: 200ms transform;
		}
	#navi .open-sub .sub-menu {
		display: block !important;
		margin: 0;
		padding: 0;
	}

	#navi .open-sub .expand {
		transform: rotate( -90deg );
		background-size: 65% 65%;
	}

/*  Menu style when scrolled down  */
#header_outer.scrolled {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;

	background-color: #0e82d0;
	background-image: none;
	border-top: none;
}
	#header_outer.scrolled #logo {
		margin: 0;
		padding: 0.5em 2.5%;
	}
		#header_outer.scrolled #logo a img{
			display: none;
		}
		#header_outer.scrolled #logo a:after {
			font-size: 120%;
			font-weight: 600;

			padding-right: 30px;

			background: transparent url(images/xubuntu-icon-20.png) 100% 50% no-repeat;
			content: "Xubuntu";

			color: #fff;
		}
	#header_outer.scrolled #navi {
		background-color: #0b68a6;
		width: 100%;
		position: fixed;
		left: 0;
		z-index: 50000;
	}

	#header_outer.scrolled #navi.closed .menu li {
		display: none;
	}