/* Modern Navbar Styling */
:root {
    --container-max-width: 1320px;
    --container-padding: 0.75rem;
    --navbar-height-desktop: 80px;
    --navbar-height-mobile: 70px;
    --navbar-height-small: 65px;
}

.modern-navbar {
    background-color: #2c3e50;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    height: var(--navbar-height-desktop);
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    z-index: 1000;
}

.transparent-navbar {
    background-color: rgba(44, 62, 80, 0.95);
}

.navbar-brand {
    padding: 0;
}

.navbar-logo {
    height: 45px;
    width: auto;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.brand-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    color: #ffffff;
    background: transparent;
    position: relative;
    z-index: 1050;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

@media (max-width: 991.98px) {
    .navbar-toggler {
        padding: 0.4rem;
        margin-right: 0.25rem;
    }
}

.navbar-nav {
    align-items: center;
    height: 100%;
}

.navbar-collapse {
    height: 100%;
}

@media (max-width: 991.98px) {
    .navbar-nav {
        align-items: stretch;
    }
}

.nav-item {
    position: relative;
    margin-left: 0;
    margin-right: 0;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link {
    color: #ecf0f1 !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.3rem 0.4rem !important;
    border-radius: 4px;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
    line-height: 1.1;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    color: #3498db !important;
    background-color: rgba(236, 240, 241, 0.1);
}

@media (max-width: 991.98px) {
    .nav-link:hover, .nav-link:active, .nav-link:focus {
        background-color: rgba(255, 255, 255, 0.1);
        transform: translateY(-1px);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }
}

.logout-btn {
    color: #e74c3c !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.5rem !important;
}

.logout-btn i {
    margin-right: 3px;
}

.logout-btn:hover {
    color: #fff !important;
    background-color: rgba(231, 76, 60, 0.8);
}

@media (max-width: 991.98px) {
    .logout-btn {
        padding: 0.5rem !important;
        justify-content: center;
    }
}

.register-btn {
    color: #fff !important;
    background-color: transparent !important; /* Removed blue background */
    padding: 0.45rem 1rem !important;
    border-radius: 3px;
    transition: all 0.3s ease;
    margin-left: 5px;
    border: 1px solid white !important; /* Added border instead */
}

.register-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important; /* Subtle hover effect */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.15);
    color: #fff !important;
}

/* Welcome Bar under navbar */
.user-welcome-bar {
    background-color: #edf2f7;
    border-bottom: 1px solid #e2e8f0;
    padding: 4px 0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
    height: 28px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 950;
    width: 100%;
}

.user-welcome-bar .container {
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: var(--container-max-width, 1320px);
    padding: 0 var(--container-padding, 0.75rem);
    width: 100%;
}

.welcome-message {
    font-size: 0.75rem;
    color: #2c3e50;
    font-weight: 500;
    position: relative;
    padding-left: 8px;
    line-height: 1;
    display: flex;
    align-items: center;
    margin: 0;
    max-width: 60%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: fadeIn 0.8s ease-in-out;
}

.welcome-message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 12px;
    width: 2px;
    background-color: #3498db;
    border-radius: 1px;
}

@media (max-width: 991.98px) {
    .welcome-message::before {
        height: 10px;
    }
}

.welcome-name {
    font-weight: 600;
    color: #3498db;
    margin-left: 3px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-date {
    font-size: 0.7rem;
    color: #7f8c8d;
    line-height: 1;
    display: flex;
    align-items: center;
    margin: 0;
    white-space: nowrap;
    padding-right: 10px;
    animation: fadeIn 0.8s ease-in-out;
}

/* Media queries for responsive navbar */
@media (max-width: 991.98px) {
    .modern-navbar {
        height: 80px;
    }
    
    .navbar-collapse {
        background-color: #2c3e50;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        padding: 0.75rem;
        margin-top: 10px;
        position: absolute;
        top: 100%;
        right: 15px;
        z-index: 1045;
        width: 90%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        overflow-y: auto;
        max-height: calc(100vh - var(--navbar-height-mobile) - 10px);
    }
    
    .navbar-nav {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .nav-item {
        margin: 5px 0;
        height: auto;
        width: 100%;
    }
    
    .register-btn {
        display: inline-block;
        text-align: center;
        margin-top: 5px;
    }
    
    .nav-link {
        color: #ecf0f1 !important;
        text-align: center;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.75rem !important;
        margin: 0.25rem 0;
        border-radius: 4px;
    }
    
    .user-welcome-bar {
        height: 30px;
        top: 0;
        position: relative;
        z-index: 950;
    }
    
    .user-welcome-bar .container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 15px;
    }
    
    .welcome-message {
        max-width: 65%;
    }
    
    .current-date {
        font-size: 0.65rem;
    }
}

@media (max-width: 575.98px) {
    .modern-navbar {
        height: 80px;
        padding: 0.6rem 0;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .navbar-logo {
        height: 40px;
    }
    
    .navbar-collapse {
        width: 85%;
        max-width: 280px;
        top: 100%;
    }
    
    .nav-link {
        padding: 0.65rem !important;
        font-size: 0.8rem;
    }
    
    .user-welcome-bar .container {
        padding: 0 10px;
    }
    
    .welcome-message {
        max-width: 60%;
        font-size: 0.7rem;
    }
    
    .current-date {
        font-size: 0.65rem;
    }
    
    /* Ensure welcome bar stays properly positioned */
    .sticky-top {
        position: sticky;
        top: 0;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar and Welcome Bar Wrapper */
.navbar-and-welcome-wrapper {
    position: relative;
    width: 100%;
}