/* Base styles for vertical menu */
.vertical-menu {
    width: 250px;
    background: #fff;
    border: 1px solid #ddd;
    position: relative;
}

/* Remove default list styles */
.vertical-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Styling for main menu items */
.vertical-menu ul li {
    position: relative;
}

.vertical-menu ul li a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #ddd;
    background: #f8f8f8;
}

/* Hover effect on main menu */
.vertical-menu ul li:hover > a {
    background: #ff9900;
    color: #fff;
}

/* First-level submenu */
.submenu-wrapper {
    position: absolute;
    top: 0; /* Always align with the top of the vertical menu */
    left: 100%;
    width: 600px;
    height: 100%; /* Ensure it spans the full height */
    background: #fff;
    border: 1px solid #ddd;
    z-index: 1000;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
    flex-wrap: wrap;
    padding: 20px;
    align-items: flex-start;
}

/* Ensure all submenus align to the top */
.menu-item:hover > .submenu-wrapper {
    display: flex;
}

/* Submenu columns */
.submenu ul {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Submenu items */
.submenu ul li {
    width: 100%;
    padding: 5px;
    position: relative;
}

/* Submenu links */
.submenu ul li a {
    padding: 10px;
    display: block;
    color: #333;
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
}

/* Hover effect on submenu */
.submenu ul li:hover > a {
    background: #ff9900;
    color: #fff;
}

/* Second-level submenu (sub-submenu) */
.sub-submenu {
    display: none;
    position: absolute;
    top: 0; /* Always align with the top of the submenu */
    left: 100%;
    width: 250px;
    height: 100%;
    background: #fff;
    border: 1px solid #ddd;
    z-index: 1100;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

/* Always show both submenu and sub-submenu when hovering */
.menu-item:hover > .submenu-wrapper,
.submenu-item:hover > .sub-submenu {
    display: flex;
}
