/* Navbar */
#yt_menuwrap {
    position: sticky;
    position: -webkit-sticky;
    top: 0;
    /* left: 0; */
    /* right: 0; */
    /* background: #005baa; */
    /* color: #fff; */
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */
    /* padding: 12px 20px; */
    /* z-index: 1000; */
    z-index: 999;
    transition: background 0.3s, box-shadow 0.3s;
}

/* Fix: show "Trang Chủ" label for Home menu item (legacy #top-navbar) */
#top-navbar>ul>li.home-icon a {
    text-indent: 0 !important;
    background: none !important;
    padding: 16px 8px !important;
}

#top-navbar>ul>li.home-icon:hover a {
    background: none !important;
}

/* Khi cuộn xuống thì thêm hiệu ứng shadow */
#yt_menuwrap.scrolled {
    background: #00487c;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Lock scroll of overlay */
body.no-scroll {
    overflow: hidden;
    height: 100vh;
    /* ngăn kéo khi zoom safari */
}

/* Hamburger */
.menu-toggle {
    margin-top: 10px;
    width: fit-content;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    z-index: 1100;
}

.menu-toggle span {
    height: 3px;
    width: 25px;
    background: white;
    margin-bottom: 5px;
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-toggle:hover span {
    background: rgb(213, 202, 202);
}

/* Offcanvas */
.offcanvas {
    position: fixed;
    top: 0;
    left: -280px;
    /* Ẩn bên trái */
    width: 280px;
    height: 100%;
    /* background: #005baa; */
    /* background: #00416F; */
    /* background: linear-gradient(to left, #00497c, #002b49); */
    /* background: linear-gradient(to right, #4792D3, #002b49); */
    background: linear-gradient(180deg, #298acb 0%, #1a5882 100%);
    /* background-color: #4792D3;  */
    color: white;
    overflow-y: auto;
    transition: left 0.5s ease;
    padding-top: 60px;
    z-index: 1050;
}

.offcanvas.active {
    left: 0;
    /* Trượt vào */
}

.offcanvas ul {
    list-style: none;
}

.offcanvas>ul>li {
    margin: 0 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* .offcanvas .submenu li {
    border-bottom: none;
} */

.offcanvas a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    margin: 4px 6px;
    width: 75%;
    transition: color 0.2s ease-in-out, background 0.2s ease-in-out;
}

.offcanvas a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #9dcbe3;
    border-radius: 5px;
    padding: 8px 12px;
    margin: 4px 6px;
    /* margin-top: 2px;
    margin-bottom: 2px;
    margin-left: 3px;
    margin-right: 3px; */
}

.offcanvas .arrow:hover {
    color: #9dcbe3;
}

.offcanvas .seperator {
    /* color: #fff; */
    color: #cccccc;
    font-weight: bold;
    padding: 8px 12px;
    margin: 4px 6px;
    width: 74%;
    transition: color 0.2s ease-in-out, background 0.2s ease-in-out;
}

/* .offcanvas .seperator:hover {
    color: #9dcbe3;
} */

/* Close button */
.offcanvas .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 30px;
    /* font-weight: bold; */
    color: #fff;
    cursor: pointer;
    transition: transform 0.5s;
}

.offcanvas .close-btn:hover {
    transform: rotate(90deg);
    /* color: #ffcc00; */
    color: #9dcbe3;
}

/* Submenu (ẩn/mở mượt) */
.submenu {
    max-height: 0;
    overflow: hidden;
    /* background: #0466c8; */
    background: #2b72a4;
    /* background: rgba(121,145,173,.4392156863); */
    transition: max-height 0.5s ease;
    margin-left: 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.submenu a {
    /* padding-left: 35px; */
    /* font-size: 14px; */
    font-weight: normal;
}

/* .submenu .submenu { */
/* background: #0571e6; */
/* border-left: 1px solid rgba(255, 255, 255, 0.2); */
/* } */

/* .submenu .submenu a { */
/* padding-left: 55px; */
/* font-size: 13px; */
/* font-weight: normal; */
/* } */

.submenu .seperator {
    font-weight: normal;
}

/* Link block */
.link-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding: 12px 18px; */
    /* padding: 8px 12px;
    margin: 4px 6px; */
}

.open>.submenu {
    max-height: 600px;
}

/* đủ lớn để chứa submenu */

/* Arrow */
.arrow {
    width: 9%;
    text-align: center;
    transition: transform 0.5s;
    font-size: smaller;
    cursor: pointer;
}

.submenu .arrow {
    font-size: xx-small;
}

.open>.link-block .arrow {
    transform: rotate(90deg);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s;
    z-index: 1040;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 767px) {
    .yt-resmenu {
        display: none;
    }
}