* {
    box-sizing: border-box;
}

/* Top Menu Bar */
.top-menu {
    position: relative;
    width: 100%;
    max-width: 100%;
    background-color: #1a73e8;
    color: white;
    height: 60px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.menu-container {
    width: calc(100% - 2px); /* Adjust for the margin-left */
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    box-sizing: border-box; /* Add this to include padding in width calculation */
}

.menu-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.menu-logo-link {
    text-decoration: none;
    color: white;
}

.menu-logo-link:hover {
    opacity: 0.9;
}

.menu-links {
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    justify-content: flex-end;
    flex: 1;
    margin-right: 7px;
    box-sizing: border-box; /* Add this to include margin in width calculation */
}

.menu-link {
    color: white;
    text-decoration: none;
    padding: 6px 10px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-block;
    text-align: center;
    font-size: 0.9rem !important;
}

.menu-link:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Current page highlight */
.menu-link.active {
    background-color: rgba(76, 175, 80, 0.7) !important; /* Green with 0.7 opacity */
    border-color: rgba(76, 175, 80, 0.9);
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.mobile-menu-link.active {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50 !important; /* Solid green color for text */
    border-left: 3px solid #4CAF50;
}

/* Make sure admin link keeps its purple color even when active */
.menu-link.admin-link.active {
    background-color: rgba(156, 39, 176, 0.7) !important; /* Keep purple for admin */
    border-color: rgba(156, 39, 176, 0.9);
    box-shadow: 0 0 5px rgba(156, 39, 176, 0.5);
}

.mobile-menu-link.admin-link.active {
    background-color: rgba(156, 39, 176, 0.1);
    color: #9c27b0 !important; /* Keep purple for admin */
    border-left: 3px solid #9c27b0;
}

/* Make sure logout link keeps its red color even when active */
.menu-link.logout-link.active {
    background-color: rgba(244, 67, 54, 0.8) !important; /* Keep red for logout */
    border-color: rgba(244, 67, 54, 0.9);
    box-shadow: 0 0 5px rgba(244, 67, 54, 0.5);
}

.mobile-menu-link.logout-link.active {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336 !important; /* Keep red for logout */
    border-left: 3px solid #f44336;
}

/* Mobile Menu Styles */
.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    background-color: #0d62d1;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    color: white;
}

.mobile-dropdown {
    display: none;
    flex-direction: column;
    background-color: #f8f9fa;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

.mobile-dropdown.active {
    display: flex;
}

.mobile-menu-link {
    padding: 15px 20px;
    text-decoration: none;
    color: #1a73e8;
    font-weight: 500;
    border-bottom: 1px solid #eaeaea;
    transition: background-color 0.2s;
    text-align: center;
    margin: 5px 10px;
    border-radius: 4px;
}

.mobile-menu-link:hover {
    background-color: #e8f0fe;
}

/* Menu item styles for My Profile and Logout */
.my-profile-link, .logout-link {
    font-weight: 500;
}

.logout-link {
    color: white !important;
    background-color: rgba(244, 67, 54, 0.8) !important;
}

.logout-link:hover {
    background-color: rgba(244, 67, 54, 0.9) !important;
}

.my-profile-link {
    color: white !important;
}

.mobile-menu-link.my-profile-link {
    color: #1a73e8 !important;
    background-color: transparent;
}

/* Desktop-specific styles */
@media (min-width: 769px) {
    .mobile-menu-toggle,
    .mobile-dropdown {
        display: none !important;
    }
    
    .menu-links {
        display: flex !important;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .menu-links {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        border-radius: 4px;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .mobile-dropdown {
        align-items: center;
    }
    
    .mobile-menu-link {
        width: calc(100% - 20px);
        padding: 12px 0;
        margin: 5px 10px;
        border-radius: 4px;
        border: 1px solid #eaeaea;
    }
}

.mobile-only-link {
    display: none;
}

@media (max-width: 768px) {
    .mobile-only-link {
        display: block;
    }
}

.admin-link {
    color: white !important;
    background-color: rgba(156, 39, 176, 0.7) !important; /* Changed from orange to purple */
    font-weight: bold;
}

.admin-link:hover {
    background-color: rgba(156, 39, 176, 0.8) !important; /* Changed from orange to purple */
}

.mobile-menu-link.admin-link {
    color: #9c27b0 !important; /* Changed from orange to purple */
    background-color: rgba(156, 39, 176, 0.1); /* Changed from orange to purple */
    font-weight: bold;
}

.mobile-menu-link.admin-link:hover {
    background-color: rgba(156, 39, 176, 0.2); /* Changed from orange to purple */
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #f44336;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.menu-link {
    position: relative;
}

.mobile-menu-link {
    position: relative;
}

.mobile-menu-link .notification-badge {
    top: 8px;
    right: 8px;
}

/* Add this to the end of your menu.css file */
.login-link {
    background-color: white !important;
    color: #1a73e8 !important; /* Using the same blue as the menu background */
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.login-link:hover {
    background-color: #f8f9fa !important;
    color: #0d62d1 !important; /* Slightly darker blue on hover */
}

/* For mobile menu login link */
.mobile-menu-link.login-link {
    /* No need to change this as mobile links already have white background */
    color: #1a73e8 !important;
    font-weight: 500;
}

