.lower-row {
    border-bottom: 1px solid var(--text-4);
    width: 100%;
    background-color: var(--white);
}

.lower-row-container {
    /* max-width: 1400px; */
    margin: auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0px 24px;
}

/* ---------- LINKS ---------- */

.nav-links{
    padding-right: 24px;
}
.nav-links a {
    margin-left: 18px;
    text-decoration: none;
    color: var(--text-3);
    font-size: 14px;
    font-weight: 600;
}

.nav-links a.active {
    color: var(--secondaryColor);
}

/* ---------- BUTTON ---------- */
.nav-right {
    position: relative;
    width: 25%;
}

.menu-btn {
    background: none;
    border: none;
    border-inline: 1px solid var(--text-4);
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    padding: 8px;
    /* gap: 12px; */
    color: var(--text);
    width: 100%;
}

.menu-btn section {
    display: flex;
    gap: 12px;

}

/* ---------- LEVEL 1 DROPDOWN ---------- */
.nav-right .dropdown {
    /* max-height: 0; */
    opacity: 0;
    transform: translateY(-8px);
    transition:
        max-height .8s ease-in-out,
        opacity .25s ease-in-out,
        transform .7s ease-in-out;
    background: var(--white);
    min-height: 50px;
    width: 100%;
    position: absolute;
    top: 100%;
    right: 0;
    visibility: hidden;
}

.nav-right .dropdown ul {
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    list-style: none;
    text-align: start;
    background: var(--white);

}

.nav-right .dropdown .has-sub {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    border-bottom: 1px dotted var(--text-4);
    height: fit-content;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
    width: 100%;
    transition: background-color .2s ease, height .1s ease-in-out;
}

.nav-right .dropdown li:hover {
    background-color: #f9fafb;
}

.has-sub a {
    width: 100%;
}

.has-sub button {
    padding-inline: 16px;
    height: 38px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 600;
    transition: transform .3s ease;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.has-sub button i {
    color: var(--text-4);
    font-size: 14px;

}

.has-sub.open button i {
    transform: rotate(180deg);
}

/* ---------- LEVEL 2 DROPDOWN ---------- */
.sub-dropdown {
    background-color: #f9fafb;
    color: var(--text);

    position: absolute;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    z-index: 100;
    max-height: 0px;
    opacity: 0;
    overflow: hidden;
    transition: max-height .35s ease, opacity .55s ease;
}

.sub-dropdown li {
    justify-content: flex-start;
    padding: 12px 16px;
}

/* ---------- HOVER TRIGGERS ---------- */
/* .nav-right:hover .dropdown {
    display: block;
} */


.nav-right.open .dropdown {
    visibility: visible;
    height: fit-content;
    /* كافية لكل العناصر */
    opacity: 1;
    transform: translateY(0);
}

.nav-right.open .fa-chevron-down {
    transform: rotate(180deg);
}

.has-sub.open>.sub-dropdown {
    /* min-height: fit-content; */
    max-height: 500px;
    opacity: 1;
    overflow: visible;

}

@media (max-width:1024px) {

    .lower-row {
        background-color: rgba(0, 0, 0, .35);
        opacity: 0;
        pointer-events: none;

        position: fixed;
        inset: 0;
        top: 0;
        right: 0;
        transform: translateX(100%);
        transition: .4s ease;
        z-index: 1000;
        width: 100%;
    }

    .lower-row.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .lower-row-container {
        background: white;
        width: fit-content;
        height: 100%;
        margin: 0px;
        padding: 24px 30px;

        overflow-y: auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 16px;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .nav-right {
        width: fit-content;
    }

    .menu-btn {
        border-inline: none;
        border-bottom: 1px solid var(--text-4);
        width: 100%;
        gap: 22px;
    }

    /* dropdowns menus */
    .nav-right .dropdown {
        position: static;
        max-height: fit-content;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-right.open .dropdown {
        max-height: 0px;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
    }

    /* ---------- LEVEL 2 DROPDOWN ---------- */
    .sub-dropdown {
        position: relative;
        transform: none;
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        width: 100%;
        transition: max-height .20s ease-in-out, opacity .25s ease;
    }

    .has-sub.open>.sub-dropdown {
        max-height: 1000px;
        opacity: 1;
        overflow: hidden;
    }

    .nav-right .dropdown li.has-sub {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 0px;
        overflow: visible;
    }

    .has-sub button {
        padding-right: 16px;
        padding-left: 0px;
    }

    .has-sub button i {
        padding-inline: 16px;
        height: 100%;
        color: var(--text-4);
        border-inline: 1px solid var(--text-4);
        text-align: center;
        align-content: center;
        /* border-bottom: 1px solid var(--text-4); */
    }

    .has-sub.open button i {
        transform: rotate(180deg);
    }
}