header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    background-color: rgba(0, 0, 0, 0.7);
    height: 60px;
    position: relative;
}

.logo-link {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    height: 60px;
    width: auto;
}

.menu-button {
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 1001;
    position: absolute;
    right: 15px;
    color: #fff;
    transition: all 0.5s ease;
}

.menu-button span {
    margin-right: 10px;
    font-size: 1.2em;
    transition: all 0.5s ease;
}

.menu-button .diamond {
    width: 30px;
    height: 30px;
}

.menu-button .diamond path {
    stroke-dasharray: 80;
    stroke-dashoffset: 0;
    /* Initially show the diamond */
    transition: stroke-dashoffset 0.5s ease;
}

.menu-button:hover .diamond path {
    stroke-dashoffset: 80;
    /* Play the stroke animation on hover */
}

.menu-button.close span {
    opacity: 0;
    transform: translateX(-50%);
}

.menu-button.close .diamond {
    transform: rotate(0deg);
    border: none;
}

.menu-button.close::before {
    content: 'X';
    position: absolute;
    right: 11px;
    font-size: 0.8em;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

/* Keyframes for the fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.nav-links {
    position: fixed;
    top: 60px;
    /* Adjusted to be below the header */
    left: 0;
    width: 100%;
    height: calc(100% - 60px);
    /* Adjusted to exclude the header height */
    background-color: #000000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    z-index: 1000;
    list-style-type: none;
    /* Remove bullet points */
    padding: 0;
    /* Remove default padding */
    margin: 0;
    /* Remove default margin */
}

.nav-links.active {
    opacity: 1;
    visibility: visible;
}

.nav-links.exiting {
    opacity: 1;
    visibility: visible;
}

.nav-links li {
    margin: 15px 0;
    position: relative;
    /* Ensure relative positioning for child elements */
    opacity: 0;
    /* Initially hidden */
    transform: translateY(20px);
    /* Initially positioned below */
}

.nav-links.active li {
    animation: fadeInUp 0.5s forwards;
    animation-delay: calc(var(--li-index) * 0.1s);
    /* Staggered animation delay */
}

.nav-links.exiting li {
    animation: fadeOutUp 0.5s forwards;
    animation-delay: calc((var(--total-li) - var(--li-index)) * 0.1s);
    /* Reverse staggered animation delay */
}

.nav-links li a {
    text-decoration: none;
    color: #ffffff;
    font-size: 4rem;
    /* Increase text size */
    font-weight: 700;
    /* Make the font bolder */
    font-stretch: extra-expanded;
    padding: 0px 15px;
    display: inline-block;
    position: relative;
    transition: transform 0.3s ease, color 0.3s ease;
    background: linear-gradient(to right, #fff 50%, rgba(255, 255, 255, 0));
    /* Adjust gradient to cover more text */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 60%;
    /* Adjusted to make the fade cover more of the text */
    background: linear-gradient(to right, rgba(255, 255, 255, 0), #000);
    /* Fading effect */
    pointer-events: none;
    /* Make sure the gradient doesn't interfere with clicks */
    transition: background 0.3s ease;
}

.nav-links li a:hover {
    transform: translateX(10px) scale(1.1);
    /* Move text to the right and grow it on hover */
    background: none;
    /* Remove the gradient effect on hover */
    -webkit-text-fill-color: #ffffff;
    /* Ensure the text is fully white on hover */
}

.nav-links li a:hover::after {
    background: none;
    /* Remove the fading effect on hover */
}

/* Keyframes for fade-in animation */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keyframes for fade-out animation */
@keyframes fadeOutUp {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Media Queries for Responsive Text Sizes */
@media (max-width: 768px) {
    .nav-links {
        display: flex; /* Ensure this is flex to align items properly */
    }
}

@media (max-width: 480px) {
    .nav-links li a {
        font-size: 2rem;
        /* Even smaller text size for small mobile devices */
    }
}