@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap");

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body{
    font-family: "Poppins", sans-serif;
}

.container {
    min-height: 100vh;
    width: 100%;
    background-color: #485461;
    background-image: linear-gradient(135deg, #485461 0%, #28313b 74%);
    /* background-image: url("landscape.jfif"); */
    overflow-x: hidden;
    transform-style: preserve-3d; /*make sure to preserve 3d transformation*/
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10;
    height: 3rem;
    background-color: #222636;
}

.menu {
    max-width: 80rem;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    /*background-color: green;*/
    background-color: #0B2238;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.logo{
    font-size: 1.3rem;
    font-weight: 300;
    color: white;   /*derrick added this to see BrandName text*/
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 2rem;
    padding-top: 5px;   /* Move logo down */
}

.logo span {
    font-weight: 300;
}

.hamburger-menu {
    height: 4rem;
    width: 3rem;
    cursor: pointer;
    /* background-color: black; */
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.bar {
    width: 1.9rem;
    height: 1.5px;
    border-radius: 2px;
    background-color: #eee;
    transition: 0.5s;
    position: relative;

}

.bar:before, 
.bar:after {
    content: "";
    position: absolute;
    width: inherit;
    height: inherit;
    background-color: #eee;
    transition: 0.5s;
}

.bar:before {
    transform: translateY(-9px);
}

.bar:after {
    transform: translateY(9px);
}

.main {
    position: relative; /*helps transform page from left side*/
    width: 100%;
    left: 0;
    z-index: 5;
    /*background-color: white;*/
    overflow: hidden;
    transform-origin: left; /*helps transform page from left side*/
    transform-style: preserve-3d; /*make sure to preserve 3d transformation*/
    transition: 0.5s; /*for the animation effect when hamburger menu clicked*/
}

header {
    min-height: 100vh;
    width: 100%;
    /* can also use background-image. Becareful of syntax */
    /*background: url("dashboard.JPG") no-repeat top center / cover;  */
    position: relative;
}

/*give background image a hazy darker look*/
/*
.overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(43, 51, 59, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}
*/

/*I inserted my iframe for dashboards on the html side where class inner is located*/
/*the padding controls the change in background you see in the embedded charts. */
/*padding values are for top right bottom left values. In that order*/
.inner {
    width: 100%;
    padding: 4rem 1rem 0rem 1rem; 
}

.title {
    font-size: 2.7rem;
}

.btn {
    margin-top: 1rem;
    padding: 0.6rem 1.8rem;
    /*background-color: #1179e7; */
    background-color: #808080;
    border: none;
    border-radius: 25px;
    color: #fff;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover{
    background-color: #b4b4b4;
}

/*this is what should happen when the container class changes to container active*/
/*the javascript event will change the container class to a container active class*/
.container.active .bar{
    transform: rotate(360deg);
    background-color: transparent;

}

/*when the container is active the bar being 45degrees before and after*/
/*gives it the X look*/
.container.active .bar:before{
    transform: translateY(0) rotate(45deg);
}

.container.active .bar:after{
    transform: translateY(0) rotate(-45deg);
}

/*when the container is active, we have to rotate the .main element or class 20 degrees*/
/*and decrease its size*/
/*adding perspective to define how far the element is away from the user*/
/*using translateZ(310px) to pull it towards us by 310px*/
/*then animate it when the hamburger menu is clicked*/
.container.active .main{
    animation: main-animation 0.5s ease;
    transform: perspective(1300px) rotateY(20deg) translateZ(310px) scale(0.5);
    cursor: pointer;
}

@keyframes main-animation{
    from{
        transform: translate(0);
    }
    to{
        transform: perspective(1300px) rotateY(20deg) translateZ(310px) scale(0.5);
    }
}

/*controls for the links section*/
.links {
    position: absolute;
    width: 30%;
    right: 0;
    top: 0;
    height: 100vh;
    z-index: 2;
    /*background-color: white;*/
    display: flex;
    justify-content: center;
    align-items: center;
}

/*controls for the list tag by removing the underline*/
ul{
    list-style: none;
}

/*controls the links and how they look and the border around them, even with the buttons*/
.links a {
    text-decoration: none;
    color: #eee;
    padding: 0.5rem 1.7rem;
    display: inline-block;
    font-size: 1rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    opacity: 0;
    transform: translateY(10px);
    animation: hide 0.5s forwards ease;
}

.links a:hover{
    color: #fff;
    /*background-color: #b4b1b1; light gray color*/
}


.container.active .links a {
    animation: appear 0.5s forwards ease var(--i);
    
}

@keyframes appear{
    from{
        opacity: 0;
        transform: translateY(10px);
    }
    to{
        opacity: 1;
        transform: translateY(0px);
    }
}

@keyframes hide{
    from {
        opacity: 1;
        transform: translateY(0px);
    }
    to {
        opacity: 0;
        transform: translateY(10px);
    }

}

/*the 2 images behind the main one when the menu is clicked*/
.shadow {
    position: absolute;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    transform-style: preserve-3d;
    transform-origin: left; /*moves the shadow pane to the left when menu is clicked*/
    transition: 0.5s;
    background-color: white;
    /* background-color: white; this will show you the white background color when menu is clicked */
}

    .shadow.one {
        z-index: -1;
        background-color: white;
        opacity: 0.15;
        /*background-color: red; used to see the frames or shadow behind the main one*/
    }

.shadow.two{
    z-index: -2;
    opacity: 0.1;
}

/*when the container has the active class, the 2 layers will have the same styles as the */
/*(.main) element except for the translateZ() value */
/*the translateZ value of the first layer behind the main is reduced compared to the main*/
.container.active .shadow.one {
    animation: shadow-one 0.6s ease-out;
    transform: perspective(1300px) rotateY(20deg) translateZ(215px) scale(0.5);
}

/*keyframes means make the element move from one place to the other*/
@keyframes shadow-one{
    0%{
       transform: translate(0);
    }

    5% {
        transform: perspective(1300px) rotateY(20deg) translateZ(310px) scale(0.5);
    }
    100% {
        transform: perspective(1300px) rotateY(20deg) translateZ(215px) scale(0.5);
    }
}

/*doing the same thing done for shadow one for shadow two except decreasing the translateZ value even move*/
.container.active .shadow.two {
    animation: shadow-two 0.6s ease-out;
    transform: perspective(1300px) rotateY(20deg) translateZ(120px) scale(0.5);
}

/*keyframes means make the element move from one place to the other*/
@keyframes shadow-two {
    0% {
        transform: translate(0);
    }

    20% {
        transform: perspective(1300px) rotateY(20deg) translateZ(310px) scale(0.5);
    }

    100% {
        transform: perspective(1300px) rotateY(20deg) translateZ(120px) scale(0.5);
    }
}

/*the last thing to do is increase the translateZ() value of the main element and the*/
/*first layer when we hover over (.main) element*/
.container.active .main:hover + .shadow.one {
    transform: perspective(1300px) rotateY(20deg) translateZ(230px) scale(0.5);
}

.container.active .main:hover {
    transform: perspective(1300px) rotateY(20deg) translateZ(340px) scale(0.5);
}