*
    {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

:root
    {
        --textMain: rgba(255, 255, 255, 0.8);
        --bgColor: hsla(252, 88%, 3%, 0.6);
        --headerFont: "Cormorant Garamond";
        --bodyFont: "Crimson Text";
        --main-bg-color: #CCC;
        --submenu-bg-color: #999;
        --sub-submenu-bg-color: #666;
        --main-hover-bg-color: #C5C5C5;
        --submenu-hover-bg-color: white;
        --sub-submenu-hover-bg-color: #000;
        --text-color: #000;
        --nav-position-x: 20px;
        --nav-position-y: 20px;
    }



.content-wrapper
    {
        height: 100vh;
        width: 100vw;
        color: var(--textMain);
        background-color: var(--bgColor);
        font-size: 12px;
        display: grid;
        grid-template-rows: auto 1fr auto;
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main"
            "footer";
    }

    header 
    {
        font-family: var(--headerFont), serif;
        z-index: 10;
        grid-area: header;
        display: grid;
        grid-template-columns: 5.25rem 1fr;
        grid-template-rows: 1fr 1fr;
        grid-template-areas:
            "logo title"
            "logo subtitle";
    }

    .logo 
        {
        height: clamp( 2.5rem, 5vw, 5rem);
        width: clamp( 2.5rem, 5vw, 5rem);
        border-radius: 50%;
        border: 1px solid green;
        background-image: url("/images/EMH_logo.png");
        background-size: cover;
        grid-area: logo;
        margin: auto;
        }

    .title-main
    {
        padding-bottom: 0.5rem;
        font-size: clamp( 1.5rem, 3vw, 2.5rem);
        text-shadow: 5px 5px 2px #000;
        letter-spacing: 1px;
        width: clamp( 16rem, 32vw, 40rem);
        border-bottom: 2px solid lightgrey;
        grid-area: title;
    }

    .title-sub
    {
        font-size: clamp(0.7rem, 1.2vw, 1.25rem);
        letter-spacing: 0.5px;
        padding-top: 0.5rem;
        font-style: italic;
        grid-area: subtitle;
    }

/* define a fixed width for the entire menu */
.navigation 
    {
        width: 300px;
        position: fixed;
        top: var(--nav-position-y);
        right: var(--nav-position-x);
        font-family: var(--headerFont), serif;
        font-weight: 400;
        font-size: 1rem;
        letter-spacing: 1.5px;
        box-shadow: 10px 10px 15px 3px rgba(0,0,0,0.6);
        z-index: 1000;
    }

/* reset our lists to remove bullet points and padding */
    .mainmenu, 
        .submenu, 
        .sub-submenu 
            {
                list-style: none;
                padding: 0;
                margin: 0;
            }

/* make ALL links (main and submenu) have padding and background color */
    .mainmenu a 
        {
            display: block;
            background-color: var(--main-bg-color);
            text-decoration: none;
            text-align: center;
            padding: 0.5rem;
            color: var(--text-color);
        }

/* add hover behaviour */
    .mainmenu a:hover 
        {
            background-color: var(--main-hover-bg-color);
    }

/* when hovering over a .mainmenu item,
  display the submenu inside it.
  we're changing the submenu's max-height from 0 to 200px;
*/

    .mainmenu li:hover .submenu 
        {
            max-height: 20rem;
        }

    .submenu li:hover .sub-submenu 
        {
            max-height: 15rem;
        }

/*
  we now overwrite the background-color for .submenu links only.
  CSS reads down the page, so code at the bottom will overwrite the code at the top.
*/

    .submenu a 
        {
            background-color: var(--submenu-bg-color);
        }

/* hover behaviour for links inside .submenu */
    .submenu a:hover 
        {
            background-color: var(--submenu-hover-bg-color);
        }

/* keep submenu link highlighted when hovering over its sub-submenu */
    .submenu li:hover > a 
        {
            background-color: var(--submenu-hover-bg-color);
            transition: all 1s ease-in;
        }

/* this is the initial state of all submenus.
  we set it to max-height: 0, and hide the overflowed content.
*/
    .submenu 
        {
            overflow: hidden;
            max-height: 0;
            -webkit-transition: all 1s ease-out;
            transition: all 1s ease-out;
        }

    .sub-submenu 
        {
            overflow: hidden;
            max-height: 0;
            -webkit-transition: all 1s ease-out;
            transition: all 1s ease-out;
        }

/* styling for sub-submenu links */
    .sub-submenu a 
        {
            background-color: var(--sub-submenu-bg-color);
            padding-left: 20px;
            transition: all 0.3s ease-in;
        }

/* hover behaviour for links inside .sub-submenu */
    .submenu .sub-submenu a:hover 
        {
            background-color: var(--sub-submenu-hover-bg-color);
            color: var(--textMain);
            transition: all 0.3s ease-in;
        }

    .toggle-icon 
        {
            float: right;
            font-size: 1rem;
            font-weight: bold;
            color: var(--text-color);
            transition: all 0.3s ease;
        }
        
    .submenu > li > a 
        {
            position: relative;
            padding-right: 1.5rem; /* Add space for the icon */
        }

    main 
    {
        font-family: var(--bodyFont), serif;
        color: var(--textMain);
        line-height: 1.3;
        font-size: clamp( 0.875rem, 1.5vw, 1.125rem);
        overflow-y: scroll;
        grid-area: main;

            h1 
            {
                font-size: clamp( 1.5rem, 3vw, 2.5rem);
                text-shadow: 5px 5px 2px #000;
                margin-bottom: 1rem;
                text-align: center;
                font-weight: 500;
                letter-spacing: 1px;
            }

            h2
            {
                font-size: clamp( 1.25rem, 2.5vw, 2rem);
                text-shadow: 5px 5px 2px #000;
                margin-bottom: 0.75rem;
                margin-top: 1.5rem;
                font-weight: 400;
                text-align: center;
                letter-spacing: 1px;
            }

            p
            {
                margin: 1rem 10vw;
                font-weight: 300;
                font-size: clamp( 0.875rem, 1.5vw, 1.125rem);
            }

            figcaption
            {
                font-size: clamp( 0.75rem, 1.2vw, 1rem);
                text-align: center;
                font-style: italic;
            }

            li 
            {
                margin: 0.5rem 15vw;
            }

            .sublist li 
            {
                margin: 0 20vw;
            }

            table 
            {
                background-color: black;
                border: 1px solid black;
                border-spacing: 3px;
                margin: 1rem auto;
            }
              
              th, td 
              {
                background-color: white;
                color: black;
                padding: 5px;
                text-align: center;
              }

            .student_quest
            {
                margin: 2rem 15vw;
                padding: 1rem;
                border: 2px solid lightgrey;
                background-color: rgba(255, 255, 255, 0.1);
                box-shadow: 10px 10px 15px 3px rgba(0,0,0,0.6);
            }
    }

    footer
    {
        font-family: var(--headerFont), serif;
        font-size: clamp( 0.75rem, 1.5vw, 1rem);
        font-style: italic;
        grid-area: footer;
        display: flex;
        justify-content: end;
        align-items: center;
        padding: 0.75rem 1rem;
        z-index: 10;
    }

    /* media querries */

    @media (max-width: 600px)
    { 
        .navigation 
        {
            top: 5rem;
            right: calc(50vw - 150px);
            font-size: 0.8rem;
        }

        main 
        {
            padding-top: 75px;
        }    
        
        #spec-map
        {
            width: 85vw;
        }


    }