/* variables */
:root {
	--primary-color: #931420;
	--accent-color: #f6bb73;
	--light-accent: #fffded;
	--light: white;
	--dark: black;
}

/* reset */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

/* the default styles for the elements */
body {
	font-family: Arial, Helvetica, sans-serif;
    font-size: 100%;
    width: 80%;
    margin: auto;
    border: 3px solid var(--primary-color);
}
header, section, aside, footer { padding: 1em; }
h1, h2, h3, p, article, blockquote { padding-bottom: .5em; }
ul { margin-left: 1em; }
h1 { font-size: 150%; }
h2 { font-size: 120%; }
h3 { font-size: 110%; }
a:focus, a:hover { font-style: italic; }

/* the styles for the header */
header {
	border-bottom: 3px solid var(--primary-color);
	background-image: linear-gradient(30deg, 
		var(--accent-color) 0%, 
		var(--light-accent) 25%, 
		var(--light) 50%, 
		var(--light-accent) 75%, 
		var(--accent-color) 100%);
	& h2 {
		font-size: 175%;
		color: var(--primary-color);
		padding-bottom: 0;
	}
	& h3 {
		font-size: 130%;
		font-style: italic;
	}
	& img {
		float: left;
		margin: 0 30px;
		width: clamp(40px, 15%, 66px);
	}
}

/* the styles for the main element */
main {
	clear: left;
	display: flex;
}

/* the styles for the section */
section {
	flex-basis: 75%;
	& h1 {
		color: var(--primary-color);
	}
	& article + h2 {
		clear: left;
		color: var(--primary-color);
		border-top: 3px solid var(--primary-color);
		padding-top: .5em;
	}
}

/* the styles for the article */
article {
	padding-top: .5em;
	margin-bottom: .5em;
	& img {
		float: left;
		margin: .25em 1em 1em 0;
		border: 1px solid var(--dark);
		width: min(100%, 225px);
	}
}

/* the styles for the aside */
aside {
	flex-basis: 25%;
	& h2 {
		color: var(--primary-color);
	}
	& img {
		margin-bottom: .9em;
	}
	& blockquote {
		font-style: italic;
		margin-left: .5em;
	}
}

/* the styles for the footer */
footer {
	background-color: var(--primary-color);
	& p {
		text-align: center;
		color: white;
		padding-bottom: 0; 
	}
}

/* the styles for the navigation menu */
.navbar {
	container-type: inline-size;   /* create container */
	position: relative;
	background-color: var(--primary-color);
	& ul {
		list-style-type: none;
		margin: 0;
	}
	& a {
		display: block;
		padding: .75em;
		text-decoration: none;
		color: var(--light);
	}
	& a.current {
		color: var(--accent-color);
		font-weight: bold;
	}
	& a.current:hover { 
		font-style: normal; /* override hover effect */
	}
}

.menu {
	position: absolute;
	left: 0;
	display: none;
	background-color: var(--primary-color);
}

input[type="checkbox"] {  /* select both checkboxes */
	display: none;        /* hide the checkboxes */

	/* if checkbox is checked */
	&:checked ~ .menu {              /* display the corresonding menu */
		display: block;   
	}
	&:checked ~ .menu-btn::after {   /* display the close symbol */
		content: "\2716";   
	}	
}

.menu-btn {
	display: block;
	padding: 0.25em 1em;
	color: var(--light);
	font-size: 24px;
	&::after {
		content: "\2630";   /* hamburger symbol */
	}
}


/* container query for larger containers */
@container (min-width: 560px) {
	.menu {
		position: relative;
		display: flex;
		justify-content: space-evenly;
	}
	.menu-btn {
		display: none;
	}

	/* make sure menu displays horizontally if corresponding checkbox is checked */
	input[type="checkbox"]:checked ~ .menu { 
		display: flex; 
	}
}