@media screen and (max-width: 1400px) {
    .main-footer {
        background-image: url('../../images/footer-bg-tablet.svg');
    }

    .main-footer__upper {
        padding: 5rem 2.5rem 5rem 2.5rem;
        align-items: center;
    }

    .main-footer__link {
        width: auto;
        font-size: 3rem;
    }

    .main-footer__description {
        margin-top: 1.25rem;
        letter-spacing: -4%;
        line-height: 120%;
        font-size: 1.25rem;
        max-width: 27.5rem;
    }

    .main-footer__content {
        padding: 5rem 2.5rem 5rem 2.5rem;
        flex-direction: column;
        row-gap: 5rem;
    }

    .main-footer__courses {
        width: 100%;
    }

    .main-footer__courses__head {
        display: grid;
        grid-template-areas: "logo rating"
                             "title rating";
        grid-template-columns: 1fr 148px;
    }

    .main-footer__courses__head .main-footer__courses__ya-rating {
        display: block;
        grid-area: rating;
        align-self: end;
    }


    .main-footer__courses__logo {
        width: 24.5625rem;
        height: 3rem; 
        grid-area: logo;
    }

    .main-footer__courses__title {
        font-size: 1.125rem;
        grid-area: title;
        margin-top: 0.9375rem;
    }

    .main-footer__courses__item a {
        font-size: 1.125rem;
    }

    .main-footer__courses__list {
        width: 100%;
        row-gap: 1rem;
    }

    .main-footer__courses__link {
        margin-top: 1.9375rem;
        align-items: center;
    }

    .main-footer__courses__link a {
        font-size: 1.1875rem;
    }

    .main-footer__courses__ya-rating {
        display: none;
    }

    .main-footer__friend-sites {
        column-gap: 4rem;
        row-gap: 5rem;
    }

    .main-footer__friend-sites__item {
        width: 27.5rem;
        min-height: 16.9375rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .main-footer__friend-sites__item:nth-child(3),
    .main-footer__friend-sites__item:nth-child(4) {
        min-height: 18.3125rem;
    }

    .main-footer__friend-sites__heading {
        height: 2rem;
    }

    .main-footer__friend-sites__title {
        font-size: 1rem;
        margin-top: 0.875rem;
        padding-bottom: 0.875rem;
        box-sizing: content-box;
        width: 100%;
    }

    .main-footer__friend-sites__links {
        margin-top: 1.625rem;
        row-gap: 1.25rem;
    }

    .main-footer__friend-sites__links-item a {
        font-size: 1rem;
    }

    .main-footer__friend-sites__more-courses,
    .main-footer__friend-sites__item:nth-child(1) .main-footer__friend-sites__more-courses,
    .main-footer__friend-sites__item:nth-child(2) .main-footer__friend-sites__more-courses {
        margin-top: 1.75rem;
        margin-bottom: 0rem;
        margin-top: auto;
    }

    .main-footer__friend-sites__more-courses span {
        font-size: 1.0625rem;
    }

    .main-footer___feedback {
        width: 27.5rem;
        padding: 3.5625rem 3rem 3.875rem 3rem;
    }

    .main-footer___feedback__title {
        letter-spacing: -4%;
    }

    .main-footer___feedback__link {
        margin-top: 2.5rem;
    }

    .main-footer__lower {
        padding: 0.9375rem 2.5rem 1rem 2.5rem;
        align-items: center;
    }

    .main-footer__license {
        max-width: 44rem;
    }

    .main-footer__license__title {
        font-size: 0.875rem;
    }
}

@media screen and (max-width: 1200px) {
    .main-page .header__logo {
        width: 8.5625rem;
        margin-top: 0.3125rem;
        margin-left: 0.25rem;
        margin-right: 0rem;
    }

    .main-page .header__button-courses {
        display: none;
    }

    .main-page .header__button.mobile {
        display: block;
    }

    .header__block_wrapper {
        margin-left: 2.5rem;
        margin-right: 2.5rem;
    }

    .header__site-name {
        font-size: 2rem;
        font-weight: 400;
        letter-spacing: -0.02rem;
        margin-top: 0.7rem;
        padding-top: 0rem;
        padding-bottom: 0rem;
    }

    .header__site-description {
        font-size: 2.5rem;
        margin-top: 1rem;
        line-height: 2.8rem;
    }

    .header__site-faculty {
        font-size: 1.375rem;
    }

    .header__programs-description {
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        column-gap: 1.875rem;
        row-gap: 1.5rem;
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
        margin-top: 4rem;
    }

    .header__programs-description__item {
        width: 28.125rem;
    }

    .header.main-page .header__background_design {
        margin-top: 1.25rem;
    }

    .courses-gallery {
        width: 100%;
        padding: 4.3125rem 2.5rem 5rem 2.5rem;
        margin-top: 0;
        border-radius: 4.0625rem;
    }

    .courses-gallery__cards__item {
        margin-bottom: 4.7rem;
    }

    .courses-gallery__cards__list {
        gap: 1.5rem;
    }

    .courses-gallery__cards__arrow,
    .courses-gallery__card__score {
        display: none;
    }

    .courses-gallery__cards__heading-text {
        flex-shrink: unset;
    }

    .courses-gallery__cards__heading {
        margin-top: 2.8125rem;
        margin-bottom: 1.75rem;
    }

    .courses-gallery__card-body {
        flex-wrap: wrap;
        padding: 3.75rem 2rem 4.375rem 2rem;
        flex-direction: column;
        gap: 1.5rem;
        align-self: stretch;
    }

    .courses-gallery__card__properties {
        margin-bottom: 0.5rem;
    }

    .courses-gallery__card__properties-item {
        padding: 0rem 0.5rem 0rem 0.5rem;
        font-size: 0.75rem;
        letter-spacing: -0.0075rem;
    }

    .courses-gallery__card__course-title,
    .courses-gallery__card__course-title a {
        font-size: 1.375rem;
        letter-spacing: -0.0275rem;
        margin-bottom: 0rem;
    }

    .courses-gallery__card__course-annotation {
        font-size: 0.875rem;
        line-height: 1.29rem;
    }

    .courses-gallery__card__course-benefits {
        padding-top: 1.4rem;
        max-width: 100%;
        width: 100%;
    }

    .courses-gallery__card__course-review {
        padding-top: 1.6rem;
    }

    .courses-gallery__card-footer {
        padding: 1.1rem 2.5rem 1.1rem 2.5rem;
    }

    .courses-gallery__card-footer__starttime {
        font-size: 1rem;
    }

    .courses-gallery__card-footer__starttime::before {
        width: 1.25rem;
        height: 1.25rem;
    }

    .courses-gallery__card-footer__price {
        font-size: 1.25rem;
    }

    .courses-gallery__cards__list.pro-retraining .courses-gallery__card-body {
        flex-direction: row;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    .courses-gallery__cards__list-with-picture .courses-gallery__card-body {
        padding: 3.75rem 1.25rem 3.6rem 2.5rem;
        flex-direction: row;
        justify-content: flex-start;
        width: 100%;
        height: auto;
    }

    .courses-gallery__cards__list-with-picture .courses-gallery__card__properties-item {
        letter-spacing: -0.006875rem;
        font-size: 0.6875rem;
    }

    .courses-gallery__cards__list-with-picture .courses-gallery__card__course-annotation {
        font-size: 0.8125rem;
        line-height: 1.2rem;
    }

    .courses-gallery__cards__list-with-picture .courses-gallery__card__course-info {
        max-width: 39rem;
    }

    .courses-gallery__cards__list-with-picture .courses-gallery__card__course-title,
    .courses-gallery__cards__list-with-picture .courses-gallery__card__course-title a {
        margin-bottom: 0.1rem;
        padding-bottom: 0rem;
    }

    .courses-gallery__cards__list-with-picture .courses-gallery__card__course-benefits {
        padding-top: 1.3rem;
        column-gap: 0.8125rem;
        row-gap: 0.3rem;
    }

    .courses-gallery__cards__list-with-picture .courses-gallery__card__course-benefits__item {
        font-size: 0.8125rem;
    }

    .courses-gallery__cards__list-with-picture .courses-gallery__card__course-logo {
        padding: 2.5rem 0 0 0.5rem;
    }

    .courses-gallery__cards__list-with-picture .courses-gallery__card__course-logo img {
        width: 13.4375rem;
        height: auto;
    }

    .courses-gallery__card__wrapper-column {
        flex-direction: column;
        gap: 1.5rem;
        width: 100%;
    }

    .courses-gallery__card__wrapper-column .courses-gallery__card-body {
        flex-direction: row-reverse;
        justify-content: space-between;
    }

    .courses-gallery__card__wrapper-column .courses-gallery__card__properties-item {
        padding: 0rem 0.5rem 0rem 0.5rem;
    }

    .courses-gallery__card__wrapper-column .courses-gallery__card__score {
        display: none;
    }

    .courses-gallery__card__wrapper-column .courses-gallery__card__properties {
        margin-bottom: 0.4rem;
    }

    .courses-gallery__card__wrapper-column .courses-gallery__card__course-title,
    .courses-gallery__card__wrapper-column .courses-gallery__card__course-title a {
        font-size: 1.35rem;
        margin-bottom: 0.3rem;
    }

    .courses-gallery__card__wrapper-column .courses-gallery__card__course-annotation {
        margin-bottom: 1.4375rem;
        line-height: 1.125rem;
    }

    .courses-gallery__card__wrapper-column .courses-gallery__card-footer {
        padding: 1.1rem 2.5rem;
    }

    .courses-gallery__card__wrapper-column.three-columns .courses-gallery__card-body {
        width: 100%;
        gap: 2.125rem;
        height: auto;
    }
}


@media screen and (max-width: 330px) {
    html {
        font-size: 12px;
    }
}