*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid red;
}

nav ul{
    list-style: none;
    background-color: #f1f1f1;
}

nav ul li{
    width: 100%;
}

nav ul li a{
    width: 100%;
    display: block;
    text-decoration: none;
    color: black;
    padding: 15px;
    font-family: arial;
}

.active{
    color: white;
    background-color: #04aa6d;
}

nav ul li a:hover{
    background-color: grey;
    color: white;
}

.topnav.responsive li{
    display: block;
    text-align: left;
  }

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    nav ul{
        width: 50%;
    }
    
    nav ul li:not(:first-child) {
    display: none;
    }
    
    nav ul li.button{
        display: block;
    }
}

/* Small devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
    nav ul{
        width: 50%;
    } 
      
    nav ul li:not(:first-child) {
        display: none;
    }
    
    nav ul li.button{
        display: block;
    }
}

/* Medium devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
    
}

/* Large devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    body{
        background-color: beige;
    }
    
    nav ul{
        display: flex;
        width: 100%;
    }
    
    li{
        display:block;
    }
    
    nav ul li:not(:first-child) {
        display: block;
    }
    
    nav ul li.button{
        display: none;
    }   
}

/* Extra large devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
    
}