html{
    /* Unified colors for easy adjustment across the site */
    --midnight-green: #104547ff;
    --outer-space: #4b5358ff;
    --dim-gray: #727072ff;
    --dark-sand: #e5d8c5;
    --rose-quartz: #af929dff;
    --sand: rgb(255, 243, 224);

    --bg-color: var(--sand);
    --accent-color: var(--midnight-green);
    background-color: var(--bg-color);

    width: 100%;
    max-width: 2160px;
    align-self: center;
    justify-self: center;
}

/* Adjusts the overall width of the page so that text does not span from the edges of the screen */
body {
    width: 90%;
    margin-left: 5%;
    margin-right: 5%;
    padding-bottom: 4em;
}

/* Creates additional space so that the top content is not covered by the nav bar */
main {
    padding-top: 3em;
}

/* Style for level 1 headings */
h1 {
    width: 100%;
    text-align: center;
    padding: 1rem 0;
    color: var(--accent-color);

    font-family: "Fira Sans Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 45pt; 
}

/* Styling for level 2 headings */
h2 {
    width: 100%;
    text-align: left;
    color: var(--accent-color);

    font-family: "Fira Sans Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 35pt; 
    margin-bottom: 0.25rem;
    padding-bottom: 0;
}

/* Styling for both level 3 headings, and level 3 headings that serve as links */
h3 , h3 > a{
    width: 100%;
    text-align: left;
    color: var(--accent-color);

    font-family: "Fira Sans Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 20pt; 

    margin-bottom: 0.25rem;
    padding-bottom: 0;
}

/* Styling for standard body text */
p {
    margin-top: 0.1rem;
    font-family: "Merriweather", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14pt;
    line-height: 150%;

    width: 75%;
}

/* Makes the address italic for specific locations */
.address {
    font-style: italic;
}

/* Styling for various hyperlinks throughout the site */
a {
    font-family: "Merriweather", serif;
    font-weight: 400;
    font-style: normal;
    color: black;
}

a:visited {
    color: black;
}

a:hover {
    color: var(--accent-color);
}

/* Basic indent class to standardize an indentation across the site */
.indent {
    padding-left: 2em;
}

/* Styling for the brief description on some landing pages. This is for text between H1 and H2 */
.overview{
    text-align: center;
    justify-self: center;
    width: 80%;
}

/* Hides menu icon in desktop mode */
#menuIcon {
    display: none;
}

/* Below is the stylings for the desktop navigational structure */
nav {
    position: fixed;
    top: 0;
    width: 97%;
    background-color: var(--bg-color);

    max-width: 2160px;
}

nav ul {
    font-family: "Fira Sans Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 18pt;
    
    display: block;
    list-style: none;
    margin: 0;
    padding: 0.75em 0;
    width: 100%;
}

nav a {
    font-family: "Fira Sans Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    color: black;
    text-decoration: none;
}

nav li li a {
    display: block;
    color: black;
    padding: 0.1em 5px;

}

nav li {
    float: left;
    width: 13.3%;
    text-align: center;
    cursor: default;
    background-color: var(--bg-color);
    border: 1px solid var(--accent-color);
    border-width: 0px 0px 1px 0px;
    padding-bottom: 0.5em;
}

nav li li {
    display: block;
    float: none;
    background-color: var(--bg-color);
    border: 0;
    width: 100%;
}

nav li ul{
    display: none;
    position: absolute;
    font-weight: normal;
    padding: 0.5em 0 0em 0;
    border: solid 1px var(--accent-color);
    width: 13.3%;
    background-color: var(--bg-color);

    z-index: -5;
}

nav li:hover ul{
    display: block;
}

nav li li a:hover {
    background: var(--dark-sand);
    cursor:pointer;
}

/* Changes the cursor to better explain what happens when user clicks on images */
#spotlightBackground img:hover {
    cursor: zoom-out;
}

img:hover {
    cursor: zoom-in;
}

/* Prevents zoom icon when using menu button */
#menuIcon img:hover {
    cursor: pointer;
}

/* Below is the styling for the map of the cape on the homepage */
#map {
    justify-content: center;
    height: 35em;
}

#map img {
    justify-self: center;
    height: 30em;
    width:30em;
    object-fit: cover;
}

/* Below is the styling for the bike trail map on the Biking page */
#trailMap img {
    width: 70%;
    justify-self: center;
}

/* Below is the styling for the various page buttons on the restaurant index page */
.subPages {
    justify-self: center;

    width: 90%;
    display: flex;
    gap: 1em;
    align-items: center;
    justify-content: center;
}

.subPages h3, .subPages a {
    text-align: center;
    width: 100%;
    height: 100%;
    background-color: var(--dark-sand);
    border-radius: 5px;
    text-decoration: none;
}

/* Below is the styling for the flex container to hold the image gallery for each location */
.locationImages {
    display: flex;
    gap: 20px;
    width: 100%;
    height: auto;
    flex-wrap: wrap;
}

/* Below is the styling for each image element that is part of the gallery */
.imgContent {
    display: grid;
    grid-template-rows: auto auto;
    margin: 10px 0;
}

.locationImages img {
    width: auto;
    height: 20em;
    object-fit: contain;
    border-radius: 5px;
    border: 3px solid var(--accent-color);
}

/* Styling for the image captions */
figcaption, figcaption a {
    font-family: "Merriweather", serif;
    font-weight: 400;
    font-style: normal;
    color: black;
    text-decoration: underline;
    font-style: italic;
}

/* Below is the styling for the references page, since it has a unique layout */
ol > li {
    width: 96%;
    height: fit-content;
    text-align: left;
    color: var(--accent-color);
    font-family: "Fira Sans Condensed", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 20pt;
    margin-bottom: 0.25rem;
    padding: 0.25em;
    padding-top: 0.05em;
    background-color: var(--dark-sand);
    border-radius: 5px;
}

ol li > h3 {
    margin-top: 0px;
}

ol li p {
    margin-bottom: 0px;
}

/* styling for comment page */
#commentContent {
    display: grid;
    grid-template-columns: 30% 70%;
    grid-template-rows: 10em auto auto;
    column-gap: 20px;
}

#commentContent h1 {
    grid-column: 1 / span 2;
}

#commentform {
    grid-row: 2;
    grid-column: 1;
}

#commentContent h3 {
    margin-top: 0px;
}

/* Styling for field labels */
label {
    margin-top: 0.1rem;
    font-family: "Merriweather", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14pt;
    line-height: 150%;

    color: var(--midnight-green);
}

#sendButton {
    background-color: var(--midnight-green);
    color: var(--bg-color);
    font-size: 14pt;

    outline: none;
    border: none;
    padding: 5px 10px;
    border-radius: 12px;
    height: 2em;
    width: 4em;
}

#comments {
    grid-row: 2 / span 2;
    grid-column: 2;
}

#userName {
    width: 50%;
    background-color: rgb(0, 0, 0, 0.1);
    border-radius: 12px;
    outline: none;
    border: solid 1px var(--dim-gray);

    margin-top: 0.1rem;
    font-family: "Merriweather", serif;
    font-weight: 200;
    font-style: normal;
    font-size: 12pt;
    line-height: 125%;
    padding-left: 10px;

    color: var(--midnight-green);
}

#nameValidation, #messageValidation {
    font-family: "Merriweather", serif;
    font-weight: 600;
    text-decoration: underline;
    font-size: 12pt;
    line-height: 125%;

    color: var(--midnight-green);
}

#commentContent textarea {
    width: 90%;
    height: 5rem;
    margin-top: 5px;
    background-color: rgb(0, 0, 0, 0.1);
    color: black;
    border-radius: 12px;
    outline: none;
    border: solid 1px var(--dim-gray);
    padding: 10px;

    margin-top: 0.1rem;
    font-family: "Merriweather", serif;
    font-weight: 200;
    font-style: normal;
    font-size: 12pt;
    line-height: 125%;

    color: var(--midnight-green);
}

.darkerBackground {
    background-color: rgb(0, 0, 0, 0.1);
    padding: 10px;
    border-radius: 12px;
}

.message {
    display: grid;
    grid-template-columns: 70% auto;
    grid-template-rows: auto auto;
    margin-bottom: 10px;
}

.message .name {
    font-family: "Merriweather", serif;
    font-weight: 600;
    font-style: normal;
    font-size: 14pt;
    line-height: 125%;

    color: var(--midnight-green);
}

.message .date {
    grid-column: 2;
    grid-row: 1;
    text-align: right;

    font-family: "Merriweather", serif;
    font-weight: 200;
    font-style: italic;
    font-size: 12pt;
    line-height: 125%;

    color: var(--midnight-green);
}

.message .chat {
    grid-column: 1 / span 2;
    grid-row: 2;

    font-family: "Merriweather", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 12pt;
    line-height: 150%;
    
    padding-left: 10px;
}

#submission{
    margin-top: 50px;
}

/* Below is the styling for the grading page, as it has a unique layout */
#criteria {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

.gradingElement {
    display: grid;
    grid-template-columns: 35% 65%;
}

.gradingElement h3 {
    margin-top: 0px;
}

.gradingElement p {
    padding-left: 2em;
    width: 90%;
}

.gradingElement ul {
    list-style: "- ";
    font-size: 14pt;
}

/* Below is the styling for the footer content */
footer {
    display: grid;
    grid-template-columns: 20% 20% 40% auto;
    grid-template-rows: auto auto;
    border-top: solid 2px var(--midnight-green);
    margin-top: 5em;
}

footer h2 {
    font-size: 20px;
    margin-bottom: 3px;
}

footer h3 > a, footer h3{
    font-size: 16px;
    margin-top: 0px;
    margin-bottom: 3px;
}

footer h4, footer h4 > a{
    font-size: 14px;
    margin-top: 0px;
    margin-bottom: 3px;
}

footer p {
    font-size: 14px;
}

#footerNavHeader {
    grid-column-start: 1;
    grid-column: span 2;
}

#footerNavA {
    grid-row: 2;
    grid-column: 1;
}

#footerNavB {
    grid-row: 2;
    grid-column: 2;
}

#footerAboutHeader {
    grid-row: 1;
    grid-column: 3;
}

#footerAbout {
    grid-row: 2;
    grid-column: 3;
}

#copyright h2 {
    text-align: center;
}

/* Back to Top Button Container */
#toTop {
    display: none; /* hidden by default */
    position: fixed;
    bottom: 20px;
    right: 30px;
    z-index: 99;
    cursor: pointer;
    padding: 15px;
    border-radius: 100%;
    font-size: 18px;
    width: 5rem;
    height: 5rem;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

#backToTop { 
    padding-top: 2em;
    justify-content: center;
    position: relative;
    grid-row: 2;
    grid-column: 4;
}

@media screen and (max-width: 900px) {
    h1 {
        padding: 0;
    }

    /* Hides the weird extra width in mobile layout */
    body {
        overflow-x: hidden;
    }

    /* Makes the main body text wider */
    p {
        width: 90%;
        margin-left: 5%;
        margin-right: 5%;
    }

    /* Styles the hamburger menu contatiner */
    #menuIcon {
        display: block;
        position: fixed;
        width: 50px;
        top: 10px;
        left: 10px;
        z-index: 99999999999;
    }

    /* Styles the hamburger menu */
    #menuIcon img {
        width: 50px;
        object-fit: contain;
    }

    /* Makes the default display for nav menu to hidden */
    nav {
        display: none;
        padding-left: 5em;
    }

    /* Shifts nav menu to vertical */
    nav li {
        float: none;
        text-align: left;
        width: 10em;
        background: none;
        height: auto;
        font-size: 22px;
    }

    /* Makes it so sub-menus are always expanded in mobile */
    nav li ul{
        display: block;
        position: relative;
        width: fit-content;
        z-index: 9999999999999999999999999;
        border: none;
        padding-left: 10px;
    }

    /* Class to enable display of nav menu */
    .active {
        z-index: 9999999;
        display: block;
        position: absolute;
        top: 0;
        left: 0;
    }

    /* Shifts to one-column footer for mobile */
    footer {
        display: block;
        display: grid;
        grid-template-columns: 100%;
        grid-template-rows: repeat(10, auto);
        border-top: solid 2px var(--midnight-green);
        margin-top: 5em;
    }

    #footerNavHeader {
        grid-column: 1;
        grid-row: 1;
    }
    
    #footerNavA {
        grid-column: 1;
        grid-row: 2;
    }
    
    #footerNavB {
        grid-column: 1;
        grid-row: 3;
    }
    
    #footerAboutHeader {
        grid-column: 1;
        grid-row: 4;
    }
    
    #footerAbout {
        grid-column: 1;
        grid-row: 5;
    }

    #backToTop { 
        grid-row: 1;
        grid-column: 1;
    }
    

    /* resizes map container on home page */
    #map {
        justify-content: center;
        height: 25em;
    }

    #map img {
        justify-self: center;
        height: 20em;
        width:20em;
        object-fit: contain;
    }

    /* changes the directions of the buttons on the restaurants index page */
    .subPages {
        flex-direction: row;
        gap: 0em;
    }

    .subPages h3 {
        margin-top: 0px;
    }

    /* Changes the sizes of the location images */
    .locationImages img {
        width: auto;
        height: 10em;
        object-fit: contain;
    }

    .imgContent {
        margin: 0;
    }

    .locationImages {
        padding-left: 2em;
    }

    #commentContent {
        display: block;
    }

    .message {
        margin-top: 20px;
    }

    /* Below is the styling for the grading page, as it has a unique layout */
    #criteria {
        display: flex;
        flex-direction: column;
        gap: 2em;
    }

    /* Changes the layout of the grading page to be one-column */
    .gradingElement {
        display: grid;
        grid-template-rows: auto auto;
        grid-template-columns: 100%;
    }

}