.navbar { display: flex; justify-content: space-between; align-items: center; background-color: #333; padding: 10px 20px; color: white; } .navbar-brand { font-size: 1.5em; font-weight: bold; } .nav-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; } .nav-links a { color: white; text-decoration: none; padding: 5px 10px; } /* Responsive behavior */ @media (max-width: 768px) { .navbar { flex-direction: column; align-items: flex-start; } .nav-links { flex-direction: column; width: 100%; margin-top: 10px; } .nav-links li { width: 100%; text-align: center; padding: 10px 0; background-color: #444; border-bottom: 1px solid #555; } .nav-links li:last-child { border-bottom: none; } .nav-links a { display: block; /* Make links fill the width */ } }