
.header111{
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: rgb(13,127,64);
    width: 100%;
    height: 6%;
    padding: 2px 10px;
    float: left;
    text-align: center;
    display: flex;
    font-weight: 700;
    justify-content: space-between;
}
.header111 img{
    float: left;
    width: 45px;
    height: 45px;
    margin: 0px 10px;
    padding: 2px;
}
.header111 p{
    float: right;
    margin: 10px 20px;
    font-size: 0.9em;
    color: #ffffffe6;
}
.header222{
    background: #f1f1f1;
    width: 100%;
    display: flex;           /* dùng flex để canh hàng */
    align-items: center;     /* dọc căn giữa */
    justify-content: space-between; /* logo bên trái, menu bên phải */
    padding: 0px 30px;       /* chỉnh khoảng cách trong */
    box-sizing: border-box;
}
.header222 .logo-link img {
    width: 55px;
    height: 52px;
}
.header222 .menu ul {
    display: flex;
    gap: 15px;       /* khoảng cách giữa các mục */
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
    align-items: center; /* căn giữa dọc */
    justify-content: center; /* căn giữa ngang */
}
.header222 .menu ul li{
    display: inline-block;
    margin: 10px 10px;
    font-size: 1.1em;
    font-weight: bold;
    position: relative;
}
.header222 .menu ul li a{
    text-decoration: none;
    color: black;
    transition: color 0.3s;
    padding: 5px 10px;
    border-radius: 10px;
    white-space: nowrap;
    text-align: center;
}
.header222 .menu ul li a:hover{
    background: #f1f1f1;
    color: #0adb0a;
    
}
.header222 .menu ul li > .submenu{
    display: none;
    position: absolute;
    background: #f1f1f1;
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
    min-width: 160px;
}
.header222 .menu ul li .submenu li {
    margin: 4px 0;
    border-bottom: 1px solid;
}
.header222 .menu ul li:hover .submenu{
    display: block;
    background: #f1f1f1;
    padding: 10px;
    border-radius: 5px;
}
.header222 .menu ul li .submenu a {
    white-space: nowrap;
    display: block;
    padding: 5px 10px;
    justify-self: left;
}
.submenu li{
    width: 100%;
}
.menu-toggle {
    display: none;
}

/* Khi .menu.show được bật thì menu hiện */
.header222 .menu.show {
    display: block !important;
}
.header222 .menu ul li.has-submenu .submenu {
    display: none;
    position: absolute;
    background: #f1f1f1;
    padding: 10px;
    border-radius: 5px;
    z-index: 1000;
    min-width: 160px;
}
.header222 .menu ul li.has-submenu .arrow{
    font-size: 0.8em;
}
@media (min-width: 769px) {
    .header222 .menu ul li.has-submenu:hover .submenu {
        display: block;
    }
}
@media (max-width: 768px) {
    .header111 {
        display: none !important;
    }

    .header222 {
        position: relative;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 2em;
        cursor: pointer;
        color: rgb(13,127,64);
        margin-left: auto;
    }
    .header222 .menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: #fff;
        width: 220px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.13);
        z-index: 100;
        border-radius: 6px;
        padding: 10px 0;
    }
    .header222 .menu ul {
        flex-direction: column;
        gap: 0;
    }
    .header222 .menu ul li {
        margin: 0;
        padding: 10px 16px;
        font-size: 1em;
        border-bottom: 1px solid #ececec;
    }
    .header222 .menu ul li:last-child {
        border-bottom: none;
    }
    .header222 .menu ul li.has-submenu .arrow {
        float: right;
        margin-left: 5px;
        margin-top: 2px;
        font-size: 0.9em;
    }

    .header222 .menu ul li.has-submenu .submenu-toggle {
        display: block;
        cursor: pointer;
        font-weight: bold;
    }

    .header222 .menu ul li.has-submenu.open .submenu {
        display: block;
        background: #fafafa;
        border-left: 2px solid #ccc;
        padding-left: 15px;
    }

    .header222 .menu ul li.has-submenu > a {
        display: none; /* ẩn thẻ <a> nếu còn */
    }
}
