@charset "utf-8";

/*
   New Perspectives on HTML5 and CSS3, 8th Edition
   Tutorial 3
   Case Problem 1
   
   Layout styles for Slate and Pencil Tutoring
   Author: Io Anderson
   Date:   10/3/25
   
   Filename: sp_layout.css

*/

/* Window and Body Styles */
html {
	height: 100%;
}
body {
	width: 95%;
	min-width: 640px;
	max-width: 960px;
	margin-left: auto;
	margin-right: auto;
	min-height: 100%;
}
img {
	display: block;
}
img#logo {
	grid-column: span 3;
	width: 100%;
}


/* CSS Grid Styles */
body {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr;
	grid-template-areas: " header 	    header 	    header 	   vertical "
						 " header 	    header 	    header 	   vertical "
						 "horizontal  horizontal  horizontal   vertical "
						 " topic1       topic2      topic3      topic4  "
						 " aside		 aside       aside       aside  "
						 " aside		 aside       aside       aside  "
						 "footer        footer      footer      footer  "
}





/* Horizontal Navigation List Styles */
nav.horizontal {
	grid-row: 2;
	grid-column-start: 1; 
	grid-column-end: 5;
	
}
nav.horizontal li{
	display: block;
	width: 12.5%;
	float: left;
}
footer {grid-area: footer;}
aside {grid-column: span 2;}


/* Section Styles */
section img {
	width: 50%;
	margin: 0 auto 0 auto;
}
section p {
	width: 70%;
	margin: 0 auto 0 auto;
}


/* Customer Comment Styles */
aside {
	width: 75%;
	padding-bottom: 30px;
}
aside img {
	float: left;
	width: 20%;
}
aside p {
	float: left;
	width: 75%;
	margin-left: 5%;
}

aside:nth-of-type(odd) {
	align-self: end;
	justify-self: end;
}
aside:nth-of-type(even) {
	align-self: start;
	justify-self: start;
}