/* Name: Amy Blain
Current Date: 21APR2018
Class.Section: CGS1821.054
Assignment: Final Project
Language: CSS3
Purpose: Using the knowledge gained during this course to build a webpage */

html {
	background-image: url("../images/wrappingpaper.jpg");
    height: 100%; 
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
body  {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	max-width: 960px;
	width: 95%;                        /* fixed width was 800 */
	background-color: white;
	margin: 0 auto; 
	padding: 0;
	border: 3px solid black;
	box-shadow: 0 9px 18px 9px;
    display: grid;
    grid-template: repeat(4,auto) / 85px 1fr;
    grid-template-areas: 
        "head head"
        "navi navi"
        "main main"
        "foot foot";
}
h1, h2, h3, p {
	margin: 0;
	padding: 0;
}

/* Header */
header { 
    background-image: -webkit-linear-gradient(45deg, white 0%, #990000 75%, white 100%);
    background-image: -moz-linear-gradient(45deg, white 0%, #990000 75%, white 100%);
    background-image: -o-linear-gradient(45deg, white 0%, #990000 75%, white 100%);
    background-image: linear-gradient(45deg, white 0%, #990000 75%, white 100%);
    padding: .9375em 1.875% 1.5em 1.875%;  /* 15 / 16; 15 / 800 x 100 */
    grid-area: head;
} 
header img { 
	float: left; 
	padding-right: 1.875%;               /* 15 / 800 x 100 */  
	width: 10.6%;
	max-width: 85px;
	min-width: 40px;
} 
header h2 {
	font-size: 230%;
}
header h3 {
	font-size: 125%;
	padding-bottom: .75em;              /* 15 / (1.25 x 16) */
}

/* Navigation menu */
#nav_menu {
    grid-area: navi;
}
#nav_menu ul {
	list-style: none;
	position: relative;
    display: grid;
    grid-template: auto / repeat(5, 1fr);
    align-content: center;
}
#nav_menu ul ul {
	display: none;
	position: absolute;
	top: 100%;
}
#nav_menu ul ul li {
	float: none;
}
#nav_menu ul li:hover > ul {
	display: block;
}
#nav_menu > ul::after {
	content: "";
	clear: both;
	display: block;
}
#nav_menu ul {
	margin: 0;
	padding: 0;
}
#nav_menu ul li:hover ul {
	width: 100%;
}
#nav_menu ul li a {
	text-align: center;
	display: block;
	padding: .7em 0;
	text-decoration: none;
	background-color: black;
	color: white;
}
#nav_menu ul li a.current {
	color: red;
}
#nav_menu ul li a:hover, #nav_menu ul li a:focus {
	background-color: green;
}
/* Section */
main {
    grid-area: main;
}
section {
	width: 72.5%;                       /* 580 / 800 x 100 */
	padding: 1.25em 2% 2em 15%;     /* top and bottom: 20 / 16; right: 40 / 800 x 100; left: 20 / 800 x 100 */
}
section h1 { 
	font-size: 140%;
	margin-bottom: 1em;
}
section h1:first-letter { 
	font-size: 240%;
	color: #990000;
}
section h2 {
	font-size: 125%;
	margin: .8em 0 .5em 0;
}
section h3 {
	font-size: 110%;
	margin: .8em 0 .5em 0;
}
section p {
	margin-bottom: .5em;
}
section a {
	font-weight: bold;
	color: orange;
}
section a:link, main a:visited { 
    color: orange; 
}
section a:hover, main a:focus { 
    color: green;
}
section img {
	width: 30%;
	max-width: 150px;
}
section ul {
    margin: 0;
    padding: 0;
}
/* Footer */
footer { 
	clear: both;
	border-top: 2px solid black;
	padding: .9375em 1.875% .9375em 1.875%;       /* top and bottom: 15 / 16; right and left: 15 / 800 x 100 */
    background-image: -webkit-linear-gradient(45deg, white 0%, #990000 25%, white 100%);
    background-image: -moz-linear-gradient(45deg, white 0%, #990000 25%, white 100%);
    background-image: -o-linear-gradient(45deg, white 0%, #990000 25%, white 100%);
    background-image: linear-gradient(45deg, white 0%, #990000 25%, white 100%);
    grid-area: foot;
} 
footer p {
	font-size: 90%;
	text-align: center;
}

#mobile_menu {
	display: none;
}

@media only screen and (max-width: 800px) {
	html {
		background-image: none;
	}
	body {
		font-size: 90%;
		box-shadow: none;
	}
}

@media only screen and (max-width: 767px) {
    header {
        grid-area: head;
    }
    header h2 {
		font-size: 200%;
	}
	#nav_menu {
		display: none;
	}
	#mobile_menu {
		display: block;
        grid-area: navi;
	}
    body {
        display: grid;
        grid-template: 115px 45px auto auto / auto;
        grid-template-areas: 
            "head"
            "navi"
            "main"
            "foot";
    }
    main {
        grid-template: auto /auto;
        grid-template-areas: 
            "sec"
    }
	section {
		width: 90%;
		float: none;
		padding-left: 5%;
		padding-bottom: .5em;
        grid-area: sec;
	}
    
    footer {
        grid-area: foot;
    }
}
/* mobile portrait to mobile landscape */
@media only screen and (max-width: 479px) {
	header h2 {
		font-size: 180%;
	}
	header h3 {
		font-size: 115%;
	}
	section h1 {
		font-size: 130%;
	}
	section h1:first-letter {
		font-size: 180%;
	}
}