/* Main menu container styling */
.beklane-mobile-menu {
    position: relative;
    z-index: 10;
}

.menu-toggle {
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.mobile-menu-container {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 12px;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 1000;
}

.mobile-menu-container.active {
    opacity: 1;
    transform: translateY(0);
    max-height: 1000px;
}

/* Hide main menu when submenu is active */
.mobile-menu-container.hide-main > ul {
    display: none;
}

/* Submenu styling */
.mobile-menu-container .sub-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #ffffff;
    z-index: 10001; /* Higher than main menu */
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-container .sub-menu.active {
    display: block;
    animation: slideInRight 0.3s ease forwards;
}

.mobile-menu-container .sub-menu.closing {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

/* Back button styling */
.mobile-menu-container .menu-back-button {
    display: none;
    cursor: pointer;
    margin-bottom: 15px;
    color: #333;
    font-weight: bold;
    position: absolute;
    top: 20px;
    left: 15px;
    font-size: 18px;
    z-index: 10002;
}

.mobile-menu-container .sub-menu .menu-back-button {
    display: block;
}

/* List styling */
.mobile-menu-container ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-container li {
    position: relative;
}

.mobile-menu-container .menu-item-has-children > a::after {
    content: "▾";
    margin-left: 8px;
}

.beklane-submenu-content {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100vh; /* Use viewport height instead of 100% */
    background: #fff;
    z-index: 99999;
    transition: left 0.3s ease-in-out;
    overflow-y: auto; /* Enable vertical scrolling */
    padding: 20px;
    box-sizing: border-box;
}

.beklane-submenu-content.active {
    left: 0;
}

/* Ensure Elementor content fills the space */
.beklane-submenu-content .elementor {
    min-height: 100%;
}

.beklane-submenu-back-button {
    padding: 1em;
    font-weight: bold;
    cursor: pointer;
}   