color: white; padding: 15px 20px; text-decoration: none; text-align: center; font-size: 16px; font-weight: bold; transition: background-color 0.3s, color 0.3s; flex: 1 1 auto; /* Flexible and responsive */ } .nav-bar a:hover { background-color: #388E3C; /* Darker green on hover */ color: #fff; } @media screen and (max-width: 768px) { .header img { max-width: 80px; } .nav-bar a { flex: 1 1 100%; box-sizing: border-box; } }