/* Basic styling for the body */
body {
    font-family: sans-serif;
    margin: 0;
}

/* Style the header and navigation bar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #333;
    padding: 1rem;
}

.nav-branding {
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
}

/* Style the navigation menu items */
.nav-menu {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem; /* space between menu items */
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease-in-out;
}

.nav-link:hover {
    color: #00bcd4; /* A nice highlight color */
}

/* Style the hamburger icon */
.hamburger {
    display: none; /* Hide it on desktop */
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

/* Media query for mobile devices */
@media(max-width: 768px) {
    .hamburger {
        display: block; /* Show the hamburger on mobile */
    }

    /* Animate the hamburger icon to an 'X' when active */
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Style the mobile menu */
    .nav-menu {
        position: fixed;
        left: -100%; /* Hide it off-screen */
        top: 60px; /* Position below the navbar */
        flex-direction: column;
        background-color: #333;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        gap: 0;
    }

    .nav-item {
        margin: 16px 0;
    }

    /* This class will be added by JavaScript to show the menu */
    .nav-menu.active {
        left: 0;
    }
}
