/* Keep service hero images inside the viewport on tablets and small laptops. */
.service-h1-hero,
.single-directions,
.theme_three {
  max-width: 100%;
  overflow-x: hidden;
}

.service-h1-hero__media,
.single-directions .main-banner,
.single-directions .top_baner {
  max-width: 100%;
  overflow: hidden;
}

.service-h1-hero__image,
.single-directions .main-banner img {
  max-width: 100%;
  width: 100%;
  height: auto;
}

.service-h1-hero__image {
  height: 100%;
  min-height: 0 !important;
  object-fit: cover;
  object-position: right center;
}

.single-directions .main-banner .text_block .container {
  width: 100% !important;
  max-width: 1320px;
}

.theme_three .main-banner .text_block .wrap .description_main_baner {
  width: min(600px, 100%) !important;
  max-width: 100%;
}

@media (max-width: 1199px) {
  .service-h1-hero--has-media {
    display: flex;
    flex-direction: column;
  }

  .service-h1-hero--has-media .service-h1-hero__media {
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-height: 240px;
    height: min(420px, 52vh);
    max-height: min(420px, 52vh);
    overflow: hidden;
  }

  .service-h1-hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0 !important;
  }
}
