li {
    list-style: none;
}
.menu-nav-custom {
    background-color: rgb(120, 180, 61);
}
.nav-items-custom {
    height: 100%;
    flex-grow: 1;
    position: relative;
    width: 100%;
    margin-top: 0;
    /* margin-left: 30px; */
}
.nav-items-custom:hover .sub-menu-custom {
    display: block
}
.nav-bars-custom{
    display: flex;
    position: relative;
    margin-bottom: 0;
}
.menu-items-custom {
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    font-weight: bold;
    color: white;
    font-size: 12px;
}
.menu-items-custom:hover{
    background-color: green;
}
.sub-menu-custom {
    display: none;
    position: absolute;
    background-color: white;
    margin-left: 0;
    min-width: 230px;
    max-width: max-content;
    border: 1px solid whitesmoke;
    padding-left: 0; /* Loại bỏ lùi của các mục li trong submenu */
    margin-top: 0; /* Loại bỏ margin-top mặc định */
    z-index: 999;
}
.sub-menu-custom li {
    width: 100%;
    padding: 10px;
    position: relative;
}
.sub-menu-custom li:hover {
    background-color:rgb(120, 180, 61);
}
.sub-menu-custom li::after {
content: "";
display: block;
width: 100%;
height: 1px;
background-color:whitesmoke;
position: absolute;
bottom: 0;
left: 0;
transition: opacity 0.3s ease; /* Hiệu ứng hiển thị */
}
.sub-menu-custom>li:first-child::before {
content: "";
display: block;
width: 100%;
height: 2px;
background-color: green;
position: absolute;
top: 0;
left: 0;
}
.sub-menu-items-custom {
    color: black;
    width: 100%;
    padding: 10px;
    margin-left: 20px;
}
.sub-menu-items-custom:hover {
    color: white;
}
/* New CSS for submenu items hover */
.sub-menu-active {
    background-color: green;
}
@media screen and (min-width:780px) {
    .bar-custom,.home-custom{
        display: none;
    }
    .menu-responsive{
        display: none;
    }
}
@media screen and (max-width:780px) {
    .menu-nav-custom{
        display: flex;
        align-items: center;
        height: 50px;
        justify-content: space-between;
        position: relative;
    }
    .bar-custom{
        display: block;
        scale: 1.5;
        cursor: pointer;
        margin-right: 40px;
    }
    .home-custom{
        display: flex;
        scale: 1.5;
        cursor: pointer;
        margin-left: 40px;
    }
    .nav-bars-custom{
        display: none;
    }
    .menu-line{
        width: 20px;
        height: 2px ;
        background-color: white;
        position: relative;
    }
    .menu-line::before{
        content: '';
        width: 20px;
        height: 2px ;
        background-color: white;
        position: absolute;
        top: -6px;
        display: block;
    }
    .menu-line::after{
        content: '';
        width: 20px;
        height: 2px ;
        background-color: white;
        position: absolute;
        top: 6px;
        display: block;
    }
    .menu-line:active::after {
        content: ""; /* Đặt nội dung của pseudo-element */
        width: 20px; /* Chiều rộng của mỗi gạch */
        height: 2px; /* Chiều cao của mỗi gạch */
        background-color: white; /* Màu sắc của mỗi gạch */
        position: absolute; /* Vị trí tuyệt đối */
        transform: rotate(45deg);
        transition: all 0.3s ease;
        top: 0;
    }
    .menu-line:active:before {
        content: ""; /* Đặt nội dung của pseudo-element */
        width: 20px; /* Chiều rộng của mỗi gạch */
        height: 2px; /* Chiều cao của mỗi gạch */
        background-color: white; /* Màu sắc của mỗi gạch */
        position: absolute; /* Vị trí tuyệt đối */
        transform: rotate(135deg);
        transition: all 0.3s ease;
        top: 0;
    }
    .menu-line:active {
        background-color: transparent; /* Loại bỏ màu nền của dấu gạch chính */
    }
    .menu-line.active::before {
        transform: rotate(-45deg);
        transition:  0.5s;
        top: 0;
    }

    .menu-line.active::after {
        transform: rotate(45deg);
        top: 0;
        transition: 0.5s;
    }
    .menu-line.active{
        background-color: transparent; /* Loại bỏ màu nền của dấu gạch chính */
    }
    .menu-responsive {
        display: none; /* Ẩn menu responsive ban đầu */
        position: absolute; /* Đặt menu responsive ở vị trí tuyệt đối */
        top: 100%; /* Hiển thị menu responsive ngay dưới menu chính */
        left: 0; /* Bắt đầu từ vị trí bên trái ngoài màn hình */
        width: 100%; /* Chiều rộng của menu responsive */
        height: fit-content; /* Chiều cao của menu responsive */
        background-color:rgb(120, 180, 61); /* Màu nền menu */
        transition: 0.5s; /* Hiệu ứng trượt */
        z-index: 999;
        padding-left: 40px;
    }
    .menu-responsive.show-menu {
        display: block; /* Hiển thị menu khi có lớp "show-menu" */
        transform: translateX(100); /* Di chuyển menu từ trái sang phải */
    }
}

