/* Global Styles */
* {
    box-sizing: border-box;
}
body {
    background-size: 340px, auto;
    margin: 50px;
}

/* Eachitem inthe grid contains names */
.item {
    /* Center the contents of the grid items. Make each grid item a Flex container */
    display: flex;
    /* Horizontal and Vertical centering */
    justify-content: center;
   /* border: 1px solid black;*/
    border-radius: 3px;
    font-size: 1em;
    font-family: sans-serif;
    
}
/*Declare the grid container */

.container {
    display: grid;
    grid-template-columns: repeat(autofill, 1fr);
    grid-template-rows: auto;
    grid-gap: 20px;
  
}

.header{
    grid-area: header;
    grid-column: 1 / 5;
    grid-row: 1 / 2;
}
.header img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    overflow: hidden;
}
.nav {
    grid-area: Nav;
    grid-column: 1 / 2;
    grid-row: 2 / 4;
    margin-top: 0px;
    margin-bottom: 0px;
}
.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    
}
.nav li {
    width: 100%;
    padding:5px;
  margin-bottom: 0px;
  color: #ffffff;
 /* border: .5px solid black;*/
 /* box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);*/
}
.nav li {
    padding: 8px;
    margin-top: 10px;
    margin-bottom: 7px;
    background-color: #33b5e5;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    
}

.nav li:hover {
  background-color: #0099cc;
}


.article {
    grid-area: article;
    background-color: white;
    grid-column: 2 / 5;
    grid-row: 2 / 5;
    padding: 5px;
}
.article h1{
    text-align: center;
    border-bottom: 1px solid black;
}
.footer {
    grid-area: footer;
    background-color: gray;
    grid-column: 1 / 5;
    grid-row: 5 / 5;
    padding: 20px;
    font-size: .8em;
    text-align: center;
}


/* media Query for smaller screens */

@media (max-width: 500px) {
  .header{
    grid-area: header;
    grid-column: 1 / 5;
    grid-row: 1 / 2;
}
.nav {
    grid-area: Nav;
    grid-column: 2 / 5;
    grid-row: 2 / 3;
}
.article {
    grid-area: article;
    grid-column: 3 / 5;
    grid-row: 3 / 4;
}
.footer {
    grid-area: footer;
    grid-column: 1 / 5;
    grid-row: 5 / 6;
}
    .nav {
        display: block;
        text-align: center;
        border: none;
}
  }