
/* =========================================
   TerraStroy — Service Hero
   ========================================= */

.tsServiceHero {
  position: relative;
  display: flex;
  align-items: center;
  isolation: isolate;
  min-height: clamp(420px, 37vw, 620px);
  background: #202020;
  color: #fff;
  overflow: hidden;
}

/* =========================================
   Контейнер
   ========================================= */

.tsServiceHeroInner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  width: min(calc(100vw - 200px), 1400px);
  min-height: inherit;
  margin-inline: auto;
  pointer-events: none;
}

.tsServiceHeroContent {
  width: min(46%, 610px);
  padding: 54px 0;
  pointer-events: auto;
}

/* =========================================
   Текст
   ========================================= */

.tsServiceHeroTitle {
  margin: 0;
  font-family: var(--fontBody);
  font-size: clamp(36px, 3.4vw, 56px);
  font-weight: 700;
  line-height: 1.13;
  color: #fff;
  text-wrap: balance;
}

.tsServiceHeroDescription {
  margin: 18px 0 0;
  font-family: var(--fontBody);
  font-size: clamp(17px, 1.5vw, 23px);
  font-weight: 400;
  line-height: 1.42;
  color: #f5f5f5;
}

/* =========================================
   Кнопки
   ========================================= */

.tsServiceHeroActions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 24px;
}

.tsServiceHeroButton {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 14px 24px;
  border: 1px solid #fff;
  border-radius: var(--radiusPill);
  font-family: var(--fontBody);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--transitionDefault),
    color var(--transitionDefault),
    border-color var(--transitionDefault),
    transform var(--transitionDefault);
}

.tsServiceHeroButton:hover {
  transform: translateY(-2px);
}

.tsServiceHeroButton:active {
  transform: translateY(0);
}

.tsServiceHeroButton-primary {
  background: #fff;
  color: #242323;
}

.tsServiceHeroButton-primary svg {
  flex: 0 0 auto;
  color: var(--colorBrand);
}

.tsServiceHeroButton-primary:hover {
  background: var(--colorBrand);
  border-color: var(--colorBrand);
  color: #fff;
}

.tsServiceHeroButton-primary:hover svg {
  color: #fff;
}

.tsServiceHeroButton-secondary {
  background: transparent;
  color: #fff;
}

.tsServiceHeroButton-secondary:hover {
  background: #fff;
  color: #202020;
}

.tsServiceHeroButton:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* =========================================
   Изображение — десктоп
   ========================================= */

.tsServiceHeroMedia {
  position: absolute;
  z-index: 1;
  inset: 0 0 0 44%;
  pointer-events: none;
}

.tsServiceHeroImage {
  display: block;
  width: 100%;
  min-width: 1500px;
  margin-top: -150px;
  object-fit: cover;
  object-position: bottom;
}

/* =========================================
   До 1440px
   ========================================= */

@media (max-width: 1440px) {
  .tsServiceHeroInner {
    width: calc(100vw - 100px);
  }

  .tsServiceHeroContent {
    width: 48%;
  }

  .tsServiceHeroMedia {
    left: 43%;
  }
}

/* =========================================
   До 1200px
   ========================================= */

@media (max-width: 1200px) {
  .tsServiceHero {
    min-height: 510px;
  }

  .tsServiceHeroInner {
    width: calc(100vw - 50px);
  }

  .tsServiceHeroContent {
    width: 52%;
    padding: 45px 0;
  }

  .tsServiceHeroTitle {
    font-size: clamp(34px, 4vw, 48px);
  }

  .tsServiceHeroDescription {
    font-size: 18px;
  }

  .tsServiceHeroMedia {
    left: 46%;
    overflow: hidden;
  }

  .tsServiceHeroImage {
    width: 100%;
    min-width: 1050px;
    height: auto;
    margin-top: -90px;
    object-position: bottom;
  }

  .tsServiceHeroActions {
    gap: 12px;
  }

  .tsServiceHeroButton {
    min-height: 50px;
    padding: 13px 17px;
    font-size: 14px;
  }
}

/* =========================================
   Мобильные устройства — до 700px
   ========================================= */

@media (max-width: 700px) {
  .tsServiceHero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 0;
    overflow: hidden;
  }

  /* Контейнер с отступами 10px */

  .tsServiceHeroInner {
    display: block;
    flex: 0 0 auto;
    width: calc(100% - 20px);
    min-height: 0;
    margin-inline: auto;
  }

  .tsServiceHeroContent {
    width: 100%;
    max-width: none;
    padding: 34px 0 0;
  }

  /* Заголовок */

  .tsServiceHeroTitle {
    max-width: 520px;
    margin: 0;
    font-size: clamp(30px, 7.4vw, 39px);
    font-weight: 700;
    line-height: 1.12;
    text-wrap: balance;
    overflow-wrap: break-word;
  }

  /* Описание */

  .tsServiceHeroDescription {
    max-width: 520px;
    margin-top: 16px;
    font-size: clamp(15px, 3.8vw, 17px);
    line-height: 1.48;
    color: #ededed;
  }

  /* Кнопки */

  .tsServiceHeroActions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 420px;
    margin-top: 24px;
  }

  .tsServiceHeroButton {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: none;
    min-height: 50px;
    padding: 12px 20px;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
  }

  .tsServiceHeroButton-primary svg {
    width: 20px;
    height: 20px;
  }

  /* Изображение под контентом */

  .tsServiceHeroMedia {
    position: relative;
    inset: auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    flex: 0 0 auto;
    width: calc(100% - 20px);
    height: auto;
    min-height: 0;
    margin: 16px auto 0;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .tsServiceHeroImage {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    min-width: 0;
    max-width: 100%;
    max-height: none;
    margin: 0;
    object-fit: contain;
    object-position: center bottom;
  }
}

/* =========================================
   Небольшие телефоны
   ========================================= */

@media (max-width: 380px) {
  .tsServiceHeroContent {
    padding-top: 28px;
  }

  .tsServiceHeroTitle {
    font-size: 29px;
  }

  .tsServiceHeroDescription {
    margin-top: 14px;
    font-size: 15px;
  }

  .tsServiceHeroActions {
    margin-top: 20px;
    gap: 9px;
  }

  .tsServiceHeroButton {
    min-height: 48px;
    padding: 11px 15px;
    font-size: 13px;
  }

  .tsServiceHeroMedia {
    margin-top: 12px;
  }
}

/* =========================================
   Reduced motion
   ========================================= */

@media (prefers-reduced-motion: reduce) {
  .tsServiceHeroButton {
    transition: none;
  }

  .tsServiceHeroButton:hover {
    transform: none;
  }
}
