/* Name: Amy Blain
Current Date: 19APR18
Class.Section: CGS1821.054
Assignment: Module 10 Halloween
Language: CSS3
Purpose: Using Grid layout to format HTML/CSS pages */

html {
	background-image: url("../images/wrappingpaper.jpg");
    height: 100%; /* Full height */
    background-position: center; /* Center and scale the image */
    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.88% 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;
    margin: 0;
	padding: 0;
    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 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;
}
/* Main */
main {
    display: grid;
    grid-area: main;
    grid-template: auto / 20% auto;
    grid-template-areas: 
        "aside sec"
}
/* Sidebar */
aside {
	padding: 1.25em 0;                 /* 20 / 16 */
    grid-area: aside;
}
#nav_list ul { 
	list-style: none;
	padding-left: 15%;                 /* (1.5 x 16) / 160 x 100 */
}
#nav_list ul li { 
	margin-bottom: .5em;
	border: 2px solid black;
}
#nav_list ul li a {
	display: block;
	font-weight: bold;
	text-decoration: none;
	background-color: #990000;
	padding: .5em 0 .5em 7.27272%;     /* .5 x 16 / 110 x 100 */
	color: black;
}
/* Section */
section {
	padding: 1.25em 5% 1.25em 2.5%;     /* top and bottom: 20 / 16; right: 40 / 800 x 100; left: 20 / 800 x 100 */
	grid-area: sec;
}
section h1 { 
	font-size: 140%;
	margin-bottom: .5em;
}
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: 50%;
	max-width: 300px;
}
/* Transition */
h3 {
    font-size: 120%;
    color: black;
    transition: font-size 2s ease-out 1s,
        color 2s ease-in 1s;
}
h3:hover {
    cursor: pointer;
    font-size: 180%;
    color: #990000;
}
/* Footer */
footer { 
	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) {
	#nav_menu {
		display: none;
	}
	#mobile_menu {
		display: grid;
        grid-area: navi;
	}
    header {
        grid-area: head;
    }
	header h2 {
		font-size: 200%;
	}
    body {
        display: grid;
        grid-template: 115px 45px auto auto / auto;
        grid-template-areas: 
            "head"
            "navi"
            "main"
            "foot";
    }
    main {
        grid-area: main;
        grid-template: auto /auto;
        grid-template-areas: 
            "sec"
            "aside"
    }
	section {
		padding-left: 5%;
		padding-bottom: .5em;
        grid-area: sec;
	}
	aside {
		padding: 0 5% 1em 5%;
        grid-area: aside;
	}
	#nav_list ul {
		padding-left: 25%;
		text-align: center;
	}
	#nav_list ul li a {
		padding-left: 0;
	}
    footer {
        grid-area: foot;
    }
}
@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%;
	}
}