.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px 40px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    box-sizing: border-box;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.brand a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

/* Right Side */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.topbar-menu {
    display: flex;
    gap: 30px;
}

.menu-link {
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    /* PREVENTS WRAPPING */
    transition: 0.3s ease;
}

.menu-link:hover,
.menu-link.active {
    color: #F47419;
}

.dropdown-menu a.active {
    background: #fdf1e8;
    color: #F47419;
}

.dropdown-item-with-desc.active .dropdown-item-title {
    color: #F47419;
}

.dropdown-item-with-desc.active .dropdown-item-desc {
    color: #666;
}

/* Button */
.cta-btn {
    background: #F47419;
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
    /* PREVENTS WRAPPING */
    transition: 0.3s ease;
}

.cta-btn:hover {
    background: #d86314;
}

.cta-btn-sm {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
}

.brand-logo-img {
    height: 50px;
    width: auto;
    display: block;
}

/* Dropdown logic */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.dropdown-menu a:hover {
    background: #fdf1e8;
    color: #F47419;
}

/* Dropdown with descriptions */
.dropdown-menu-with-desc {
    min-width: 320px;
    padding: 8px 0;
}

.dropdown-item-with-desc {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 20px !important;
    border-bottom: 1px solid #f5f5f5;
}

.dropdown-item-with-desc:last-child {
    border-bottom: none;
}

.dropdown-item-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
}

.dropdown-item-desc {
    font-size: 12px;
    font-weight: 500;
    color: #888;
    display: block;
    line-height: 1.4;
}

.dropdown-item-with-desc:hover .dropdown-item-title {
    color: #F47419;
}

.dropdown-item-with-desc:hover .dropdown-item-desc {
    color: #666;
}

.menu-link i {
    font-size: 10px;
    margin-left: 4px;
}

/* Auth Buttons Group */
.auth-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-left: 20px;
}

.auth-buttons .menu-link {
    font-weight: 600;
}

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

/* Hamburger Icon */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    margin-left: 10px;
    padding: 5px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .topbar {
        padding: 12px 15px;
    }

    .topbar-right {
        gap: 10px;
    }

    /* Auth Buttons adjustments on mobile */
    .auth-buttons {
        gap: 8px;
        margin-left: 0;
    }

    .auth-buttons .menu-link {
        padding: 5px 8px;
        font-size: 14px;
    }

    /* Show hamburger */
    .mobile-menu-toggle {
        display: block;
    }

    /* Transform main menu to vertical dropdown */
    .topbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        gap: 0;
        padding: 10px 0;

        /* Hide by default using visibility */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .topbar-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .topbar-menu .menu-link {
        display: block;
        padding: 15px 25px;
        font-size: 16px;
        border-bottom: 1px solid #f1f1f1;
    }

    /* Modify dropdown behavior on mobile */
    .topbar-menu .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 20px;
        display: none;
        /* Can be handled via JS, mostly hidden initially */
    }

    .topbar-menu .dropdown:hover .dropdown-menu {
        display: block;
    }

    .brand-logo-img {
        height: 35px;
    }

    .cta-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Extra Mobile Rules (< 576px) */
@media (max-width: 576px) {
    .hide-on-mobile {
        display: none !important;
    }
    .mobile-only-links {
        display: flex !important;
        border-top: 1px solid #eee;
        margin-top: 5px;
    }
}