/* Reset and Body */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

/* Navbar Container */
#nav-ctn {
    position: absolute;
    background-color: #fff;
    top: 32px;
    left: 0;
    width: 80%; 
    margin-left:10%;
    margin-right: 10%;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 25px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    padding: 16px 32px;
    z-index: 1000;
    transition: 0.3s ease-in-out;
    height: 80px;
    
    font-weight: 200;
}

#nav-ctn.scrolled-nav {
    position: fixed;
    top: 0;
    left: 0;
    margin-left: 0;
    margin-right: 0;
    height: 50px;
    width: 100%;
    border-radius: 0;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); 
    padding: 0.5rem 1rem;
    transition: 0.5s;
}

#nav-ctn.nav-active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

#nav-ctn.scrolled-nav a{
    transform: scale(0.9);
    transition: 0.5s;
    align-items: start;
}

a{
    transition: 0.5s;
}

#nav-ctn.scrolled-nav li{
    transform: scale(0.8);
    transition: 0.5s;
}

li{
    transition: 0.5s;
    display: flex;
    align-items: center;
}

/* Navbar */
#nav {
    width: 90%; /* Constrain navbar content */
    max-width: 1200px; /* Optional: prevent items from stretching too wide */
    display: flex;
    align-items: center;
    justify-content: space-between; /* Ensure space between logo and hamburger */
    height: 80px; /* Ensure the height remains fixed */
}

/* Logo */

#logo {
    display: flex;
    align-items: center;
    margin-left: -20px;
}

#logo img {
    height: 40px;
}

/* Navbar Items */
#nav-buttons {
    list-style: none;
    display: flex;
    gap: 2rem;
}

#nav-buttons li a {
    font-family: 'Lato', sans-serif;
    color: #0c0050;
    font-size: 1rem;
    font-weight: 200;
    transition: color 0.3s ease;
    margin-left: 0px;
}

#nav-buttons li a:hover {
    color: #6495ED;
}


/* Queries */

@media (max-width: 990px) {
    #nav-ctn {
        interpolate-size: allow-keywords;
        transition: height 0.3s ease;
        height: 50px;
    }
    
    #nav{
        height: 80px; /* Ensure the height remains fixed */
        display: flex;
        justify-content: space-between; /* Ensure space between logo and hamburger */
        
    }
    
    #nav-buttons{
        interpolate-size: allow-keywords;
        transition: height 0.3s ease;
        height: auto;
        display: none;
        justify-content: start;
        align-items: start;
        flex-direction: column;
        position: absolute;
        top: 50px; /* Position the nav buttons below the fixed height container */
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 1rem;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    }

   
    #nav-buttons.active li:nth-child(2) a {
        transform: translateX(-1px); /*I don't know why this one was moving to the right but this fixed it...*/
    }

    #nav-buttons.active{
        height: auto;
        display: flex;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 25px;
        border-bottom-right-radius: 25px;
    }

    #nav-buttons li a{
        font-size: clamp(0.7rem, 2vw, 1rem);
    }

    #logo{
        display: flex;
        transform: scale(0.8)
    }

    #hamburger{
        height: 30px;
        width: 30px;
        margin-left: auto;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #hamburger span {
        height: 5px;
        width: 100%;
        background-color: #0c0050;
        border-radius: 25px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        transition: .3s ease;
    }

    #hamburger span:nth-child(1) {
        top: 25%;
    }

    #hamburger span:nth-child(3) {
        top: 75%;
    }

    #hamburger.active span:nth-child(1) {
        top: 50%;
        transform: rotate(45deg);
    }

    #hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    #hamburger.active span:nth-child(3) {
        top: 50%;
        transform: rotate(-45deg);
    }
}

@media (max-width: 815px) {
    #nav-ctn{
        text-align: start;
    }
    
}