/* Header navigation only: intentionally independent of .theme-btn and forms. */
.header-1 #mobile-menu > ul {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 72px;
    padding: 0;
    margin: 0;
}

.header-1 #mobile-menu > ul > li {
    margin-inline: 0;
}

/* Arabic starts at the right edge; don't reverse the DOM/tab order as well. */
html[dir="rtl"] .header-1 #mobile-menu > ul {
    direction: rtl;
    flex-direction: row;
    justify-content: flex-start;
}

@media (min-width: 1200px) {
    html[dir="rtl"] .header-1 .header-main {
        column-gap: 24px;
    }

    html[dir="rtl"] .header-1 .header-main > .logo {
        flex: 0 0 100px;
    }

    html[dir="rtl"] .header-1 .header-right-items {
        flex: 1 1 0%;
        min-width: 0;
        gap: 24px;
        justify-content: space-between;
    }

    html[dir="rtl"] .header-1 .mean__menu-wrapper {
        flex: 1 1 auto;
        min-width: 0;
    }

    html[dir="rtl"] .header-1 .header-right {
        flex: 0 0 auto;
    }
}

/* Reserve the visible part of the 384px logo background inside the container.
   The template uses 100px gutters, reduced to 50px at widths up to 1600px. */
@media (min-width: 1400px) {
    html[dir="rtl"] .header-1 .header-main > .logo {
        flex-basis: 284px;
    }
}

@media (min-width: 1400px) and (max-width: 1600px) {
    html[dir="rtl"] .header-1 .header-main > .logo {
        flex-basis: 334px;
    }
}

.header-1 #mobile-menu > ul > li > a.eduex-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
    min-height: 44px;
    padding: 12px 16px;
    border-radius: 14px;
    font-family: inherit;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    background-color: #f7f8fb;
    transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.header-1 #mobile-menu > ul > li > a.eduex-nav-link i {
    margin: 0;
}

.header-1 #mobile-menu > ul > li > a.eduex-nav-link::after {
    content: "";
    position: absolute;
    inset-inline: 16px;
    bottom: 5px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 180ms ease;
}

html[dir="rtl"] .header-1 #mobile-menu > ul > li > a.eduex-nav-link::after {
    transform-origin: right center;
}

.header-1 #mobile-menu > ul > li > a.eduex-nav-link:focus-visible {
    outline: 3px solid var(--theme-2, #ffa729) !important;
    outline-offset: 3px;
}

.header-1 #mobile-menu > ul > li > a.eduex-nav-link:focus-visible:not(.is-active) {
    color: var(--theme, #6558f5);
    background-color: rgba(101, 88, 245, .09);
}

.header-1 #mobile-menu > ul > li > a.eduex-nav-link:focus-visible::after {
    transform: scaleX(1);
}

@media (hover: hover) {
    .header-1 #mobile-menu > ul > li > a.eduex-nav-link:hover {
        color: var(--theme, #6558f5) !important;
        background-color: rgba(101, 88, 245, .09);
        transform: translateY(-2px);
    }

    .header-1 #mobile-menu > ul > li > a.eduex-nav-link:hover::after {
        transform: scaleX(1);
    }
}

.header-1 #mobile-menu > ul > li > a.eduex-nav-link.is-active,
.header-1 #mobile-menu > ul > li > a.eduex-nav-link.is-active:hover {
    color: #fff !important;
    background-color: var(--theme, #6558f5);
    box-shadow: 0 4px 12px rgba(101, 88, 245, .18);
}

.header-1 #mobile-menu > ul > li > a.eduex-nav-link.is-active::after {
    display: none;
}

.header-1 #mobile-menu > ul > li > a.eduex-nav-link:active {
    transform: translateY(0);
}

/* Keep dropdown sections marked, and expose them to keyboard users as well. */
.header-1 #mobile-menu .submenu a.eduex-nav-link.is-active {
    color: var(--theme, #6558f5) !important;
    background-color: rgba(101, 88, 245, .09);
}

.header-1 #mobile-menu li:focus-within > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-1 #mobile-menu .submenu a.eduex-nav-link:focus-visible {
    outline: 3px solid var(--theme-2, #ffa729) !important;
    outline-offset: -3px;
}

/* MeanMenu clones these links into its mobile drawer; don't style its expand controls. */
.offcanvas__info .mobile-menu .mean-nav a.eduex-nav-link,
.offcanvas__info .mobile-menu [data-fallback-menu] a.eduex-nav-link {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    min-height: 44px;
    width: 100%;
    padding: 12px 16px;
    margin-block: 4px;
    border-radius: 12px;
    border: 0 !important;
    text-align: start;
    font-family: inherit;
    transition: background-color 180ms ease, color 180ms ease;
}

.offcanvas__info .mobile-menu .eduex-nav-link:hover,
.offcanvas__info .mobile-menu .eduex-nav-link:focus-visible {
    background-color: rgba(101, 88, 245, .09);
}

.offcanvas__info .mobile-menu a.eduex-nav-link.is-active,
.offcanvas__info .mobile-menu a.eduex-nav-link.is-active:hover {
    color: #fff !important;
    background-color: var(--theme, #6558f5);
}

.offcanvas__info .mobile-menu a.eduex-nav-link:focus-visible {
    outline: 3px solid var(--theme-2, #ffa729) !important;
    outline-offset: -3px;
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .header-1 #mobile-menu > ul {
        gap: 4px;
    }

    .header-1 #mobile-menu > ul > li > a.eduex-nav-link {
        padding-inline: 12px;
        font-size: 14px;
    }
}

@media (min-width: 1400px) and (max-width: 1499.98px) {
    html[dir="rtl"] .header-1 #mobile-menu > ul > li > a.eduex-nav-link {
        padding-inline: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header-1 #mobile-menu a.eduex-nav-link,
    .header-1 #mobile-menu a.eduex-nav-link::after,
    .header-1 #mobile-menu .submenu,
    .offcanvas__info .mobile-menu a.eduex-nav-link {
        transition: none !important;
        transform: none !important;
    }
}
