.territor__header {
  display: flex;
}

.territor-content__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  margin-top: 35px;
}

.territor-content__title .cmsl_razdsite {
  margin-bottom: 25px;
}

.territor_razdsite {
  display: flex;
  align-items: center;
  width: 100%;
}

.territor_razdsite .projects-edit {
  margin-left: auto;
}

.territor_razdsite .projects-edit a {
  display: flex;
  align-items: center;
}

.territor_razdsite h1 {
  font-size: 42px;
}

.territor__head {
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.territor__header_item {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  margin-right: 45px;
}

.territor__header_item a {
  /* display: flex; */
  margin-bottom: 10px;
  color: #000;
  text-decoration: none;
}

.territor__header_item a span {
  position: relative;
}

.territor__header_item a span::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0%;
  width: 0%;
  height: 1px;
  background: #000;
  transition: 0.2s;
}

.territor__header_item a:hover span::before {
  width: 100%;
}

.territor__header_item.active span::before {
  width: 100%;
}

.territor__content_block {
  display: flex;
}

.territor__ter {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  max-width: 690px;
  width: 100%;
  padding-top: 35px;
  padding-bottom: 5px;
}

.territor__ter::before {
  content: "";
  position: absolute;
  z-index: -3;
  background: #f8f8f8;
  width: 100%;
  height: 100%;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1000%;
}

.territor__block {
  display: flex;
  flex-direction: column;
  width: 50%;
  margin-bottom: 30px;
}

.territor__block_title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 10px;
}

.territor__block_links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.territor__block_link {
  font-size: 16px;
  color: #000;
  line-height: 1.4;
  margin-bottom: 5px;
}

.territor__block_link a {
  color: #000;
  text-decoration: none;
}

.territor__block_link a span {
  position: relative;
}

.territor__block_link a span::before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0%;
  width: 0%;
  height: 1px;
  background: #000;
  transition: 0.2s;
}

.territor__block_link a:hover span::before {
  width: 100%;
}

.territor__block_link.active span::before {
  width: 100%;
}

.territor__items {
  max-width: 1050px;
  width: 100%;
  padding-top: 35px;
  padding-left: 85px;
  padding-bottom: 15px;
}

.territor__items_title {
  font-size: 16px;
  font-weight: 600;
}

.territor__items_table {
  margin-top: 25px;
}

.territor__items_table table {
  width: 100%;
  text-align: left;
  font-size: 16px;
  border-spacing: 0px;
}

.territor__items_table table th {
  padding-left: 0;
  font-weight: 600;
  padding-bottom: 14px;
  padding-top: 14px;
  border-bottom: 1px solid #f4f4f4;
}

.territor__items_table table td {
  padding-bottom: 14px;
  padding-top: 14px;
  border-bottom: 1px solid #f4f4f4;
}

.territor__items_table .ter-name {
  width: 335px;
}

.territor__items_table .ter-city {
  width: 230px;
}

.territor__items_table .ter-phone {
  width: 210px;
}

.territor-content__button {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 255px;
  height: 60px;
  padding: 20px;
  margin-left: 9px;
  margin-right: 9px;
  background: #000;
  font-size: 15px;
  font-family: "HelveticaNeueCyr";
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.45px;
  text-decoration: none;
  line-height: 1.8;
}

.territor-content__button span {
  position: relative;
  overflow: hidden;
}

.territor-content__button span::before {
  content: "";
  position: absolute;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #fff;
  transition: 0.2s;
}

.territor-content__button:hover {
  color: #fff;
  text-decoration: none;
}

.territor-content__button:hover span::before {
  width: 100%;
}

@media (max-width: 1900px) {
  .territor__ter {
    max-width: 600px;
  }
  .territor__items_table table td {
    padding-right: 10px;
  }
  .territor__items {
    padding-left: 55px;
  }
  .territor__items_table .ter-name {
    width: 260px;
  }
}

@media (max-width: 1535px) {
  .territor__block_link {
    font-size: 14px;
  }
  .territor__ter {
    max-width: 480px;
  }
  .territor__items_table table {
    font-size: 14px;
  }
  .territor__items_table .ter-name {
    width: 230px;
  }
  .territor__items_table .ter-city {
    width: 290px;
  }
}

@media (max-width: 1279px) {
  .territor_razdsite {
    align-items: flex-start;
    flex-direction: column;
    padding-left: 0;
    padding-right: 0;
  }

  .territor_razdsite .projects-edit {
    margin-left: auto;
    position: absolute;
    right: 25px;
    margin-top: 5px;
  }

  .territor__content {
    overflow: hidden;
  }

  .territor-content__button {
    margin-top: 40px;
    background: #f6f6f6;
    color: #000;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .territor__content_block {
    flex-direction: column;
  }

  .territor__ter {
    width: 100%;
    max-width: 100%;
    padding-bottom: 30px;
  }

  .territor__ter::before {
    width: 200%;
    right: -50%;
  }

  .territor__head .cmsl_wrapper1,
  .territor__content .cmsl_wrapper1 {
    padding: 0 !important;
  }

  .territor__items {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 1023px) {
  .territor__head .cmsl_wrapper1,
  .territor__content .cmsl_wrapper1,
  .territor-content__title .cmsl_razdsite {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .territor__items {
    padding-bottom: 0;
    padding-top: 0;
  }

  .territor__items_title {
    padding-top: 35px;
  }

  .territor__items_table  {
    padding-bottom: 50px;
  }
  .territor__items_table .ter-city {
    width: 170px;
  }
}

@media (max-width: 767px) {
  .territor__header {
    flex-wrap: wrap;
  }
  .territor__head {
    padding-bottom: 10px;
  }
  .territor__header_item {
    margin-right: 0;
    width: 33.3333%;
    margin-bottom: 20px;
  }
  .territor__header_item:nth-child(2),
  .territor__header_item:nth-child(5) {
    text-align: center;
  }
  .territor__header_item:nth-child(3),
  .territor__header_item:nth-child(6) {
    text-align: right;
  }
  .territor__block_title {
    font-size: 13px;
  }
  .territor__block_link {
    font-size: 13px;
  }
  .territor__items_table {
    overflow-y: auto;
  }
  .territor__items_table table {
    width: max-content;
    font-size: 13px;
  }
  .territor__items_table .ter-name {
    width: 120px;
  }
  .territor__items_table .ter-city {
    width: 100px;
  }
  .territor__items_table .ter-phone {
    width: 140px;
  }
}


@media (max-width: 1023px) {
  .territor__block {
    width: 50%;
    margin-bottom: 0;
    padding-right: 10px;
  }

  .territor__block_title {
    margin-bottom: 0;
    padding: 10px 0;
    cursor: pointer;
  }

  .territor__block_links {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      max-height 0.35s ease,
      opacity 0.25s ease;
  }

  .territor__block.active .territor__block_links {
    opacity: 1;
  }

  .territor__block_link:last-child {
    margin-bottom: 10px;
  }
}