:root {
  --tleft-width: 321px;
}

.maright {
  max-width: 441px;
}

@media (max-width: 1050px) {
  main {
    /* или любая другая ширина */
    margin: 0 auto;
    text-align: center;
  }

  header .header_top .tcontacts {
    display: none;
    width: 50vw;
  }

  .header__a {
    padding-inline: 0px;
    font-size: 0px;
  }

  * {
    box-sizing: border-box;
  }

  .maleft a {
    max-width: 1050px;
    height: fit-content;
    width: fit-content;
    margin: 0% auto;
  }

  .services a {
    width: 40%;
  }

  .text {
    padding-inline: 15px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tleft {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: min(642px, 90%);
  }

  .tleft a {
    align-self: center;
    max-width: 321px;
    flex-basis: 50%;
  }

  .icons {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin-top: 30px;
  }

  .icons .ico {
    float: unset;
    width: 23%;
    margin-right: 2%;
    margin-left: 0;
    margin-bottom: 2%;
  }
}

@media (max-width: 995px) {
  .tcontacts {
    display: none;
  }

  .grid-container {
    display: flex;
    gap: 10px;
    flex-direction: column;
    align-content: stretch;
    justify-content: space-evenly;
    align-items: stretch;
  }

  .slide_text {
    display: flex;
    flex-direction: column;
    width: auto;
    top: 35px;
    left: 0;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.05);
  }

  .slide_text b {
    line-height: 24px;
    margin-bottom: 5px;
    color: var(--body-white);
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  }

  a.card {
    padding: 10px;
  }

  a.card h2 {
    padding: 5px;
    font-size: 18px;
  }

  a.card img {
    width: 64px;
    height: 64px;
  }

  header {
    grid-template-areas:
      "header_top";
    grid-template-columns: auto;
    grid-template-rows: 60px;

    & .header_top {
      justify-content: space-around;
      background-color: white;

      & .header_top__nav {
        display: none;
      }
    }

    & .header_bottom {
      display: none;
    }

    & .header_top {
      display: flex;
    }

    & .menu-toggle {
      display: block;
    }
  }

  .main_content{
    margin-inline: 5px;
}
  table {
    table-layout: fixed;
    width: 100%;
  }

  /* Применяем max-width к первым ячейкам */
  table>thead>tr>th:nth-child(1) {
    width: 68%;
    /* Фиксированная ширина для надежности */
  }

  table>thead>tr>th:nth-child(2) {
    width: 32%;
    /* Фиксированная ширина для надежности */
  }

  /* Настройки переноса текста */
  .table th,
  .table td {
    padding: 8px 8px;
    text-align: left;
    border-bottom: 1px solid #eaeef2;
    vertical-align: top;
    white-space: normal;
    /* Разрешаем перенос */
    word-break: break-word;
    /* Ломаем длинные слова */
    overflow-wrap: break-word;
    /* Альтернатива для старых браузеров */
  }

  table>thead>tr>th:nth-child(3),
  table>tbody>tr>td:nth-child(3) {
    display: none;
  }
  .text {
    flex-direction: column-reverse;
    padding: 0px;
  }

  .text ul li {
    margin-left: 20px;
    font-size: 15px;
  }

  .maright {
    max-width: 700px;
    padding: 0% 15px;
  }

  .services {
    width: 100%;
    padding: 0 20px;
  }

  .index_page {
    width: 100%;
    padding: 0 30px;
  }

  .footer {
    width: 100%;
  }

  .rslide {
    width: 80%;
    font-size: 18px;
  }
}

@media (max-width: 768px) {
  .header_top {
    float: left;
  }

  .header_top {
    display: none;
  }

  .prices td:nth-child(3),
  .prices th:nth-child(3) {
    display: none;
  }

  .services a {
    width: 36%;
  }

  .phone,
  .emerg {
    display: none;
  }

  #scrollup {
    padding: 0;
    z-index: 9999;
  }

  #scrollup img {
    width: 75%;
  }

  .mleft_slide .slides {
    height: unset;
    position: unset;
    width: unset;
  }

  .cont_form input,
  .cont_form textarea {
    width: 100%;
  }

  .cont_form table tr {
    display: flex;
    flex-direction: column;
  }

  .cont_form table tr td {
    white-space: unset;
  }

  .icons {
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  .icons .ico {
    width: 46%;
    margin-right: 2%;
  }

  .icons .ico:nth-child(2n+2) {
    margin-right: 0;
  }
}

@media (max-width: 550px) {
  .services a {
    width: 44%;
  }

  .services .one_serv {
    margin-right: 8px;
    margin-left: 8px;
  }

  .mleft_slide {
    height: 152px;
  }

  .tleft a {
    font-size: 16px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .footer {
    padding-bottom: 45px;
    position: relative;
    height: unset;
    margin-top: 70px;
  }

  .footer .fmenu {
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  /* .footer .maker {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%);
  } */
  .footer .copyright {
    width: 100%;
    text-align: center;
  }

  .tright table {
    width: 100% !important;
  }
}

@media (max-width: 366px) {

  .tleft {
    width: 90%;
    align-self: center;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;

    & a {
      flex-basis: 90%;
      text-align: center;
      padding-left: 0px;
      padding-top: 6px;
      padding-bottom: 6px;
      font-size: 14;
    }
  }
}