/* mobile-menu.css */
.hamburger-menu-button {
    position: relative;
    float: right;
    display: none; /* Shown only in mobile view via media query */
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 1rem;
    z-index: 1049;
    align-items: center; /* Center items vertically */
}

.menu-button-wrapper {
    text-align: right; /* Aligns the wrapper's content to the right */
}

.menu-text {
    margin-right: 10px; /* Space between text and icon */
    font-size: 14px; /* Adjust font size */
    color: #416ca3;
    font-weight: bold;
}

.hamburger-menu-button .fa-bars {
    font-size: 25px;
    color: #416ca3;
    transition: color 0.3s, transform 0.3s;
}

.hamburger-menu-button:hover .fa-bars,
.hamburger-menu-button:focus .fa-bars {
    color: #FFD700;
    transform: rotate(90deg);
}

.mobile-menu-container {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 1050; /* Make sure this is high enough to be on top of other content */
    transform: translateX(100%);
    transition: transform 0.5s ease-out;
    flex-direction: column;
    display: flex;
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Disable horizontal scrolling */
}

/* Additional CSS to prevent background scrolling */
body.no-scroll {
    overflow: hidden;
}

.mobile-menu-container.active {
    transform: translateX(0%);
}

.close-mobile-menu {
    align-self: flex-end;
    padding: 1rem;
    cursor: pointer;
    color: #416ca3;
    background: none;
    border: none;
    font-size: 2rem;
    z-index: 1051;
    transition: color 0.3s, transform 0.8s ease;
}

.close-mobile-menu:hover {
    color: #FFD700;
    transform: rotate(360deg);
}

.mobile-navigation ul {
    list-style-type: none;
    padding: 0;
    margin-top: 1rem;
    font-family: 'Roboto Slab';
}

.mobile-navigation a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #416ca3;
    font-size: 20px;
    transition: color 0.3s;
}

.mobile-navigation a:hover {
    color: #416ca3;
}

.mobile-search {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: transparent;
    border-bottom: 2px solid #ddd;
    height: 60px;
}

.mobile-search input[type="text"] {
    flex-grow: 1;
    padding: 8px;
    border: none;
    font-size: 14px;
    font-style: italic;
    font-family: "Roboto slab";
}

.mobile-search button {
    background: none;
    border: none;
    font-size: 20px;
    color: #416ca3;
    cursor: pointer;
    padding: 8px;
    order: -1;
}

.mobile-search button:hover {
    color: #FFD700;
}

@media (max-width: 1100px) {
    .hamburger-menu-button {
        display: flex !important; /* Show button on smaller screens */
    }
}

.mobile-nav-menu {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    position: relative;
    padding: 10px 15px;
    overflow: visible;
    border-bottom: 1px solid #ddd;
    padding-right: 60px; /* Ensure there's space for the extended submenu indicator */
}

.mobile-nav-menu li:last-child {
    border-bottom: none; /* Remove border for the last item */
}


.mobile-nav-menu li a {
    display: block;
    color: #416ca3;;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    font-size: 18px;
    padding-right: 40px;
    z-index: 1;
}

.mobile-nav-menu li a:hover,
.mobile-nav-menu li a.active {
    color: #416ca3;
    background-color: #bababa;
}



.submenu-indicator {
    position: absolute;
    right: 0; /* Align it to the right edge */
    top: 0;
    bottom: 0;
    width: 40px; /* Increase the width to make the clickable area larger */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #416ca3;
    font-size: 1.2rem;
    z-index: 2;
    pointer-events: auto; /* Ensure it can be clicked */
    transition: background-color 0.3s, color 0.3s;
}

.submenu-indicator:hover {
    background-color: #f0f0f0; /* Light background color on hover */
    color: #FFD700; /* Gold color on hover */
}



@media (max-width: 768px) {
    .mobile-nav-menu {
        font-size: 16px;
    }
}

/* Position the submenu panel to start right below the search bar */
/* Ensure the submenu panel also allows for scrolling */
.submenu-panel {
    position: fixed;
    top: 50px; /* Adjust this value to be the height of your search bar */
    left: 100%; /* Start offscreen to the right */
    width: 100%;
    height: calc(100% - 50px); /* Take up remaining space below search bar */
    background: #fff; /* Solid white background */
    transition: left 0.3s ease;
    z-index: 1052; /* Higher than mobile-menu-container */
    overflow-y: auto; /* Enable vertical scrolling */
    overflow-x: hidden; /* Disable horizontal scrolling */
}

.mobile-has-children.active .submenu-panel {
    left: 0;
}

/* Ensuring the submenu panel header is styled and visible */
.submenu-header {
    background: white; /* Light gray background for the header */
    border-bottom: 1px solid #ccc; /* Separator */
    padding: 15px;
    font-size: 22px;
    color: #416ca3;;
}


/* Back button styling */
.back-button {
    font-weight: bold;
    color: #416ca3; /* Theme color */
    cursor: pointer;
    margin-right: 20px;
    display: inline-block; /* Ensure it does not break line */
}

.back-button:hover {
    color: #FFD700; /* Gold color on hover */
}

.submenu-items {
    list-style: none;
    padding: 0;
}

/* Styling for the second-level buttons */
.second-level-button {
    display: block;
    background-color: #416ca3 !important;
    color: #fff !important;
    padding: 10px;
    margin: 10px 0;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px;
}

.second-level-button:hover {
    background-color: #FFD700 !important;
    color: #416ca3 !important;
}