/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2b3e50;
    padding: 20px;
    color: white;
    font-family: Arial, sans-serif;
    position: relative;
    z-index: 1100;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-logo-link {
    text-decoration: none;
    display: inline-block;
    width: 150px;
    height: 41px;
    background-image: url('../../content/images/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 35px;
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 22px;
    width: 25px;
    cursor: pointer;
    position: relative;
    z-index: 1100;
    /* Ensure it's above the menu-links */
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Animate to X */
.hamburger-menu.open span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.hamburger-menu.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Menu Links */
.menu-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 40px;
    background-color: #2b3e50;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 15px 20px;
}

.menu-links.active {
    display: flex;
}

.menu-links a {
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    margin: 8px 0;  /* Consistent vertical spacing */
    border-radius: 5px;
    background-color: #0099cc;
    transition: background-color 0.3s ease, transform 0.3s ease;
    width: 100%;    /* Full width buttons */
    box-sizing: border-box;
    text-align: left;
}

.menu-links a:hover {
    background-color: #0078a3;
    transform: scale(1.05);
}

.menu-links.active {
    height: fit-content;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;  /* Center items vertically */
    gap: 12px;  /* Space between icon and welcome text */
    font-size: 16px;
}

.menu-links .user-info {
    display: none;
}

.logout-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 12px 20px;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.logout-btn:hover {
    background-color: #d32f2f;
}

/* Small Screen Full-Screen Menu */
@media (max-width: 768px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .menu-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;         /* Full viewport width */
        height: 100vh;        /* Full viewport height */
        min-height: 100vh;    /* Ensure minimum height covers screen */
        background-color: #2b3e50;
        padding: 80px 16px 20px;
        margin: 0;
        border-radius: 0;
        overflow-y: auto;
        box-sizing: border-box;
        z-index: 1050;        /* Make sure it's above other content but below hamburger */
    }

    .menu-links.active {
        display: flex;
    }

    /* Add this to prevent background content from scrolling */
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    .menu-links a {
        margin: 4px 0;  /* Tighter spacing on mobile */
        padding: 16px 20px;  /* Slightly taller buttons */
        font-size: 16px;
        text-align: left;
        background-color: #0099cc;
        border: none;
        width: 100%;
    }

    .menu-links .user-info {
        display: flex;
        padding: 20px 0;  /* Consistent padding */
        margin-bottom: 10px;
        color: white;
    }

    .logout-btn {
        width: 100%;
        margin: 4px 0;
        padding: 16px 20px;
        font-size: 16px;
        text-align: left;
        border-radius: 5px;
    }

    .navbar-right .user-info {
        display: none;
    }

    .user-info {
        font-size: 18px;
    }

    .hamburger-menu {
        padding: 0px;
    }
}

.user-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;  /* Center the SVG horizontally */
}

.user-icon svg {
    width: 100%;
    height: 100%;
}

/* Ensure the welcome text is vertically centered */
.user-info span {
    display: flex;
    align-items: center;
}