html,body {
	font-size: 14pt;
	height: 100%;
	padding: 0;
	margin: 0;
}

body {
	font-family: Helvetica Neue,Helvetica,Arial,sans-serif; 
}

p {
	display: inline-block;
	margin: 0.5rem;
}

* {
	margin: 0;
	padding: 0;
}

img {
	max-width: 100%;
}

a {
	text-decoration: none;
}

.hover {
	-webkit-user-select: none;
	-webkit-touch-callout: none;        
}

:hover, :focus {
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
	-o-transition: 0.5s;
	transition: 0.5s;
}

h1 { 
    font-size: 3em;
}
h2 {
    font-size: 2.5em;
}
h3 { 
    font-size: 2em;
}
h4 { 
	font-size: 1.5em;
}
h5 { 
    font-size: 1em;
}
h6 { 
    font-size: .8em;
}

/* !-------- Layout setup --- */

.page {
	height: 100%;
	display: flex;
	flex-direction: column;
	margin: auto;
}

main {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	flex: 1 1 auto;
	text-align: left;
}

.image-content, .gallery-content, .gallery-info, .archive {
	width: 70%;
	margin: 1rem auto 2rem auto;
	padding: 1rem 2rem 2rem 2rem;
	box-sizing: border-box;
	text-align: left;
}

.sidebar {
	width: 200px;
	display: flex;
	flex-direction: column;
	padding: 0.5rem;
	box-sizing: border-box;
	align-items: flex-start;
	align-content: start;
	justify-content: start;
}

.sidebar img {
	display: block;
}

article {
	width: 75%;
	margin: 0 auto;
	flex-grow: 1;
}

.home-menu {
	width: 100%;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	align-items: center;
	justify-content: center;
}

.home-menu a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 200px;
	margin: 1rem;
	padding: 1rem;
}

.home-menu a img {
	max-height: 100%;
}

.main-menu {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	margin-bottom: -5rem;
	padding: 0.5rem;
	box-sizing: border-box;
	position: relative;
	z-index: 50;
}

.main-menu img {
	height: 100px;
	margin-left: 1rem;
}

.page-header {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

/* !-------- Posts --- */

.blog {
	margin: 1rem auto;
}

.byline {
	margin: 0.5rem 0 1rem 0;
	font-size: 0.8rem;
}

.post .byline {
	margin: 0 auto 2rem auto;
	text-align: center;
}

#right h3 {
	margin: 1rem auto 0 auto;
}

#right div a {
	display: block;
	font-size: 0.9rem;
	padding: 0.2rem;
	margin: 0;
}

.archive-post, .archive-year, .archive-link, .archive-cat {
	width: 100%;
	margin-bottom: 0.5rem;
	padding: 0.5rem 0.5rem 1rem 0.5rem;
	box-sizing: border-box;
}

/* !-------- Gallery --- */

.gallery {
	margin: 1rem auto;
	text-align: center;
}

.gallery-post {
	max-height: 900px;
}

.gallery-label {
	height: 120px;
	margin: 1rem auto;
}

.gallery-content {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	margin: auto;
}

.gallery-item {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
}

footer {
	margin-top: 2rem;
	padding: 1rem 2rem 0 2rem;
	box-sizing: border-box;
}

.footer {
	align-self: flex-end;
	width: 100%;
	margin: auto;
	padding: 0.8rem 0;
	text-align: center;
	font-size: 0.8rem;
}

/* !-------- Menu --- */

nav ul, nav li {
	list-style: none;
}

#main-menu ul {
	display: flex;
	flex-direction: row;
	justify-content: center;
	align-items: flex-start;
}

#main-menu a {
	padding: 0.5rem 1rem;
	font-size: 1rem;
}

#main-menu label, #mobile-button {
  display: none;
}

/* Multi-level menu */

#menu li {
    margin:0 0.5rem;
}

#menu a.arrow::after {
    content:'';
    position:absolute;
    display:inline;
    top:50%;
    margin-top:-4px;
    right:8px;
}
        
/*Sub level menu items
---------------------------------------*/
#menu li ul {
    position:absolute;
    display:none;
	top: 100%;
	left: -50%;
}

.has-submenu {
	position: relative;
}

#menu li:hover > ul {
    display: block;
}

#main-menu .level-1 {
	flex-direction: column;
	min-width: 200px;
}

#main-menu .level-1 li {
	width: 100%;
	margin: 0;
	text-align: left;
}

/* Image Content */

.image-content img {
	display: block;
	margin: auto;
}

.text-content {
	position: relative;
	z-index: 500;
}

.image-none figure {
	display: none;
}

.image-top {
	display: flex;
	flex-direction: column;
}

.image-left figure, .image-right figure {
	margin: auto;
}

.image-left {
	display: flex;
	flex-direction: row;
	margin-bottom: 2rem;
}

.image-right {
	display: flex;
	flex-direction: row-reverse;
	margin-bottom: 2rem;
}

.image-left .text-content, .image-right .text-content {
	flex-grow: 1;
	padding: 0 1rem;
	box-sizing: border-box;
}

/* Medium screens */
@media (max-width: 1200px){
	.image-content, .gallery-content, .gallery-info {
		width: 95%;
		margin: 1rem auto;
	}
	.gallery-content {
		grid-template-columns: repeat(2, 1fr);
		gap: 1rem;
	}
	main {
		flex-direction: column;
	}
	main article {
		order: 1;
		width: 90%;
	}
	#right {
		order: 2;
		flex-direction: column;
		text-align: center;
		align-content: center;
	}
	#left, #right {
		width: 100%;
		text-align: center;
	}
	
	#right img {
		margin: auto;
		width: 50%;
	}
}

/* Small screens */

@media screen and (max-width: 900px){
	.image-content, .gallery-content, .gallery-info, .archive {
		width: 95%;
		padding: 1rem;
		margin: 1rem auto;
	}
	.gallery-content {
		grid-template-columns: repeat(1, 1fr);
		gap: 1rem;
		width: 95%;
	}
	.home-menu, .main-menu {
		display: flex;
		flex-direction: column;
	}
	.home-menu a {
		height: auto;
	}
	#right img {
		margin: auto;
		width: 75%;
	}
	#menu ul {
		display: block;
		width: 150px;
		margin: 0 0.5rem;
		text-align: left;
	}
	#main-menu label {
		display: block;
		font-size: 1.5rem;
		margin: auto;
		text-align: center;
	}
	#main-menu { 
		width: 100%;}
	  /* Break down menu items into vertical */
	#main-menu a {
		display: block;
		margin: 0.5rem auto;
	}
	/* Toggle show/hide menu on checkbox click */
	#main-menu div {
		transition: opacity 1.5s ease-out;
		opacity: 0;
		height: 0;
		overflow: auto;
	}
	#main-menu input:checked ~ div {
		opacity: 1;
		width: 100%;
		height: auto;
		overflow: inherit;
	}
	#menu li ul {
		width: 100%;
		display: block;
		box-sizing: border-box;
		transform: none;
		position: initial;
		left: unset;
		top: unset;
	}
	#menu li ul {
		background: none;
		text-align: left;
		margin-left: 2rem;
	}
	.page-content {
		display: flex;
		flex-direction: column;
		justify-content: flex-start;
		width: 100%;
	}
	.page-content article {
		width: 95%;
	}
	.page-secondary {
		width: 90%;
		margin: auto;
	}
	.image-left, .image-right {
		flex-direction: column;
	}
	.image-left .text-content, .image-right .text-content {
		max-width: 90%;
	}
}