/* Keep decorative outlines behind service cards, including their links. */
.services-page__decoration {
  z-index: 0;
  pointer-events: none;
}

/* The process ornaments need the outer gutters of a wide desktop layout. */
@media (max-width: 1919.98px) {
  .manufacturing-page__process-decoration--hidden-mobile {
    display: none !important;
  }
}

/* Fit the heading and enquiry form without the fixed 400px text offset. */
@media (min-width: 1280px) and (max-width: 1919.98px) {
  .manufacturing-page .manufacturing-page__hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    gap: 32px;
    width: 100%;
    padding-left: 240px;
    padding-right: 32px;
    box-sizing: border-box;
    align-items: start;
  }

  .manufacturing-page .manufacturing-page__hero-text {
    margin-left: 0;
    min-width: 0;
    max-width: none;
  }

  .manufacturing-page .manufacturing-page__hero-text h1 {
    font-size: clamp(40px, 4vw, 60px);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
  }

  .manufacturing-page .manufacturing-page__hero-form {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .manufacturing-page .manufacturing-page__hero-form .input-shape-szaloldal {
    width: 100%;
    max-width: none;
    margin-right: 0;
    box-sizing: border-box;
  }

  .manufacturing-page__hero-decoration svg {
    width: 180px;
  }
}

@media (max-width: 1279.98px) {
  .manufacturing-page__hero-decoration {
    display: none;
  }
}

/* Reference introductions reserve separate columns for copy and photography. */
.reference-detail-page__hero-content {
  z-index: 1;
}
.reference-detail-page__polygon-decoration {
  pointer-events: none;
}
@media (min-width: 768px) {
  .reference-detail-page__hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 34%);
    gap: clamp(32px, 4vw, 64px);
    align-items: center;
    padding-left: clamp(32px, 5vw, 96px);
    padding-right: 0;
  }
  .reference-detail-page__hero-content {
    width: 100%;
    min-width: 0;
    padding: 24px 0;
    gap: 32px;
  }
  .reference-detail-page__hero-svg {
    position: static;
    min-width: 0;
  }
  .reference-detail-page__hero-svg svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
  }
}
@media (min-width: 1600px) {
  .reference-detail-page__hero {
    --reference-decoration-width: clamp(240px, 18vw, 360px);
    grid-template-columns: minmax(0, 1fr) minmax(0, calc(520px * 371 / 480));
    gap: 48px;
    padding-left: calc(var(--reference-decoration-width) + 48px);
    overflow: clip;
  }
  .reference-detail-page__hero-description {
    position: relative;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding-inline: max(0px, calc((100% - 700px) / 2));
  }
  .reference-detail-page__polygon-decoration {
    top: 50%;
    left: auto;
    right: calc(100% + 48px);
    width: 100vw;
    transform: translateY(-50%);
    clip-path: polygon(0% 10%, calc(100% - 120px) 10%, 100% 50%, calc(100% - 120px) 90%, 0% 90%);
  }
}
@media (max-width: 1599.98px) {
  .reference-detail-page__polygon-decoration {
    display: none;
  }
}

/* Keep the homepage contact columns inside the available content width. */
#kapcsolat.contact-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 1280px;
  box-sizing: border-box;
  gap: clamp(32px, 5vw, 80px);
  padding-inline: 32px;
}
#kapcsolat .contact-section__content,
#kapcsolat .contact-section__form {
  min-width: 0;
  width: 100%;
}
#kapcsolat .contact-section__form {
  max-width: 560px;
  margin: 0 auto;
}
#kapcsolat .contact-section__input {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 1280px) {
  #kapcsolat.contact-section {
    grid-template-columns: minmax(0, 1fr);
    max-width: 760px;
  }
  #kapcsolat .contact-section__content {
    padding-top: 0;
  }
}
@media (max-width: 767px) {
  #kapcsolat.contact-section {
    padding-inline: 16px;
  }
}

@media (min-width: 1024px) {
  .references-section[data-carousel="home-references"] .references-section__nav--prev {
    left: clamp(24px, 2vw, 40px);
  }
  .references-section[data-carousel="home-references"] .references-section__nav--next {
    right: clamp(24px, 2vw, 40px);
  }
}
