@media (max-width: 1118px) {
    header {
        nav {
            & ul {
            flex-wrap: wrap;
            justify-content: center;
            }
        }
    }
    header {
        .phone {
            & a {
            min-width: 180px;
            }
        }
    }
    .desc {
        display: none;
    }
    .services-info {
        & .services-info--content {
            & .service-info--item {
                flex-wrap: wrap;
                justify-content: flex-start;
            }
        }
    }
    section.advantages {
        & .advantages-content {
            flex-wrap: wrap;
            justify-content: center;
            & .advantage-item {
                min-width: 270px;
                flex-grow: 0;
            }
        }
    }
    .service-image--small {
        display: none;
    }
    section.services {
        & .services-content {
            & .service-item {
                &.one, &.two {
                    width: 100%;
                }
            }
        }
    }
    section.services {
        & .services-content {
            & .service-item {
                & h3 {
                    font-size: 22px;
                    font-weight: 700;
                }
                & p {
                    display: none;
                }
            }
        }
    }
    section.reviews {
        & .reviews-header {
            & .reviews-image--small {
            display: none;
            }
        }
    }
    section.calculator {
        & .calculator-content {
            flex-direction: column;
               & .calculator-content--right {
                border-radius: 0 0 40px 40px;
                }
        }
    }
    section.quiz {
        & .quiz-container {
            padding: 40px 36px;
        }
    }
}
@media (max-width: 870px) {
    h2 {
        font-size: 32px;
        line-height: 40px;
    }

    header {
        padding: 15px;
        flex-wrap: wrap;
        a.logo {
            flex: 0 0 100%;
            justify-content: center;
        }
        nav {
            display: none;
        }
        .phone, .messagers {
            flex: 0 0 auto;
            justify-content: center;
        }

    }
    section.hero {
        flex-wrap: wrap;
        .hero-left, .hero-right {
            min-width: 400px;
        }
        & .hero-left {
            & .hero-left--content {
                padding: 0;
                height: 450px;
                & h1 {
                    font-size: 22px;
                    line-height: 30px;
                }
                & .hero-btn {
                    margin-top: 0;
                }

            }
        }
    }
    section.services {
    & .services-content {
            & .service-item {
            & div:nth-child(1) {
                width: 100%;
            }
            }
        }
    }
    section.clients {
        & .clients-content {
            flex-wrap: wrap;
            height: auto;
            flex-direction: row;
            gap: 20px;
            justify-content: center;
        }
    }
    section.clients {
        & .clients-content {
            & .item {
                align-self: center;
                &:nth-child(2), &:nth-child(4) {
                    align-self: center;
                }
            }
        }
    }
    section.about {
        flex-wrap: wrap;
        flex-direction: column-reverse;
    }
    section.about {
        & .about-right {
            & img {
            width: 100%;
            max-width: 610px;
            }
        }
    }
    .services-header {
        p {
            line-height: 26px;
        }
    }
    section.table {
        & div {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        & table {
            min-width: 700px;
        }
    }
        section.callback {
            background-size: 300px;
        & .callback-form {
            & form {
            flex-wrap: wrap;            gap: 0;
            & div {
                & input {
                    min-width: auto;
                    width: 100%;
                    font-size: 16px !important;
                }
            }            }
        }
    }
    section.reviews {
    & .reviews-content {
        & .review-item {
        flex: 100%;
        }
    }
    }
    section.info {
        padding: 30px 0;
          & .info-content {
            padding: 0;
        }
    }
    section.calculator {
        padding: 0;
                  & .calculator-content {
            & .calculator-content--left {
                flex-direction: column-reverse;
                & .calc-form {
                    & .form-row {
                        flex-direction: column;
                        background-color: transparent;
                        padding: 0;
                        gap: 10px;
                        & input {
                            width: 100%;
                            font-size: 16px !important;
                            min-height: 44px;
                            padding: 0 10px;
                        }
                    }
                    & div {
                        flex-direction: column;
                        & input {
                            width: auto;
                            font-size: 16px !important;
                        }
                    }
                     & button {
                        width: 100%;
                        justify-content: center;
                     }
                }
            }
        }
    }
    section.portfolio {
        & .portfolio-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 30px;
        }
    }
    section.faq {
        & .faq-content {
            padding: 0;
            & .faq-item {
                & h3 {
                    padding: 20px;
                    height: auto;
                } 
                
            }
        }
    }
    section.stage {
        .stage-content {
            flex-direction: column;
        }
    }
    footer {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 20px;
        align-items: center;
        
        & .info {
            text-align: left;
            order: 3;
            
            & img {
                width: 168px;
                height: auto;
            }
            
            & p {
                font-size: 9px;
            }
        }
        
        & .menu {
            order: 1;
            width: 150px;
            
            & h3 {
                font-size: 14px;
                margin-bottom: 10px;
            }
            
            & a {
                font-size: 12px;
            }
        }
        
        & .menu:nth-child(3) {
            order: 2;
        }
        
        & .contact {
            gap: 20px;
            order: 0;
            
            & .phone {
                & a {
                    font-size: 16px;
                }
            }
            
            & button {
                font-size: 12px;
                padding: 8px 15px;
            }
        }
    }
    section.quiz {
        & .quiz-container {
            padding: 30px 24px;
        }
        & .quiz-step {
            & h3 {
                font-size: 22px;
                line-height: 30px;
            }
        }
        & .quiz-estimate {
            & .quiz-estimate-value {
                font-size: 30px;
            }
        }
    }

    .sticky-quiz-btn {
        right: 16px;
        bottom: 16px;
        padding: 12px 18px;
        font-size: 13px;
    }
}

@media (max-width: 520px) {
    h2 {
        font-size: 22px;
        line-height: 26px;
    }
    p {
        font-size: 14px;
    }
    footer {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "info info"
            "phone phone"
            "button button"
            "menu-1 menu-2";
        align-items: start;
        gap: 18px 16px;

        & .info {
            grid-area: info;
            order: initial;
            width: 100%;
            text-align: left;
            align-items: center;

            & img {
                width: 140px;
            }
        }

        & .menu {
            order: initial;
            width: 100%;
            min-width: 0;
        }

        & .menu:nth-child(2) {
            grid-area: menu-1;
        }

        & .menu:nth-child(3) {
            grid-area: menu-2;
        }

        & .contact {
            display: contents;
            order: initial;
        }

        & .contact .phone {
            grid-area: phone;
            justify-self: center;
            align-self: start;
            align-items: center;
            gap: 8px;

            & svg {
                width: 40px;
                height: 40px;
                flex-shrink: 0;
            }

            & a {
                display: block;
                font-size: 20px;
                text-align: left;
            }
        }

        & .contact button {
            grid-area: button;
            width: 100%;
            justify-content: center;
            padding: 10px 14px;
        }
    }
    section.hero {
        flex-wrap: wrap;
        .hero-left, .hero-right {
            min-width: auto;
        }
        & .hero-left {
            & .hero-left--content {
                padding: 20px;
                height: 450px;
                & h1 {
                    font-size: 22px;
                    line-height: 30px;
                }
                & .hero-btn {
                    margin-top: 0;
                }

            }
        }
    }
    section.services {
        & .services-content {
            & .service-item:nth-child(4) {
            color: black;
            }
        }
    }
    section.about {
        & .about-left {
            & h2 {
            font-size: 32px;
            line-height: 40px;
            }
        }
    }
    section.callback {
        background-size: 200px;
        padding: 35px 25px;
        & .callback-info {
            & p {
            width: 60%;
            font-size: 14px;
            }
        }
        & .callback-form {
            & form {
                gap: 15px;
                flex-direction: column;
                & div {
                    & input {
                        min-width: auto;
                        width: 90%;
                        font-size: 16px !important;
                    }
                }
                & button {
                    margin-top: 0;
                    width: 100%;
                }
            }
        }
    }
    section.table {
        & div {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            h2 {
                margin: 10px 0;
            }
        }
        & table {
            min-width: 600px;
            font-size: 12px;
            th, td {
                padding: 5px;
            }
        }
    }
    section.calculator {
    & .calculator-content {
        flex-direction: column;
        padding: 0;
        & .calculator-content--left {
            flex-direction: column;
            padding: 0;
            p:first-child {
                    display: none;
                }
            & .calc-form {
                & div {
                    flex-direction: column;
                    gap: 15px;
                    justify-content: flex-start;
                    background-color: transparent;
                    padding: 0;
                    & input {
                        width: 100%;
                        min-height: 44px;
                        font-size: 16px !important;
                        padding: 0 15px;
                    }
                }
                & button {
                    width: 100%;
                    margin-top: 10px;
                }
            }
        }
        & .calculator-content--right {
            flex: none;
            padding: 30px 25px;
            border-radius: 0;
            & h3 {
                font-size: 22px;
            }
        }
    }
    }
    .services-info {
        & .services-info--content {
            & .service-info--item {
                img {
                    width: 100%;
                }
            }
        }
    }
    section.portfolio {
        & .sw-caption {
            font-size: 12px;
        }
    }
    section.calculator {
        & .calculator-content {
            & .calculator-content--right {
                & h3 {
                    font-size: 22px;
                }
            }
        }
    }
    section.info {
        .info-content {
            p {
                line-height: 22px;
            }            
        }
    }
    section.calculator {
        .calculator-header {
            p {
                line-height: 18px;
            }
        }
    }
    .services-info {
        .services-info--content {
            .service-info--item {
                h3 {
                    font-size: 22px;
                }
            }
        }
    }
    .services-header {
        p {
            line-height: 20px;
        }
    }
    section.quiz {
        & .quiz-container {
            padding: 24px 18px;
            border-radius: 24px;
        }
        & .quiz-option {
            width: 100%;
            text-align: center;
        }
        & .quiz-form {
            & input[type="tel"] {
                min-width: auto;
                width: 100%;
            }
            & .hero-btn {
                width: 100%;
                justify-content: center;
            }
        }
    }

    .sticky-quiz-btn {
        right: 12px;
        left: 12px;
        bottom: 12px;
        text-align: center;
    }
}