@import 'variable.css';

nav {
    background: var(--secondary-bg-color);
    color: var(--secondary-text-color);
    padding: 10px 20px;
    border-radius: 7px;
    margin: 10px 0;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo .title{
    font-weight: 600;
    font-size: 15pt;
    color: #555;
}
.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.nav-links li {
    position: relative;
}
.nav-links a {
    text-decoration: none;
    color: var(--secondary-text-color);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    font-size: 11pt;
}
.nav-links a i {
    margin-right: 8px;
}
.nav-links .dropdown a{
    color: var(--primary-text-color);
}
.nav-links a:hover, .nav-links .active > a, .menu-item:hover > a {
    background: var(--primary-bg-color);
    color: var(--primary-text-color);
    border-radius: 7px;
}
.nav-links .dropdown a:hover, .nav-links .dropdown .menu-item:hover > a{
    background: #1f630a;
}

/* Dropdown Styling */
.dropdown, .nested-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-bg-color);
    width: auto;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease-in-out;
    list-style: none;
    color: var(--primary-text-color);
}
.dropdown li, .nested-dropdown li {
    width: 100%;
}
.dropdown a, .nested-dropdown a {
    padding: 10px;
    display: block;
}
.nav-links li:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Nested Dropdown */
.nested-dropdown {
    top: 0;
    left: 100%;
}
.dropdown li:hover > .nested-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Arrow Animation */
.menu-item > a .arrow {
    margin-left: 5px;
    transition: transform 0.3s ease-in-out;
}
.menu-item:hover > a .arrow, .dropdown li:hover > a .arrow {
    transform: rotate(180deg);
}

/* Mobile Menu */
.hamburger {
    display: none;
    font-size: 24px;
    cursor: pointer;
}
.user-section .login{
    background: var(--primary-bg-color);
    color: var(--primary-text-color);
    padding: 10px 15px;
    border: none;
    outline: none;
    border-radius: 7px;
    cursor: pointer;
}
.user-section i{
    margin-right: 7px;
}
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: var(--secondary-bg-color);
        color: var(--secondary-text-color);
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        border-radius: 5px;
        z-index: 999;
        padding: 0;
        margin: 0;
    }
    .nav-links.active {
        display: flex;
    }
    .hamburger {
        display: block;
    }
    .dropdown, .nested-dropdown {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
        background: #555;
    }
    .menu-item.active > .dropdown {
        display: block;
    }
    .dropdown li.active > .nested-dropdown {
        display: block;
    }
}
