/*
 * Wide-screen text layout fixes for consulmax.infaport.ru.
 *
 * The base stylesheet uses the page-level --pad value on both sides of
 * nested split-layout cells. On wide screens that leaves only a narrow
 * content strip and, together with overflow-wrap:anywhere, breaks headings
 * inside words. Keep the outer grid alignment, but give the copy panels a
 * practical inner gutter and a larger share of the split layout.
 */

.hero-copy-block h1,
.china-copy h2,
.office-card h2 {
  text-wrap: balance;
}

.hero-lead,
.china-copy > p:not(.label),
.china-list,
.office-card p {
  text-wrap: pretty;
}

.hero-product-video {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 620px);
  height: auto;
  max-height: 92%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #000;
  mix-blend-mode: screen;
  filter: contrast(1.05);
  pointer-events: none;
}

.china-product-video {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, 760px);
  height: auto;
  max-height: 92%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
  mix-blend-mode: screen;
  filter: contrast(1.05);
  pointer-events: none;
}

@media (min-width: 761px) {
  .hero-copy-block h1,
  .china-copy h2,
  .office-card h2 {
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }
}

@media (min-width: 1101px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.4fr) minmax(420px, .6fr);
  }

  .hero-copy-block {
    padding-right: clamp(32px, 4vw, 72px);
  }

  .hero-copy-block h1 {
    max-width: 1200px;
  }

  .hero-lead {
    max-width: 860px;
  }

  .china-section {
    grid-template-columns: minmax(0, 1.3fr) minmax(420px, .7fr);
  }

  .china-copy {
    padding-right: clamp(32px, 4vw, 72px);
  }

  .china-copy h2 {
    max-width: 1000px;
  }

  .china-copy > p:not(.label),
  .china-list {
    max-width: 820px;
  }

  .footer-offices {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.2fr) minmax(320px, .9fr);
  }

  .footer-offices > article {
    padding-right: clamp(28px, 3vw, 56px);
    padding-left: clamp(28px, 3vw, 56px);
  }

  .footer-offices > article:first-child {
    padding-left: clamp(28px, var(--pad), 120px);
  }

  .footer-offices > article:last-child {
    padding-right: clamp(28px, var(--pad), 120px);
  }

  .office-card h2 {
    font-size: clamp(28px, 2.5vw, 42px);
  }

  .office-card p {
    min-height: 0;
    line-height: 1.55;
  }
}

@media (max-width: 760px) {
  .hero-product-video {
    width: min(68vw, 240px);
    max-height: 210px;
  }

  .china-product-video {
    width: min(88vw, 420px);
    max-height: 260px;
  }
}
