/* Base styles - keep original design for desktop */
#page-topbar {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.layout-width {
    width: 100%;
    margin: 0 auto;
}

.navbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}

.navbar-brand-box {
    display: flex;
    align-items: center;
}

.logo img {
    height: 20px;
}

.topnav-hamburger {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    width: 20px;
    height: 15px;
    justify-content: space-between;
}

.hamburger-icon span {
    height: 2px;
    background: #333;
    transition: all 0.3s ease;
}

.custom-menu {
    display: flex;
    align-items: center;
}

.navbar-nav {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    color: #000000;
}

.nav-link i {
    margin-right: 0.5rem;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 200px;
    z-index: 1050;
}

.menu-dropdown .nav {
    flex-direction: column;
    padding: 0.5rem 0;
}

.menu-dropdown .nav-link {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.menu-dropdown .nav-link:last-child {
    border-bottom: none;
}

/* Mobile overlay menu */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 1050;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
}

.mobile-menu-content {
    padding: 1rem 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
}

.mobile-nav-link:hover {
    background: #f8f9fa;
    color: #000000;
}

.mobile-submenu {
    display: none;
    background: #f8f9fa;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu-link {
    display: block;
    padding: 0.5rem 2rem;
    color: #666;
    text-decoration: none;
    border-bottom: 1px solid #e9ecef;
}

.mobile-submenu-link:hover {
    color: #000000;
    background: #e9ecef;
}

.mobile-toggle-icon {
    transition: transform 0.3s ease;
}

.mobile-toggle-icon.rotated {
    transform: rotate(180deg);
}

/* Tablet styles */
@media (max-width: 1024px) {
    .navbar-header {
        padding: 0.5rem 0.75rem;
    }

    .nav-link {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }

    .custom-menu {
        overflow-x: auto;
    }

    .navbar-nav {
        flex-wrap: nowrap;
    }
}

/* Mobile styles */
@media (max-width: 1024px) {
    .topnav-hamburger {
        display: block;
    }

    .custom-menu {
        display: none;
    }

    .mobile-overlay,
    .mobile-menu {
        display: block;
    }

    .navbar-header {
        justify-content: space-between;
    }

    .d-flex.align-items-center {
        display: flex !important;
        align-items: center !important;
    }
}
/* Small mobile styles */
@media (max-width: 480px) {
    .navbar-header {
        padding: 0.5rem;
    }

    .logo img {
        height: 18px;
    }

    .mobile-menu {
        width: 100%;
        left: -100%;
    }
}

/* Hamburger animation */
.hamburger-active .hamburger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-active .hamburger-icon span:nth-child(2) {
    opacity: 0;
}

.hamburger-active .hamburger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}