.mag{
	display: grid;
	grid-template-columns:10% 45% 45%;
	grid-template-rows:1fr repeat(4, 1.5fr) 1fr;
	grid-gap:.5em;
}
#title{
	background-color:#98BBEB;
	text-align: center;
	grid-column: 1 / 4 ;
	grid-row: 1 / 2;
}
#title h1{
	font-family: 'Concert One', cursive;
	text-shadow: 2px 2px 1.5px #888;
}
#description{
	font-family: Arial, Helvetica, sans-serif;
	padding:.25em;
	color:#fff;
	background-color:#666;
	font-size: 1.1em;
	grid-column: 1 / 2 ;
	grid-row: 2 / 6;
}
.articles{
	background-color: #D5D4D4;
	padding: .3em;
	font-family: 'Source Sans Pro', sans-serif;
	display:flex;
	align-items: center;
	justify-content: center;
}
.articles img{
	padding:.3em;
	max-width: 100%;
	min-height: 0;
	order:-1;
}
.article1{
	grid-column: 2 / 3;
	grid-row: 2 / 3;
}
.article2{
	grid-column: 3 / 4;
	grid-row: 2 / 3;
}
.article3{
	grid-column: 2 / 3;
	grid-row: 3 / 4;
}
.article4{
	grid-column: 3 / 4 ;
	grid-row: 3 / 4;
}
.article5{
	grid-column: 2 / 3;
	grid-row: 4 / 5;
}
.article6{
	grid-column: 3 / 4;
	grid-row: 4 / 5;
}
.article7{
	grid-column: 2 / 3;
	grid-row: 5 / 6;
}
.article8{
	grid-column: 3 / 4;
	grid-row: 5 / 6;
}
#footer{
	grid-column: 1 / 4 ;
	grid-row: 6 / 7;
	background-color:#98BBEB;
	text-align: center;
	font-family: Arial, Helvetica, sans-serif;
	padding:.5em;
}
@media screen and (max-width:850px){
/* 
-The layout will go to 2 columns. Sidebar will move to a row above articles and below the title section
-Flex direction changed to column so that images are placed on top of the text. Justify and align will no longer be at the center position.
-The flexbox order property will be used to make sure that each image for each article appears above the text */
	.mag{
		grid-template-columns: 50% 50%;
		grid-template-rows:auto;
	}
	#description{
		grid-column: 1 / 3 ;
		grid-row: 2 / 3;
		
	}
	.article1{
		grid-column: 1 / 2;
		grid-row: 3 / 4;
		flex-direction: column;
	}
	.article2{
		grid-column: 2 / 2;
		grid-row: 3 / 4;
		flex-direction: column;
	}
	.article3{
		grid-column: 1 / 2;
		grid-row: 4 / 5;
		flex-direction: column;
	}
	.article4{
		grid-column: 2 / 2 ;
		grid-row: 4 / 5;
		flex-direction: column;
	}
	.article5{
		grid-column: 1 / 2;
		grid-row: 5 / 6;
		flex-direction: column;
	}
	.article6{
		grid-column: 2 / 2;
		grid-row: 5 / 6;
		flex-direction: column;
	}
	.article7{
		grid-column: 1 / 2;
		grid-row: 6 / 7;
		flex-direction: column;
	}
	.article8{
		grid-column: 2 / 2;
		grid-row: 6 / 7;
		flex-direction: column;
	}
	#footer{
		grid-column: 1 / 3 ;
		grid-row: 7 / 8;
		flex-direction: column;
	}
	.articles{
		justify-content: flex-start;
	}
}
@media screen and (max-width:450px){
/*
-The layout will go to single column 
-The position of the footer section will need to be moved to the bottom	
	*/
	.mag{
		grid-template-columns: 100%;
		grid-template-rows:auto;
	}
	#description{
		grid-column: 1 / -1 ;
		grid-row: auto;
		
	}

	.article1{
		grid-column: 1 / -1;
		grid-row: auto;
		flex-direction: column;
	}
	.article2{
		grid-column: 1 / -1;
		grid-row: auto;
		flex-direction: column;
	}
	.article3{
		grid-column: 1 / -1;
		grid-row: auto;
		flex-direction: column;
	}
	.article4{
		grid-column: 1 / -1;
		grid-row: auto;
		flex-direction: column;
	}
	.article5{
		grid-column: 1 / -1;
		grid-row: auto;
		flex-direction: column;
	}
	.article6{
		grid-column: 1 / -1;
		grid-row: auto;
		flex-direction: column;
	}
	.article7{
		grid-column: 1 / -1;
		grid-row: auto;
		flex-direction: column;
	}
	.article8{
		grid-column: 1 / -1;
		grid-row: auto;
		flex-direction: column;
	}
	#footer{
		grid-column: 1 / -1 ;
		grid-row: auto;
		flex-direction: column;
	}


}