/*==========  Non-Mobile First Method  ==========*/
/* Extra Large Devices */
@media only screen and (max-width: 1280px) {
  .slick-prev {
    left: 0;
  }
  .slick-next {
    right: 0;
  }
  .services__list,
  .news__list {
    padding: 0 40px;
  }
  .nav-primary__item {
    margin: 0 20px;
  }
}

/* Large Devices, Wide Screens */
@media only screen and (max-width: 1200px) {
  .service {
    padding-bottom: 30px;
  }
  .service__caption {
    margin-right: 30px;
    margin-left: 30px;
  }
  .contact {
    margin: 0 30px 20px 0;
  }
}

/* Medium Devices, Desktops */
@media only screen and (max-width: 992px) {
  .contacts__col:last-child {
    max-width: none;
  }
  .catalog__link {
    font-size: 18px;
  }
}

/* Small Devices, Tablets */
@media only screen and (max-width: 768px) {
  .container_header {
    height: 95px;
  }
  body:not(.is-admin) .site-header + .site-main {
    padding-top: 95px;
  }
  .lang-switcher {
    top: 2px;
  }
  .callback {
    margin-right: 14px;
  }
  .social__link {
    margin-left: 3px;
  }
  .services__list {
    max-width: 440px;
    margin: 0 auto;
  }
  .nav-primary {
    display: none;
  }
  .main-slider__row {
    display: block;
  }
  .main-slider__title {
    font-size: 40px;
  }
  .main-slider__subtitle {
    margin: 0 0 30px;
  }
  .main-slider .slick-dots {
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
        -ms-flex-pack: start;
            justify-content: flex-start;
    top: 5px;
  }
  .services__list .slick-list {
    margin: 0 -10px;
  }
  .service, .article {
    margin-right: 10px;
    margin-left: 10px;
  }
  .article_one-half {
    margin-left: 0;
    max-width: calc((100% - 10px * 1)/2);
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 calc((100% - 10px * 1)/2);
        -ms-flex: 1 1 calc((100% - 10px * 1)/2);
            flex: 1 1 calc((100% - 10px * 1)/2);
  }
  .article_sm {
    margin-right: 0;
    margin-left: 0;
  }
  .services__list, .news__list {
    padding: 0 35px;
  }
  .contacts__row {
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
        -ms-flex-direction: column;
            flex-direction: column;
  }
  .contacts__col:last-child {
    margin: 0 0 30px;
    -webkit-flex-basis: auto;
        -ms-flex-preferred-size: auto;
            flex-basis: auto;
    -webkit-box-ordinal-group: 0;
    -webkit-order: -1;
        -ms-flex-order: -1;
            order: -1;
  }
  .contacts__list {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
  }
  .contacts__col {
    max-width: 100%;
  }
  .contact {
    font-size: 14px;
  }
  .custom-table {
    margin: 0 0 30px;
  }
  .custom-table tbody {
    display: block;
  }
  .custom-table tr {
    display: block;
    max-width: 100%;
    margin-right: 0;
  }
  .custom-table tr:nth-child(2n+2) {
    margin-right: 0;
  }
  .custom-table td {
    display: block;
  }
  .custom-table table td {
    display: table-cell;
    padding: 10px;
  }
  .custom-table td:nth-child(1),
  .custom-table td:nth-child(2),
  .custom-table td:nth-child(3) {
    padding: 10px 0;
    max-width: 100%;
  }
  .custom-table td:nth-child(2) {
    padding: 0;
  }
  .custom-table table td:nth-child(2) {
    padding: 10px;
  }
  .single-post__row {
    display: block;
  }
  .single-post__sidebar {
    margin: 20px 0 0 0;
  }
  .catalog__item {
    max-width: calc((100% - 20px * 1)/2);
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 calc((100% - 20px * 1)/2);
        -ms-flex: 1 1 calc((100% - 20px * 1)/2);
            flex: 1 1 calc((100% - 20px * 1)/2);
    margin: 0 20px 20px 0;
  }
  .catalog__item:nth-child(3n+3) {
    margin-right: 20px;
  }
  .catalog__item:nth-child(2n+2) {
    margin-right: 0;
  }
}

/* Extra Small Devices, Phones */
@media only screen and (max-width: 480px) {
  .container_header {
    flex-wrap: wrap;
    height: 95px;
  }
  .site-header {
    padding: 0 0 10px;
    position: relative;
  }
  body:not(.is-admin) .site-header + .site-main {
    padding-top: 0;
  }
  .logo {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    top: 8px;
    flex-shrink: 1;
    max-width: 60px;
    order: 3;
  }
  .lang-switcher {
    top: 0;
  }
  .callback {
    margin: 0;
    display: flex;
    align-items: baseline;
    justify-content: center;
    width: 100%;
    order: 5;
  }
  .callback::before {
    position: static;
    margin: 0 5px 0 0;
  }
  .social {
    order: 4;
  }
  .social__link {
    width: 25px;
    height: 25px;
    font-size: 13px;
  }
  .callback__btn {
    font-size: 12px;
  }
  .callback__phone {
    font-size: 14px;
    margin: 0 3px 0 0;
  }
  .main-slider__img {
    min-height: 200px;
  }
  .main-slider__caption {
    bottom: 20px;
  }
  .main-slider__title {
    font-size: 25px;
  }
  .main-slider__subtitle {
    font-size: 16px;
    margin-bottom: 20px;
  }
  .btn-primary {
    font-size: 16px;
    min-width: 0;
    padding: 12px 30px;
  }
  .title-box__title {
    font-size: 36px;
  }
  .title-box__subtitle:before, .title-box__subtitle:after {
    max-width: 50px;
    -webkit-flex-basis: 50px;
        -ms-flex-preferred-size: 50px;
            flex-basis: 50px;
  }
  .service {
    padding-bottom: 0;
  }
  .service__caption {
    padding: 18px 0 0 0;
    margin: 0;
  }
  .news__grid {
    display: block;
  }
  .article__title {
    font-size: 20px;
  }
  .article_one-half {
    margin-right: 0;
    max-width: 100%;
  }
  .article_sm {
    margin-right: 0;
    margin-left: 0;
  }
  .site-footer__main {
    padding: 30px 0;
  }
  .footer-logo {
    margin-bottom: 20px;
  }
  .contacts__list {
    display: block;
  }
  .contact {
    margin: 20px 0 0 0;
    max-width: 100%;
  }
  .contact:first-child {
    margin-top: 0;
  }
  .custom-table tbody {
    display: block;
  }
  .custom-table tr {
    max-width: 100%;
    margin-right: 0;
  }
  .catalog__list {
    display: block;
  }
  .catalog__item {
    margin-right: 0;
    max-width: 100%;
  }
}
