@grey1:     #fafafa;
@grey2:     #f2f2f2;
@grey3:     #888;


//
//  Common (styles-m.css)
//  _____________________________________________

& when (@media-common = true) {

    .cg-above-footer-3{

        background: white;

        .block{
            &.footer-images{
                //border-bottom: 1px solid @grey2;
                margin: auto;
                width: 100%;
                max-width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                flex-direction: column;
                overflow: hidden;
                padding: 0 0 4rem 0;

                @media(min-width: 768px){
                    padding: 7rem 0 7rem 0;
                }

                .content{
                    width:100%;
                }

                .title-wrap{
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;

                    h2{
                        font-size: 4rem;
                        margin: 0 0 3rem 0;
                    }

                    p{
                        font-size: 2rem;
                        margin: 0 0 3.5rem 0;
                        text-align: center;
                    }

                }

                ul{
                    list-style-type: none;
                    padding: 0;
                    display: flex;
                    width: 100%;
                    justify-content: space-between;

                    li{
                        position: relative;
                        display: flex;
                        align-items: center;
                        justify-content: center;

                        &:hover{
                            cursor: pointer;
                        }
                    }
                }

                .top-level{
                    flex-direction: row;

                    > li{
                        &:first-child{
                            width: 40%;
                            border: solid 10px white;
                            margin-left: -10px;

                            &:hover{
                                &:after{
                                    opacity: 1;
                                    visibility: visible;
                                    transition: all 300ms ease;
                                    background: rgba(0,0,0,20%);
                                }
                            }

                            &:after{
                                content:" ";
                                width: ~"calc(100% - 10px)";
                                height: 100%;
                                position: absolute;
                                top:0;
                                left:0;
                                background: black;
                                opacity: 0;
                                visibility: hidden;
                            }

                            img{
                                object-fit: cover;
                                object-position: center;
                                width: 100%;
                                height: 100%;
                                margin: 0 10px;
                            }
                        }

                        &:last-child{
                            width: 60%
                        }
                    }
                }

                .sub-level{
                    flex-wrap: wrap;

                    > li{
                        width: ~"calc( 33% - 20px)";
                        min-height: 230px;
                        margin: 0;
                        border: solid 10px white;

                        img{
                            object-fit: cover;
                            object-position: center;
                            width: 100%;
                            height: 100%;
                        }

                        &:hover{
                            &:after{
                                opacity: 1;
                                visibility: visible;
                                transition: all 300ms ease;
                                background: rgba(0,0,0,20%);
                            }
                        }

                        &:after{
                            content:" ";
                            width:100%;
                            height: 100%;
                            position: absolute;
                            top:0;
                            left:0;
                            background: black;
                            opacity: 0;
                            visibility: hidden;
                        }
                    }
                }
            }
        }
    }
}

//
//  max 768
//  _____________________________________________

@media(max-width: 768px){
    .cg-above-footer-3 .block.footer-images .title-wrap h2{
        font-size: 3rem;
    }
    .cg-above-footer-3 .block.footer-images .title-wrap p{
        font-size: 1.6rem;
    }

    .cg-above-footer-3 .block.footer-images .top-level > li:first-child{
        h2, h3, h4, p{
            margin: 0;
            font-size: 2rem;
        }
    }

}

//
//  max 991
//  _____________________________________________

@media(max-width: 991px){
    .cg-above-footer-3 .block.footer-images .sub-level > li{
        min-height: 100px;
    }

    .cg-above-footer-3 .block.footer-images .top-level > li:first-child{
        display: none;
    }

    .cg-above-footer-3 .block.footer-images .top-level > li:last-child{
        width: 100%;
    }
}

//
//  max 786
//  _____________________________________________

@media(min-width: 768px){
    .cg-above-footer-3 .block.footer-images .top-level {
        flex-direction: row;
        width: ~"calc( 100% + 20px)";
        margin-left: -10px;
    }

}

