/**
 * Herbalist
 * Herbalist – is a website template created for selling the cannabis, medical marijuana and CBD products, cannabis blogging and others
 * Exclusively on https://1.envato.market/herbalist-html
 *
 * @encoding        UTF-8
 * @version         1.0.0
 * @copyright       (C) 2018 - 2021 Merkulove ( https://merkulov.design/ ). All rights reserved.
 * @license         Envato License https://1.envato.market/KYbje
 * @contributors    Lamber Lilit (winter.rituel@gmail.com)
 * @support         help@merkulov.design
 **/
// latest news section

.latest {
    &_header {
        margin-bottom: 30px;
    }

    &_list {
        .list-item {
            margin-bottom: 30px;

            &:hover {
                .preview-img {
                    transform: scale(1.1);
                }
            }
        }

        &-preview {
            border-radius: 24px;
            overflow: hidden;
            margin-bottom: 15px;

            .preview-img {
                transition: all .3s ease-in-out;
            }
        }

        &-main {
            .metadata {
                display: block;

                &_item {
                    font-size: 14px;
                    line-height: 22px;
                    font-weight: 600;

                    &:first-of-type {
                        margin-right: 15px;
                    }

                    .icon {
                        margin-right: 5px;
                    }
                }
            }

            .title {
                display: inline-block;
                margin: 15px 0;
                font-size: 20px;
                line-height: 1.3;
                font-family: $accentFont;
                font-weight: 700;
                color: $primary;
            }
        }
    }

    &_promo {
        position: relative;
        border-radius: 16px;
        overflow: hidden;

        .overlay {
            position: absolute;
            color: #fff;
            background: rgba($primary, .7);
            bottom: 0;
            left: 0;
            right: 0;
            top: 0;
            padding: 30px;

            &_header {
                margin-bottom: 15px;
                color: inherit;
            }
        }
    }
}

// media queries

@media screen and (min-width: 575.98px) {
    .latest {

        &_promo {
            max-height: 300px;

            .overlay {
                top: unset;
            }
        }

        &_list {

            &-preview {
                margin-bottom: 0;
                margin-right: 15px;
                min-width: 193px;

                .preview-img {
                    height: 100%;
                }
            }

            &-main {

                .title {
                    max-width: 315px;
                }

                .text {
                    flex-grow: 1;
                }
            }
        }
    }
}

@media screen and (min-width: 767.98px) {
    .latest {
        &_promo {
            max-height: 350px;
            margin-right: -50px;

            .overlay {

                &_header, &_text {
                    max-width: 295px;
                    padding-right: 30px;
                }
            }
        }

        &_list {
            &-preview {
                max-width: 193px;
            }

            &-main {
                .text {
                    max-width: 315px;
                }
            }
        }
    }

}

@media screen and (min-width: 991.98px) {
    .latest {
        &_header {
            margin-bottom: 40px;
            text-align: center;
        }

        &_promo {
            max-height: unset;
            margin-right: 40px;
            flex-grow: 1;

            &-bg {
                height: 100%;
            }

            .overlay {

                &_header, &_text {
                    max-width: 265px;
                    padding-right: 0;
                }
            }
        }

        &_list {
            .list-item {
                &:last-of-type {
                    margin-bottom: 0;
                }
            }

            &-preview {
                margin-right: 30px;
            }

            &-main {
                .title {
                    font-size: 22px;
                }
            }
        }
    }
}

@media screen and (min-width: 1199.98px) {
    .latest {

        &_promo {
            margin-right: 80px;

            .overlay {
                max-width: 394px;
                margin-left: auto;
            }
        }

        &_list {
            &-main {
                .title {
                    margin: 20px 0;
                }
            }
        }
    }
}

