/* --- Menu Overlay Foundation --- */
.angie-fs-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 85%; /* Adjust width for mobile */
    max-width: 400px;
    height: 100vh;
    background-color: #ffffff;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.angie-fs-menu-wrapper.is-active .angie-fs-menu-overlay {
    transform: translateX(0);
}

/* --- Fixed Header: Logo (Left) & Close (Right) --- */
.angie-fs-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px !important;
    width: 100%;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    min-height: 80px;
}

.angie-fs-menu-logo-wrapper {
    display: flex;
    align-items: center;
}

.angie-fs-menu-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

.angie-fs-menu-close {
    background: #f8f8f8;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: background 0.3s ease;
    color: #333;
}

.angie-fs-menu-close:hover {
    background: #eeeeee;
}

/* --- Navigation Area --- */
.angie-fs-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.angie-fs-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.angie-fs-menu-item {
    position: relative;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    margin-bottom: 10px;
}

.angie-fs-menu-item:last-child {
    border-bottom: none;
}

.angie-fs-menu-item a {
    display: block;
    padding: 15px 40px 15px 0; /* Space for arrow on right */
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    color: #222;
    transition: all 0.3s ease;
}

/* --- Submenu & Arrow Toggle --- */
.angie-fs-dropdown-toggle {
    position: absolute;
    right: 0;
    top: 0;
    height: 54px; /* Matches height of parent link */
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}

.angie-fs-dropdown-toggle::after {
   
    font-size: 12px;
    transition: transform 0.3s ease;
    opacity: 0.5;
}

.angie-fs-menu-item.is-open > .angie-fs-dropdown-toggle::after {
    transform: rotate(90deg); /* Arrow points down when open */
    opacity: 1;
}

.sub-menu {
    list-style: none;
    padding: 0 0 15px 20px; /* Indented submenu */
    margin: 0;
    display: none; /* Controlled by JS */
    border-left: 2px solid #f0f0f0;
}

.angie-fs-menu-item.is-open > .sub-menu {
    display: block;
    animation: fadeInDown 0.3s ease-out;
}

.sub-menu li a {
    font-size: 16px;
    padding: 10px 0;
    opacity: 0.8;
}

/* --- Animations --- */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Tweak */
@media (max-width: 480px) {
    .angie-fs-menu-overlay { width: 90%; }
    .angie-fs-menu-header { padding: 20px; }
    .angie-fs-menu-content { padding: 20px; }
}

/* Hide sub-menus by default */
.angie-fs-menu-overlay .sub-menu {
    display: none;
    padding-left: 20px; /* Indent sub-items */
    list-style: none;
}

/* Show sub-menus when the parent has the .is-open class */
.angie-fs-menu-overlay .menu-item-has-children.is-open > .sub-menu {
    display: block;
}

/* Rotate the arrow icon when open */
.angie-fs-menu-overlay .menu-item-has-children.is-open > .angie-fs-dropdown-toggle i {
    transform: rotate(90deg);
}

/* Base style for the dropdown toggle arrow (if not already defined) */
.angie-fs-dropdown-toggle {
    cursor: pointer;
    padding: 10px;
    display: inline-block;
    transition: transform 0.3s ease;
}