/* === Base Navbar === */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-color);
    padding: 10px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

/* === Left Section === */
.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-left a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--muted-text-color);
}

.navbar-icon {
    height: 40px;
    width: 40px;
    margin-right: 10px;
}

.navbar-text {
    color: var(--muted-text-color);
    font-size: 24px;
    font-weight: bold;
}

/* === Hamburger (Mobile Toggle) === */
.hamburger {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 10px;
    margin-left: auto;
}

/* === Right Nav Section === */
.navbar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* Nav Links */
.navbar-right a {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    font-size: 18px;
    transition: color 0.3s ease, background-color 0.3s ease;
    width: 100%;
}

.navbar-right a:hover {
    color: var(--hover-color);
    border-radius: 5px;
}

/* === Dropdowns === */
.dropdown {
    position: relative;
    width: 100%;
}

.dropbtn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    box-sizing: border-box;
    color: var(--text-color);
    text-decoration: none;
    font-size: 18px;
}

.dropbtn-text {
    flex: 1;
    text-align: left;
    color: var(--text-color);
    text-decoration: none;
}

.dropdown-arrow {
    font-size: 0.8em;
    color: var(--muted-text-color);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    align-self: center;
    margin-left: auto;
}

.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background-color: var(--primary-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

.dropdown.open .dropdown-content {
    display: block;
}

/* === Mobile Styles === */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .navbar-right {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-top: 10px;
    }

    .navbar-right.open {
        display: flex !important;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        width: 100%;
        padding-left: 10px;
    }

    .dropdown.open .dropdown-content {
        display: block;
    }

    .dropbtn {
        padding-right: 10px;
    }

    .dropdown-arrow {
        margin-left: auto;
        margin-right: 20px;
    }
}

/* === Desktop dropdown fallback === */
@media (min-width: 769px) {
    .dropdown-content {
        left: 0;
        right: auto;
    }
}