.bg-home {
    background-color: transparent;

    .sub-menu {
        background-color: var(--custom-purple);

        .menu-item:hover {
            background-color: var(--custom-secondary);
        }
    }
}


.bg-inner {
    background-color: var(--custom-primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);

    .sub-menu {
        background-color: var(--custom-primary);

        .menu-item:hover {
            background-color: var(--custom-primary-dark);
        }

    }
}

.navbar {
    padding: 1rem var(--padding-small);
    position: absolute;
    z-index: 99;
    width: 100%;

    img {
        width: 10rem;
        height: auto;
    }

    .navbar-brand {
        margin-top: -.2rem;
    }
}

a {
    text-decoration: none;
}

#mainNavbar ul {
    justify-content: center;
    width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-item {
    position: relative;
    display: inline-block;
    width: 100%;
}

.menu-item-has-children {
    position: relative;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    text-wrap: nowrap;
    width: auto !important;
    display: flex;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 -1rem -1rem !important;

    .menu-item {
        padding: 0;
    }


    .menu-item a {
        display: block;
        padding: 1rem;
        width: 100%;
    }
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.menu-item-has-children > a {
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.menu-item-has-children > a::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75em;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

.menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

.menu-item-has-children .sub-menu .menu-item:not(.menu-item-has-children) > a::after {
    content: none;
}

.sub-menu .menu-item-has-children > a::after {
    content: "\f078";
}

.sub-menu .menu-item-has-children .sub-menu {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.sub-menu .menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sub-menu .sub-menu .menu-item-has-children > a::after {
    content: none;
}

.socials-and-tickets {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.ticket-icon-in-button {
    position: absolute;
    background-color: var(--custom-light);
    color: var(--custom-dark);
    height: 1rem;
    width: 1rem;
    padding: 1.3rem;
    border-radius: .3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-lg);
    top: 0;
    right: 0;
}

.cart-count-badge {
    position: absolute;
    top: -1rem;
    right: -1rem;
    background: var(--custom-yellow);
    border: 0.1rem solid var(--custom-yellow);
    color: var(--custom-dark);
    font-size: var(--font-size-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-weight: bold;
    z-index: 10;
}

@media (max-width: 992px) {
    .navbar {
        padding: 1rem var(--padding-mobile);
    }

    .navbar.bg-home.navbar-collapsed {
        background-color: var(--custom-primary);
        box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
    }

    .navbar.bg-home.navbar-collapsed .navbar-collapse {
        background-color: var(--custom-primary);
    }

    .nav-container {
        width: 100%;
    }

    #mainNavbar ul {
        list-style: none;
        padding-left: 0;
        margin: 0;

        & li a {
            text-decoration: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.8rem 0;
            color: var(--custom-light);
            border-bottom: 1px solid var(--custom-light);

            /*&:after {*/
            /*    font-family: "Font Awesome 6 Free";*/
            /*    content: "\f054";*/
            /*    font-weight: 900;*/
            /*    font-size: 0.75rem;*/
            /*    color: var(--custom-light);*/
            /*}*/
        }

        a {
            text-decoration: none;
        }

    }

    .menu-item {
        padding: 0;
    }


    .menu-item-has-children > a::after {
        display: none;
    }

    .menu-item-has-children:hover > a::after {
        transform: none;
    }

    .sub-menu .menu-item-has-children > a::after {
        content: none;
    }

    .menu-item-has-children {
        position: relative;
    }

    .menu-item-has-children::after {
        content: "\f078";
        font-family: "Font Awesome 6 Free";
        position: absolute;
        right: 0;
        top: 5px;
        padding: 10px;
        z-index: 20;
        font-weight: 900;
        font-size: 0.75em;
        transition: transform 0.3s ease;
        display: flex;
        align-items: center;
        color: var(--custom-light);
    }

    .menu-item-has-children.active::after {
        transform: rotate(180deg);
    }

    .menu-item-has-children.active > ul.sub-menu {
        display: flex;
        flex-direction: column;
        margin: 0 0 0 20px !important;
    }

    .sub-menu {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        display: none;
    }

    .menu-item-has-children.open > .sub-menu {
        display: flex;
        flex-direction: column;
    }

    .menu-item-has-children > a::after {
        content: "\f078";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 0.75em;
        margin-left: 0.5em;
    }

    .socials-and-tickets {
        margin-top: 1rem;
    }

    .nav-icon {
        font-size: var(--font-size-xl);
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: .3rem;
    }

    .nav-ticket-checkout {
        display: flex;
        align-items: center;
        position: relative;
        margin: 1rem 0;

        a {
            text-decoration: none;
        }

        .checkout-icon-wrapper:hover .cart-count-badge {
            background: transparent;
            color: var(--custom-light);
        }

        .ticket-icon-in-button {
            height: 1rem;
            width: 1rem;
            padding: 1.1rem;
            font-size: var(--font-size-lg);
        }

        .cart-count-badge {
            position: absolute;
            top: -1rem;
            right: -1rem;
            background: var(--custom-yellow);
            border: 0.1rem solid var(--custom-yellow);
            color: var(--custom-dark);
            font-size: var(--font-size-sm);
            display: flex;
            justify-content: center;
            align-items: center;
            width: 1.5rem;
            height: 1.5rem;
            border-radius: 50%;
            font-weight: bold;
            z-index: 10;
        }

        /* Default button styling (empty cart) */

        .ticket-button {
            padding: 1rem 3rem;
        }

        .cart-not-empty {
            padding-right: 5rem;
        }
    }

    .bg-home {

        .sub-menu {
            background-color: var(--custom-primary);

            .menu-item:hover {
                background-color: var(--custom-primary-dark);
            }
        }
    }
}


@media (min-width: 993px) {
    #mainNavbar ul {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
        align-items: center;
        list-style: none;
        margin: 0;

        & li a {
            text-decoration: none;
            color: var(--custom-light);

            &:hover {
                color: var(--custom-gray-light);
            }
        }
    }

    .navbar-expand-lg .navbar-collapse {
        align-items: end;
        margin-top: -.8rem;
    }

    .nav-ticket-checkout {
        display: flex;
        align-items: center;
        position: relative;

        a {
            text-decoration: none;
        }

        .checkout-icon-wrapper:hover .cart-count-badge {
            background: transparent;
            color: var(--custom-light);
        }
    }

    /* Default button styling (empty cart) */
    .ticket-button {
        margin-left: 1rem;
        padding: 1.2rem 4rem;
    }

    .cart-not-empty {
        padding-right: 6rem;
    }
}

@media (max-width: 575px) {
    .navbar {
        padding: 1rem var(--padding-xsmall);
    }
}

@media (max-width: 250px) {
    .navbar {
        padding: .5rem var(--padding-xsmall);

        img {
            width: 4rem;
        }
    }

}