/* ==========================================================================
   Vertical Menu Widget (vars-vm-)
   ========================================================================== */

/* --- Full-width header --- */
.elementor-location-header {
    width: 100%;
    /* position: fixed; */
    top: 0;
    left: 0;
    z-index: 9990;
}

/* --- Wrapper --- */
.vars-vm-wrapper {
    width: 100%;
}

/* --- Header Bar --- */
.vars-vm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}

/* --- Scrolled State --- */
.vars-vm-header.vars-vm-scrolled {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.vars-vm-logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    background-color: #f5f5f5;
    padding: 5px;
}

.vars-vm-logo.scrolled-logo {
    background-color: transparent;
}

.vars-vm-logo img {
    display: block;
}

/* --- Hamburger Button --- */
.vars-vm-hamburger {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 5px;
}

.vars-vm-hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hamburger → X animation */
.vars-vm-hamburger.vars-vm-active .vars-vm-line-1 {
    transform: translateY(7px) rotate(45deg);
}

.vars-vm-hamburger.vars-vm-active .vars-vm-line-2 {
    opacity: 0;
}

.vars-vm-hamburger.vars-vm-active .vars-vm-line-3 {
    transform: translateY(-7px) rotate(-45deg);
}

/* --- Overlay --- */
.vars-vm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 9998;
}

.vars-vm-overlay.vars-vm-visible {
    opacity: 1;
    visibility: visible;
}

/* --- Off-Canvas Panel --- */
.vars-vm-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow-y: auto;
    box-sizing: border-box;
}

.vars-vm-panel.vars-vm-open {
    transform: translateX(0);
}

/* --- Close Button --- */
.vars-vm-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
}

.vars-vm-close:hover {
    opacity: 0.7;
}

/* --- Nav Items --- */
.vars-vm-nav {
    padding-top: 50px;
}

.vars-vm-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vars-vm-menu li {
    list-style: none;
}

.vars-vm-menu > li > a {
    display: block;
    padding: 10px 0;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Dividers */
.vars-vm-menu.vars-vm-has-dividers > li:not(:last-child) {
    padding-bottom: 10px;
}

/* Parent menu item with children */
.vars-vm-menu > li.menu-item-has-children > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Chevron icon */
.vars-vm-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.vars-vm-submenu-toggle::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.vars-vm-submenu-toggle.vars-vm-submenu-open::after {
    transform: rotate(-135deg);
}

/* Sub-menu — hidden by default, slide down */
.vars-vm-menu .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0 0 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.vars-vm-menu .sub-menu.vars-vm-submenu-open {
    max-height: 500px;
}

.vars-vm-menu .sub-menu a {
    display: block;
    padding: 6px 0;
    font-size: 0.9em;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* --- Scroll Lock --- */
body.vars-vm-no-scroll {
    overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .vars-vm-panel {
        width: 85vw !important;
        max-width: 320px;
    }
}
