nav {
    position: sticky;
    top: 0;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    justify-items: center;
    text-align: center;
    box-shadow: 1px 5px 20px rgba(0, 0, 0, 0.4ห21);
    /* border: 1px solid black; */
    z-index: 100;
    background-color: white;
}

.sticky {
    position: fixed;
    top: 0;
    width: 100%;
}

.topnav {
    justify-items: center;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #ffffff;
    /* border: 1px solid black; */

    transition: 0.3s;
}

.topnav a {
    float: left;
    display: block;
    color: #000000;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 16px;
    /* border: 1px solid rgb(0, 38, 255); */

    transition: 0.3s;
}

.active {
    background-color: #ffe9e9;
    color: rgb(255, 255, 255);

}

.topnav .icon {
    display: none;
}

.dropdown {
    float: left;
    overflow: hidden;
    transition: .3s;
}

.dropdown .dropbtn {
    font-size: 16px;
    border: none;
    outline: none;
    color: rgb(0, 0, 0);
    padding: 14px 16px;
    background-color: inherit;
    font-family: inherit;
    margin: 0;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #cecece;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;

    transition: 0.3s;
}

.dropdown-content a {
    float: none;
    color: #5D0808;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-size: 14px;

    transition: 0.3s;
}

.topnav a:hover,
.dropdown:hover .dropbtn {
    background-color: #5D0808;
    color: white;
}

.dropdown-content a:hover {
    background-color: #eeeeee;
    color: black;
}

.dropdown:hover .dropdown-content {
    display: block;
}

@media screen and (max-width: 1550px) {

    nav {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        display: block;
        align-items: center;
        justify-content: space-around;
        justify-items: flex-start;
        text-align: center;

        z-index: 100;
    }

    .sticky {
        position: fixed;
        top: 0;
        width: 100%;
    }

    .topnav {
        width: 100%;
        justify-items: center;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        background-color: #ffffff;
    }

    .topnav a:not(:first-child),
    .dropdown .dropbtn {
        display: none;
    }

    .topnav a.icon {
        float: right;
        display: block;
    }

    .topnav.responsive {
        position: relative;
    }

    .topnav.responsive .icon {
        position: absolute;
        right: 0;
        top: 0;
    }

    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }

    .topnav.responsive .dropdown {
        float: none;
    }

    .topnav.responsive .dropdown-content {
        position: relative;
    }

    .topnav.responsive .dropdown .dropbtn {
        display: block;
        width: 100%;
        text-align: left;
    }
}

@media screen and (max-width: 800px) {

    .topnav.responsive {
        position: relative;
    }

    .topnav.responsive .icon {
        position: absolute;
        right: 0;
        top: 0;
    }

    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }

    .topnav.responsive .dropdown {
        float: none;
    }

    .topnav.responsive .dropdown-content {
        position: relative;
    }

    .topnav.responsive .dropdown .dropbtn {
        display: block;
        width: 100%;
        text-align: left;
    }
}