.viaansh-elementor-nav {
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.viaansh-elementor-nav li {
    position: relative;
    /* Anchor for dropdowns */
}

.viaansh-elementor-nav li a {
    text-decoration: none;
    color: #333;
    font-weight: 400;
    display: inline-block;
    padding: 8px 12px;
}

/* Submenu - Desktop with transition */
.viaansh-elementor-nav .sub-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

/* Show submenu smoothly */
.viaansh-elementor-nav li:hover>.sub-menu,
.viaansh-elementor-nav li.show-submenu>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Keep display:block to avoid flickering on hover */
.viaansh-elementor-nav li:hover>.sub-menu,
.viaansh-elementor-nav li.show-submenu>.sub-menu {
    display: block;
}

/* Add explicit submenu li styling */
.viaansh-elementor-nav .sub-menu li {
    margin: 0;
}

/* Submenu links styling */
.viaansh-elementor-nav .sub-menu li a {
    display: block;
    padding: 8px 15px;
    font-weight: 500;
    font-size: 14px;
    color: #555;
    white-space: nowrap;
}

/* Fix: Apply hover color on submenu links */
.viaansh-elementor-nav .sub-menu li a:hover {
    color: #000;
    /* or any hover color you prefer */
    background-color: #f5f5f5;
}

/* Nav wrapper */
.viaansh-nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* or space-between */
}

.viaansh-hamburger {
    font-size: 0;
    width: 40px;
    height: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    background: none;
    border: none;
    position: relative;
    z-index: 10000;
    margin-right: auto;
    padding: 5px;
    display: none;
}

/* Hamburger lines */
.viaansh-hamburger::before,
.viaansh-hamburger::after,
.viaansh-hamburger span {
    content: "";
    display: block;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: 0.3s ease;
}

.viaansh-hamburger span {
    margin: 6px 0;
}

@media (max-width: 768px) {
    .viaansh-hamburger {
        display: flex;
    }
}

/* Add a span inside your button in HTML or JS if needed */
.viaansh-hamburger::before,
.viaansh-hamburger::after {
    width: 100%;
}

.viaansh-sidebar {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transition: right 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto;
    border-left: 1px solid #eee;
}

/* When shown */
.viaansh-sidebar.show {
    right: 0;
}

.viaansh-sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.viaansh-sidebar-close:hover {
    color: #000;
}


.viaansh-sidebar-menu {
    list-style: none;
    margin-top: 50px;
    padding: 0;
}

.viaansh-sidebar-menu li {
    margin-bottom: 15px;
}

/* Sidebar links */
.viaansh-sidebar-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* Submenu - Mobile (Sidebar) */
.viaansh-sidebar-menu .sub-menu {
    list-style: none;
    margin-top: 8px;
    padding-left: 15px;
    display: none;
}

/* Submenu links - Mobile */
.viaansh-sidebar-menu .sub-menu li a {
    font-weight: normal;
    font-size: 14px;
    color: #555;
}

/* New: submenu toggle button in sidebar - small arrow */
.submenu-toggle {
    cursor: pointer;
    margin-left: 8px;
    font-size: 14px;
    user-select: none;
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.3s ease;
}

/* Rotate toggle when active */
.submenu-toggle.open {
    transform: rotate(90deg);
}

/* Show submenu in sidebar when .open is added (JS controlled) */
.viaansh-sidebar-menu li.show-submenu>.sub-menu {
    display: block;
}

/* Responsive Styles */
@media (max-width: 768px) {

    /* Hide desktop nav and show hamburger */
    .viaansh-elementor-nav {
        display: none !important;
    }

    .viaansh-hamburger {
        display: block;
    }

    /* Optional: Your nav menu that appears on click (if used) */
    .viaansh-nav-menu {
        display: none !important;
        flex-direction: column;
        position: absolute;
        top: 40px;
        background: #fff;
        border: 1px solid #ccc;
        padding: 10px;
        width: 200px;
        z-index: 1000;
    }

    .viaansh-nav-menu.show {
        display: flex !important;
    }
}

/* Top level menu item inline styling */
.viaansh-elementor-nav>li {
    display: inline-block;
    vertical-align: middle;
    /* align all menu items vertically center */
}

/* Align top level links and submenu toggle */
.viaansh-elementor-nav>li>a,
.viaansh-elementor-nav>li>.submenu-toggle {
    display: inline-block;
    line-height: 1.4;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    font-family: inherit;
}

.submenu-toggle {
    margin-top: 1px;
}

/* Ensure submenu toggle (in sidebar) looks like a link */
.viaansh-sidebar-menu .submenu-toggle {
    display: block;
    margin-left: unset;
    font-weight: bold;
    font-size: 16px;
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* Ensure same line height and spacing as <a> */
.viaansh-sidebar-menu .submenu-header {
    margin-bottom: 8px;
}

.viaansh-nav-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
}

.viaansh-elementor-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

