
.modern-navbar {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d30 50%, #1e1e1e 100%);
    box-shadow: 0 4px 25px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 1050;

}
.nav-logo {
    height: 50px;
    width: 50px;
    max-width: 50px;
    max-height: 50px;
    border-radius: 50px!important;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
    background-color: white!important;
    padding: 1px!important;
}
.navbar-brand {
    display: flex;
    align-items: center;
    color: #ffffff !important;
    text-decoration: none;
}

.brand-logo {
    width: 35px;
    height: 35px;
    margin-right: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
    background: linear-gradient(135deg, #00d4ff, #5865f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: #888;
    font-weight: 500;
}

.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 212, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.2em;
    height: 1.2em;
}

.nav-link {
    color: rgba(255,255,255,0.85) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 1rem !important;
    border-radius: 6px;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: #00d4ff !important;
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
}

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

.logo-nav-item .nav-link {
    padding: 0.5rem !important;
    justify-content: center;
}

.nav-logo {
    height: 50px;
    width: 50px;
    object-fit: cover;
    object-position: left;
    margin-bottom: 0.25rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

.nav-logo:hover {
    border-color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Desktop Navigation Layout */
@media (min-width: 992px) {
    #main-nav-list {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
    }

    .logo-nav-item {
        flex: 0 0 auto;
    }

    .logo-nav-item .nav-link {
        padding: 0.5rem !important;
        justify-content: center;
        border-radius: 8px;
    }
}

/* Mobile Navigation Grid Layout - 2 per row */
@media (max-width: 991.98px) {
    .project-categories-mobile-grid {
        display: block;
        margin-bottom: 1rem;
    }

    /* Grid container for logo navigation items only */
    .mobile-nav-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        padding: 1rem;
        background: rgba(0,0,0,0.2);
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    /* Style for logo nav items in mobile grid */
    .mobile-nav-grid .logo-nav-item {
        display: flex;
        justify-content: center;
        margin: 0;
    }

    .mobile-nav-grid .logo-nav-item .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 1rem 0.5rem !important;
        background: rgba(255,255,255,0.05);
        border-radius: 12px;
        transition: all 0.3s ease;
        text-align: center;
        width: 100%;
        min-height: 100px;
        text-decoration: none;
    }

    .mobile-nav-grid .logo-nav-item .nav-link:hover,
    .mobile-nav-grid .logo-nav-item .nav-link:focus {
        background: rgba(0, 212, 255, 0.1);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
    }

    .mobile-nav-grid .nav-logo {
        width: 45px;
        height: 45px;
        margin-bottom: 0.5rem;
    }

    .mobile-nav-grid .logo-nav-item span {
        display: block !important;
        font-size: 0.75rem;
        font-weight: 600;
        color: rgba(255,255,255,0.9);
        line-height: 1.2;
        margin-top: auto;
    }

    /* Regular navigation list (non-logo items) - vertical stack */
    #main-nav-list {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    /* Hide logo items from regular nav list on mobile - they'll be in the grid */
    #main-nav-list .logo-nav-item {
        display: none;
    }

    /* Other nav items remain vertical */
    #main-nav-list .nav-item:not(.logo-nav-item) {
        margin-bottom: 0.25rem;
    }
}

/* Very small mobile - keep 2 per row but adjust sizing */
@media (max-width: 480px) {
    .mobile-nav-grid {
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .mobile-nav-grid .logo-nav-item .nav-link {
        padding: 0.75rem 0.25rem !important;
        min-height: 85px;
    }

    .mobile-nav-grid .nav-logo {
        width: 40px;
        height: 40px;
    }

    .mobile-nav-grid .logo-nav-item span {
        font-size: 0.7rem;
    }
}

/* Standard Navigation Link Styles */
.nav-link {
    color: rgba(255,255,255,0.85) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 1rem !important;
    border-radius: 6px;
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: #00d4ff !important;
    background: rgba(0, 212, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.15);
}

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

/* Dropdown Styles */
.dropdown-menu {
    background: rgba(26, 26, 26, 0.95);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    padding: 0.5rem 0;
}

.dropdown-item {
    color: rgba(255,255,255,0.85) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    margin: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(0, 212, 255, 0.1) !important;
    color: #00d4ff !important;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

.dropdown-item i {
    width: 20px;
    margin-right: 10px;
    opacity: 0.8;
}

.dropdown-item:hover i {
    opacity: 1;
}

/* Office Dropdown Optimizations */
@media (min-width: 992px) {
    .dropdown-menu[aria-labelledby="officeDropdown"] {
        max-height: 80vh;
        overflow-y: auto;
        width: 600px;
    }
}

.dropdown-menu[aria-labelledby="officeDropdown"]::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu[aria-labelledby="officeDropdown"]::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
}

.dropdown-menu[aria-labelledby="officeDropdown"]::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 4px;
}

/* Office Tools Grid */
.office-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.office-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s ease;
}

.office-tool-btn:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
}

.office-tool-btn i {
    margin-right: 0.5rem;
}

/* Notification Styles */
.card-img-small {
    width: 50px !important;
    height: 50px !important;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background-color: #f8f9fa; /* Light background for placeholders */
}

.card-img-small img {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.notification-container {
    margin-right: 1rem;
}

.notification-btn {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
}

.notification-btn:hover {
    background: rgba(0, 212, 255, 0.1) !important;
    border-color: rgba(0, 212, 255, 0.3) !important;
    color: #00d4ff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.2);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff3b5c, #ff6b8a);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    border: 2px solid #1a1a1a;
    animation: pulse 2s infinite;
}

.nav-message-badge-static {
    position: static;
    width: auto;
    min-width: 20px;
    padding: 0 7px;
    border-radius: 999px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.notification-menu {
    width: 340px !important;
    max-height: 450px;
    overflow-y: auto;
    background: rgba(20, 20, 20, 0.95) !important;
    color: #ffffff !important;
}

.notification-menu .text-muted,
.notification-menu .text-white\/60,
.notification-menu .text-white\/50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

.notification-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    color: #ffffff !important;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    color: #ffffff !important;
}

.notification-item:hover {
    background: rgba(0, 212, 255, 0.05);
    transform: translateX(5px);
}

/* User Avatar */
.user-avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.avatar-nav-item {
    display: flex;
    align-items: center;
}

.avatar-nav-item .nav-link {
    margin: 0;
    padding: 0.5rem 1rem;
}

/* Bootstrap Select Override */
.bootstrap-select .dropdown-menu {
    z-index: 10000 !important;
}

/* Navbar Toggler */
.navbar-toggler {
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 212, 255, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.2em;
    height: 1.2em;
}

/* Special Styles */
.my-jobs {
    background: linear-gradient(135deg, #00d4ff, #5865f2) !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 20px !important;
    padding: 0.6rem 1.5rem !important;
    margin-left: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.my-jobs:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
    color: white !important;
}

.logout {
    color: #ff6b8a !important;
    font-weight: 600;
}

.logout:hover {
    background: rgba(255, 107, 138, 0.1) !important;
    color: #ff3b5c !important;
}

/* Mobile Optimizations */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(26, 26, 26, 0.98);
        border-radius: 12px;
        margin-top: 0.5rem;
        padding: 1rem;
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }

    .navbar-nav {
        width: 100%;
    }

    .nav-item {
        margin-bottom: 0.25rem;
    }

    .nav-link {
        padding: 1rem !important;
        font-size: 1rem;
        border-radius: 8px;
    }

    .dropdown-menu {
        width: 100% !important;
        margin-top: 0.5rem;
        transform: none !important;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
    }

    .notification-menu {
        width: 100% !important;
        position: static !important;
        margin-top: 0.5rem;
        transform: none !important;
    }

    .notification-btn {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }

    .my-jobs {
        width: 100%;
        margin: 0.5rem 0 0 0;
        padding: 0.75rem 1rem !important;
        font-size: 1.1rem;
    }

    .navbar-nav.mr-auto {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .navbar-nav.ml-auto {
        margin-top: 1rem;
    }
}

/* Tablet optimizations */
@media (min-width: 768px) and (max-width: 991px) {
    .brand-title {
        font-size: 1.2rem;
    }

    .brand-subtitle {
        font-size: 0.75rem;
    }
}

/* Small mobile phones */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .brand-logo {
        width: 30px;
        height: 30px;
        margin-right: 6px;
    }

    .brand-title {
        font-size: 1rem;
    }

    .brand-subtitle {
        font-size: 0.65rem;
    }

    .navbar-collapse {
        margin-top: 0.25rem;
        padding: 0.75rem;
    }

    .nav-link {
        padding: 0.75rem !important;
        font-size: 0.95rem;
    }

    .office-tool-btn {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .notification-menu {
        width: calc(100vw - 2rem) !important;
        left: 1rem !important;
        right: 1rem !important;
    }

    .notification-header,
    .notification-item {
        padding: 0.75rem;
    }
}

/* Very small screens */
@media (max-width: 350px) {
    .brand-text {
        display: none;
    }

    .brand-logo {
        margin-right: 0;
    }

    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Landscape mobile optimization */
@media (max-width: 991px) and (orientation: landscape) {
    .navbar-collapse {
        max-height: 70vh;
        overflow-y: auto;
    }

    .notification-menu {
        max-height: 50vh;
    }
}

/* Touch-friendly improvements */
@media (pointer: coarse) {
    .nav-link {
        min-height: 44px;
    }

    .dropdown-item {
        min-height: 44px;
    }

    .office-tool-btn {
        min-height: 44px;
    }

    .notification-btn {
        min-height: 44px;
    }
}

/* Performance Optimizations */
.nav-logo {
    will-change: transform;
}

.nav-link {
    will-change: transform, background-color;
}

.dropdown-menu.show {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus improvements for accessibility */
.nav-link:focus,
.dropdown-item:focus,
.office-tool-btn:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

.navbar-toggler:focus {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modern-navbar {
        background: #000;
        border-bottom: 2px solid #fff;
    }

    .nav-link {
        color: #fff !important;
    }

    .dropdown-menu {
        background: #000;
        border: 2px solid #fff;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
.nav-logo {
    height: 50px;
    width: 50px;
    object-fit: cover;
    object-position: left;
    margin-bottom: 0.25rem;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.3s ease;
}

/* Notification dropdown fixes */
.notification-dropdown-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

.dropdown-backdrop {
    position: relative;
}

.dropdown-backdrop::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1040;
    pointer-events: none;
}

/* Ensure notification menu stays on top */
.notification-menu {
    position: absolute !important;
    z-index: 1050 !important;
    right: 0 !important;
    top: 100% !important;
    margin-top: 0.5rem !important;
    transform: none !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 450px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
}

.notification-menu.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Disable Bootstrap dropdown behavior for notifications */
.notification-container .dropdown-toggle::after {
    display: none;
}

.notification-container.dropdown .dropdown-menu {
    display: block;
}

/* Prevent clicking through the backdrop */
.notification-container .dropdown-menu.show {
    display: block !important;
}

/* Mobile dropdown improvements */
@media (max-width: 991px) {
    .notification-menu {
        position: fixed !important;
        right: 1rem !important;
        left: 1rem !important;
        top: auto !important;
        bottom: 1rem !important;
        width: auto !important;
        max-height: 60vh !important;
        margin-top: 0 !important;
    }

    .notification-dropdown-open {
        height: 100vh !important;
    }
}
/* Add these new styles to the existing nav.css file */

/* Notification dropdown fixes */
.notification-dropdown-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

.dropdown-backdrop {
    position: relative;
}

.dropdown-backdrop::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1040;
    pointer-events: none;
}

/* Ensure notification menu stays on top but below modals */
.notification-menu {
    position: absolute !important;
    z-index: 1050 !important;
    right: 0 !important;
    top: 100% !important;
    margin-top: 0.5rem !important;
    transform: none !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    max-height: 450px !important;
    overflow-y: auto !important;
}

/* Hide notification dropdown when modal is open */
.modal-open .notification-menu,
body.tw-modal-open .notification-menu {
    display: none !important;
}

/* Ensure notification button stays accessible */
.modal-open .notification-container,
body.tw-modal-open .notification-container {
    z-index: 1055 !important;
    position: relative;
}

.notification-menu.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto !important;
    transform: translateY(0);
}

/* Disable Bootstrap dropdown behavior for notifications */
.notification-container .dropdown-toggle::after {
    display: none;
}

.notification-container.dropdown .dropdown-menu {
    display: block;
}

/* Prevent clicking through the backdrop */
.notification-container .dropdown-menu.show {
    display: block !important;
}

/* Notification header close button */
.notification-close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    line-height: 1;
}

.notification-close-btn:hover {
    background: rgba(255, 59, 92, 0.2);
    border-color: rgba(255, 59, 92, 0.4);
    color: #ff3b5c;
}

.notification-header {
    position: relative;
    padding: 1rem 3rem 1rem 1rem; /* Extra right padding for close button */
}

/* Mobile dropdown improvements */
@media (max-width: 991px) {
    .notification-menu {
        position: fixed !important;
        right: 1rem !important;
        left: 1rem !important;
        top: auto !important;
        bottom: 1rem !important;
        width: auto !important;
        max-height: 60vh !important;
        margin-top: 0 !important;
    }

    .notification-dropdown-open {
        height: 100vh !important;
    }

    /* On mobile, make sure the close button is more prominent */
    .notification-close-btn {
        width: 35px;
        height: 35px;
        font-size: 18px;
        background: rgba(255, 255, 255, 0.15);
    }
}

/* Full-screen mobile navigation */
@media (max-width: 991.98px) {
    .modern-navbar .navbar-collapse.collapsing,
    .modern-navbar .navbar-collapse.show {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100vh;
        width: 100vw;
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d30 100%);
        z-index: 1051;
        overflow-y: auto;
        padding: 5rem 1rem 2rem 1rem; /* Add top padding for status bar */
        border-radius: 0;
        margin-top: 0;
        border: none;
        box-shadow: none;
        display: flex;
        flex-direction: column;
    }

    .modern-navbar .navbar-toggler {
        z-index: 1052; /* Keep toggler above the menu */
    }

    /* We need a way to close the full-screen menu.
       The toggler button will now act as a close button when the menu is open. */
    .modern-navbar .navbar-toggler[aria-expanded="true"] {
        position: fixed;
        top: 1rem;
        right: 1rem;
    }

    .modern-navbar .navbar-nav {
        height: 100%;
    }
}


/* Additional styles for Tailwind navigation */

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notification badge pulse animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

#notificationCount:not(.hidden) {
    animation: pulse 2s infinite;
}

/* Dropdown animations */
.dropdown-menu {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile nav slide in */
#mobileNav {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Notification menu scrollbar */
.notification-menu::-webkit-scrollbar {
    width: 8px;
}

.notification-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.notification-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 4px;
}

.notification-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}

/* Office dropdown scrollbar */
.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

.dropdown-menu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 4px;
}

/* Focus styles for accessibility */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

/* Touch-friendly tap targets */
@media (pointer: coarse) {
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Mobile dropdown icon rotation */
.mobile-dropdown-icon {
    transition: transform 0.3s ease;
}

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    nav {
        background: #000 !important;
        border-bottom: 2px solid #fff !important;
    }

    .dropdown-menu {
        background: #000 !important;
        border: 2px solid #fff !important;
    }
}

/* Prevent body scroll when mobile nav is open */
body.mobile-nav-open {
    overflow: hidden;
}

/* Smooth logo hover effects */
.nav-logo {
    will-change: transform, border-color, box-shadow;
}

/* Dropdown positioning helpers */
.dropdown-menu {
    min-width: 200px;
}

/* Category logo grid alignment */
#desktop-category-logos {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

#desktop-category-logos::-webkit-scrollbar {
    display: none;
}

/* Mobile category grid improvements */
#mobile-category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* Ensure dropdowns don't overflow viewport */
@media (max-width: 768px) {
    .dropdown-menu {
        max-width: calc(100vw - 2rem);
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
    }
}

/* Link hover states */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* Custom scrollbar for mobile nav */
#mobileNav::-webkit-scrollbar {
    width: 6px;
}

#mobileNav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

#mobileNav::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.3);
    border-radius: 3px;
}

/* Prevent text selection on buttons */
button {
    user-select: none;
    -webkit-user-select: none;
}

/* Modal backdrop */
#notificationDetailModal {
    backdrop-filter: blur(8px);
}

/* Smooth height transitions for dropdowns */
.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-dropdown-menu:not(.hidden) {
    max-height: 2000px;
}

/* Z-index layers */
nav {
    z-index: 1050;
}

.dropdown-menu {
    z-index: 1051;
}

.notification-menu {
    z-index: 1052;
}

#mobileNav {
    z-index: 1060;
}

#notificationDetailModal {
    z-index: 1070;
}

/* Performance optimizations */
.dropdown-menu,
.notification-menu {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Gradient text fix for Safari */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* Ensure proper stacking context */
.dropdown,
.notification-container {
    position: relative;
    isolation: isolate;
}
