Código do NavBar Responsiva

HTML


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Portal</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://kit.fontawesome.com/636bc3a652.js" crossorigin="anonymous"></script>
</head>
<body>
    <header class="header">
        <div class="header-container">
            <div class="header-logo">
                <a href="/">SeuLogo</a>
            </div>

            <nav class="header-main-nav">
                <ul>
                    <li><a href="#" class="active">Home</a></li>
                    <li><a href="#" class="#">Serviços</a></li>
                    <li><a href="#" class="#">Sobre</a></li>
                    <li><a href="#" class="#">Contato</a></li>
                </ul>
            </nav>

        <div class="header-icon">
            <a href="#"><i class="fa-solid fa-magnifying-glass"></i></a>
            <a href="#"><i class="fa-solid fa-user-plus"></i></a>
        </div>
        </div>

    </header>
</body>
</html>

CSS


/* Fontes e Cores */
:root{
 
        --color-white: #fff;
        --color-red: #e30a15;
        --color-dark-red: #bf0810;
        --color-gold: #fad700;
        --color-black: #000000;
        --color-gray: #6c757d;
      
        --progress-bar-grey: #333;
        --progress-bar-red: #e50914;
      
        --overlay-light: rgba(255, 255, 255, 0.2);
        --overlay-dark: rgba(0, 0, 0, 0.6);
      
        --btn-red: #e50914;
        --btn-red-hover: #bf0810;
      
        --header-background: #151515;
      
        --width: 1200px;
      
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    font-family: Arial, Helvetica, sans-serif;
    font-size: 62.5%/* 10px / 16px = 0.625 * 100 = 62.5% */;
}

body{
    background-color: var(--color-black);
    color: var(--color-white);
}

a{
    color: var(--color-white);
    text-decoration: none;
}

header{
    background-color: var(--header-background);
    padding: 1rem 2rem;
}

.header-container{
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--width);
    margin: 0 auto;
}

.header-logo a{
    font-size: 4rem;
    color: var(--color-red)
}

.header-main-nav ul{
list-style: none;
display: flex;
gap: 6rem;
}

.header-main-nav a{
 font-size: 1.4rem;
 font-weight: bold;
 transition: color 0.3s;
}

.header-main-nav a:hover,.header-main-nav a.active{
    color: var(--color-red);
}

.header-icon{
    display: flex;
    gap: 4rem;
    
}

.header-icon i{
    font-size: 1.4rem;
}