.header {
    display: flex;
    justify-content: space-between;
    background-color: #333;
    padding: 6px 0;
    position: fixed;
    top: 0;
    width: 100%;
    font-family: Arial, Helvetica, sans-serif;
    height: 5%;
    /* To prevent the elements in the content with any position attribute covering the header, move the header forward */
    z-index: 1;
}

.header .home-icon-container {
    width: 4%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header .home-icon {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header .home-icon img{
    display: inline-flexbox;
    width: 100%;
    /* height: 100%; */
    border-radius: 5px;
    transition: opacity 0.3s 0s ease;
}


.header .home-icon img:hover{
    opacity: 0.5;
}

.header #nav-container {
    display: flex;
    align-items: center;
}

.header nav {
    /* 要加這行才會真的讓<nav>底下的文字對齊右邊 */
    width: 100%;
    display: flex;
    justify-content: right;
    padding-right: 20px;
}

.header nav .nav-button-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.header nav .nav-button-container .nav-word-container {
    display: flex;
    width: 100%;
}

.header nav a {
    text-decoration: none;
    color: white;
    padding: 1vw 1vw;
    font-size: 1.3vw;
    border-radius: 5vw;
    transition: background-color 0.1s 0s ease;
}

@media screen and (min-width: 769px) {
    .header nav a:hover {
        background-color: #666;
    }
}

@media screen and (max-width: 768px) {    
    .header {
        position: fixed;
        top: -100%;
        left: -100%;
    }
}

@media screen and (max-width: 768px) {
    .header #nav-container {
        display: flex;
        align-items: flex-start;
        width: 90%;
        height: 92vh;
        display: flex;
        flex-direction: column;
        padding-right: 0px;
        position: fixed;
        right: -100%;
        top: 8vh;
        background-color: #eee;
        box-shadow: -3px 0 3px #bbb;
        transition: right 0.3s 0s ease;
    }

    .header nav {
        height: fit-content;
        display: flex;
        flex-direction: column;
        padding-right: 0px;
    }

    .header nav .nav-button-container {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        height: 8vh;
        border-bottom: solid 2px #ccc;
    }

    .header nav .nav-button-container .nav-word-container {
        width:fit-content;
        color: #666;
    }

    .header nav a {
        text-decoration: none;
        display: flex;
        justify-content: center;
        font-size: 6vw;
        border-radius: 5vw;
        transition: background-color 0.1s 0s ease;
    }
}