/* 
 * 
 * Styling for main menu
 * 
 */

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}
.site-header {
    position:relative;
    z-index:4;
    background-color: var(--color-garnet);
    @media (max-width: 991px) {
        height: 7rem;
        min-height: 7rem;
    }
    @media (min-width: 992px) {
        padding-top: 1.2rem;
    }
}

/* Mobile Menu Styles */
@media (max-width: 991px) {
    .site-header .container, .uscaa-logo-container {
        height: 100%;
    }

    .uscaa-logo-container{
        padding-top:.9rem;
    }
   
    .site-header nav {
        position: fixed;
        top: 0;
        bottom: 0;
        right: -100%;
        width: 100%;
        max-width: 90%;
        height: 100vh;
        transition: right 0.3s ease;
        z-index: 100;
    }

    .site-header nav.active {
        right: 0;
    }

    .nav-wrapper {
        position: relative;
        width: 100%;
        height: 100%;
        box-shadow: -10px 0px 50px 0 rgba(0,0,0,1);
        background-color: var(--color-black);
        display: flex;
        flex-direction: column;
        overflow-y: scroll;
        overflow-x: hidden;
        scrollbar-width: none;
    }

    .menu-top-links {
        background-color: var(--color-black);
        color: white;
        padding: 2.4rem;
        order: 4;
        .top-menu-items {
            li {
                line-height: 2.8rem;
                font-size: 1.4rem;
                a {
                    color: white;
                    text-decoration: none;
                    padding: 0.8rem 0;
                    display: inline-block;
                }
            }
        }
    }

    .mobile-menu-close {
        display: flex;
        order: 1;
        box-sizing: border-box;
        justify-content: flex-end;
        align-items: center;
        background-color: var(--color-garnet);
        height: 7rem;
        padding: 2.4rem;
        .mobile-menu-close-btn {
            display: flex;
            width: 3.6rem;
            height: 3.6rem;
            border-radius: 50%;
            background-color: var(--color-white);
            justify-content: center;
            align-items: center;
            text-decoration: none;
            i {
                font-size: 2.4rem;
                line-height: 1;
            }
        }
    }

    .mobile-menu-social {
        order: 5;
        display: flex;
        .footer-social-menu {
            position: relative;
            background: transparent;
            top: auto;
            right: auto;
            height: auto;
            padding: 0;
            .footer-social-items {
                display: flex;
                justify-content: flex-start;
                align-items: center;
                li {
                    margin: 0;
                    a {
                        padding: 2.4rem;
                        color: white;
                        i {
                            z-index: 0;
                        }
                    }
                }
            }
        }
    }

    .menu-level {
        display: flex;
        flex-direction: column;
        background-color: var(--color-black) !important;
        order: 3;
        .main-menu-items {
            background-color: var(--color-garnet);
            color: white;
            margin: 0;
            padding: 0 2.4rem;
            > li {
                line-height: 2.8rem;
                font-size: 1.8rem;
                font-weight: 500;
                > a {
                    padding: 1.4rem 0;
                    color: white;
                    text-decoration: none;
                    display: block;
                    position: relative;
                }
                &.menu-item-has-children > a::after {
                    content: '\e000';
                    font-family: "Font Awesome Kit";
                    font-weight: 400;
                    font-size: 2.1rem;
                    font-style: normal;
                    -webkit-font-smoothing: antialiased;
                    margin-right: 0.4rem;
                    right: 0;
                    position: absolute;
                    transition: 0.15s ease-out;
                }
                &.btn-secondary {
                    a {
                        border: 1px solid var(--color-white);
                        border-radius: 10rem;
                        padding-top: 0.4rem;
                        padding-bottom: 0.4rem;
                        margin: 1.2rem 0;
                        line-height: 3rem;
                        transition: all 0.15s ease-out !important;
                        position: relative;
                        padding-right: 3rem;
                        padding-left:3rem;
                        text-align: center;
                        &::after {
                            content: '\e000';
                            font-family: "Font Awesome Kit";
                            font-weight: 400;
                            font-size: 2.1rem;
                            font-style: normal;
                            -webkit-font-smoothing: antialiased;
                            margin-left: 0.4rem;
                            /* position: absolute; */
                            /* right: -; */
                            transform: translateX(20%);
                            transition: 0.25s ease-out;
                        }
                        &:active {
                            background-color: var(--color-black);
                            border-color: var(--color-black);
                            text-decoration: none !important;
                            &::after {
                                transform: translateX(0.7rem);
                            }
                        }
                    }
                }
            }
        }
    }

    .search-icon {
        order: 2;
        background-color: var(--color-garnet);
        padding: 1.2rem 1.2rem 1.6rem 2.4rem;
        a {
            color: white;
            text-decoration: none;
            font-size: 1.4rem;
            font-weight: 500;
            line-height: 2.8rem;
            i { 
                margin-left: 0.4rem;
            }
        }
    }

    .sub-menu {
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0%;
        left: 0;
        width: 100%;
        max-width: 100%;
        height: 100%;
        transform: translateX(0);
        transition: transform 0.3s ease;
        background: var(--color-white);
        margin-top: 13rem;
        padding-bottom: 2.4rem;
        overflow-y: scroll;
        overflow-x: hidden;
        scrollbar-width: none;
        min-height: 100vh;
        container-type: inline-size;
        h2 {
            margin: 1.2rem 2.4rem;
            font-size: 3.2rem;
            line-height: 3.8rem;
        }
        .submenu-section {
            padding-left: 2.4rem;
            padding-right: 2.4rem;

            li {
                font-size: 1.6rem;
                line-height: 3.6rem;
            }
    
            a {
                color: var(--color-black);
                text-decoration: none;
                &:hover {
                    text-decoration: underline;
                }
            }
    
            .regular-columns {
                .regular-column {
                    margin-right: 2.4rem;
                    a {
                        display: inline-block;
                        color: var(--color-black);
                        text-decoration: none;
                        margin-right: 2.4rem;
                        &::after {
                            content: '\f061';
                            font-family: "Font Awesome 6 Sharp";
                            font-weight: 400;
                            font-size: 1rem;
                            font-style: normal;
                            -webkit-font-smoothing: antialiased;
                            margin-left: 0.6rem;
                            position: absolute;
                            transform: translateX(0);
                            transition: 0.15s ease-out;  
                            color: var(--color-garnet);
                        }
                        &:hover{
                            color: var(--color-garnet);
                            &::after {
                                transform: translateX(0.4rem);
                            }
                        }
                    }
                }
                
            }
            &.promo-section {
                .menu-item {
                    display:flex;
                    flex-direction: column-reverse;
                    color: black;
                    /* padding-right: 4.8rem; */
                    border-bottom: 1px solid var(--color-border-light);
                    /* margin-right: 2.4rem; */
                    position: relative;
                    a {
                        display: flex;
                        flex-direction: column-reverse;
                    }
                    .promo-image-wrapper {
                        aspect-ratio: 4/3;
                        position: relative;
                        width: 100%;
                        display: inline-block;
                        max-width: 25rem;
                        &::before {
                            content: '';
                            position: absolute;
                            bottom: -0.1rem;
                            right: -0.1rem;
                            aspect-ratio: 1/1;
                            width: 6.3rem;
                            height: 6.3rem;
                            display: inline-block;
                            background-color: var(--color-white);
                            clip-path: polygon(0 100%, 100% 0, 100% 100%);
                            z-index: 5;
                        }
                        &::after {
                            content: '\e000';
                            font-family: "Font Awesome Kit";
                            font-weight: 400;
                            font-size: 2.1rem;
                            font-style: normal;
                            -webkit-font-smoothing: antialiased;
                            position: absolute;
                            bottom: 0;
                            right: 0;
                            transform: translateX(-0.8rem);
                            transition: 0.15s ease-out;
                            color: var(--color-garnet);
                            z-index: 10;
                        }
                        img {
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                            object-position: center;
                        }
                    }
                }
            }
            .regular-columns {
                padding: 1.2rem 1.2rem 1.2rem 0; 

                /* .regular-column { */
                    margin-right: 2.4rem;
                    li {
                        margin: 1.2rem 0
                    }
                    a {
                        display: inline-block;
                        color: var(--color-black);
                        text-decoration: none;
                        margin-right: 2.4rem;
                        font-size: 1.8rem;
                        line-height: 2.1rem;
                        &::after {
                            content: '\f061';
                            font-family: "Font Awesome 6 Sharp";
                            font-weight: 400;
                            font-size: 1rem;
                            font-style: normal;
                            -webkit-font-smoothing: antialiased;
                            margin-left: 0.6rem;
                            position: absolute;
                            transform: translateX(0);
                            transition: 0.15s ease-out;  
                            color: var(--color-garnet);
                        }
                        &:hover{
                            color: var(--color-garnet);
                            &::after {
                                transform: translateX(0.4rem);
                            }
                        }
                    }
                /* } */
            }
            
        }
    }

    .sub-menu {
        transform: translateX(100%);
        display: block;
        z-index: 200;
    }

    .sub-menu.active {
        transform: translateX(0);
    }

    .menu-level li,
    .sub-menu li {
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .menu-level > ul > li:first-child,
    .menu-level > ul > li:last-child,
    .sub-menu > li:first-child {
        border-top: none;
    }

    .back-button {
        display: flex;
        align-items: center;
        color: var(--color-garnet);
        padding: 1.2rem 0;
        cursor: pointer;
        padding-left: 2rem;
        &::before {
            content: '\f060';
            display: inline-block;
            position: relative;
            left: 0;
            font-family: "Font Awesome 6 Sharp";
            font-weight: 300;
            font-size: 2.4rem;
            font-style: normal;
            margin-right: 0.8rem;
            -webkit-font-smoothing: antialiased;
        }
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: relative;
        width: 3.6rem;
        height: 3.6rem;
        cursor: pointer;
        background-color: white;
        border-radius: 50%;
        span {
            display: block;
            width: 1.6rem;
            height: 0.2rem;
            background: var(--color-garnet);
            margin: 2px 0;
            &:nth-child(2) {
                width: 2rem;
            }
        }
    }
    .hamburger-wrapper {
        position: absolute;
        top: 0;
        right: 2.4rem;
        height: 100%;
        display: flex;
        align-items: center;
    }

}
.uscaa-logo-container{
    width: 10rem;
}
/* Desktop Menu Styles */
@media (min-width: 992px) {
    .site-header {
        position: relative;
        padding-top: 0.8rem;
    }
    .uscaa-logo-container {
        position: absolute;
        left: 2.4rem;
        bottom: 0;
        padding-bottom: 0.6rem;
        z-index: 99;
    }
    .site-header .container {
        display: flex;
        align-items: flex-end;
        position: relative;
        nav {
            justify-content: flex-end;
            position: relative;
            align-items: flex-end;
            width: 100%;
            padding-left: 10rem;
        }
    }
    .nav-wrapper {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        .menu-top-links {
            order: 1;
        }
        .search-icon {
            order: 2;
            position: absolute;
            a {
                color: var(--color-white);
                display: inline-block;
                padding: 0 0.6rem;
                span {
                    display: none;
                }
                i {
                    display: flex;
                    font-size: 1.4rem;
                    top: 0.2rem;
                    right: 1.2rem;
                    transition: all 0.1s ease-out;
                    position: absolute;
                    justify-content: center;
                    align-items: center;
                    width: 2.4rem;
                    height: 2.4rem;
                }
                &:hover {
                    i {
                        transform: scale(1.15);
                    }
                }
            }
        }
        .menu-level {
            order: 3
        }
    }

    .main-menu-items {
        display: flex;
        margin: 0;
        padding: 0.8rem 0 0 0;
        
        > li {
            font-size: 1.6rem;
            line-height: 2.8rem;
            margin-left: 0.4rem;
            &:first-child {
                margin-left: 0;
            }
            @media (min-width: 1200px) {
                margin-left: 2.4rem;
            }
             
            > a {
                color: white;
                text-decoration: none;
                display: flex;
                justify-content: center;
                align-items: center;
                padding: 1.2rem;
                border-bottom: 6px var(--color-garnet) solid;
                height: 100%;
                transition: all 0.15s ease-out;
                background-color: var(--color-garnet);
                &:hover {
                    background-color: var(--color-black);
                    border-color: var(--color-black);
                }
                &[aria-expanded="true"] {
                    background-color: var(--color-black);
                    border-color: var(--color-white) !important;
                }
                .dropdown-indicator {
                    display: inline-block;
                    pointer-events: none;
                    &::before {
                        content: '\f107';
                        font-family: "Font Awesome 6 Sharp";
                        font-weight: 400;
                        font-size: 1rem;
                        font-style: normal;
                        -webkit-font-smoothing: antialiased;
                        margin-left: 0.4rem;
                        transition: 0.15s ease-out;

                    }
                }
                &.btn-secondary {
                    height: auto;
                    border: 1px solid var(--color-white);
                    border-radius: 10rem;
                    padding-top: 0.4rem;
                    padding-bottom: 0.4rem;
                    /* padding-left: 3rem;
                    padding-right: 3rem; */
                    margin: 0.6rem 0 !important;
                    line-height: 3rem;
                    transition: all 0.15s ease-out !important;
                    position: relative;
                    &::after {
                        content: '\e000';
                        font-family: "Font Awesome Kit";
                        font-weight: 400;
                        font-size: 2.1rem;
                        font-style: normal;
                        -webkit-font-smoothing: antialiased;
                        margin-left: 0.4rem;
                        transform: translateX(20%);
                        transition: 0.15s ease-out;
                    }
                    &:hover {
                        background-color: var(--color-black);
                        border-color: var(--color-black);
                        text-decoration: none !important;
                        &::after {
                            transform: translateX(0.7rem);
                        }
                    }
                }
            }
        }
    }

    .menu-top-links {
        margin-right: 2.4rem;
        .top-menu-items {
            display: flex;
            li {
                font-size: 1.4rem;
                line-height: 2.8rem;
                a {
                    color: white;
                    text-decoration: none;
                    display: inline-block;
                    margin-right: 2.4rem;
                    &:hover {
                        text-decoration: underline;
                    }
                }
            }
        }
    }
    
    /* Style for dropdown toggle links */
    .dropdown-toggle-link {
        position: relative;
        cursor: pointer;
    }

    /* Hide submenus by default */
    .sub-menu {
        display: none;
        position: relative;
        h2 {
            display: none;
        }
        .back-button {
            display: none;
        }
        &.toggled-on {
            display: flex;
            justify-content: center;
            position: absolute;
            background-color: white;
            padding: 2.4rem;
            z-index: 9;
            left: -2.4rem;
            width: calc(100vw);
            min-height: 28rem;
            background-color: var(--color-white);
            box-shadow: var(--box-shadow);
            margin: 0 !important;
            overflow: hidden;
            @media (min-width: 1200px) {
                left: 50%;
                transform: translateX(-50%);
            }            
        }
    }


    .submenu-section {
        li {
            font-size: 1.6rem;
            line-height: 2.8rem;
        }

        a {
            color: var(--color-black);
            text-decoration: none;
            &:hover {
                text-decoration: underline;
            }
        }
        &.promo-section {
            width: 25%;
            @media (min-width: 1200px) {
                max-width: calc(1000px * 0.25);
            }
        }
        &.regular-section {
            width: 75%;
            @media (min-width: 1200px) {
                max-width: calc(1000px * 0.75);
            }
        }

        .regular-columns {
            display: flex;
            justify-content: flex-start;
            .column-menu {
                margin-right: 2.4rem;
                width: 100%;
                display: flex;
                flex-direction: row;
                flex-wrap: wrap;
                li {
                    line-height: 1;
                    word-wrap: break-word;
                    flex-basis: 33.33333333333333%;
                    align-items: flex-start;
                    justify-content: flex-start;
                    padding: 1.6rem 1rem 0 0;
                    
                    a {
                        display: inline-block;
                        color: var(--color-black);
                        text-decoration: none;
                        margin-right: 2.4rem;
                        position: relative;
                        line-height: 2rem;
                        cursor: pointer;
                        &::after {
                            content: '\f061';
                            font-family: "Font Awesome 6 Sharp";
                            font-weight: 400;
                            font-size: 1rem;
                            font-style: normal;
                            -webkit-font-smoothing: antialiased;
                            margin-left: 0.6rem;
                            position: absolute;
                            transform: translateX(0);
                            transition: 0.15s ease-out;  
                            color: var(--color-garnet);
                        }
                        &:hover{
                            color: var(--color-garnet);
                            &::after {
                                transform: translateX(0.4rem);
                            }
                        }
                    }
                }
                
            }
            
        }
        &.promo-section {
            .menu-item {
                display:flex;
                flex-direction: column-reverse;
                color: black;
                padding-right: 2.4rem;
                border-right: 1px solid var(--color-border-light);
                margin-right: 2.4rem;
                position: relative;
                a {
                    display: flex;
                    flex-direction: column-reverse;
                    line-height: 2.4rem;
                    &:hover {
                        color: var(--color-garnet);
                        .promo-image-wrapper::after {
                            transform: translateX(0);
                        }
                    }
                }
                .promo-image-wrapper {
                    
                    position: relative;
                    width: 100%;
                    display: inline-block;
                    max-width: 25rem;
                    margin-bottom: 1.2rem;
                    &::before {
                        content: '';
                        position: absolute;
                        bottom: -0.1rem;
                        right: -0.1rem;
                        aspect-ratio: 1/1;
                        width: 6.3rem;
                        height: 6.3rem;
                        display: inline-block;
                        background-color: var(--color-white);
                        clip-path: polygon(0 100%, 100% 0, 100% 100%);
                        z-index: 5;
                    }
                    &::after {
                        content: '\e000';
                        font-family: "Font Awesome Kit";
                        font-weight: 400;
                        font-size: 2.1rem;
                        font-style: normal;
                        -webkit-font-smoothing: antialiased;
                        position: absolute;
                        bottom: 0.4rem;
                        right: 0;
                        transform: translateX(-0.8rem);
                        transition: 0.15s ease-out;
                        color: var(--color-garnet);
                        z-index: 10;
                    }
                    img {
                        aspect-ratio: 4/3;
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                        object-position: center;
                    }
                }
            }
        }
    }
}