/* Reset of all margins and paddings */

*
{
    margin: 0;
    padding: 0;
}

/* Main styling */

body
{
    width: 1200px;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: grid;
}

/* Header styling */

header
{
    background-color: #CCCCCC;
    height: 100px;
}


header img:first-of-type
{
    max-width: 100vw;
}

header img:last-of-type
{
    max-width: 100%;
    float: right;
}

/* General menu styling - applies to both menus (and footer for some properties) */

body > li, nav ul li
{
    list-style-type: none;
    line-height: 40px;
}

body > li a, nav ul a
{
    padding: 0 0 0 0.3em;
}

nav ul a, footer a, body > li a
{
    text-decoration: none;
    color: white;
}

nav ul li:hover, body > li:hover
{
    background-color: #CCCCCC;
}

nav ul li:hover a, body > li:hover a
{
    color: rgba(50, 54, 84, 0.8);
}

/* Top navigation styling (and some also apply for footer) */

body > li, footer
{
    height: 40px;
    background-color: #565952;
    color: white;
}

/* Side navigation styling */

nav
{
    background-color: #CCCCCC;
}

nav ul
{
    background-color: rgba(50, 54, 84, 0.8);
}

nav ul li a
{
    display: block;
    border-bottom: 1px solid white;
}

nav ul li a, body > li a
{
    margin: 0 1rem;
}

nav ul li:last-of-type a
{
    border-bottom: none;
}

/* Footer styling */

footer
{
    text-align: center;
    line-height: 40px;
}

/* Article styling */

article
{
    margin: 2em;
    font-size: small;
}

article img
{
    float: left;
    margin-right: 1em;
}

article p:first-of-type::first-line
{
    color: rgba(50, 54, 84, 0.9);
    line-height: 1rem;
    padding-bottom: 2px;
    font-size: 1rem;
    font-weight: bold;
}

h2
{
    color: #565952;
    margin-bottom: 1em;
    padding-bottom: 1em;
    border-bottom: 1px solid #565952;
}

header {
	grid-area: header;
}

#nav-1 {
	grid-area: nav-1;
}

#nav-2 {
	grid-area: nav-2;
}

#nav-3 {
	grid-area: nav-3;
}

#nav-4 {
	grid-area: nav-4;
}

#nav-5 {
	grid-area: nav-5;
}

#nav-6 {
	grid-area: nav-6;
}

#nav-7 {
	grid-area: nav-7;
}

nav {
	grid-area: menu
}

footer {
	grid-area: footer
}

#article-1 {
	grid-area: article-1;
}

#article-2 {
	grid-area: article-2;
}

#article-3 {
	grid-area: article-3;
}

#article-4 {
	grid-area: article-4;
}

@media only screen and (max-width: 699px) {
	body {
		margin: 0 auto;
		width: 100%;
		grid-template-columns: repeat(4, 25%);
		grid-template-rows: 150px 40px 40px 40px repeat(4, auto) auto 40px;
		grid-template-areas:
			"header header header header"
			"nav-1 nav-1 nav-4 nav-5"
			"nav-2 nav-2 nav-6 nav-6"
			"nav-3 nav-3 nav-7 nav-7"
			"article-1 article-1 article-1 article-1"
			"article-2 article-2 article-2 article-2"
			"article-3 article-3 article-3 article-3"
			"article-4 article-4 article-4 article-4"
			"menu menu menu menu"
			"footer footer footer footer";
	}
}

@media only screen and (min-width: 700px) {
    
    body
    {
        width: 1300px;
        margin: 0 auto;
		grid-template-columns: repeat(7, 14%);
		grid-template-rows: 100px 40px auto auto 40px;
		grid-template-areas:
			"header header header header header header header"
			"nav-1 nav-2 nav-3 nav-4 nav-5 nav-6 nav-7"
			"menu article-1 article-1 article-1 article-2 article-2 article-2"
			"menu article-3 article-3 article-3 article-4 article-4 article-4"
			"footer footer footer footer footer footer footer";
    }

    header img
    {
        height: 100px;
    }

    header img:last-of-type
    {
        float: right;
    }

    body > li
    {
        border-right: 1px solid white;
	}

    nav>p
    {
        display: none;
    }
}