/* Theme Name: Algo Trading Solution Global 
   Version: 2.0 */

/* 1. RESET */
.menu, .menu ul { list-style: none; margin: 0; padding: 0; }

/* 2. DESKTOP MENU */
.menu { display: flex; gap: 2rem; align-items: center; }
.menu > li { position: relative; padding: 1rem 0; }
.menu > li > a { color: #94a3b8; font-weight: 500; text-decoration: none; transition: color 0.2s ease; }
.menu > li:hover > a { color: #ffffff; }

/* 3. ARROWS */
.menu-item-has-children > a, .page_item_has_children > a { display: inline-flex; align-items: center; gap: 6px; }
.menu-item-has-children > a::after, .page_item_has_children > a::after {
    content: "▾"; font-size: 12px; opacity: 0.8; transition: transform 0.2s ease;
}
.menu-item-has-children:hover > a::after, .menu-item-has-children.open > a::after,
.page_item_has_children:hover > a::after, .page_item_has_children.open > a::after {
    transform: rotate(180deg);
}

/* 4. DESKTOP DROPDOWN */
@media (min-width: 769px) {
    .menu-item-has-children > .sub-menu, .page_item_has_children > .children {
        position: absolute; top: 100%; left: 0; width: 24rem;
        background: #15171b; border: 1px solid rgba(255,255,255,0.08); border-radius: 0.75rem;
        padding: 0.5rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5);
        opacity: 0; visibility: hidden; transform: translateY(10px); transition: all 0.2s ease-out; z-index: 999;
    }
    .menu-item-has-children:hover > .sub-menu, .page_item_has_children:hover > .children {
        opacity: 1; visibility: visible; transform: translateY(0);
    }
}

/* 5. SUBMENU STYLING */
.menu .sub-menu li a, .menu .children li a { display: block; padding: 0.6rem 0.75rem; border-radius: 0.5rem; color: #e5e7eb; text-decoration: none; }
.menu .sub-menu li a:hover, .menu .children li a:hover { background: rgba(255,255,255,0.05); }

/* Typography */
.menu .sub-menu span.font-semibold { font-size: 13px; line-height: 1.3; color: #e5e7eb; display: block; }
.menu .sub-menu span.text-xs { font-size: 11px; line-height: 1.45; color: #9ca3af; display: block; }

/* Icon Fixes */
.menu .sub-menu .flex.items-center.justify-center {
    width: 32px !important; height: 32px !important; min-width: 32px !important;
    border-radius: 6px; background: rgba(255,255,255,0.03); font-size: 15px !important;
}
.menu .sub-menu img { width: 16px; height: 16px; }

/* 6. MOBILE FIXES */
@media (max-width: 768px) {
    .menu { flex-direction: column; gap: 0; width: 100%; align-items: flex-start; }
    .menu > li { width: 100%; padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .menu > li > a { display: flex; justify-content: space-between; width: 100%; font-size: 16px; color: #e2e8f0; }

    /* Force Hide/Show Logic */
    .menu-item-has-children > .sub-menu, .page_item_has_children > .children {
        display: none !important; position: static !important; width: 100%; box-shadow: none; border: none;
        background: rgba(255,255,255,0.02); margin-top: 0.5rem; padding-left: 0.5rem;
        opacity: 1 !important; visibility: visible !important; transform: none !important;
    }
    .menu-item-has-children.open > .sub-menu, .page_item_has_children.open > .children {
        display: block !important; animation: fadeIn 0.3s ease;
    }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }