/* Excellence Home Tutors - Areas & Subjects Mega Dropdown CSS */
.eht-standalone-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

.eht-menu-item {
    position: relative;
}

.eht-menu-item > a.eht-top-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    text-decoration: none;
}

.eht-caret {
    font-size: 11px;
    line-height: 1;
}

/* Primary Dropdown Panel */
.eht-menu-item > ul.eht-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
    padding: 8px 0;
    margin: 0;
    list-style: none;
    z-index: 99999;
}

.eht-menu-item:hover > ul.eht-dropdown-menu,
.eht-menu-item.eht-open > ul.eht-dropdown-menu {
    display: block;
}

/* 2-Column Clean Grid for Areas so all 20 Areas + Flyouts remain unclipped */
.eht-menu-item:hover > ul.eht-areas-grid,
.eht-menu-item.eht-open > ul.eht-areas-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(275px, 1fr));
    width: 570px;
    padding: 10px;
    gap: 2px 10px;
}

.eht-core-group {
    grid-column: 1 / -1;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
}

.eht-dropdown-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.eht-dropdown-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    color: #1e293b !important;
    font-size: 13.5px;
    line-height: 1.35;
    text-decoration: none !important;
    border-radius: 5px;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.eht-dropdown-menu > li > a:hover {
    background-color: #f1f5f9;
    color: #0f62fe !important;
}

/* Nested Submenu (Opens cleanly beside each Area) */
.eht-area-group > ul.eht-nested-menu {
    display: none;
    position: absolute;
    top: -4px;
    left: 96%;
    min-width: 330px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
    padding: 8px 0;
    margin: 0;
    list-style: none;
    z-index: 100000;
}

.eht-area-group:hover > ul.eht-nested-menu,
.eht-area-group.eht-sub-open > ul.eht-nested-menu {
    display: block;
}

.eht-nested-menu > li > a {
    display: block;
    padding: 8px 16px;
    color: #334155 !important;
    font-size: 13.5px;
    line-height: 1.4;
    text-decoration: none !important;
    white-space: normal;
}

.eht-nested-menu > li > a:hover {
    background-color: #eff6ff;
    color: #0f62fe !important;
}

/* Flip nested flyout to left if near right screen edge */
.eht-area-group.eht-flip-left > ul.eht-nested-menu {
    left: auto;
    right: 96%;
}

/* Hide mobile toggle buttons on desktop */
.eht-mobile-toggle,
.eht-mobile-subtoggle {
    display: none;
}

/* Responsive Mobile Styles */
@media (max-width: 991px) {
    .eht-menu-item > ul.eht-dropdown-menu,
    .eht-menu-item:hover > ul.eht-areas-grid,
    .eht-menu-item.eht-open > ul.eht-areas-grid,
    .eht-area-group > ul.eht-nested-menu {
        display: none;
        position: static;
        width: 100% !important;
        min-width: 100% !important;
        box-shadow: none;
        border: none;
        border-left: 2px solid #cbd5e1;
        border-radius: 0;
        margin-left: 12px;
        padding: 4px 0;
    }

    .eht-menu-item.eht-open > ul.eht-dropdown-menu,
    .eht-menu-item.eht-open > ul.eht-areas-grid,
    .eht-area-group.eht-sub-open > ul.eht-nested-menu {
        display: block;
    }

    .eht-mobile-toggle,
    .eht-mobile-subtoggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        right: 8px;
        top: 5px;
        width: 28px;
        height: 28px;
        background: #f1f5f9;
        border: 1px solid #cbd5e1;
        border-radius: 4px;
        color: #1e293b;
        font-weight: bold;
        cursor: pointer;
        z-index: 2;
    }

    .eht-dropdown-menu > li > a {
        white-space: normal;
        padding-right: 44px;
    }

    .eht-sub-arrow {
        display: none;
    }
}
