//Converts px to vw
@function get-vw($target) {
    $vw-context: (768*.01) * 1px;
    @return ($target/$vw-context) * 1vw;
}

@function get-mobile-vw($target) {
    $vw-context: (320*.01) * 1px;
    @return ($target/$vw-context) * 1vw;
}

//Colors
$dark: #2B2B2B;
$grey: #636363;

#content-description {
    display: none;
}

body {
    padding: 0;
    margin: 0;
}

.main-page-wrapper {
    width: 1112px;
    margin: 0 auto 32px auto;

    .main-head {
        margin: 54px 0 128px 0;

        @media (max-width: 800px) {
            & {
                margin: get-mobile-vw(20px) 0 get-mobile-vw(67px) 0;
            }
        }

        .main-head__headline {
            display: none;
            font-style: normal;
            font-weight: bold;
            font-size: 129px;
            line-height: 88px;
            margin: 0;
            text-align: center;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: $dark;

            @media (max-width: 1140px) {
                & {
                    font-size: 9vw;
                }
            }

            @media (max-width: 800px) {
                & {
                    display: inline-block;
                    font-size: get-mobile-vw(30px);
                    line-height: get-mobile-vw(23px);
                }
            }
        }
    }

    .vehicles-section {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;

        @media (max-width: 1140px) {
            & {
                justify-content: space-around;
            }
        }

        @media (max-width: 800px) {
            & {
                justify-content: center;
            }
        }

        .vehicles-section__item {

            @media (max-width: 800px) {

                & {
                    width: 90vw;
                }

                .vehicles-section__image {
                    width: 100%;
                }
            }

            .vehicles-section__headline {
                line-height: 20px;
                letter-spacing: 0.03em;
                margin: 0;

                @media (max-width: 800px) {
                    & {
                        line-height: get-mobile-vw(14px);
                    }
                }

                a {
                    color: inherit;
                    text-decoration: none;
                }

                .vehicles-section__headline_year {
                    font-size: 14px;
                    color: #808080;

                    @media (max-width: 800px) {
                        & {
                            font-size: get-mobile-vw(12px);
                        }
                    }
                }

                .vehicles-section__headline_model {
                    font-size: 20px;
                    text-transform: uppercase;
                    color: $dark;

                    @media (max-width: 800px) {
                        & {
                            font-size: get-mobile-vw(15px);
                        }
                    }

                    &:hover {
                        color: $grey;
                    }
                }
            }

            .vehicles-section__cta {
                display: flex;
                font-size: 14px;
                line-height: 100%;
                text-align: center;
                letter-spacing: 0.04em;
                text-transform: uppercase;
                margin: 19px 0 120px 0;

                @media (max-width: 800px) {
                    & {
                        font-size: get-mobile-vw(12px);
                        margin: get-mobile-vw(11px) 0 get-mobile-vw(80px) 0;
                    }
                }

                .vehicles-section__cta_inventory {
                    background: $dark;
                    text-decoration: none;
                    display: block;
                    padding: 13px 16px;
                    color: white;
                    border-radius: 4px;
                    margin-right: 16px;

                    @media (max-width: 800px) {
                        & {
                            padding: get-mobile-vw(9.5px) get-mobile-vw(16.3px);
                            border-radius: get-mobile-vw(4px);
                            margin-right: get-mobile-vw(8px);
                        }
                    }

                    &:hover {
                        background: $grey;
                    }
                }

                .vehicles-section__cta_model {
                    text-decoration: none;
                    display: block;
                    border: 1px solid #E6E6E6;
                    color: $dark;
                    border-radius: 4px;
                    padding: 13px 16px;

                    @media (max-width: 800px) {
                        & {
                            padding: get-mobile-vw(9.5px) get-mobile-vw(22px);
                            border-radius: get-mobile-vw(4px);
                        }
                    }

                    &:hover {
                        background: $grey;
                        border: 1px solid $grey;
                        color: white;
                    }
                }
            }
        }
    }

    .paragraph-section {
        color: $dark;
        letter-spacing: 0.01em;

        .paragraph-section__headline {
            font-size: 24px;
            line-height: 32px;
            text-transform: uppercase;

            @media (max-width: 800px) {
                & {
                    font-size: get-mobile-vw(18px);
                    line-height: get-mobile-vw(24px);
                }
            }
            
        }

        .paragraph-section__text {
            font-size: 14px;
            line-height: 20px;

            a {
                color: $grey;
                text-decoration: none;
            }

            @media (max-width: 800px) {
                & {
                    font-size: get-mobile-vw(12px);
                    line-height: get-mobile-vw(16px);
                }
            }
        }
    }

    @media (max-width: 1140px) {
        & {
            width: 100%;
        }
    }

    @media (max-width: 800px) {
        & {
            width: 90vw;
            padding: 0;
        }
    }
}