/* Skip to main content link for accessibility */
.skip-to-main {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
    padding: 1rem;
    background-color: #367fef;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.skip-to-main:focus {
    left: 0;
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 80px;
    background: linear-gradient(to right,
    #f9f9f9,
    #367fef 20%,
    #367fef 50%,
    #367fef 60%,
    #fcb34c 80%,
    #fcb34c 90%,
    #f9f9f9 100%
    );
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: slideInFromLeft 1.0s ease-out forwards;
    transform-origin: left;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: inherit;
    z-index: 2000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white !important;
    font-weight: bold;
    font-size: 1.1rem;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.4s forwards;
}

.navbar-brand:hover {
    color: white !important;
}


.navbar-brand img {
    width: 45px;
    height: auto;
}

.btn-login {
    background-color: white;
    color: #367fef;
    padding: 6px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeIn 0.5s ease-out 0.4s forwards;
}

.btn-login:hover {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 20px;
    }
}

/* Make all nav links white by default */
.navbar .nav-link {
    color: white !important;
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s ease;
    padding-bottom: 5px;
}

/* Make all dropdown toggles white */
.navbar .nav-link.dropdown-toggle {
    color: white !important;
    border-bottom: 3px solid transparent;
    transition: border-color 0.3s ease;
    padding-bottom: 5px;
}

/* Specifically style the user dropdown to be black */
#userDropdown {
    color: black !important;
}

/* White underline on hover, focus, and when dropdown is open */
.navbar .nav-link:hover,
.navbar .nav-link:focus,
.navbar .nav-link.dropdown-toggle:hover,
.navbar .nav-link.dropdown-toggle:focus,
.navbar .nav-link.dropdown-toggle.show {
    border-bottom-color: white;
    outline: none;
}

/* Visible focus indicator for keyboard navigation */
.navbar .nav-link:focus-visible,
.navbar .nav-link.dropdown-toggle:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Don't apply underline to user dropdown */
#userDropdown {
    border-bottom: none !important;
}

#userDropdown:hover {
    border-bottom: none !important;
}


/* Keep dropdown menu items styling */
.navbar .dropdown-menu {
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 8px 0 !important;
    margin-top: 8px !important;
}

/* Make dropdown items black by default */
.navbar .dropdown-menu .dropdown-item {
    color: black !important;
    padding: 8px 20px !important;
    transition: all 0.2s ease !important;
}

/* Blue hover and focus effect for dropdown items */
.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
    background-color: rgba(54, 127, 239, 0.1) !important;
    color: #367fef !important;
}

/* Focus visible outline for dropdown items */
.navbar .dropdown-menu .dropdown-item:focus-visible {
    outline: 2px solid #367fef;
    outline-offset: -2px;
}

/* Keep dropdown text items like email and name in user menu visible */
.navbar .dropdown-menu .dropdown-item-text {
    color: black !important;
}

/* Navbar spacing for evenly distributed items */
.navbar-nav {
    gap: 2.5rem;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
    .navbar-nav {
        gap: 0;
    }
    
    .navbar-nav .nav-item:not(:first-child):not(.ms-auto) {
        margin-left: 0;
    }
    
    /* Stack items vertically on mobile */
    .navbar-nav .ms-auto {
        margin-left: 0 !important;
    }
}
