/* Sticky Menu Styles
  -------------------------------------------------------------- */

/* Menu Sticky */
#header-sticky.sticky-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: #ffffff !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: sticky-header 0.5s ease forwards;
}

#header-sticky.sticky-menu .second-menu {
    padding: 0;
}

#header-sticky.sticky-menu .logo img {
    max-height: 60px !important; /* Logo nhỏ hơn khi sticky */
    transition: all 0.3s ease;
}

#header-sticky.sticky-menu .main-menu ul li {
    padding: 15px 0;
}

/* Menu Sticky cho tất cả header layouts */
#header-sticky.sticky-menu .header-three .second-header {
    background: #ffffff !important;
}

#header-sticky.sticky-menu .menu-area {
    background: #ffffff !important;
}

/* Đảm bảo sticky menu hiển thị đúng cho header-three */
.header-three #header-sticky.sticky-menu {
    background: #ffffff !important;
}

/* Cải thiện hiệu ứng chuyển đổi cho sticky menu */
#header-sticky {
    transition: all 0.3s ease;
}

/* Đảm bảo z-index cao nhất cho sticky menu */
#header-sticky.sticky-menu {
    z-index: 99 !important;
}

/* Điều chỉnh khoảng cách cho menu items khi sticky */
#header-sticky.sticky-menu .main-menu ul li a {
    color: #333333 !important;
    transition: all 0.3s ease;
}

#header-sticky.sticky-menu .main-menu ul li a:hover {
    color: #0a5ba7 !important;
}

/* Điều chỉnh logo khi sticky */
#header-sticky.sticky-menu .logo {
    padding: 5px 0 !important;
}

/* Đảm bảo menu không bị che khuất */
#header-sticky.sticky-menu .menu-area {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

/* Điều chỉnh nút liên hệ trong sticky menu */
#header-sticky.sticky-menu .second-header-btn .btn.ss-btn {
    background: #0a5ba7 !important;
    color: #ffffff !important;
    border: 1px solid #0a5ba7 !important;
}

#header-sticky.sticky-menu .second-header-btn .btn.ss-btn:hover {
    background: #ffffff !important;
    color: #0a5ba7 !important;
    border: 1px solid #0a5ba7 !important;
}

/* Điều chỉnh icon search trong sticky menu */
#header-sticky.sticky-menu .login ul li a.menu-tigger {
    color: #333333 !important;
    background: rgba(10, 91, 167, 0.1) !important;
}

#header-sticky.sticky-menu .login ul li a.menu-tigger:hover {
    color: #0a5ba7 !important;
    background: rgba(10, 91, 167, 0.2) !important;
}

/* Sticky menu animation */
@keyframes sticky-header {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Điều chỉnh cho mobile */
@media (max-width: 768px) {
    body.has-sticky-header {
        padding-top: 60px;
    }
    
    #header-sticky.sticky-menu .logo img {
        max-height: 50px !important;
    }
}

@media (max-width: 991px) {
    #header-sticky.sticky-menu .mean-container a.meanmenu-reveal {
        color: #0a5ba7 !important;
        background-color: #ffffff;
        display: none;
    }
     .header-three .menu-area {
        padding: 0 ;
    }
}

/* Submenu styles for #cssmenu3 */
#cssmenu3 {
    margin-top: 32px;
}
#cssmenu3 ul ul {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 200px;
    background: #fff;
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    padding: 0;
    margin: 0;
}
#cssmenu3 ul li {
    position: relative;
}
#cssmenu3 ul li:hover > ul,
#cssmenu3 ul li:focus-within > ul,
#cssmenu3 ul li.menu-item-has-children.open > ul {
    display: block;
}
#cssmenu3 ul ul li {
    width: 100%;
}
#cssmenu3 ul ul ul {
    left: auto;
    right: 100%;
    top: 0;
}
#cssmenu3 ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#cssmenu3 ul li a {
    display: block;
    padding: 10px 20px;
    color: #333;
    background: none;
    text-decoration: none;
    white-space: nowrap;
}
#cssmenu3 ul li a:hover {
    background: #f0f0f0;
    color: #0a5ba7;
}

#cssmenu3 ul li.menu-item-has-children > a::after {
    content: '\f107'; /* fa-chevron-down */
    font-family: 'Font Awesome 6 Pro';
    font-weight: 900;
    display: inline-block;
    margin-left: 8px;
    font-size: 0.9em;
    vertical-align: middle;
    transition: transform 0.2s;
}
#cssmenu3 ul li.menu-item-has-children:hover > a::after,
#cssmenu3 ul li.menu-item-has-children:focus-within > a::after {
    transform: rotate(180deg); /* Xoay xuống khi hover */
}
#cssmenu3 ul ul li.menu-item-has-children > a::after {
    content: '\f105'; /* fa-chevron-right */
    font-family: 'Font Awesome 6 Pro';
    font-weight: 900;
    margin-left: 8px;
    transform: none;
}
#cssmenu3 ul ul li.menu-item-has-children:hover > a::after,
#cssmenu3 ul ul li.menu-item-has-children:focus-within > a::after {
    transform: translateX(3px);
}
@media (max-width: 992px) {
    #cssmenu3 ul,
    #cssmenu3 ul ul,
    #cssmenu3 ul ul ul {
        display: block !important;
        position: static;
        min-width: 0;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding-left: 0;
    }
    #cssmenu3 ul ul {
        margin-left: 8px;
        border-left: none;
        background: #f5faff;
    }
    #cssmenu3 ul ul ul {
        margin-left: 16px;
        border-left: none;
        background: #f5faff;
    }
    #cssmenu3 ul li {
        border: none;
    }
    #cssmenu3 ul li a {
        border-radius: 0 !important;
        border: none;
        padding-left: 16px;
    }
    #cssmenu3 ul ul li a {
        padding-left: 24px;
    }
    #cssmenu3 ul ul ul li a {
        padding-left: 32px;
    }
    #cssmenu3 ul li.menu-item-has-children > a::after {
        content: '\f107'; /* fa-chevron-down */
        font-family: 'Font Awesome 6 Pro';
        font-weight: 900;
        margin-left: 8px;
        font-size: 0.9em;
        vertical-align: middle;
        transform: none !important;
    }
    #cssmenu3 ul ul li.menu-item-has-children > a::after {
        content: '\f107'; /* fa-chevron-down */
    }
}