/* Basic styling for the navigation menu */
nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px;
    background-color: rgba(242, 242, 242, 0.9);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
}

nav li {
    margin: 0 10px;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    font-size: xx-large;
}

nav a:hover {
    color: #3835dd;
}

nav a.active {
    color: red;
    /* This ensures the active class has higher specificity over the general nav a styles */
}

/* Media queries for mobile devices */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 30px;
        cursor: pointer;
        margin-left: auto;
        /* Align the hamburger menu to the right */
    }

    .menu-toggle .bar {
        height: 3px;
        width: 100%;
        background-color: #333;
        border-radius: 10px;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        display: none;
        width: 100%;
        background-color: rgba(242, 242, 242, 0.9);
        position: absolute;
        top: 50px;
        /* Adjust this based on your nav height */
        left: 0;
    }

    nav ul.active {
        display: flex;
    }

    nav ul li {
        margin: 10px 20px;
    }

    nav ul li a {
        font-size: large;
        /* Adjust the font size for better readability on mobile */
    }
}

/* Additional styling for smaller mobile devices (like iPhone SE) */
@media (max-width: 375px) {
    nav {
        padding: 8px;
    }

    nav ul li a {
        font-size: medium;
        /* Further adjust the font size for smaller screens */
    }
}