/*
Table of Contents
---
CSS Reset
Main Elements
Smaller Elements
Section Classes
Element Classes
Media Query
*/

/*
My Styling Order
1.  display type (includes info about CSS Grid and Flexbox for children)
2.  positioning (includes grid-area)
3.  sizing
4.  margin/padding
5.  border
6.  colors/background
7.  font family/size
8.  text/other content modifiers
9.  other
*/

/*CSS Reset*/
*, *::before, *::after {
	box-sizing: border-box;
}
/*CSS Reset End*/

/*Main Elements*/
html {
	height: 100%;
	background-color: rgb(16, 2, 43);
	font-size: 16px;
}

body {
	height: 100%;
	margin: 0;
	padding: 0;
	font-family: 'Arial', sans-serif;
}

header {
	display: grid;
	grid-template-areas:
		"header-left title header-right"
		"header-left buttons header-right";
	grid-template-columns: 1fr min(1036px, 70%) 1fr;
	grid-area: header; /*child of .grid*/
	position: fixed;
	top: 0;
	width: 100%;
	background-color: rgb(16, 2, 43);
}

nav {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	grid-area: buttons; /*child of header*/
	padding: 5px 0px;
}

main {
	grid-area: main; /*child of .grid*/
    padding: 0px 15px 20px;
    background-color: rgb(36, 6, 99);
    color: white;
}
/*Main Elements End*/

/*Smaller Elements*/
h1 {
	grid-area: title; /*child of header*/
	align-content: center;
	height: 50px;
	margin: 0;
	/*Next 3 lines make text gradient*/
	background-image: linear-gradient(rgb(100, 0, 255), rgb(35, 0, 95));
	color: transparent;
	background-clip: text;
	
	font-family: 'Times New Roman', Times, serif;
	font-size: 2.5rem;
	text-align: center;
}

h2 {
	margin-bottom: 0px;
	font-size: 2rem;
}

h3 {
    margin-top: 0px;
    margin-bottom: 0px;
    font-size: 1.5rem;
}

ul {
	margin: 0;
	padding: 5px 20px;
}

li {
	margin: 0 0 7px;
}

a {
    color: rgb(149, 0, 255);
}

a:hover {
    color: gold;
}

nav > a {
	align-content: center;
	height: 35px;
	width: 19%;
	margin-bottom: 5px;
	border: 0;
	background-color: rgb(120, 0, 207);
	color: rgb(204, 176, 255);
	text-align: center;
	text-decoration: none;
}

nav > a:hover {
	background-color: rgb(36, 9, 99);
	color: rgb(204, 176, 255);
}
/*Smaller Elements End*/

/*Section Classes*/
.grid {
	display: grid;
	grid-template-areas:
		"header header header"
		"leftbg main rightbg";
	grid-template-columns: 1fr min(1036px, 70%) 1fr;
	grid-template-rows: 100px auto;
	height: 100%;
	background-color: rgb(202, 173, 255);
}

.leftbg {
    grid-area: leftbg; /*child of .grid*/
    background-image: url("Images/d20 Pattern alt.png");
    background-repeat: repeat-y;
    background-size: 100%;
}

.rightbg {
    grid-area: rightbg; /*child of .grid*/
    background-image: url("Images/d20 Pattern alt.png");
    background-repeat: repeat-y;
    background-size: 100%;
}

.box-frame {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 20px;
	margin-top: 20px;
}

#banner {
	width: min(500px, 90%);
	margin: 20px auto;
	padding: 0 5px;
	border: 2px white solid;
	border-radius: 10px;
	background-color: rgb(171, 171, 255);
	text-align: center;
}
/*Section Classes End*/

/*Element Classes*/
#selected {
	background-color: rgb(36, 9, 99);
}

.box {
	flex: 1 1 40%;
	min-width: 350px;
	padding: 5px;
	border: 2px solid white;
	border-radius: 10px;
	background-color: rgb(25, 0, 62);
}

.box-spacer {
	flex: 1 1 40%;
	min-width: 350px;
	margin: 0;
	padding: 0px 5px;
}

.box > h3 {
	margin-top: 10px;
	margin-left: 5px;
}

.box > p {
	margin-left: 5px;
}
/*Element Classes End*/

/*Media Query*/
@media screen and (max-width: 600px) {
	html {
		font-size: 12px;
	}
	
	header {
		grid-template-areas:
		"header-left title header-right"
		"buttons buttons buttons";
	}
	
	nav {
		padding: 5px 5px;
	}
	
	h1 {
		font-size: 2rem;
	}
	
	h2 {
		font-size: 1.75rem;
	}
	
	h3 {
		font-size: 1.4rem;
	}
	
	.grid, header {
		grid-template-columns: 1fr 85% 1fr;
	}
	
	.box, .box-spacer{
		min-width: 250px;
	}
}
