html{
    box-sizing: border-box;
}

*, *::after, *::before{
    box-sizing: inherit;
}

/**********************************************/

        /*Для прибития footer*/

html, body{
    height: 100%;
}

.wrapper{
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.main{
    flex-grow: 1;
}

/**********************************************/

a{
    text-decoration: none;
    color: inherit;/*Цвет наследуется от родителя*/
}

ul{
    list-style: none;
}

body{
    color: rgb(21, 22, 24);/*Акцентный цвет элементов*/
    font-size: 20px;
    font-weight: 300;
    line-height: normal;
    font-family: "Open Sans", sans-serif;
    /* font-family: "Cormorant", serif; */
    position: relative;
}

button{/*Also For Burger Menu*/
    padding: 0;
    border: none;
    background-color: transparent;
}

.title{
    text-align: center;
    margin-bottom: 60px;
    font-family: "Cormorant", serif;
    color: rgb(21, 22, 24);
    font-size: 40px;
    font-weight: 400;
    line-height: 48px;
}

.container{
    max-width: 1240px;/*1200 + 20(pl) +20(pr)*/
    margin: 0 auto;/*Ставлю блок с фиксированной шириной по центру*/
    padding-left: 20px;
    padding-right: 20px;
}

/*Header*/

.header__inner{
    min-height: 140px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
}

.logo{
    margin-bottom: 35px;
}

.menu__list{
    display: flex;
    align-items: center;
    gap: 0 65px;
    font-size: 18px;
    font-weight: 400;
    margin-left: 85px;
    position: relative;
    z-index: 3;
}

.menu__btn{/*For Burger Menu*/
    display: none;
    width: 40px;
    height: 20px;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.menu__btn span{
    background-color: #000;
    height: 2px;
    width: 100%;
}

    /*Для затемненного фона при открытом Burger Menu*/

.menu--close{
    display: none;

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.menu--close.menu--open{
    display: block;
}

.user-actions{
    display: flex;
    align-items: center;
    gap: 0 20px;
}

.user-actions__item-search{
    margin-left: 80px;
}

    /*For Burger Menu*/

.mobile-nav, .menu__close{
    display: none;
}    

/*Section Top*/

.top{
    background-image: url(.././images/top-bg.jpeg);
    background-repeat: no-repeat;
    background-position: bottom left;/*Чтобы на любых экранах (при уменьшении) была лева часть картинки*/
    background-size: cover;
}

.top__inner{
    min-height: 500px;
    color: #fff;
    font-family: "Cormorant", serif;
    font-weight: 400;
    /*Чтобы прижать текст к низу блока и расположить как на макете*/
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.top__title{
    font-size: 60px;
    margin-bottom: 20px;
    max-width: 780px;
    line-height: 1;
    font-weight: 400;/*Тегам h нужно всегда явно указывать font-weight*/
}

.top__text{
    font-size: 24px;
    margin-bottom: 48px;
    max-width: 560px;
}

    /*Вставка а-ля цитаты*/

.blockquote__text{
    text-align: center;
    font-family: "Cormorant", serif;
    font-size: 40px;
    font-style: italic;
    max-width: 704px;
    margin: 150px auto;
}

/*Section assortment*/

.assortment{
    margin-bottom: 150px;
}

.assortment__list{
    text-align: center;
    display: flex;
    gap: 0 40px;
}

.assortment__img{
    max-width: 208px;
    max-height: 208px;
    width: 100%;
}

.assortment__name{
    padding-top: 10px;
    font-size: 24px;
    font-weight: 400;
    font-family: "Cormorant", serif;
}

/*Section reviews*/

.reviews{
    background-color: #F7F2EA;
    padding-top: 60px;
    padding-bottom: 60px;
}

.reviews__list{
    display: flex;
    gap: 0 26px;
    justify-content: center;
}

.reviews__item{
    flex-basis: 280px;
}

.reviews__text{
    font-size: 16px;
    font-style: italic;
    margin-bottom: 10px;
}

.reviews__name{
    font-size: 20px;
    font-weight: 600;
}

/* .reviews__item.reviews__item--hide{Добавляю класс, чтобы при определенных экранах (по макету) менять кол-во комментариев от покупателей. При таком способе логика прописывается на бек-енде.
    display: none; 
} */

/*Section Blog*/

.main-blog{
    padding: 150px 0;
}

.main-blog__list{
    display: flex;
    flex-wrap: wrap;
    gap: 40px 58px;
}

.main-blog__item{
    flex-basis: 542px;
    display: flex;
    gap: 0 20px;
}

.main-blog__item-content{
    display: flex;
    flex-direction: column;

}

.main-blog__item-title{
    font-family: "Cormorant", serif;
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 10px;
    min-height: 86px;
}

.main-blog__item-author{
    font-size: 13px;
}

.main-blog__item-link{
    margin-top: auto;
    font-size: 13px;
    position: relative;
}

.main-blog__item-link::after{
    content: '';
    position: absolute;
    background-image: url(.././images/arrow.svg);
    width: 5px;
    height: 10px;
    margin-left: 8px;
    bottom: 3px;
}

.main-blog__link{
    padding: 12px 41px;
    display: flex;
    justify-content: center;
    margin: 72px auto 0;
    border: 1px solid rgb(21, 22, 24);
    width: 152px;
}

/*Section Subscribe*/

.subscribe{
    padding: 100px 0;
    background-color: #F7F2EA;
    background-image: url(.././images/subscribe-bg.png);
    background-repeat: no-repeat;
    background-position: bottom right;
}

.subscribe__title{
    text-align: left;
    margin-bottom: 50px;
}

.subscribe__inner{
    display: flex;
    gap: 60px 40px;
}

.subscribe__text{
    line-height: 1.5;/*150%*/
    flex-basis: 580px;
}

.subscribe__form{
    display: flex;
    flex-wrap: wrap;
    flex-basis: 580px;
}

.subscribe__form-email{
    border: none;
    border-bottom: 1px solid #B8B58B;
    background-color: transparent;
    padding: 3px 15px;
    width: 438px;
    margin-right: 25px;
    /*Для текста, который прописывается*/
    color: #151618;
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.5;
}

.subscribe__form-email::placeholder{
    color: rgb(184, 181, 139);
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.5;
}

.subscribe__form-btn{
    font-family: 'Open Sans', sans-serif;
    background-color: #fff;
    border: 1px solid #151618;
    padding: 12px 41px;
    font-size: 20px;
    font-weight: 300;
    cursor: pointer;
}

.subscribe__form-label{
    margin-top: 16px;
}

.checkbox{/*Убираю стандартный checkbox*/
    position: absolute;
    width: 1px;
    height: 1px;
    clip: rect(0, 0, 0, 0);
    overflow: hidden;
    padding-left: 20px;
}

.checkbox-style{/*Делаю свой checkbox*/
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid #151618;
    margin-top: 5px;
}

.checkbox:checked + .checkbox-style::before{/*Для галочки в checkbox*/
    position: absolute;
    content: '';
    width: 6px;
    height: 6px;
    background-color: #151618;
    top: 1px;
    left: 1px;
}

.checkbox__text{
    font-size: 13px;
    padding-left: 20px;
}

/*Section We Prioritise*/

.prioritise{
    padding: 150px 0;
}

.prioritise__list{
    display: flex;
    text-align: center;
    justify-content: center;
    flex-wrap: wrap;
    /* flex-direction: row; */
    gap: 30px 49px;
}

.prioritise__item-title{
    font-family: 'Open Sans', sans-serif;
    font-size: 30px;
    font-weight: 300;
    margin-bottom: 10px;
}

.prioritise__item-text{
    font-family: 'Open Sans', sans-serif;
    margin-bottom: 30px;
    font-weight: 600;
}

/*Footer*/

.footer{
    padding: 100px 0 20px;
    background-color: #F7F2EA;
}

.footer__inner{
    margin-bottom: 100px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0 40px;
}

.footer__products-title, .footer__company-title, .footer__contacts-title{
    font-size: 24px;
    font-family: 'Cormorant', serif;
    font-weight: 400;
    line-height: 29px;
    margin-bottom: 50px;
}

.footer__products-item, .footer__company-item{
    margin-bottom: 20px;
}

.footer__blockquote{
    margin-top: 80px;
}

.footer__blockquote-text{
    font-style: italic;
    margin-bottom: 20px;
}

.footer__blockquote-author{
    font-size: 12px;
    font-style: normal;
}

.footer__blockquote-author span{
    display: block;
}

.footer__contacts-text{
    font-size: 13px;
    margin-bottom: 20px;
}

.footer__nav{
    display: flex;
    flex-wrap: wrap;
}

.footer__logo{
    width: 57px;
    height: 91px;
}

.footer__nav-logo{
    margin-right: 36px;
}

.footer__nav-contacts{
    margin-top: 20px;
}

.footer__nav-phone, .footer__nav-email{
    font-size: 13px;
    position: relative;
    padding-left: 40px;
    display: block;
    margin-bottom: 20px;
}

.footer__nav-phone::before, .footer__nav-email::before{
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 22px;
    height: 16px;
    background-image: url(.././images/mail.svg);
}

.footer__nav-phone::before{
    background-image: url(.././images/phone.svg);
    width: 21px;
    height: 21px;
}

.footer__nav-social{
    margin-top: 40px;
    margin-left: 97px;
}

.footer__nav-social--list{
    display: flex;
    align-items: center;
    gap: 0 20px;
}

.footer__nav-social--link{
    display: grid;
}

.footer__bottom{
    display: flex;
}

.footer__copy{
    margin-right: 192px;
    font-size: 16px;
}

.partners-logo{
    display: flex;
    align-items: center;
    gap: 0 20px;
}

.partners-logo__item-mc{
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

/*Adaptive*/

@media (max-width: 1000px){
    /*Header*/

    .header__inner{
        min-height: auto;
    }

    .user-actions__item-search{
        margin-left: 30px;
    }

    .menu{
        margin-right: auto;
    }

    .menu__list{
        margin-left: 60px;
    }

    .logo{
        margin-bottom: 0;
    }

    /*Вставка а-ля цитаты*/

    .blockquote__text{
        margin-top: 120px;
        margin-bottom: 135px;
    }

    /*Section assortment*/

    .assortment{
        margin-bottom: 120px;
    }

    .assortment__list{
        gap: 0;
    }

    /*Section reviews*/

    /*Добавляю класс, чтобы при определенных экранах (по макету) менять кол-во комментариев от покупателей. Такая логика для фронтенда*/
    .reviews__item:last-child{/*Исчезает последний элемент наследник при 1000*/
        display: none;
    }

    /*Section Blog*/

    .main-blog{
        padding: 120px 0;
    }

    .main-blog__list{
        gap: 67px 20px;
    }

    .main-blog__item{
        flex-basis: 460px;
    }

    .main-blog__item-img{
        max-width: 230px;
    }

    .main-blog__link{
        margin-top: 60px;
    }

    /*Section Subscribe*/

    .subscribe{
        padding: 60px 0;
    }

    .subscribe__inner{
        flex-wrap: wrap;
        justify-content: center;
    }

    .subscribe__title{
        text-align: center;
    }

    .subscribe__text{
        text-align: center;
        flex-basis: 780px;
    }

    /*Section We Prioritise*/

    .prioritise{
        padding: 120px 0;
    }

    .prioritise__list{
        gap: 30px 210px;
    }

    /*Footer*/

    .footer__blockquote{
        width: 270px;
        margin-top: 0;
    }

    .footer__inner{
        margin-bottom: 55px;
    }

    .footer__copy{
        margin-right: 85px;
    }

    .footer__nav-logo{
        margin-right: 35px;
    }

    .footer__contacts{
        width: 270px;
    }
}

@media (max-width: 860px){
    /*Header*/

    .menu{
        order: -1;
        margin-right: 0;
    }

    .menu__list{
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 480px;
        margin: 0 auto;
        background-color: #fff;
        display: block;
        text-align: center;
        padding-top: 60px;
        transform: translateY(-100%);
        transition: transform .8s ease;
    }

    .menu__list.menu__list--open{
        transform: translateY(0%);
    }

    .menu__btn{/*For Burger Menu*/
        display: flex;
    }

    .logo{
        margin-left: auto;
        margin-right: 154px;
    }

        /*For Burger Menu*/

    .mobile-nav, .menu__close{
        display: block;
    }     

    .menu__close-btn{
        position: absolute;
        top: 20px;
        right: 20px;
    }
    
    .menu__item{
        margin-bottom: 30px;
        font-size: 24px;
        font-weight: 400;
        font-family: "Cormorant", serif;
    }

    .mobile-menu{
        padding-top: 60px;
        margin: 60px 30px;
        border-top: 2px solid #F7F2EA;
    }

    .mobile-menu__item{
        margin-bottom: 35px;
    }

    .mobile-actions{
        background: rgb(247, 242, 234);
        height: 60px;
        padding: 0 80px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 768px){
    /*Header*/

    .header__inner{
        padding-left: 64px;
        padding-right: 64px;
    }

    /*Вставка а-ля цитаты*/

    .blockquote__text{
        max-width: 640px;
    }

    /*Section assortment*/

    .title{
        margin-bottom: 40px;
    }

    .assortment__list{
        gap: 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    /*Section reviews*/

    .reviews__item:last-child{
        display: block;
    }

    .reviews__list{
        flex-wrap: wrap;
        gap: 30px 76px;
    }

    /*Section Blog*/

    .main-blog__list{
        gap: 30px 20px;
    }

    .main-blog__item{
        flex-basis: 542px;
    }

    .main-blog__item:nth-child(even){
        margin-left: 98px;
    }

    .main-blog__item-img{
        max-width: 270px;
    }

    /*Section Subscribe*/

    .subscribe__text{
        flex-basis: 640px;
    }

    /*Section We Prioritise*/

    .prioritise__list{
        gap: 30px 133px;
    }

    /*Footer*/

    .footer__inner{
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: 1fr 1fr;
    }

    .footer__products, .footer__company{
        grid-row: span 3;
    }

    .footer__contacts{
        grid-column: 3 / 4;
        grid-row: 2 /3;
    }

    .footer__copy{
        margin-right: 120px;
    }
}

@media (max-width: 680px){
    .container{
        padding-left: 10px;
        padding-right: 10px;
    }

    /*Header*/

    .header__inner{
        padding-left: 0;
        padding-right: 0;
    }

    /*Section Top*/

    .top__title{
        font-size: 40px;
    }

    /*Вставка а-ля цитаты*/

    .blockquote__text{
        font-size: 16px;
        max-width: 376px;
        font-family: "Open Sans";
        font-weight: 300;
        line-height: 22px;
        margin-top: 60px;
        margin-bottom: 60px;
    }

    /*Section Blog*/

    .main-blog__item:nth-child(even){
        margin-left: 0;
    }
}

@media (max-width: 480px){
    /*Header*/

    .logo{
        margin-right: 80px;
    }

    .logo img{
        width: 40px;
    }

    .menu__list{
        width: 360px;
    }

    /*Section assortment*/

    .assortment{
        margin-bottom: 60px;
    }

    .title{
        margin-bottom: 30px;
    }
    
    .assortment__img{
        max-width: 180px;
    }

    /*Section reviews*/

    .reviews{
        padding: 50px 0;
    }

    .reviews__list{
        gap: 30px 20px;
    }

    .reviews__item{
        flex-basis: 220px;
    }

    /*Section Blog*/

    .main-blog{
        padding: 60px 0;
    }

    .main-blog__item-img{
        max-width: 230px;
    }

    /*Section Subscribe*/

    .subscribe{
        padding: 50px 0;
    }

    .subscribe__inner{
        gap: 30px 0;
    }

    .subscribe__text{
        flex-basis: 100%;
        font-size: 13px;
    }

    .subscribe__form-email{
        width: 324px;
        margin-right: 20px;
    }

    .subscribe__form-btn{
        padding: 10px 38px;
    }

    /*Section We Prioritise*/

    .prioritise{
        padding: 60px 0;
    }

    /*Footer*/

    .footer{
        padding: 50px 0 10px;
    }

    .footer__inner{
        display: flex;
        flex-wrap: wrap;
    }

    .footer__blockquote{
        width: 100%;
    }

    .footer__blockquote-text{
        margin-top: 50px;
        margin-bottom: 10px;
    }

    .footer__blockquote-author{
        display: flex;
    }

    .footer__contacts{
        margin-top: 50px;
        width: 100%;
    }

    .footer__contacts-title{
        margin-bottom: 20px;
        text-align: center;
    }

    .footer__contacts-text{
        text-align: center;
    }

    .footer__nav{
        flex-wrap: nowrap;
    }

    .footer__nav-social{
        margin-left: 30px;
    }

    .footer__copy{
        margin-right: auto;
    }

    .footer__products{
        margin-right: auto;
        padding-right: 20px;
    }

    .footer__company{
        margin-right: 55px;
        padding-right: 20px;
    }

    .footer__products-title, .footer__company-title{
        margin-bottom: 30px;
    }
}

@media (max-width: 380px){
    /*Section assortment*/

    .assortment__title{
        font-size: 24px;
        font-weight: 400;
        line-height: 29px;
        margin-bottom: 8px;
    }
    
    .assortment__img{
        max-width: 170px;
    }
}

@media (max-width: 360px){

    .title{
        margin-bottom: 30px;
        font-size: 24px;
    }

    /*Header*/

    .header__inner{
        padding: 10px 0;
    }

    .logo{
        margin-right: 50px;
    }

    .user-actions__item-search{
        margin-left: 0;
    }

    /*Section Top*/

    .top__inner{
        min-height: 367px;
    }

    .top__title{
        font-size: 24px;
        margin-bottom: 10px;
    }

    .top__text{
        font-size: 13px;
        margin-bottom: 30px;
    }

    /*Вставка а-ля цитаты*/

    .blockquote__text{
        max-width: 340px;
        margin-top: 70px;
        margin-bottom: 80px;
    }

    /*Section assortment*/

    .assortment{
        margin-bottom: 80px;
    }

    /*Section reviews*/

    .reviews__item{
        flex-basis: 100%;
    }

    .reviews__item:last-child,
    .reviews__item:first-child{
        display: none;
    }

    /*Section Blog*/

    .main-blog{
        padding: 50px 0;
    }

    .main-blog__list{
        justify-content: center;
    }

    .main-blog__item{
        display: block;
        max-width: 270px;
    }

    .main-blog__item:nth-child(even){
        display: none;
    }

    .main-blog__item-img{
        max-width: 100%;
    }

    .main-blog__item-title{
        min-height: auto;
    }

    .main-blog__item-link {
        margin-top: 10px;
    }

    /*Section Subscribe*/

    .subscribe__form-email{
        width: 205px;
    }
    
    /*Section We Prioritise*/

    .prioritise{
        padding: 50px 0;
    }

    .prioritise__item-title{
        font-size: 20px;
    }

    .prioritise__item-text{
        font-size: 10px;
        font-weight: 400;
    }

    .prioritise__list{
        gap: 40px 100px;
    }

    /*Footer*/

    .footer__company{
        padding-right: 15px;
        margin-right: 0;
    }

    .footer__nav{
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer__products{
        padding-right: 10px;
    }

    .footer__nav-social{
        margin: 40px auto 50px;
    }
}