/* Apple-inspired Navbar Styles */
.railway-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 100px;
    overflow: visible;
    z-index: 1001;
    margin-top: 0;
}

.railway-navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    /*animation: shimmer 3s infinite;*/
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Brand Section Styles */
.navbar-brand-section {
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.logo-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
}

.logo-container:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.logo-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.logo-container:hover .logo-glow {
    opacity: 1;
}

.railways-logo, .sampark-logo {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo-container:hover .railways-logo,
.logo-container:hover .sampark-logo {
    transform: scale(1.1);
}

/* System Name Styles */
.system-name-container {
    margin-left: 1rem;
    text-align: left;
}

.system-name {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(45deg, #ffffff, #e2e8f0, #ffffff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.system-full-name {
    font-size: 2rem;
    margin: 0;
    color: rgba(29, 27, 27, 0.8);
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Navigation Links Styles */
.navbar-nav {
    gap: 0.5rem;
}

.nav-link-animated {
    position: relative;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.022em;
    color: var(--apple-black, #000000);
    text-decoration: none;
    min-height: 44px;
}

.nav-link-animated:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--apple-blue, #0088cc);
    text-decoration: none;
}

/* Active state for navigation links */
.nav-link-animated.active {
    background: var(--apple-blue, #0088cc);
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
    transform: translateY(-1px);
}

.nav-link-animated.active:hover {
    background: var(--apple-blue, #0088cc);
    color: white !important;
    transform: translateY(-1px);
}

.nav-link-animated.active i {
    transform: scale(1.1);
}

.nav-link-animated i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.nav-link-animated:hover i {
    transform: scale(1.2);
}

/* Apple-inspired Dropdown Styles */
.dropdown-menu-animated {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: dropdownFadeIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1001 !important;
    position: absolute !important;
    padding: 8px;
}

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

.dropdown-item {
    color: var(--apple-black, #000000);
    padding: 12px 16px;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 12px;
    margin: 2px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.022em;
    min-height: 44px;
}

.dropdown-item:hover {
    background: var(--apple-blue, #0088cc);
    color: white;
    transform: scale(1.02);
}

/* Active state for dropdown items */
.dropdown-item.active {
    background: var(--apple-blue, #0088cc);
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.dropdown-item.active:hover {
    background: var(--apple-blue, #0088cc);
    color: white !important;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

/* Specific styles for right-aligned dropdowns */
.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
    z-index: 1001 !important;
    position: absolute !important;
    min-width: 200px;
}

/* Ensure dropdown toggle shows properly */
.dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Fix dropdown visibility issues */
.nav-item.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    float: left;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
}

.dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure customer dropdown is visible */
#customerDropdownMenu {
    z-index: 1001;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#customerDropdownMenu.show {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* User Profile Styles */
.user-profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
    color: #000000;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.user-profile-link:hover {
    background: rgba(255, 255, 255, 1);
    color: #000000;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.2);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3b82f6, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #000000;
}

.user-role {
    font-size: 0.7rem;
    opacity: 0.8;
    font-weight: 400;
    color: #000000;
}

/* User Profile Header in Dropdown */
.user-profile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3b82f6, #1e40af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin: 0.25rem;
}



/* Special Link Styles */
.login-link, .register-link {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.login-link {
    background: linear-gradient(45deg, #10b981, #059669);
}

.register-link {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.login-link:hover, .register-link:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.logout-link {
    color: #ef4444 !important;
}

.logout-link:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Custom Toggler */
.custom-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.custom-toggler:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

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

/* Responsive Design */
@media (max-width: 991.98px) {
    .railway-navbar {
        top: 120px;
    }
    
    .navbar-brand-section {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .system-name {
        font-size: 1.5rem;
    }
    
    .system-full-name {
        font-size: 0.7rem;
    }
    
    .logo-container {
        width: 50px;
        height: 50px;
    }
    
    .railways-logo, .sampark-logo {
        width: 35px;
        height: 35px;
    }
    
    .user-profile-link {
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }
    
    .user-info {
        align-items: center;
    }
    
    .dropdown-menu-end {
        right: auto !important;
        left: 0 !important;
        width: 100%;
        min-width: auto;
    }
    
    .notification-dropdown {
        width: 300px;
        left: -250px !important;
    }
}

@media (max-width: 768px) {
    .railway-navbar {
        top: 140px;
    }
}

@media (max-width: 576px) {
    .railway-navbar {
        top: 160px;
        padding: 0.25rem 0.5rem;
    }
    
    .system-name {
        font-size: 1.2rem;
    }
    
    .system-full-name {
        font-size: 0.6rem;
    }
    
    .nav-link-animated {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .railway-navbar {
        top: 180px;
    }
}
