/**
 * Base Navbar Styles - extracted from base.html inline <style> blocks
 * Includes: navbar modern styles, mobile menu, dropdowns, logo FOUC fix
 * Loaded async - critical navbar CLS handled by critical.css
 */
        /* 1. Navbar Container - Black on first load for CLS/FCP, solid on scroll */
        .navbar.navbar-dark,
        .navbar.navbar-dark.bg-dark {
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border: none !important;
            box-shadow: none !important;
            z-index: 1050;
            transition: background 0.3s ease, backdrop-filter 0.3s ease, box-shadow 0.3s ease;
        }
        
        /* Navbar becomes visible when scrolled - full-width background via pseudo-element */
        .navbar.navbar-dark.navbar-scrolled,
        .navbar.navbar-dark.bg-dark.navbar-scrolled {
            position: relative;
            background: transparent !important;
            background-color: transparent !important;
        }
        .navbar.navbar-dark.navbar-scrolled::before,
        .navbar.navbar-dark.bg-dark.navbar-scrolled::before {
            content: '';
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            width: 150vw;
            top: 0;
            bottom: 0;
            background: rgba(20, 20, 25, 0.95);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
            z-index: -1;
        }
        
        /* ========================================
           MOBILE FULL-SCREEN MENU (< 768px)
           ======================================== */
        /* Always hide mobile overlay on all screens by default */
        .mobile-menu-overlay {
            display: none !important;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(20, 20, 25, 0.98);
            z-index: 9999;
            flex-direction: column;
            padding: 0;
            overflow-y: auto;
        }
        
        @media (max-width: 768px) {
            /* Hide default Bootstrap collapse on mobile */
            .navbar-collapse {
                display: none !important;
            }
            
            /* Show mobile menu only when active AND on mobile */
            .mobile-menu-overlay.active {
                display: flex !important;
            }
            
            /* Menu header with close button */
            .mobile-menu-header {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 20px 24px;
                border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            }
            
            .mobile-menu-back {
                font-size: 1.5rem;
                color: #fff;
                background: none;
                border: none;
                cursor: pointer;
                padding: 8px;
                opacity: 0.7;
                transition: opacity 0.15s;
            }
            
            .mobile-menu-back:hover {
                opacity: 1;
            }
            
            .mobile-menu-back.hidden {
                visibility: hidden;
            }
            
            .mobile-menu-title {
                color: rgba(255, 255, 255, 0.5);
                font-size: 0.85rem;
                text-transform: uppercase;
                letter-spacing: 1px;
            }
            
            .mobile-menu-close {
                font-size: 1.5rem;
                color: #fff;
                background: none;
                border: none;
                cursor: pointer;
                padding: 8px;
                opacity: 0.7;
                transition: opacity 0.15s;
            }
            
            .mobile-menu-close:hover {
                opacity: 1;
            }
            
            /* Menu content */
            .mobile-menu-content {
                flex: 1;
                padding: 32px 24px;
            }
            
            /* Main menu items */
            .mobile-menu-item {
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 16px 24px 16px 0;
                font-size: 1.75rem;
                font-weight: 500;
                color: #fff;
                text-decoration: none;
                border: none;
                background: none;
                width: 100%;
                text-align: left;
                cursor: pointer;
                transition: color 0.15s;
            }
            
            .mobile-menu-item:hover {
                color: #7d19ff;
            }
            
            .mobile-menu-item i.fa-chevron-right {
                font-size: 1rem;
                opacity: 0.7;
            }
            
            .mobile-menu-item i.fa-external-link-alt {
                font-size: 0.9rem;
                opacity: 0.5;
                margin-left: 8px;
            }
            
            /* Sub-menu items (when expanded) */
            .mobile-submenu-item {
                display: block;
                padding: 14px 0;
                font-size: 1.5rem;
                font-weight: 400;
                color: #fff;
                text-decoration: none;
                transition: color 0.15s;
            }
            
            .mobile-submenu-item:hover {
                color: #7d19ff;
            }
            
            .mobile-submenu-item i.fa-external-link-alt {
                font-size: 0.8rem;
                opacity: 0.5;
                margin-left: 8px;
            }
            
            /* Language submenu buttons */
            .mobile-menu-sub form {
                display: block;
            }
            
            .mobile-menu-sub button.mobile-submenu-item {
                width: 100%;
                background: none;
                border: none;
                cursor: pointer;
                text-align: left;
                display: flex;
                align-items: center;
            }
            
            /* Menu divider */
            .mobile-menu-divider {
                border: none;
                border-top: 1px solid rgba(255, 255, 255, 0.1);
                margin: 16px 0;
            }
            
            /* Menu sections (main vs sub) */
            .mobile-menu-main,
            .mobile-menu-sub {
                display: none;
            }
            
            .mobile-menu-main.active,
            .mobile-menu-sub.active {
                display: block;
            }
            
            /* Bottom actions in mobile menu */
            .mobile-menu-actions {
                padding: 24px 32px;
                border-top: 1px solid rgba(255, 255, 255, 0.1);
            }
            
            .mobile-menu-actions .btn-primary {
                display: inline-block;
                width: auto;
                padding: 14px 32px;
                font-size: 1.1rem;
                border-radius: 12px;
                margin-left: 0rem;
            }
            
            .mobile-menu-actions-row {
                display: flex;
                align-items: center;
                gap: 20px;
                margin-top: 20px;
            }
            
            .mobile-menu-actions-row a,
            .mobile-menu-actions-row button {
                color: rgba(255, 255, 255, 0.7);
                font-size: 1.25rem;
                text-decoration: none;
                background: none;
                border: none;
                cursor: pointer;
            }
            
            .mobile-menu-actions-row img {
                width: 32px;
                height: 32px;
                border-radius: 50%;
            }
        }
        
        /* 2. Dropdown Menu - Modern Glass Effect */
        .navbar .dropdown-menu {
            background: rgba(30, 30, 30, 0.95);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
            padding: 8px;
            z-index: 1051;
            animation: dropdownFadeIn 0.2s ease-out;
        }
        
        @keyframes dropdownFadeIn {
            from {
                opacity: 0;
                transform: translateY(-8px) scale(0.96);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        
        /* 3. Dropdown Items - Modern Styling */
        .navbar .dropdown-item {
            border-radius: 8px;
            padding: 10px 12px;
            margin: 2px 0;
            transition: background 0.15s ease, transform 0.1s ease;
            display: flex;
            align-items: center;
            color: rgba(255, 255, 255, 0.9);
        }
        
        .navbar .dropdown-item:hover {
            background: rgba(125, 25, 255, 0.15);
            color: #fff;
            transform: translateX(2px);
        }
        
        .navbar .dropdown-item.active {
            background: rgba(125, 25, 255, 0.2);
            color: #fff;
        }
        
        /* Dropdown item icons */
        .navbar .dropdown-item i {
            width: 18px;
            margin-right: 10px;
            opacity: 0.7;
            font-size: 0.9rem;
        }
        
        .navbar .dropdown-item:hover i {
            opacity: 1;
        }
        
        /* 4. Language Dropdown - Flags & Checkmarks */
        .navbar .dropdown-item .lang-flag {
            margin-right: 8px;
            font-size: 1.1em;
        }
        
        .navbar .dropdown-item.active::after {
            content: '✓';
            margin-left: auto;
            color: #7d19ff;
            font-weight: bold;
        }
        
        /* 5. Dashboard Button - Modern Gradient */
        .navbar .btn-primary {
            background: linear-gradient(135deg, #7d19ff 0%, #9d4eff 100%);
            border: none;
            border-radius: 8px;
            padding: 8px 20px;
            font-weight: 500;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }
        
        .navbar .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(125, 25, 255, 0.4);
            background: linear-gradient(135deg, #8d29ff 0%, #ad5eff 100%);
        }
        
        /* 6. Profile Dropdown - Logout styling */
        .navbar .dropdown-item.text-danger {
            color: #ef4444 !important;
        }
        
        .navbar .dropdown-item.text-danger:hover {
            background: rgba(239, 68, 68, 0.15);
            color: #f87171 !important;
        }
        
        /* 7. Dropdown Divider */
        .navbar .dropdown-divider {
            border-color: rgba(255, 255, 255, 0.1);
            margin: 6px 0;
        }
        
        /* 8. Nav Link Hover State */
        .navbar .nav-link {
            transition: color 0.15s ease;
        }
        
        .navbar .nav-link:hover {
            color: #fff !important;
        }
        
        /* 9. User Avatar - Subtle hover effect + placeholder while loading */
        .navbar .dropdown-toggle img.rounded-circle {
            transition: transform 0.15s ease, box-shadow 0.15s ease;
            border: 2px solid transparent;
            background: rgba(255, 255, 255, 0.1);
        }
        
        .navbar .dropdown-toggle:hover img.rounded-circle {
            transform: scale(1.05);
            box-shadow: 0 0 0 2px rgba(125, 25, 255, 0.5);
        }
        
        /* 10. What's New Bell + Notification Dot */
        .whats-new-bell {
            font-size: 1.1rem;
            padding: 0.5rem !important;
        }
        
        .whats-new-bell:hover {
            color: #7d19ff !important;
        }
        
        .notification-dot {
            position: absolute;
            top: 6px;
            right: 4px;
            width: 8px;
            height: 8px;
            background: #ef4444;
            border-radius: 50%;
            border: 2px solid rgba(26, 26, 26, 0.9);
            animation: notificationPulse 2s ease-in-out infinite;
        }
        
        @keyframes notificationPulse {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
            }
            50% {
                transform: scale(1.1);
                box-shadow: 0 0 0 4px rgba(239, 68, 68, 0);
            }
        }
        
        /* 11. Desktop Navbar Layout - logo left | Features/Resources/Listing centered | right items */
        @media (min-width: 769px) {
            .navbar .mobile-menu-top,
            .navbar .mobile-menu-bottom {
                display: block !important;
            }
            
            .navbar .mobile-menu-container {
                display: flex !important;
                width: 100%;
                align-items: center;
            }
            
            .navbar .mobile-menu-top {
                position: absolute !important;
                left: 50%;
                transform: translateX(-50%);
            }
            
            .navbar .mobile-menu-top .navbar-nav {
                flex-direction: row !important;
                gap: 0.25rem;
            }
            
            .navbar .mobile-menu-bottom {
                position: absolute !important;
                right: 3.5rem;
                padding-right: 1rem !important;
            }
            
            .navbar .mobile-menu-bottom .navbar-nav {
                flex-direction: row !important;
                flex-wrap: nowrap !important;
                align-items: center;
                gap: 0 !important;
            }
            
            /* Consistent spacing for ALL nav items on the right - both regular and dropdown */
            .navbar .mobile-menu-bottom .navbar-nav > li {
                margin: 0 0 0 1rem !important;
                padding: 0 !important;
                flex-shrink: 0;
            }
            
            .navbar .mobile-menu-bottom .navbar-nav > li:first-child {
                margin-left: 0 !important;
            }
            
            .navbar .mobile-menu-bottom .nav-link {
                padding: 0.5rem !important;
            }
            
            .navbar .mobile-menu-bottom .btn-primary {
                margin: 0 !important;
            }
            
            /* Container needs relative positioning */
            .navbar .container-fluid {
                position: relative;
            }
            
            .navbar .navbar-collapse {
                flex: 1 !important;
                justify-content: flex-start !important;
                flex-wrap: nowrap !important;
            }
            
            /* Fix dropdown positioning - dropdowns need relative parent */
            .navbar .nav-item.dropdown {
                position: relative !important;
            }
            
            /* Dropdown menus position relative to their nav-item */
            .navbar .dropdown-menu {
                position: absolute !important;
                top: 100% !important;
                margin-top: 0.5rem !important;
            }
            
            /* Left-side dropdowns (Features, Resources) align left */
            .navbar .mobile-menu-top .dropdown-menu {
                left: 0 !important;
                right: auto !important;
            }
            
            /* Right-side dropdowns (Language, Profile) align right */
            .navbar .mobile-menu-bottom .dropdown-menu {
                left: auto !important;
                right: 0 !important;
            }
            
            /* 12. Hover-to-expand dropdowns (Desktop only) */
            .navbar .nav-item.dropdown .dropdown-menu {
                display: block;
                opacity: 0;
                visibility: hidden;
                transform: translateY(-8px);
                transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
            }
            
            .navbar .nav-item.dropdown:hover > .dropdown-menu,
            .navbar .nav-item.dropdown.show > .dropdown-menu {
                opacity: 1;
                visibility: visible;
                transform: translateY(0);
            }
            
            /* Small delay before closing to prevent accidental close */
            .navbar .nav-item.dropdown .dropdown-menu {
                transition-delay: 0s;
            }
            
            .navbar .nav-item.dropdown:hover > .dropdown-menu {
                transition-delay: 0s;
            }
        }
        
        /* 13. Features Dropdown - Compact Style */
        .navbar .features-menu-compact {
            min-width: 220px;
            padding: 8px;
        }
        
        .navbar .features-menu-compact .dropdown-item {
            padding: 10px 14px;
            font-size: 0.9rem;
        }
        
        .navbar .features-menu-compact .dropdown-item i {
            width: 20px;
            margin-right: 10px;
            text-align: center;
            opacity: 0.7;
        }
        
        .navbar .features-menu-compact .dropdown-item:hover i {
            opacity: 1;
        }
        
        /* Resources Dropdown - Two Column Grid */
        .navbar .resources-menu-grid {
            min-width: 280px;
            padding: 12px 16px;
        }
        
        .navbar .resources-grid-layout {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0 24px;
        }
        
        .navbar .resources-col {
            display: flex;
            flex-direction: column;
        }
        
        .navbar .resources-menu-grid .dropdown-item {
            padding: 8px 4px;
            font-size: 0.9rem;
            font-weight: 500;
            color: rgba(255, 255, 255, 0.85);
        }
        
        .navbar .resources-menu-grid .dropdown-item:hover {
            background: transparent;
            color: #fff;
        }
        /* Ultra-specific selectors to override external CSS */
        nav.navbar .navbar-brand img,
        .navbar .navbar-brand img,
        .header-container .navbar .navbar-brand img {
            height: 40px !important;
            width: 298px !important;
            max-width: none !important;
            display: block !important;
            object-fit: contain !important;
        }
        
        /* Alternative approach: Use background image for logo to prevent FOUC */
        .navbar-brand.logo-bg {
            width: 298px !important;
            height: 40px !important;
            background-image: url("../images/communityone-logo.ba7f5e42e83a.png") !important;
            background-size: contain !important;
            background-repeat: no-repeat !important;
            background-position: center left !important;
            display: block !important;
        }
        
        /* Responsive logo sizing with ultra-specific selectors */
        
        /* Smaller desktop screens (768px - 1200px) - reduce logo and nav spacing */
        @media (min-width: 769px) and (max-width: 1200px) {
            nav.navbar .navbar-brand img,
            .navbar .navbar-brand img,
            .header-container .navbar .navbar-brand img {
                height: 32px !important;
                width: 200px !important;
            }
            
            .navbar-brand.logo-bg {
                width: 200px !important;
                height: 32px !important;
            }
            
            .navbar .nav-item {
                margin-right: 0.15rem !important;
                margin-left: 0 !important;
            }
            
            .navbar-nav .nav-item.dropdown {
                margin-left: 0 !important;
            }
            
            .navbar .nav-link {
                padding: 0.5rem 0.3rem !important;
                font-size: 0.85rem !important;
            }
            
            .navbar .btn-primary {
                padding: 0.4rem 0.7rem !important;
                font-size: 0.8rem !important;
            }
            
            .navbar .dropdown-toggle::after {
                margin-left: 0.1rem !important;
            }
            
            .navbar-nav.ms-auto {
                gap: 0.4rem !important;
            }
        }
        
        @media (max-width: 768px) {
            nav.navbar .navbar-brand img,
            .navbar .navbar-brand img,
            .header-container .navbar .navbar-brand img {
                height: 32px !important;
                width: 239px !important;
            }
            
            .navbar-brand.logo-bg {
                width: 239px !important;
                height: 32px !important;
            }
        }
        
        @media (max-width: 576px) {
            nav.navbar .navbar-brand img,
            .navbar .navbar-brand img,
            .header-container .navbar .navbar-brand img {
                height: 28px !important;
                width: 209px !important;
            }
            
            .navbar-brand.logo-bg {
                width: 209px !important;
                height: 28px !important;
            }
        }
