/* Active Bottom Line */
#mainNav > a.active::after,
#mainNav > .nav-dropdown > button.active::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 0;
    height: 3px;
    background: #f4c542;
}

/* ============================
   DROPDOWN WRAPPER
============================ */
#mainNav .nav-dropdown {
    position: relative;
}

/* ============================
   FIRST DROPDOWN
============================ */
#mainNav .dropdown-panel {
    position: absolute;

    top: 100%;
    left: 0;

    width: max-content;
    min-width: 230px;
    max-width: 320px;

    padding: 6px 0;

    background: #ffffff;

    border-top: 3px solid #890c25;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);

    z-index: 99999;
}

/* ============================
   DROPDOWN LINKS
============================ */
#mainNav .dropdown-panel > a {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 17px;
    background: #ffffff;
    color: #333333;
    border-bottom: 1px solid #eeeeee;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    white-space: normal;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease;
}

/* Last Border Remove */
#mainNav .dropdown-panel > a:last-child {
    border-bottom: 0;
}

/* Dropdown Hover */
#mainNav .dropdown-panel > a:hover {
    background: #890c25;
    color: #ffffff;

    padding-left: 22px;
}

/* Dropdown Active */
#mainNav .dropdown-panel > a.active {
    background: #890c25;
    color: #ffffff;
}

/* ============================
   NESTED DROPDOWN
   Submenu ka Submenu
============================ */
#mainNav .nested-dropdown {
    position: relative;
    width: 100%;
}

/* Nested Parent Button */
#mainNav .nested-dropdown > button {
    width: 100%;
    min-height: 42px;

    padding: 9px 17px;

    border: 0;
    border-bottom: 1px solid #eeeeee;

    outline: 0;

    background: #ffffff;
    color: #333333;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    text-align: left;

    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease;
}

/* Nested Hover */
#mainNav .nested-dropdown:hover > button,
#mainNav .nested-dropdown > button:hover {
    background: #890c25;
    color: #ffffff;

    padding-left: 22px;
}

/* Nested Active */
#mainNav .nested-dropdown > button.active {
    background: #890c25;
    color: #ffffff;
}

/* ============================
   2nd / 3rd / 4th LEVEL PANEL
============================ */
#mainNav .nested-panel {
    position: absolute;

    top: -3px;
    left: 100%;

    min-width: 230px;

    margin-left: 1px;

    background: #ffffff;

    border-top: 3px solid #890c25;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.18);

    z-index: 100000;
}

/* Dropdown Right Arrow */
#mainNav .nested-dropdown > button .dropdown-icon {
    margin-left: auto;
}

/* Main Dropdown Arrow Rotate */
#mainNav > .nav-dropdown:hover > button .fa-chevron-down {
    transform: rotate(180deg);
}

/* ============================
   DROPDOWN CORNERS
============================ */
#mainNav > .nav-dropdown > .dropdown-panel {
    border-radius: 0 0 5px 5px;
}

/* ============================
   PREVENT LAST MENU OVERFLOW
============================ */
#mainNav > .nav-dropdown:last-child > .dropdown-panel {
    left: auto;
    right: 0;
}

/* =====================================================
   TABLET / MOBILE
===================================================== */
@media (max-width: 1100px) {
    #mainNav > a,
    #mainNav > .nav-dropdown > button {
        padding-left: 11px;
        padding-right: 11px;

        font-size: 13px;
    }
}

@media (max-width: 991px) {
    #mainNav {
        display: none;

        position: absolute;

        top: 100%;
        left: 0;
        right: 0;

        width: 100%;

        flex-direction: column;
        align-items: stretch;

        background: #890c25;

        max-height: calc(100vh - 100px);
        overflow-y: auto;

        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
    }

    /* Alpine open class */
    #mainNav.open {
        display: flex;
    }

    /* Main Links */
    #mainNav > a,
    #mainNav > .nav-dropdown > button {
        width: 100%;

        min-height: 47px;

        padding: 12px 18px;

        justify-content: space-between;

        border-bottom: 1px solid rgba(255, 255, 255, 0.13);

        font-size: 14px;

        text-align: left;
    }

    #mainNav > a.active::after,
    #mainNav > .nav-dropdown > button.active::after {
        display: none;
    }

    /* All Dropdowns Static Mobile */
    #mainNav .dropdown-panel,
    #mainNav .nested-panel {
        position: static;

        top: auto;
        left: auto;
        right: auto;

        width: 100%;
        max-width: none;
        min-width: 100%;

        margin: 0;

        border-top: 0;

        border-radius: 0;

        box-shadow: none;

        background: #ffffff;
    }

    /* Level 1 */
    #mainNav .dropdown-panel > a {
        padding-left: 28px;
    }

    /* Level 2 */
    #mainNav .nested-dropdown > button {
        padding-left: 28px;
    }

    #mainNav .nested-panel > a {
        padding-left: 42px;
    }

    #mainNav .nested-panel .nested-dropdown > button {
        padding-left: 42px;
    }

    /* Level 3 */
    #mainNav .nested-panel .nested-panel > a {
        padding-left: 55px;
    }

    #mainNav .nested-panel .nested-panel .nested-dropdown > button {
        padding-left: 55px;
    }

    /* Mobile submenu arrow */
    #mainNav .nested-dropdown > button .fa-chevron-right {
        transform: rotate(90deg);
    }
}

/* ============================
   SMALL MOBILE
============================ */
@media (max-width: 575px) {
    #mainNav > a,
    #mainNav > .nav-dropdown > button {
        font-size: 13.5px;
    }
}
