/* 
 * Simple Independent Mobile Menu with Logo and Line
 */

/* Only apply these styles on mobile */
@media only screen and (max-width: 991px) {
    /* Simple Mobile Menu Container */
    .simple-mobile-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #fff;
        z-index: 1000;
        overflow-y: auto;
        padding: 120px 20px 50px; /* Increased top padding to make room for logo */
    }
    
    /* Logo in mobile menu */
    .simple-mobile-menu::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 104px; /* Header height */
        background-color: #fff;
        z-index: 1002;
        /* Add your logo as a background image */
        background-image: url('../img/logo.png');
        background-repeat: no-repeat;
        background-position: 19px center;
        background-size: auto 56px;
    }
    
    /* Grey line below logo */
    .simple-mobile-menu::after {
        content: "";
        position: fixed;
        top: 99px; /* Position right below the header area */
        left: 0;
        right: 0;
        height: 1px;
        background-color: var(--border-color, #dcdcdc);
        z-index: 1002;
    }
    
    /* Show the mobile menu when active */
    .simple-mobile-menu.active {
        display: block;
    }
    
    /* Main Menu Items */
    .simple-mobile-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .simple-mobile-menu .main-items > li {
        margin-bottom: 15px;
        position: relative;
    }
    
    .simple-mobile-menu .main-items > li > a {
        display: block;
        padding: 10px 0;
        color: var(--heading-color, #fff);
        font-size: 22px;
        text-decoration: none;
    }
    
    /* Arrow indicator for items with submenu */
    .simple-mobile-menu .has-submenu > a::after {
        content: ">";
        position: absolute;
        right: 10px;
        top: 45%;
        transform: translateY(-50%);
        font-size: 22px;
    }
    
    /* Submenu Styling */
    .simple-mobile-menu .submenu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: #fff;
        z-index: 1001;
        padding: 120px 20px 50px; /* Increased top padding to make room for logo */
        transition: right 0.3s ease-in-out;
        overflow-y: auto;
    }
    
    /* When submenu is active, slide it in */
    .simple-mobile-menu .submenu.active {
        right: 0;
    }
    
    /* Submenu Items */
    .simple-mobile-menu .submenu li {
        margin-bottom: 10px;
    }
    
    .simple-mobile-menu .submenu li a {
        display: block;
        padding: 8px 0;
        color: var(--heading-color, #fff);
        font-size: 22px;
        text-decoration: none;
    }
    
    /* Back Button */
    .simple-mobile-menu .back-button {
        display: flex;
        align-items: center;
        margin-bottom: 30px;
        padding: 10px 15px;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 5px;
        color: var(--heading-color, #fff);
        cursor: pointer;
        border-bottom: 1px solid var(--border-color, #444);
		min-width: 700px;
        margin-left: -26px;
        padding-bottom: 25px;
        padding-left: 20px;
    }
    
    .simple-mobile-menu .back-button svg {
        width: 15px;
        height: 15px;
        margin-right: 10px;
        fill: currentColor;
    }
    
    /* Hamburger Toggle Button */
    .simple-mobile-toggle {
        position: fixed;
        top: 30px;
        right: 20px;
        z-index: 1002;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        display: none;
    }
    
    .simple-mobile-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: var(--heading-color, #fff);
        margin: 5px auto;
        transition: all 0.3s ease-in-out;
    }
    
    /* Show the toggle button on mobile */
    @media only screen and (max-width: 991px) {
        .simple-mobile-toggle {
            display: block;
        }
    }
    
    /* X shape when menu is open */
    .simple-mobile-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .simple-mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .simple-mobile-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    /* Add logo and line styles for submenu */
    .simple-mobile-menu .submenu::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 75px;
        background-color: var(--bg-color, #232323);
        z-index: 1002;
        /* Add your logo as a background image */
        background-image: url('../img/logo.png');
        background-repeat: no-repeat;
        background-position: 20px center;
        background-size: auto 45px;
    }
    
    .simple-mobile-menu .submenu::after {
        content: "";
        position: fixed;
        top: 75px;
        left: 0;
        right: 0;
        height: 1px;
        background-color: var(--border-color, #dcdcdc);
        z-index: 1002;
    }
}

