@media (max-width: 1640px) {
   .popularity__right {
       background-color: #fff;
       padding-left: 15px;
       padding-right: 0;
   }

   .history__form {
       margin-left: 0;
   }

   .history__wrapper {
       background-size: 50%;
   }
}

@media (max-width: 1400px) {
    .popularity__wrapper {
        background-size: 750px;
    }
}

@media (max-width: 1230px) {
    .cerificate__content {
        padding-left: 0;
    }

    .reviews-text:nth-child(even) {
        display: none;
    }

    .reviews-text {
        max-width: 100%;
    }

    .composition__box {
        max-width: 100%;
        order: 0;
    }

    .composition__item {
        order: 1;
    }

    .composition__row {
        justify-content: space-around;
    }

    .composition__link {
        max-width: 600px;
    }

    .popularity__wrapper {
        background-image: none;
    }
    .popularity__inner {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    } 
    
    .popularity__right {
        padding-left: 0;
        max-width: 800px;
        order: 0;
    }

    .mobile-bg {
        display: block;
        background-image: url(../images/popularity.jpg);
        background-repeat: no-repeat;
        min-height: 645px;
        background-size: cover;
    }

    .popularity {
        position: relative;
        padding-top: 50px;
    }

    .popularity__box {
        order: 1;
        max-width: 600px;
        position: absolute;
        z-index: 5;
        bottom: -110px;
        margin-right: 0;
    }

    .popularity__box-text {
        margin-right: 0;
    }

    .history__wrapper {
        background-image: none;
    }

    .history__title {
        text-align: center;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    .history__text {
        max-width: 100%;
        padding-bottom: 60px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .history {
        background-color: #f6f9f3;
        padding-top: 160px;
    }

    .history__form {
        max-width: 100%;
        background-color: #fff;
        padding-top: 30px;
        padding-left: 45px;
        position: relative;
        padding-right: 50%;
        padding-bottom: 242px;
    }

    .history .container {
        padding-left: 0;
        padding-right: 0;
    }

    .history__form::after {
        content: '';
        width: 355px;
        height: 420px;
        background-image: url(../images/alonso.jpg);
        position: absolute;
        right: 15px;
        top: -25px;
        background-size: cover;
    }

    .history__wrapper {
        min-height: 0;
    }
    .quote__wrapper,
    .quote {
        padding: 0;
        min-height: 0;
        background-image: none;
    }
}

@media (max-width: 1140px){
    .advantages__inner {
        flex-wrap: wrap;
    }

    .advantages__item {
        width: 50%;
        padding-right: 70px;
    }
    
}

@media (max-width: 1040px){
    

    .top__inner-img {
        margin-left: 0;
    }

    .items {
        background-color: #f6f9f3;
    }

    .items__title {
        text-align: center;
        margin: 0 auto;
    }

    .item {
        margin-left: 7px;
        margin-right: 7;
        width: 33.3333%;
    }

    .items__inner {
        padding: 20px 5px;
    }
}

@media (max-width: 1000px){

    .list__inner {
        display: block;
    }

    .tabs__content {
        margin: 0 auto;
        max-width: 500px;
    }

    .tabs__reviews {
        left: 0;
        right: 0;
        margin: 0 auto;
    }

    .tabs__content::before,
    .tabs__content::after {
        content: '';
        position: absolute;
        height: 100%;
        width: 100%;
        background-color: #a4c58c;
        z-index: 1;
    }

    .tabs__content::before {
        right: 100%;
    }

    .tabs__content::after {
        left: 100%;
    }

    .list__link {
        justify-content: center;
    }

    .list__link a {
        padding: 22px 36px 22px 73px;
        min-width: 430px;
    }

    .list__link a::after {
        right: 85px;
    }

   

    .tabs__reviews-link {
        left: 132px;
    }

    
    .tabs__reviews::before,
    .tabs__reviews::after{
        content: '';
        position: absolute;
        background-color: #fff;
        width: 100%;
        height: 20px;
        bottom: -20px;
        z-index: 2;
    }

    .tabs__reviews::before {
        right: 100%;
    }

    .tabs__reviews::after {
        left: 100%;
    }

    .list__inner {
        padding-bottom: 20px;
    }
}


@media (max-width: 940px){
    

    .reviews__link {
        flex-direction: column;
    }
    
    .reviews__link-tab {
        margin-bottom: 30px;
    }

    .composition__link {
        order: 2;
    }

    .top__inner-form {
        position: absolute;
        right: 15px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .advantages__inner {
        padding-top: 100px;
    }


    .top__inner-suptitle,
    .top__inner-title,
    .top__inner-text{
        width: 280px;
        margin-right: 100px;
    }


   
    .top__inner-title{
        font-size: 50px;
        line-height: 50px;
    }

    .top__inner-text{
        font-size: 16px;
    }

    .item {
        min-height: 275px;
    }
}

@media (max-width: 840px){
    .build__inner-box {
        padding: 60px 45px 70px 50px;
    }
    .build__wrapper {
        background-image: none;
    }

    .reviews__link {
        margin-bottom: 0;
    }

    .build__inner {
        padding: 0;
        max-width: 644px;
    }
}

@media (max-width: 768px){
    .footer__inner {
        align-items: center;
        flex-direction: column;
        justify-content: center;
    }
    .reviews__title {
        text-align: center;
        font-size: 30px;
        line-height: 40px;
    }

    .reviews__title br {
        display: none;
    }
    
    .reviews__content {
        padding-bottom: 150px;
    }

    .reviews__link {
        margin-top: -192px;
    }

    .reviews__link-tab {
        margin-right: 0;
    }

    .composition__box {
        margin: 0 auto;
        max-width: 520px;
        padding-left: 0;
        padding-right: 0;
    }

    .composition__item-inner {
        width: 332px;
        height: 322px;
    }

    .composition__link {
        width: 332px;
        height: 332px;
    }

    .composition__link-text {
        padding-left: 0;
    }

    .composition__link-text::before {
        display: none;
    }

    .composition__link {
        border: 1px solid #c8dcba;
        padding: 14px 15px 84px 16px;
        margin-left: 0;
    }

    .composition__link-btn {
        padding: 22px 79px 22px 62px;
        left: 0;
    }
    .composition__title {
        font-size: 30px;
        line-height: 40px;
    }

    .composition__title br {
        display: none;
    }

    .items__title {
        font-size: 30px;
        line-height: 40px;
    }

    .items__wrapper {
        min-height: 300px;
    }

    .item {
        min-width: 225px;
        min-height: 225px;
    }

    .history__title {
        font-size: 30px;
        line-height: 40px;
        max-width: 460px;
        margin: 0 auto;
        padding-bottom: 20px;
    }

    .history__text {
        padding-top: 10px;
    } 

    .history__form {
        padding-right: 57%;
        padding-bottom: 135px;
    }

    .header__text{
        font-size: 14px;
    }

    .top__inner-suptitle {
        margin-top: 25px;
    }


    .advantages__inner {
        padding-top: 10px;
        padding-left: 80px;
        padding-right: 50px;
    }

    .advantages__item {
        padding-right: 60px;
    }

    .advantages {
        margin-bottom: 100px;
    }

    .list__title {
        padding-top: 0;
        text-align: center;
        max-width: 370;
        margin: 0  auto 30px;
        font-size: 30px;
        line-height: 40px;
    }

    .popularity__box {
        bottom: -10px;
    }

    .popularity__right-title {
        text-align: center;
        font-size: 30px;
        line-height: 40px;
    }

    .popularity__right {
        max-width: 540px;
    }

    .popularity__right-subtitle {
        text-align: center;
    }

}

@media (max-width: 760px) {
    .build__wrapper {
        min-height: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .build__inner-box {
        padding: 0;
        border: none;
    }

    .build__link {
        padding: 22px 5px;
        width: 100%;
        text-align: center;
        display: block;
    }

    .build__link::after {
        display: none;
    }

    .top__inner-img img {
        width: 200px;
    }

    .advantages__inner {
        padding-top: 180px;
        padding-left: 0px;
        padding-right: 0px;
    }

    .advantages__item {
        padding-right: 30px;
    }



}



@media (max-width: 700px) {
    .header__text{
        display: none;
    }

    .history__title {
        padding-top: 0;
    }

    .history__form {
        padding-right: 45px;
        padding-top: 400px;
        padding-bottom: 50px;
    }

    .history__form::after {
        left: 0;
        right: 0;
        top: 0;
        width: 100%;
    }
}


@media (max-width: 740px) {
    .reviews-text {
        padding-left: 0;
        padding-right: 0;
    }

    .reviews-text:nth-child(odd) {
        padding-left: 0;
        padding-right: 0;
    }

    .reviews-text:nth-child(odd)::before {
        left: 0;
    }

    .reviews__link-popup {
        width: 100%;
        text-align: center;
        padding: 22px 5px;
    }

    .reviews__link-popup::after {
        display: none;
    }

    .reviews__tab {
        width: 49%;
        text-align: center;
        padding: 25px 5px;
        display: inline-block;
    }
}
@media (max-width: 680px) {
    .items__inner {
        display: block;
    }

    .item {
        max-width: 100%;
        width: 100%;
        border: none;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .quote__inner {
        border: none;
        font-size: 20px;
        line-height: 35px;
    }
    
    .top__inner-form {
        left: 15px;
    }   

    .top__inner-img img {
        width: 150px;
    }

    .mobile__link-btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 22px 15px 22px 15px;
    }
    .top-form{
        display: none;
    }

    .top__inner-text {
        display: none;
    }

    .top__inner-form {
        position: static;
        align-items: center;
        text-align: center;
    }

    .top__inner-suptitle,
    .top__inner-title,
    .top__inner-text {
        width: 100%;
        margin-right: 0;
    }

    .top__inner {
        flex-direction: column;
        align-items: center;
    }
    .top__inner-img {
        order: 1;
    }

    .advantages__inner {
        padding-top: 10px;
    }

    .popularity__box-link {
        max-width: 600px;
        padding: 22px 10px 22px 10px;
        text-align: center;
        width: 100%;
        position: static;
        display: block;
    }

    .popularity__box-link::after {
        display: none;
    }
}

@media (max-width: 600px) {
    .top__inner-img img {
        width: 85px;
    }



    .advantages__inner {
        padding-top: 120px;
    }

    .advantages__item {
        width: 100%;
    }

    .tabs__box {
        flex-direction: column;
    }

    .tabs__box .tab:first-child, .tabs__box .tab:nth-child(3) {
        border-right: none;
        padding-right: 0;
    }

    .tabs__box .tab:last-child, .tabs__box .tab:nth-child(2) {
        padding-left: 0;
    }

    .tabs__box .tab {
        width: 100%;
    }

    .tab-order-0 {
        order: 0;
    }
    
    .tab-order-1 {
        order: 1;
    }

    .tab-order-2 {
        order: 2;
    }

    .tab-order-3 {
        order: 3;
    }
}

@media (max-width: 550px) {
    .tabs__content {
        height: 153px;
        background-image: none;
    }

    .tabs__content::after,
    .tabs__content::before {
        display: none;
    }

    .tab-order-3 {
        border-bottom: none;
    } 
    
    .tabs__reviews {
        position: static;
        margin: 0;
    }

    .tab.active::after {
        display: none;
    }
}


@media (max-width: 480px) {

    .popularity__right-title {
        font-size: 24px;
        line-height: 30px;
    }

    .popularity__box {
        bottom: -255px;
    }

    .mobile-bg {
        min-height: 245px;
    }

    .popularity__right-list li {
        margin-bottom: 15px;
    }

    .popularity__wrapper {
        min-height: 0;
    }

    .popularity__box {
        padding: 0;
    }

    .popularity__box-text {
        text-align: center;
        border: none;
    }

    .header__phone {
        font-size: 14px;
    }

    .header__phone a::before {
        display: none;
    }
    
    .header__phone-text {
        display: none;
    }

    .header__logo img{
        width: 110px;
    }

    .list__title {
        font-size: 24px;
        line-height: 30px;
    }

    .tab{
        font-size: 12px;
        padding: 24px 0;
    }

    .tabs__reviews-text {
        font-size: 14px;
    }

    .tabs__reviews {
        padding: 0;
    }

   
    
    .tab-item {
        display: none;
    }

    .tab-item:first-child {
        display: none;
    }

    .tabs {
        padding-right: 0;
    }

    .tabs__reviews-inner {
        padding: 30px 8px;
        width: 283px;

    }

    .tabs__reviews-link {
        left: 60px;
        bottom: 8px;
    }

    .list__link a {
        margin-top: 0;
        padding: 22px 10px 22px 10px;
        text-align: center;
    }


    .history__form {
        padding-left: 10px;
        padding-right: 10px;
    }

    .history__title {
        padding-top: 155px;
    }

    .quote__inner {
        font-size: 14px;
        line-height: 24px;
    }

    .author {
        font-size: 14px;
    }

    .build__title {
        font-size: 24px;
        line-height: 30px;
        text-align: center;
    }

    .build__text span {
        text-align: center;
    }
}


@media (max-width: 360px) {
    .reviews__title {
        font-size: 24px;
        line-height: 30px;
    }

    .composition {
        padding: 115px 0 100px;
    }

    .composition__title {
        font-size: 24px;
        line-height: 30px;
        text-align: center;
    }

    .composition__item-inner {
        width: 300px;
        height: 300px;
    }
    
    .composition__link {
        width: 300px;
        height: 100%;
        border: none;
        padding: 0;
        text-align: center;
    }

    .composition__link-text p {
        font-size: 14px;
        line-height: 24px;
    }

    .composition__link-btn {
        padding: 22px 10px;
        left: -10px;
        right: -10px;
        text-align: center;
        bottom: auto;
    }

    .composition__link-btn::after {
        display: none;
    }

    .items__inner {
        background-color: #f6f9f3;
    }

    .item__number {
        color: #fff;
    }

    .items__title {
        font-size: 24px;
        line-height: 30px;
    }

    .history__title {
        font-size: 20px;
        line-height: 26px;
    }

    .top__images {
        min-height: 375px;
    }

    .top__inner-title {
        font-size: 30px;
        line-height: 36px;
        margin-bottom: 16px;
        padding: 0 15px;
    }

    .top__inner-suptitle {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .top__wrapper {
        margin-top: -365px;
    }

    .advantages__inner {
        padding-top: 50px;
    }

    .advantages__item {
        margin-bottom: 40px;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .history__form {
        text-align: center;
    }

    .history__form-title {
        padding-right: 0;
    }

    .history__form input {
        text-align: center;
    }

    .form__btn  {
        padding: 22px 5px;
    } 

    .form__btn::after {
        display: none;
    }
}