﻿* {
    box-sizing: border-box;
}

/* Animations */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
    }

    45% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

#intro {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 100vw;
    /*right: 0;*/
    max-width: 100vw;
    /*max-height: 100vh;*/
    padding-top: 2em;
    font-family: Cambria, Cochin, Georgia, Times, Times New Roman, serif;
    margin: auto;
    /*padding: 10vw 0;*/
    text-align: center;
    z-index: 10;
    /* Declare animation properties */
    animation-name: fadeInOut;
    animation-duration: 3s;
    animation-iteration-count: 1;
    /*Setting forwards value - the target will retain the computed values set by the last keyframe encountered during execution*/
    animation-fill-mode: forwards;
}

#main {
    position: absolute;
    top: 1em;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    /*max-width: 100vw;
    max-height: 100vh;*/
    max-height: 75vh;
    opacity: 0;
    height: 100vh;
    margin: auto;
    margin-top: 1em;
    text-align: center;
    z-index: 10;
    /* opacity & declare animation properties */
    animation-name: fadeIn;
    animation-delay: 3s;
    animation-duration: 1s;
    animation-iteration-count: 1;
    /*Setting forwards value - the target will retain the computed values set by the last keyframe encountered during execution*/
    animation-fill-mode: forwards;
}

#title {
    position: absolute;
    top: 0;
    left: 5px;
    margin: 0;
    padding: 0;
    color: #999
}

#figure {
    color: #000;
    font-weight: bold;
}

p {
    padding-left: 5em;
    padding-right: 5em;
}

#instruction {
    color: red;
}

.lesson {
    padding-left: 6em;
    padding-right: 6em;
    font-size: 1.5em;
    text-align: left;
}

#myVideo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: 60%;
}

svg {
    /*width: 90%;*/
    height: 45%;
    width: 90%;
    margin: auto; /* center due to display: flex */
}

#illustration {
    /*width: 90%;*/
    height: 45%;
    max-width: 100%;
    min-width: 95%;
    border-radius: 15px;
    margin: auto; /* center due to display: flex */
}

    #illustration img {
        margin: 2em 1.5em 0 1.5em;
        padding: 0;
        width: 18vw;
        border-radius: 15px;
    }

        #illustration img:first-child {
            margin-left: 0;
        }

        #illustration img:last-child {
            margin-right: 0;
        }

        #illustration img:hover {
            background: rgba(255, 0, 0, 0.3);
            cursor: pointer;
        }

video::-webkit-media-controls-panel {
    background-image: none !important;
    filter: brightness(1.0);
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (max-width: 600px) {
    #main {
        height: 80vh;
    }

    .lesson {
        padding-left: 0.5em;
        padding-right: 0.5em;
        font-size: 1.2em;
    }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (max-width: 768px) {
    #main {
        width: 100vw;
        height: 80vh;
    }

    .lesson {
        padding-left: 0.5em;
        padding-right: 0.5em;
        font-size: 1.2em;
    }
}

/*SIDEBAR NAVIGATION*/
.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    overflow-x: hidden;
    /*transition: 0.5s;*/
    padding-top: 60px;
    background-color: rgba(255,255,255,0.9);
    color: black;
}

    .sidebar a {
        padding: 8px 8px 8px 32px;
        text-decoration: none;
        font-size: 25px;
        color: black;
        display: block;
        border-bottom: 1px solid black;
        /*transition: 0.3s;*/
    }

        .sidebar a:hover {
            color: red;
        }

    .sidebar .closebtn {
        position: absolute;
        top: 0;
        right: 0;
        font-size: 36px;
        margin-left: 50px;
        border-bottom: none;
    }

#openbtn {
    position: absolute;
    top: 2px;
    right: 5px;
    margin: 0;
    font-size: 2em;
    cursor: pointer;
    background-color: #fff;
    color: #000;
    padding: 0 8px 1px 8px;
    border: 1px solid black;
    border-radius: 10px;
    z-index: 90;
}

    #openbtn:hover {
        border: 1px solid red;
    }

/* On smaller screens, where height is less than 450px, change the style of the sidenav (less padding and a smaller font size) */
@media screen and (max-height: 450px) {
    .sidebar {
        padding-top: 15px;
    }

        .sidebar a {
            font-size: 18px;
        }
}
