/* Keep long Russian headings and form content inside narrow phone screens. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.header > *,
.hero-content,
.hero-facts > div,
.intro > *,
.benefits > *,
.request > *,
.lead-form > *,
.photo-story > *,
.result > *,
.steps li,
.contacts > *,
.contact-card,
footer > * {
  min-width: 0;
}

h1,
h2,
h3,
.tag,
.hero-lead,
.travel-note,
.intro-text,
.request-copy p,
.lead-form label,
.story-copy li,
.result-copy p,
.steps p,
.contacts p,
footer p {
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}

img,
svg,
input,
select,
textarea,
button {
  max-width: 100%;
}

@media (max-width: 540px) {
  .hero {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: var(--dark);
  }

  .hero-image {
    order: 2;
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    object-position: center;
  }

  .hero-shade {
    display: none;
  }

  .hero-content {
    order: 1;
    position: relative;
    width: 100%;
    margin: 0;
    padding: 52px 16px 34px;
  }

  .hero-facts {
    order: 3;
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 3.25rem);
    line-height: 1.02;
    letter-spacing: -.045em;
  }

  h2 {
    font-size: clamp(1.9rem, 9vw, 2.3rem);
    line-height: 1.02;
    letter-spacing: -.04em;
  }

  .section,
  .request,
  .contacts,
  .story-copy,
  footer {
    width: 100%;
    max-width: 100%;
  }

  .contact-number,
  .request-phones a {
    font-size: clamp(1rem, 5.2vw, 1.28rem);
    white-space: normal;
  }
}

@media (max-width: 360px) {
  .hero-content {
    width: 100%;
  }

  .section,
  .contacts {
    padding-left: 16px;
    padding-right: 16px;
  }

  .lead-form {
    padding-left: 16px;
    padding-right: 16px;
  }
}
