
:root {
    --nav-item-bg-color: rgb(66, 130, 194);
    --nav-item-hover-bg-color: rgba(97, 144, 192, 0.4);
    --nav-item-active-bg-color: #fff;
    --nav-item-active-text-color: #000000;
    --text-color: #ffffff;
    --background-color: #f8f9fa;
}
.main-nav {
    background-color: white;
    padding: 0.5rem 0; /* Add some vertical padding */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    z-index: 1000; /* Ensure it's above other content */
    width: 100%;
}

.main-nav-fixed {
    position: fixed;
    top: 0;
    left: 0;

}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*max-width: 1200px;  Limit maximum width */ /* Removed max-width */
    /*margin: 0 auto; Center the container */    /* Removed margin: auto */
    padding: 0 1rem; /* Add horizontal padding */
}

.nav-logo-link {
    display: inline-block; /* Allows setting width/height */

}

.nav-logo {
    width: 60px; /* Consistent logo size */
    height: auto; /* Maintain aspect ratio */
    vertical-align: middle; /* Align with text */
}

.nav-links {
    display: flex;
    align-items: center;
    background-color: var(--nav-item-bg-color);  /* Background for nav items */
    border-radius: 5px; /* Rounded corners */
    padding: 0.5rem 0;
    margin: 0 1rem; /* Space out from logo and user buttons*/
    flex-grow: 1; /* Allow nav-links to take available space */
    justify-content: center; /* Center the items horizontally */

}


.nav-item {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem; /* Horizontal spacing between items */
    font-size: 1.1rem; /* Slightly larger font */
    transition: background-color 0.3s ease, color 0.3s ease, border-bottom 0.3s ease; /* Smooth transitions */
    border-bottom: 2px solid transparent; /* Placeholder for active underline */
}

.nav-item:hover {
    background-color: var(--nav-item-hover-bg-color);
    border-radius: 5px;
}

.nav-item-active {
    background-color: var(--nav-item-active-bg-color);
    color: var(--nav-item-active-text-color);
    border-bottom-color: var(--accent-color); /* Highlight underline */
    border-radius: 5px;
}

.nav-user {
    display: flex;
    align-items: center;
}

.nav-user-icon {
    margin-right: 1rem; /* Space before logout button */
    color: var(--primary-color);
}
.nav-login-button, .nav-signup-button, .nav-logout-button{
    margin-left: 0.5rem;
}



/* Non-Fixed Navbar Styles */
.ui.secondary.pointing.menu {
    border-bottom: 2px solid rgba(97, 144, 192, 0.534) !important;
    background-color: var(--nav-item-bg-color); /* Background for nav items */

}


.ui.secondary.pointing.menu .item {
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    min-width: 100px;
    align-content: center;
    justify-content: center;
    border-radius: 2px 2px 0 0;

}
.ui.secondary.pointing.menu .item:not(:first-child){
    margin-left: 2em;
}


.ui.secondary.pointing.menu .item:hover {
    background-color: var(--nav-item-hover-bg-color);
}

.ui.secondary.pointing.menu .active.item {
    background-color: var(--nav-item-active-bg-color) !important;
    color: var(--nav-item-active-text-color) !important;
    border-bottom: none; /* Remove default Semantic UI border */
    border-radius:  4px 4px 0 0;
}

/* Fixed Navbar Styles */
#div1.ui.menu {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid rgba(97, 144, 192, 0.534) !important;
}

#div1 .item {
    color: var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    border-radius: 5px;
}

/* #div1 #div2{
    background-color: var(--nav-item-bg-color);
    border-radius: 5px;
    display: flex;
    align-items: center;

} */
#div1 a.item:not(.right){
    margin: 0 0.25rem;
}

#div1 .item:hover {
    background-color: var(--nav-item-hover-bg-color);
}

#div1 .active.item {
    background-color: var(--nav-item-active-bg-color) !important;
    color: var(--nav-item-active-text-color) !important;
}
.toc.item {
    display: none !important;
} 

/* Mobile menu styles */
.toggle-menu {
    cursor: pointer;
}

.toggle-menu .icon {
    font-size: 1.5em;
}

.ui.dropdown-menu.mobile {
    width: 100%;
    z-index: 999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none !important; /* Ensure it's hidden by default with !important */
}

.ui.dropdown-menu.visible {
    display: block !important; /* Will override the default hidden state */
}

.ui.dropdown-menu .vertical.menu {
    width: 100%;
    margin-top: 0;
    border-top: none;
    border-radius: 0;
}

/* Responsive utilities */
@media only screen and (max-width: 767px) {
    .mobile.only {
        display: inline-block !important;
    }
    
    .computer.tablet.only {
        display: none !important;
    }
    
    .logo-nav {
        max-height: 30px;
    }
    .mobile.only.toc.item{
        display: block;

    }
}

@media only screen and (min-width: 768px) {
    .mobile.only {
        display: none !important;
    }
    .mobile.only.toc.item{
        display: none;
    }
}