.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1px 2rem;
    background-color: var(--nav-bg-color);
    position: sticky;
    top: 0;                
    z-index: 1000; 
}

.text-logo {
    margin-top: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: red;
    font-weight: bold;
    display: flex;
}

.navbar {
    margin-top: 0.5rem;
    list-style: none;
    display: flex;
    gap: 2rem;
    border: 1px solid black;
    padding: 0.5rem 1rem;
    border-radius: 8px;

}

.icon-section {
    display: none;

}


.navbar:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease-in-out;
    border: none;
}



.navbar:hover::before {
    opacity: 1;
}

.navbar li a {
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    color: black;
}

.navbar li a:hover {
    color: var(--primary-color);
    background-image: radial-gradient(circle,rgba(255, 98, 0, 1) 0%, rgba(255, 0, 0, 1) 50%, rgba(235, 0, 0, 1) 100%);
    transition: all 0.5s ease-in-out;
    padding: 0.8rem ;
    border-radius: 8px;
    color: #ffffff;
}


nav.scroll {
    background-color: var(--nav-bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.button-nav {
    display: none;
}

@media (max-width: 768px) {
    .navbar {
        display: none;               
        position: absolute;
        top: 0;
        left: 50%;
        margin-top: 30px;
        transform: translate(-50%, -50%);
        justify-content: center;
        align-items: center;
        background-color: white;
        padding: 1rem;
        border: 1px solid rgb(255, 255, 255);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        
    }

    .navbar.active {
        display: flex;               /* ✅ เปิดด้วย JS */
    }

    .text-logo {
        display: none;
    }

    .button-nav {
        display: flex;
        color: red;
        justify-content: center;
        align-items: center;
        background-color: #ffffff;
        border: 1px solid rgb(255, 255, 255);
        padding:  0.5rem ;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.3s ease;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        margin-top: 0.5rem;
        position: absolute;
        left: 85%;
        top: 0;
    }
    }

       
    
    


