
.navbar {
    background: linear-gradient(135deg, #0274be 0%, #003bb1 100%);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #003bb1 0%, #002080 100%);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

/* ===================================
   Logo Section
   =================================== */

.navbar .logo {
    display: flex;
    align-items: center;
    z-index: 1001;
    height: 100%;
    width: 100%;
    gap: var(--space-2, 0.75rem);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md, 0.5rem);
    
}

.navbar .logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.75rem);
    text-decoration: none;
    transition: transform 0.3s ease;

}

.navbar .logo-link:hover {
    transform: scale(1.05);
}

.navbar .logo-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
    border-radius: var(--radius-md, 0.5rem);
}

.navbar .logo-image {
    height: 80px;
    width: 100px;
    display: block;
    border-radius: var(--radius-md, 0.5rem);
    object-fit: contain;
}

.navbar .logo-text {
    color: var(--white, #ffffff);
    font-size: var(--text-xl, 1.5rem);
    font-weight: var(--font-bold, 700);
    margin: 0;
    font-family: var(--font-heading, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    letter-spacing: -0.5px;
}

/* ===================================
   Mobile Menu Toggle
   =================================== */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-3, 1rem);
    z-index: 1001;
    border-radius: var(--radius-md, 0.5rem);
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-toggle:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.hamburger-icon {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.hamburger-icon span {
    width: 100%;
    height: 2px;
    background: var(--white, #ffffff);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active .hamburger-icon span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===================================
   Navigation Menu
   =================================== */

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-1, 0.5rem);
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--white, #ffffff);
    text-decoration: none;
    padding: var(--space-3, 1rem) var(--space-4, 1.5rem);
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.75rem);
    border-radius: var(--radius-md, 0.5rem);
    transition: all 0.3s ease;
    font-weight: var(--font-medium, 500);
    font-size: var(--text-sm, 0.95rem);
    white-space: nowrap;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--white, #ffffff);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: calc(100% - 32px);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
}

.nav-link:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.nav-link i {
    font-size: var(--text-base, 1rem);
}

/* ===================================
   Dropdown Menu
   =================================== */

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown.active .dropdown-icon,
.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--white, #ffffff);
    min-width: 220px;
    border-radius: var(--radius-lg, 0.75rem);
    box-shadow: var(--shadow-xl, 0 20px 40px rgba(0, 0, 0, 0.15));
    list-style: none;
    padding: var(--space-2, 0.75rem);
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: var(--z-dropdown, 1050);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown:hover .dropdown-menu,
.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-link {
    color: var(--gray-700, #374151);
    padding: var(--space-3, 1rem) var(--space-4, 1.5rem);
    display: flex;
    align-items: center;
    gap: var(--space-3, 1rem);
    border-radius: var(--radius-md, 0.5rem);
    transition: all 0.2s ease;
    font-size: var(--text-sm, 0.95rem);
    text-decoration: none;
}

.dropdown-link:hover {
    background: var(--primary-50, #eff6ff);
    color: var(--primary-700, #1d4ed8);
    transform: translateX(5px);
}

.dropdown-link:focus {
    outline: 2px solid var(--primary-500, #3b82f6);
    outline-offset: -2px;
}

.dropdown-link i {
    width: 18px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200, #e5e7eb);
    margin: var(--space-2, 0.75rem) 0;
}

/* ===================================
   User Profile Section
   =================================== */

.user-dropdown .dropdown-menu {
    right: 0;
    left: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.75rem);
    padding: var(--space-2, 0.75rem) var(--space-3, 1rem);
}

.profile-img-small {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full, 9999px);
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.user-profile:hover .profile-img-small {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.user-name {
    font-weight: var(--font-semibold, 600);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-link {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: var(--white, #ffffff) !important;
    font-weight: var(--font-semibold, 600) !important;
    padding: var(--space-3, 1rem) var(--space-4, 1.5rem) !important;
    border-radius: var(--radius-md, 0.5rem) !important;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3) !important;
    border: 2px solid rgba(220, 38, 38, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
    margin: var(--space-2, 0.75rem) 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: var(--space-2, 0.75rem) !important;
    text-decoration: none !important;
}

.logout-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.logout-link:hover::before {
    left: 100%;
}

.logout-link:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(220, 38, 38, 0.3) !important;
}

.logout-link:active {
    transform: translateY(0) scale(0.98) !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3), 0 1px 4px rgba(0, 0, 0, 0.1) !important;
}

/* ===================================
   Login Button
   =================================== */

.btn-login {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    color: var(--primary-700, #1d4ed8) !important;
    font-weight: var(--font-semibold, 600) !important;
    padding: 5px !important;
    border-radius: 5px !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2), 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(37, 99, 235, 0.1) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%) !important;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3), 0 4px 15px rgba(0, 0, 0, 0.15);
    border-color: rgba(37, 99, 235, 0.3) !important;
}

.btn-login:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.2), 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* ===================================
   Responsive Design - Tablet
   =================================== */

@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        box-shadow: var(--shadow-xl, 0 20px 40px rgba(0, 0, 0, 0.15));
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 0;
    }

    .nav-menu.active {
        max-height: calc(100vh - 70px);
        padding: var(--space-4, 1.5rem);
        overflow-y: auto;
    }

    .nav-menu > li {
        width: 100%;
        opacity: 0;
        transform: translateX(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-menu.active > li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active > li:nth-child(1) { transition-delay: 0.05s; }
    .nav-menu.active > li:nth-child(2) { transition-delay: 0.1s; }
    .nav-menu.active > li:nth-child(3) { transition-delay: 0.15s; }
    .nav-menu.active > li:nth-child(4) { transition-delay: 0.2s; }
    .nav-menu.active > li:nth-child(5) { transition-delay: 0.25s; }
    .nav-menu.active > li:nth-child(6) { transition-delay: 0.3s; }
    .nav-menu.active > li:nth-child(7) { transition-delay: 0.35s; }

    .nav-link {
        width: 100%;
        padding: var(--space-4, 1.5rem);
        justify-content: flex-start;
        border-radius: var(--radius-lg, 0.75rem);
    }

    .nav-link::before {
        display: none;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        margin: var(--space-2, 0.75rem) 0 0 var(--space-4, 1.5rem);
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown.active .dropdown-menu {
        max-height: 400px;
        padding: var(--space-2, 0.75rem);
    }

    .dropdown-link {
        color: var(--white, #ffffff);
        padding: var(--space-3, 1rem);
    }

    .dropdown-link:hover {
        background: rgba(255, 255, 255, 0.2);
        color: var(--white, #ffffff);
    }

    .user-dropdown .dropdown-menu {
        right: auto;
        left: 0;
        margin-left: var(--space-4, 1.5rem);
    }

    .btn-login {
        width: 100%;
        justify-content: center;
        margin-top: var(--space-2, 0.75rem);
    }
}

/* ===================================
   Responsive Design - Mobile
   =================================== */

@media (max-width: 640px) {
    .nav-container {
        padding: 0 var(--space-3, 1rem);
        min-height: 60px;
    }

    .navbar {
        min-height: 60px;
    }

    .nav-menu {
        top: 60px;
    }

    .navbar .logo-text {
        font-size: var(--text-lg, 1.25rem);
    }

    .navbar .logo-image {
        height: 80px;
    }

    .nav-link {
        font-size: var(--text-base, 1rem);
        padding: var(--space-3, 1rem);
    }

    .user-name {
        max-width: 100px;
    }

    .profile-img-small {
        width: 32px;
        height: 32px;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .navbar {
        display: none;
    }
}

/* ===================================
   Accessibility - Reduced Motion
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .navbar,
    .nav-link,
    .dropdown-menu,
    .mobile-menu-toggle,
    .hamburger-icon span,
    .nav-menu > li {
        transition: none;
    }
}