﻿/* Reset CSS cơ bản */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

:root {
    --primary-color: #6c5ce7;
    --text-color: #2d3436;
    --bg-glass: rgba(255, 255, 255, 0.8);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 8%;
    background: var(--bg-glass);
    backdrop-filter: blur(10px); /* Hiệu ứng mờ đục cực sang */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: 1px;
}

    .logo span {
        color: var(--primary-color);
    }

.nav-list {
    display: flex; /* Dòng này cực kỳ quan trọng, nó phải ở đây */
    list-style: none;
    align-items: center;
}


.nav-link {
    margin: 0 15px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    transition: 0.3s;
}

    /* Hiệu ứng gạch chân chạy từ giữa ra */
    .nav-link::after {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: -5px;
        left: 50%;
        background: var(--primary-color);
        transition: 0.3s;
        transform: translateX(-50%);
    }

    .nav-link:hover::after {
        width: 100%;
    }

.btn-action {
    background: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    margin-left: 20px;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

/* Ẩn nút hamburger trên máy tính */
.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: white;
    transition: 0.3s ease-in-out;
}

/* Thanh giữa biến mất */
.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

/* Thanh trên cùng dịch xuống 8px và xoay 45 độ */
.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

/* Thanh dưới cùng dịch lên 8px và xoay -45 độ */
.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive cho Mobile (Dưới 768px) */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-list {
        position: fixed;
        right: -100%; /* Giấu menu */
        top: 0;
        height: 100vh;
        width: 70%; /* Chỉ chiếm 70% màn hình */
        background: white;
        flex-direction: column;
        justify-content: center;
        transition: 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55); /* Hiệu ứng đàn hồi */
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }

        .nav-list.active {
            right: 0;
        }

    .nav-list.active {
        right: 0; /* Kéo menu vào khi bấm nút */
    }

    .nav-list li {
        margin: 1.5rem 0;
    }

    .overlay.active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(4px);
        z-index: 999;
    }
}
