/**
 * Responsive layout system — document-level horizontal overflow fixes.
 * Loaded after style.css + media.css. Does not rely on body { overflow-x: hidden } alone.
 */

html {
  max-width: 100%;
}

body {
  max-width: 100%;
}

main {
  min-width: 0;
  max-width: 100%;
}

.container {
  min-width: 0;
}

.title,
.hero-title,
.consult__title,
.start-top__title,
.service-top__title,
.content-consult__title {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.single-content,
.service-item,
.case-item,
.blog-item,
.prices-table__td,
.list-service__item,
.work-item,
.team-item,
.faq-item,
.breadcrumb,
.tag-link,
.contract-top {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.service-item,
.service-item__top,
.list-service__item,
.work-box,
.worth-box,
.footer-menu,
.header-left,
.calc-item,
.tariff-item,
.prices-table__tr,
.service-list,
.grid-box {
  min-width: 0;
}

.list-service__item {
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
}

.bubbles-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.slider-wrap,
.blog-slider,
.universal-swiper.swiper,
.prices__swiper,
.prices__swiper.swiper {
  max-width: 100%;
}

.table-scroll-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.prices-table-scroll.table-scroll-wrap {
  overflow-x: auto;
  overflow-y: hidden;
}

.prices-table.five {
  min-width: 980px;
}

.prices-table.five .prices-table__tr {
  grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(160px, 1fr));
}

.prices-table.five .prices-table__td {
  padding-left: 24px;
  padding-right: 24px;
}

.table-scroll-wrap table {
  width: max-content;
  max-width: none;
}

body.open-m {
  overflow: hidden;
}

.open-m header {
  width: 100%;
  max-width: 100%;
  inset-inline: 0;
  height: auto;
  overflow: visible;
  background: transparent;
}

@media all and (max-width: 1440px) {
  .slider-wrap {
    position: relative;
    overflow: hidden;
  }

  .nav__item {
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
    justify-content: center;
    padding: 0;
  }

  .nav__next {
    right: 0;
    border-radius: 50%;
  }

  .nav__prev {
    left: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    padding: 0;
  }

  .nav__prev:hover,
  .nav__next:hover {
    transform: translateY(-50%);
  }
}

@media all and (max-width: 968px) {
  .hero-tooltip__content {
    max-width: min(280px, calc(100vw - 40px));
    width: auto;
    white-space: normal;
  }

  .tooltip1 .hero-tooltip__content,
  .tooltip2 .hero-tooltip__content {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .prices-table__tr {
    grid-template-columns: minmax(72px, 28%) repeat(3, minmax(0, 1fr));
  }

  .service-top {
    overflow: hidden;
  }

  .service-top .hero-img {
    max-width: min(420px, 70vw);
  }

  #inner.service-hero .service-top .hero-img {
    max-width: min(100%, 520px);
  }
}

@media all and (max-width: 568px) {
  input,
  select,
  textarea,
  .consult-input__input input,
  .consult-input__input select,
  .footer-search input,
  .modal input,
  .modal select,
  .modal textarea,
  .calc-input__item input,
  .calc-input__item select {
    font-size: max(16px, 1em);
  }

  .service-top .hero-img {
    position: relative;
    right: auto;
    margin-inline: auto;
  }

  #inner.service-hero .service-top .hero-img {
    max-width: min(100%, 420px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    align-items: flex-end;
  }

  #inner.service-hero .service-top .hero-img img {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    object-position: center bottom;
  }
}

@media (hover: none), (pointer: coarse) {
  .nav__prev:hover,
  .nav__next:hover {
    transform: translateY(-50%);
  }

  .worth-item:hover,
  .tariff-item:hover:before,
  .bubbles__item:hover {
    transform: none;
  }
}

/* 2026 benchmark calculator: one result card across all breakpoints. */
.benchmark-calculator .calc > .calc-item {
  margin-top: 60px;
}

.benchmark-calculator .calc-box {
  padding-top: 16px;
}

.benchmark-calculator .calc-final .title-top__sub {
  color: #d0d7d7;
  padding-top: 8px;
}

@media all and (max-width: 968px) {
  .benchmark-calculator .calc-left .calc-final {
    display: flex;
  }

  .benchmark-calculator .calc-right__btn {
    display: flex;
    margin-top: 28px;
  }

  .benchmark-calculator .calc > .calc-item {
    margin-top: 36px;
  }

  .benchmark-calculator .calc-box {
    padding-top: 16px;
  }
}

@media all and (max-width: 568px) {
  .benchmark-calculator .calc {
    padding-top: 80px;
  }

  .benchmark-calculator .calc-input__item label {
    line-height: 1.2;
  }
}

@media all and (max-width: 968px) {
  .prices-table.five {
    min-width: 900px;
  }

  .prices-table.five .prices-table__tr {
    grid-template-columns: 220px repeat(4, minmax(160px, 1fr));
  }
}

@media all and (max-width: 568px) {
  .prices-table.five {
    min-width: 820px;
  }

  .prices-table.five .prices-table__tr {
    grid-template-columns: 160px repeat(4, minmax(150px, 1fr));
  }
}
