 
/* Unified Navbar CSS - Mobile-First Responsive Design */
/* This file consolidates all navbar styles for consistent implementation across all pages */

:root {
    /* General Colors */
    --primary-color: #1877f2;
    --blue-primary: #1aadf1;
    --blue-light: #E1F5FE;
    --blue-dark: #0288D1;
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #050505;
    --secondary-text-color: #65676b;
    --border-color: #dddfe2;
    --hover-color: #E4E6E9;
    --navbar-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #18191A;
    --card-bg: #242526;
    --text-color: #E4E6EB;
    --secondary-text-color: #B0B3B8;
    --border-color: #3A3B3C;
    --hover-color: #3A3B3C;
}

/* Base Reset */
* {
    box-sizing: border-box;
}

/* Main Navbar Container */
.main-navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    opacity: 1;
    z-index: 10001;
    box-shadow: var(--navbar-shadow);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Header Section Z-Index Management */
header, .header, .page-header, .main-header, .content-header {
    z-index: 10001;
    position: relative;
    background: var(--card-bg);
}

/* Additional header selectors for common patterns */
.page-container > header,
.content-wrapper > header,
.main-content > header,
[class*="header"] {
    z-index: 1002;
    position: relative;
}

/* Ensure header content is above navbar */
.header-content,
.header-wrapper,
.page-title,
.content-title {
    z-index: 1003;
    position: relative;
}

/* Utility class for manual header control */
.bring-forward {
    z-index: 1002 !important;
    position: relative !important;
}

.bring-forward-high {
    z-index: 1003 !important;
    position: relative !important;
}

body.dark-mode .main-navbar {
    background-color: rgba(36, 37, 38, 0.95) !important;
    border-bottom-color: var(--border-color) !important;
}

/* Auth Navbar Styling */
.main-navbar.auth-navbar .auth-navbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
}
.main-navbar.auth-navbar .auth-navbar-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}
.main-navbar.auth-navbar .auth-navbar-links a:hover {
    background-color: var(--hover-color);
}

/* Navbar Left Section */
.navbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.navbar-logo img {
    height: 32px;
    transition: transform 0.2s ease;
}
.navbar-logo:hover img {
    transform: scale(1.05);
}

/* Search Section */
.navbar-search {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin-left: 20px;
    display: none; /* Hidden by default */
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Desktop Search Button */
.desktop-search-btn {
    background-color: transparent;
    color: var(--secondary-text-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 20px;
    position: relative;
}

.desktop-search-btn:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
    transform: scale(1.05);
}

.desktop-search-btn:active {
    transform: scale(0.95);
}

/* Search button active state when search is expanded */
.navbar-search.expanded ~ .desktop-search-btn,
.desktop-search-btn.active {
    background-color: var(--blue-primary);
    color: white;
}

/* Search box expanded state */
.navbar-search.expanded {
    display: flex !important;
    opacity: 1;
    transform: translateX(0);
}

.navbar-search .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-text-color);
    pointer-events: none;
    transition: color 0.2s ease;
}

.navbar-search input {
    background: var(--hover-color);
    border: 1px solid transparent;
    border-radius: 25px;
    padding: 10px 20px 10px 50px;
    font-size: 0.95rem;
    color: var(--text-color);
    width: 100%;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .navbar-search input {
    background: var(--border-color);
}

.navbar-search input:focus {
    border-color: var(--blue-primary);
    background-color: var(--card-bg);
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar-search input:focus + .search-icon {
    color: var(--blue-primary);
}

/* Search close button */
.search-close-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-text-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0;
    visibility: hidden;
}

.navbar-search.expanded .search-close-btn {
    opacity: 1;
    visibility: visible;
}

.search-close-btn:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
    transform: translateY(-50%) scale(1.1);
}

/* Search Results Container */
.search-results-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    margin-top: 8px;
}

.search-results-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-results-container::-webkit-scrollbar {
    width: 6px;
}

.search-results-container::-webkit-scrollbar-track {
    background: var(--hover-color);
    border-radius: 3px;
}

.search-results-container::-webkit-scrollbar-thumb {
    background: var(--secondary-text-color);
    border-radius: 3px;
}

.search-results-container::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* Navbar Right Section */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Nav Action Buttons */
.nav-action-btn {
    background-color: transparent;
    color: var(--secondary-text-color);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}
.nav-action-btn:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}
.nav-action-btn.active {
    color: var(--blue-primary);
}
.nav-action-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 4px;
    right: 4px;
    height: 3px;
    background-color: var(--blue-primary);
    border-radius: 2px;
}

/* User Menu */
.user-menu-container {
    position: relative;
}
.user-menu-btn img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
}
.user-menu-btn:hover img {
    border-color: var(--primary-color);
}
.user-dropdown-menu {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 200px;
    opacity: 1 !important;
    z-index: 10001 !important;
}
.user-dropdown-menu.show { display: block; }
.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
}
.user-dropdown-menu a:hover { background-color: var(--hover-color); }
.user-dropdown-menu a i { width: 20px; text-align: center; }

/* Mobile-Specific Elements - Hidden on desktop by default */
.mobile-search-toggle, .mobile-menu-toggle {
    display: none !important;
    background-color: transparent;
    border: none;
    color: var(--secondary-text-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.mobile-search-toggle:hover, .mobile-menu-toggle:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

/* Mobile menu toggle hamburger styling */
.mobile-menu-toggle {
    flex-direction: column;
    gap: 3px;
    
}
.mobile-menu-toggle span {
    width: 18px;
    height: 2px;
    background-color: currentColor;
    border-radius: 1px;
    transition: all 0.3s ease;
}
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 1;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}
/* Desktop Search Button - Hidden on mobile */
.desktop-search-btn {
    display: flex !important;
}

/* Ensure mobile buttons are hidden on desktop by default */
@media (min-width: 768px) {
    .mobile-search-toggle, .mobile-menu-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Ensure mobile search button is completely hidden on desktop */
@media (min-width: 768px) {
    .mobile-search-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    .desktop-search-btn {
        display: flex !important;
    }
    
    /* Hide mobile-expanded search on desktop */
    .navbar-search.mobile-expanded {
        display: none !important;
    }
}
/* Responsive Design */
@media (max-width: 768px) {
    /* Hide desktop search button on mobile */
    .desktop-search-btn {
        display: none !important;
    }
    /* Hide desktop search on mobile (except when expanded) */
    .navbar-search:not(.mobile-expanded) {
        display: none !important;
    }
    
    /* Show mobile buttons */
    .mobile-search-toggle, .mobile-menu-toggle {
        display: flex !important;
    }
    .mobile-search-toggle{
        display: none !important;
    }
    
    /* Hide auth buttons on mobile */
    .auth-buttons {
        display: none;
    }
    /* Ensure mobile buttons are properly spaced */
    .navbar-right {
        gap: 5px;
    }
    /* Make mobile buttons more touch-friendly */
    .mobile-search-toggle, .mobile-menu-toggle {
        min-width: 44px;
        min-height: 44px;
    }
    /* Adjust user menu for mobile */
    .user-menu-btn {
        padding: 0;
        background: transparent;
        border: none;
        display: flex;
        align-items: center;
        gap: 8px;
        border-radius: 20px;
        padding: 4px;
        transition: background-color 0.2s ease;
    }
    
    .user-menu-btn:hover {
        background-color: var(--hover-color);
    }
    
    .user-menu-btn img {
        width: 36px;
        height: 36px;
    }
    
    .user-menu-btn .username {
        font-size: 0.9rem;
        font-weight: 500;
    }
}

/* Desktop screens - ensure mobile elements are completely hidden */
@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 1 !important;
        z-index: 10001 !important;
    }
    .mobile-menu-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 1 !important;
        z-index: 10001 !important;
    }
    .mobile-search-toggle {
        display: none !important;
        visibility: hidden !important;
        opacity: 1 !important;
        z-index: 10001 !important;
    }
    .mobile-search-overlay {
        display: none !important;
        visibility: hidden !important;
        opacity: 1 !important;
         z-index: 10001 !important;
    }
    .mobile-search,
    .mobile-user-toggle {
        display: none !important;
    }
}

/* Mobile Search Overlay */
.mobile-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--card-bg);
    z-index: 10004;
    padding: 80px 20px 20px;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Mobile Search Overlay Active State */
.mobile-search-overlay.active {
    display: block !important;
    background-color: var(--card-bg) !important;
    opacity: 1 !important;
}

.mobile-search-container {
    max-width: 500px;
    margin: 0 auto;
}

.mobile-search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-search-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.mobile-search-close {
    background: none;
    border: none;
    color: var(--secondary-text-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.mobile-search-close:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.mobile-search-input-container {
    position: relative;
    margin-bottom: 20px;
}

.mobile-search-input-container img {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

.mobile-search-input-container input {
    width: 100%;
    padding: 15px 50px 15px 45px;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s ease;
}

.mobile-search-input-container input:focus {
    border-color: var(--blue-primary);
}

.clear-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--secondary-text-color);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.mobile-search-suggestions {
    margin-bottom: 20px;
}

.mobile-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 8px;
}

.mobile-search-item:hover {
    background-color: var(--hover-color);
}

.mobile-search-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.search-result-description {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-bottom: 2px;
}

.search-result-type {
    font-size: 0.8rem;
    color: var(--blue-primary);
    text-transform: uppercase;
    font-weight: 500;
}

.search-loading, .search-no-results {
    text-align: center;
    padding: 20px;
    color: var(--secondary-text-color);
    font-style: italic;
}

/* Mobile Search Overlay - Legacy */
.navbar-search.mobile-expanded {
    display: flex;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 60px;
    background: var(--card-bg);
    z-index: 10004;
    padding: 0 15px;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-search.mobile-expanded .search-close-btn {
    display: flex;
    margin-left: 10px;
    opacity: 1;
    visibility: visible;
}

.navbar-search.mobile-expanded input {
    background: var(--hover-color);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.navbar-search.mobile-expanded input:focus {
    background-color: var(--card-bg);
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Menu */
.mobile-menu {
    display: none !important;
    position: fixed;
    top: 60px; left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background-color: var(--card-bg);
    opacity: 1 !important;
    z-index: 10001 !important;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mobile-menu.active {
    display: block !important;
    background-color: var(--card-bg) !important;
    opacity: 1 !important;
    z-index: 10001 !important;
}

.mobile-menu .nav-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background-color 0.2s ease;
}

.mobile-menu .nav-action-btn:hover {
    background-color: var(--hover-color);
}

.mobile-menu .nav-action-btn span {
    font-size: 1rem;
    font-weight: 500;
}

.mobile-menu .mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 10px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background-color 0.2s ease;
}

.mobile-menu .mobile-nav-item:hover {
    background-color: var(--hover-color);
}

.mobile-menu .mobile-nav-item span {
    font-size: 1rem;
    font-weight: 500;
}

.mobile-menu .btn-block {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    font-weight: 500;
}
.mobile-menu .btn-block.primary {
    background-color: var(--blue-primary);
    color: white;
    border: none;
}
.mobile-menu .btn-block.primary:hover {
    background-color: var(--blue-dark);
}
.mobile-menu .btn-block.secondary {
    background-color: var(--hover-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
.mobile-menu .btn-block.secondary:hover {
    background-color: var(--hover-color);
}
.mobile-menu .mobile-user-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
.mobile-menu .mobile-user-section .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}
.mobile-menu .mobile-user-section .user-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.mobile-menu .mobile-user-section .user-info .username {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}
.mobile-menu .mobile-user-section .user-info .user-email {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
}
.mobile-menu .mobile-user-section .logout-btn {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    background-color: var(--hover-color);
    color: var(--text-color);
    border: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
}
.mobile-menu .mobile-user-section .logout-btn:hover {
    background-color: var(--border-color);
}
/* Adjustments for dark mode */
body.dark-mode .mobile-menu {
    background-color: var(--card-bg) !important;
}
body.dark-mode .mobile-menu .nav-action-btn,
body.dark-mode .mobile-menu .mobile-nav-item {
    color: var(--text-color);
}
body.dark-mode .mobile-menu .nav-action-btn:hover,
body.dark-mode .mobile-menu .mobile-nav-item:hover {
    background-color: var(--hover-color);
}
body.dark-mode .mobile-menu .btn-block.secondary {
    background-color: var(--border-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
body.dark-mode .mobile-menu .btn-block.secondary:hover {
    background-color: var(--hover-color);
}
body.dark-mode .mobile-menu .mobile-user-section .user-info .username {
    color: var(--text-color);
}
body.dark-mode .mobile-menu .mobile-user-section .user-info .user-email {
    color: var(--secondary-text-color);
}
body.dark-mode .mobile-menu .mobile-user-section .logout-btn {
    background-color: var(--hover-color);
    color: var(--text-color);
}
body.dark-mode .mobile-menu .mobile-user-section .logout-btn:hover {
    background-color: var(--border-color);
}

/* Notification Container */
.notification-container {
    position: relative;
}

/* Notification Badge (inside the nav-action-btn) */
.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 1px 4px;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--card-bg);
    box-sizing: border-box;
}

/* Notification Dropdown */
.notification-dropdown {
    display: none;
    position: absolute;
    top: 55px;
    right: -20px;
    width: 380px;
    max-height: 480px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.notification-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.notification-dropdown-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.notification-dropdown-header .see-all-link {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.notification-dropdown-header .see-all-link:hover {
    text-decoration: underline;
}

.notification-dropdown-body {
    overflow-y: auto;
    flex-grow: 1;
}

.notification-dropdown-item {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
    gap: 12px;
    align-items: center;
}
.notification-dropdown-item:last-child {
    border-bottom: none;
}
.notification-dropdown-item:hover {
    background-color: var(--hover-color);
}
.notification-dropdown-item.unread {
    background-color: var(--blue-light);
}

.notification-dropdown-item .notification-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.notification-dropdown-content {
    font-size: 0.9rem;
    flex-grow: 1;
}

.notification-message {
    margin-bottom: 4px;
    color: var(--text-color);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.8rem;
    color: var(--secondary-text-color);
    font-weight: 500;
}

.empty-notifications, .error-notifications {
    text-align: center;
    padding: 40px 20px;
    color: var(--secondary-text-color);
}
.empty-notifications i, .error-notifications i {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.7;
}

/* Ensure proper badge positioning on mobile */
@media (max-width: 768px) {
    .notification-badge {
        top: 2px;
        right: 2px;
        font-size: 9px;
        min-width: 16px;
        height: 16px;
        padding: 0 3px;
    }
}

/* Very small screens adjustment */
@media (max-width: 480px) {
    .navbar-right {
        gap: 5px !important;
    }
    
    .navbar-right .nav-action-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .notification-badge {
        top: 1px;
        right: 1px;
        font-size: 8px;
        min-width: 14px;
        height: 14px;
    }
}

/* Mobile Top Icons Bar - POSITIONED AT VERY TOP */
.mobile-top-icons-bar {
    display: none;
    position: fixed;
    top: 0; /* Very top of the page */
    left: 0;
    right: 0;
    width: 100%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 15px;
    z-index: 10002; /* Higher than main navbar */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: 50px;
}

.mobile-top-icons-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
    height: 100%;
}

/* Spacer for left side */
.mobile-top-spacer {
    flex: 1;
}

/* Icons container aligned to right */
.mobile-top-icons-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-top-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--secondary-text-color);
    text-decoration: none;
    padding: 6px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
    min-width: 50px;
    width: 50px;
    height: 44px;
    justify-content: center;
}

.mobile-top-icon:hover {
    background-color: var(--hover-color);
    color: var(--text-color);
}

.mobile-top-icon.active {
    color: var(--blue-primary);
}

.mobile-top-icon i {
    font-size: 1.3rem;
}

.mobile-icon-label {
    font-size: 0.65rem;
    font-weight: 500;
    white-space: nowrap;
}

.mobile-top-icon .notification-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 8px;
    min-width: 14px;
    height: 14px;
}

.mobile-top-icon.placeholder {
    opacity: 0.4;
    cursor: default;
}

.mobile-top-icon.placeholder:hover {
    background: none;
    color: var(--secondary-text-color);
}

/* Show only on mobile */
@media (max-width: 768px) {
    .mobile-top-icons-bar {
        display: block;
    }
    
    /* Move main navbar down to make space for top icons bar */
    .main-navbar {
        top: 50px; /* Position below the top icons bar */
    }
    
    /* Adjust body padding to account for both bars */
     /* Adjust body padding to account for both bars */
    @media (max-width: 768px) {
        body {
            padding-top: 110px !important; /* 50px top bar + 60px navbar */
        }
        
        /* Ensure main content starts below both navbars */
        .main-content, 
        .page-content, 
        .content-wrapper,
        .container,
        [class*="container"] {
            margin-top: 0 !important;
        }
        
        /* Specific targeting for common page containers */
        .page-container,
        .content-area,
        .posts-container,
        .feed-container {
            margin-top: 0 !important;
            padding-top: 0 !important;
        }
    }
    
    /* Consistent icon sizes for mobile */
    .navbar-right .nav-action-btn,
    .mobile-search-toggle,
    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    .user-menu-btn img {
        width: 36px;
        height: 36px;
    }
}

/* Hide on desktop */
@media (min-width: 769px) {
    .mobile-top-icons-bar {
        display: none !important;
    }
    
    /* Reset main navbar position on desktop */
    .main-navbar {
        top: 0;
    }
    
    /* Reset body padding on desktop */
    body {
        padding-top: 60px;
    }
}
/* Hide notification icon in main navbar on mobile */
@media (max-width: 768px) {
    .navbar-right .notification-container {
        display: none !important;
    }
}

/* Ensure notification container is visible on desktop */
@media (min-width: 769px) {
    .navbar-right .notification-container {
        display: block !important;
    }
}
