/************************ Navigation Cards ***************************/
.flip_card {
    background-color: transparent;
    width: 300px;
    height: 450px;
    perspective: 1000px !important;
    margin: 0 auto;
    transform-style: preserve-3d;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.card {
    position: relative;
    transition: transform 1s;
    transform-style: preserve-3d;
    width: 300px;
    height: 450px;
    box-sizing: border-box;
    border-radius: 15px;
    background: var(--white);
    /* border: 2px solid var(--border-grey); */
    box-shadow: 0px 3px 8px #0000001A;
    color: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transform: rotateY(0.001deg);
    -webkit-tap-highlight-color: transparent;
}

.card h3 {
    color: var(--black);
    text-align: center;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-size: 30px;
    margin: 10px auto;
    cursor: pointer;
    z-index: 10;
    padding: 5px 35px;
    border-radius: 10px;
    -webkit-border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: rotateY(0deg);
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

.card .card_pattern {
    position: absolute;
    top: 25px;
    left: 25px;
    width: calc(100% - 50px);
    height: calc(100% - 50px);
    overflow: hidden;
    z-index: 0;
    outline: none;
    opacity: 0.6;
}

.card .card_pattern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
}

.front h4 {
    width: 100%;
    text-align: center;
    /* padding: 25px 0 20px; */
    /* background-color: var(--white); */
    z-index: 5;
}

.back {
    transform: rotateY(180deg);
}

.card:hover {
    transform: rotateY(180.001deg);
}

.navigation_is_open .navigation_mobile_links a h4 {
    font-size: 22px;
    margin-bottom: 5px;
    transition: 0.2s all ease-in-out;
    -webkit-tap-highlight-color: transparent;
}

.navigation_is_open .navigation_mobile_links a h4:hover {
    color: var(--light-blue);
    transition: 0.2s all ease-in-out;
}

.back a h4 {
    font-size: 20px;
}

.back h4:last-of-type {
    margin-bottom: 0 !important;
}

.card .v_chevron {
    width: 15px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.card .v_chevron i {
    color: var(--gold);
}

.expanded_links {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transition: 0.2s all ease-in-out;
}

@media (max-width: 1550px) {
    .flip_card,
    .card {
        width: 260px;
        height: 380px;
    }

    .front h4 {
        font-size: 22px;
    }
}

@media (max-width: 1390px) {
    .flip_card {
        width: 400px;
        height: unset;
        aspect-ratio: 1;
        margin: 30px 15px 0;
    }

    .flip_card:nth-of-type(1),
    .flip_card:nth-of-type(2) {
        margin-top: 60px;
    }

    .card {
        width: 100%;
        height: 100%;
    }

    .navigation_is_open .navigation_mobile_links {
        flex-wrap: wrap;
        margin-top: 10vh;
    }

    .navigation_is_open ul {
        height: max-content !important;
        width: 860px;
    }
}

@media (max-height: 1300px) and (max-width: 1390px) {
    .navigation_is_open .navigation_mobile_links {
        margin-top: 0;
    }
}

@media (max-height: 1100px) and (max-width: 1390px) {
    .navigation_is_open .navigation_mobile_links {
        justify-content: center;
    }

    .flip_card {
        width: unset;
        height:  calc((100vh - 192px - 96px) / 2);
        aspect-ratio: 1;
        margin: 30px 15px 0;
    }
}

@media (max-height: 900px) {
    .card h4,
    .navigation_is_open .navigation_mobile_links a h4 {
        font-size: 18px;
    }
}

/************************ Flip cards become simple dropdowns ************************/
@media (max-width: 960px) {
    .navigation .wrapper_large {
        max-width: 100%;
    }

    .flip_card,
    .flip_card:nth-of-type(1),
    .flip_card:nth-of-type(2) {
        margin: 25px 0 0 !important;
        width: 60%;
        aspect-ratio: unset;
        height: 200px;
        cursor: auto;
    }

    .flip_card.expanded {
        height: 340px;
    }

    .card:hover {
        transform: none;
    }

    .card {
        box-shadow: 0px 3px 8px #00000009;
    }

    .card .card_pattern {
        top: 15px;
        left: 15px;
        width: calc(100% - 30px);
        height: calc(100% - 30px);
        opacity: 0.3;
    }

    /* .front {
        display: none;
    } */

    .front h4 {
        display: none;
    }
    
    .back {
        transform: rotateY(0);
    }

    .card .v_chevron {
        position: absolute;
        bottom: 10px;
        right: 20px;
        margin-bottom: 0;
        cursor: pointer;
        transition: 0.2s all ease-in-out;
    }

    .card .v_chevron:hover {
        opacity: 0.8;
        transition: 0.2s all ease-in-out;
    }

    .expanded .v_chevron {
        transform:rotate(180deg); 
        -webkit-transform:rotate(180deg); 
        -moz-transform:rotate(180deg); 
        -o-transform:rotate(180deg);
        transition: 0.2s all ease-in-out;
    }

    .nav_separator,
    .expanded_links {
        display: none;
        opacity: 0;
        transition: 0.2s all ease-in-out;
    }

    .expanded .expanded_links {
        display: flex;
        flex-direction: column;
        align-items: center;
        opacity: 1;
        transition: 0.2s all ease-in-out;
    }

    .expanded .nav_separator {
        display: block;
        width: 70%;
        height: 2px;
        opacity: 1;
        background-color: var(--border-grey);
        margin: 15px auto 20px;
        transition: 0.2s all ease-in-out;
    }
}

@media (max-width: 800px) {
    .flip_card,
    .flip_card:nth-of-type(1),
    .flip_card:nth-of-type(2) {
        margin: 20px 0 0 !important;
    }

    .flip_card.expanded {
        height: 340px;
    }
}

@media (max-width: 700px) {
    .flip_card,
    .flip_card:nth-of-type(1),
    .flip_card:nth-of-type(2) {
        width: 100%;
        height: 180px;
    }

    .flip_card.expanded {
        height: 340px;
    }
}

@media (max-width: 500px) {
    .flip_card,
    .flip_card:nth-of-type(1),
    .flip_card:nth-of-type(2) {
        height: 160px;
    }

    .flip_card.expanded {
        height: 340px;
    }
}