/* Basic Navbar Styles */
nav {
    display: flex;
    justify-content: center; /* Center navbar content */
    align-items: center; /* Vertically align items */
    background-color: black;
    padding: 30px 30px;
    color: white;
    position: relative; /* Keep elements within nav */
}

.menu-toggle {
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: none; /* Hidden by default */
}

#nav-list {
    display: flex;
    justify-content: center; /* Center the links */
    list-style: none;
    margin: 0;
    padding: 0;
}

#nav-list li {
    margin: 0 15px;
    position: relative; /* For dropdowns */
}

#nav-list li a {
    text-decoration: none;
    color: white;
    font-size: 1rem;
    padding: 10px 15px;
    display: block;
}

#nav-list li a:hover {
    color: #ffcc00; /* Hover effect */
}

#nav-list li ul {
    display: none; /* Hide dropdown menus */
    position: absolute;
    top: 100%;
    left: 0;
    background: black;
    padding: 10px 0; /* Add slight padding to dropdown */
    margin: 0;
    list-style: none;
    z-index: 1000;
    min-width: 180px;
    border-radius: 4px;
}

#nav-list li ul li {
    padding: 15px 15px; /* Increase padding for dropdown items */
    line-height: 1; /* Further increase spacing between lines */
    white-space: nowrap; /* Prevent text wrapping */
}

#nav-list li ul li:first-child {
    margin-top: 5px; /* Prevents extra margin on last item */
}

#nav-list li ul li:last-child {
    margin-bottom: 5px; /* Prevents extra margin on last item */
}

#nav-list li ul li a {
    display: block;
    padding: 12px 15px; /* Add more padding for clickable area */
    font-size: 1rem; /* Ensure consistent font size */
}

#nav-list li ul li a:hover {
    background-color: #333; /* Add a hover background color */
}

#nav-list li:hover ul {
    display: block; /* Show dropdown menus on hover */
}

/* Responsive Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show burger icon on small screens */
    }

    #nav-list {
        display: none; /* Hide menu initially */
        flex-direction: column;
        width: 100%;
        background-color: black;
        position: absolute;
        top: 100%; /* Position menu directly below the navbar */
        left: 0;
        padding: 10px 0;
        z-index: 1000;
        transition: all 0.3s ease-in-out; /* Smooth toggle */
    }

    #nav-list.active {
        display: flex; /* Show menu when toggled */
    }

    #nav-list li {
        margin: 10px 0;
        text-align: center;
    }

    #nav-list li ul {
        position: static; /* Dropdown menus align properly */
    }
}

.menu-toggle:focus, .menu-toggle:active {
    outline: none;
    color: #ffcc00; /* Example active state */
}
