/* MASTERBOX mobile / tablet stability fixes */
html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body, main, section, header, footer, nav, div, article, form {
  min-width: 0;
}

img, picture, svg, video, canvas {
  max-width: 100%;
}

h1, h2, h3, p, a, strong, small, address, label {
  overflow-wrap: break-word;
  word-break: normal;
}

@media (max-width: 1180px) {
  .site-header {
    width: 100%;
  }

  .site-header nav {
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 850px) {
  .site-header {
    padding-inline: 16px;
  }

  .brand {
    flex: 0 1 auto;
    min-width: 0;
  }

  .brand img {
    width: min(170px, 52vw);
    max-width: 100%;
  }

  .menu-toggle {
    flex: 0 0 auto;
  }

  .site-header nav {
    width: 100%;
    max-width: 100vw;
  }

  .site-header nav a {
    white-space: normal;
  }

  .hero {
    min-height: 700px;
    overflow: hidden;
  }

  .hero-content {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 92px 18px 70px;
  }

  .hero h1 {
    font-size: clamp(3rem, 15vw, 5.25rem);
    line-height: .92;
    max-width: 100%;
  }

  .hero h1 br,
  .section h2 br,
  .impact h2 br,
  .cta h2 br {
    display: none;
  }

  .hero-lead {
    max-width: 38rem;
    font-size: 1rem;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button,
  .cta .button {
    width: 100%;
    min-width: 0;
  }

  .hero-products {
    right: -8%;
    left: auto;
    top: 0;
    width: 108%;
    max-width: none;
    height: 48%;
  }

  .hero-box-open {
    width: 72%;
    right: 0;
  }

  .hero-box-fason {
    width: 46%;
    left: 7%;
  }

  .section {
    padding: 64px 18px;
  }

  .section h2,
  .impact h2,
  .cta h2 {
    font-size: clamp(2.65rem, 13vw, 4.15rem);
    line-height: .95;
  }

  .section-head,
  .intro,
  .process,
  .roadmap {
    width: 100%;
    min-width: 0;
  }

  .offer-grid {
    width: 100%;
    margin-top: 42px;
  }

  .offer-card {
    width: 100%;
    min-width: 0;
    min-height: 350px;
    padding: 28px 20px;
  }

  .product-pair {
    width: calc(100% + 12px);
    max-width: calc(100% + 12px);
    margin-inline: -6px;
    overflow: hidden;
  }

  .product-pair.klapowe .product-zoom:first-child,
  .product-pair.fasonowe .product-zoom:first-child {
    left: 0;
  }

  .product-pair.klapowe .product-zoom:last-child,
  .product-pair.fasonowe .product-zoom:last-child {
    right: 0;
  }

  .print-zoom {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }

  .impact {
    width: 100%;
    overflow: hidden;
  }

  .impact-mark {
    max-width: 100vw;
    overflow: hidden;
  }

  .impact-copy {
    width: 100%;
    max-width: 100%;
    padding: 50px 18px 64px;
  }

  .impact-line {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .process-list li {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 8px;
  }

  .process-list strong {
    font-size: 1.38rem;
    line-height: 1.05;
  }

  .cert {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .cta {
    width: 100%;
    padding: 50px 18px;
    gap: 30px;
  }

  .cta-heading,
  .contact-details {
    width: 100%;
    max-width: 100%;
  }

  .contact-details a,
  .contact-details address {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
  }

  footer {
    width: 100%;
    max-width: 100%;
    padding: 28px 18px;
  }

  footer img,
  .footer-right .footer-ps-logo {
    max-width: 100%;
    height: auto;
  }

  .footer-right {
    width: 100%;
    max-width: 100%;
  }

  .quote-dialog,
  .image-lightbox {
    width: calc(100% - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    margin: auto;
  }

  .quote-dialog {
    padding: 32px 16px 22px;
  }

  .quote-dialog h2 {
    font-size: clamp(2.1rem, 11vw, 3.15rem);
  }
}

@media (max-width: 480px) {
  .site-header {
    height: 66px;
  }

  .site-header nav {
    top: 66px;
    max-height: calc(100dvh - 66px);
    padding: 12px 16px 18px;
  }

  .brand img {
    width: min(155px, 50vw);
  }

  .menu-toggle {
    padding: 9px 12px;
  }

  .hero {
    min-height: 660px;
  }

  .hero-content {
    padding-top: 82px;
  }

  .hero-products {
    right: -4%;
    width: 104%;
    height: 43%;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 15.5vw, 4rem);
  }

  .eyebrow,
  .section-kicker {
    letter-spacing: .12em;
    font-size: .68rem;
  }

  .eyebrow:before,
  .section-kicker:before {
    width: 22px;
    margin-right: 8px;
  }

  .button {
    min-width: 0;
    gap: 14px;
    padding: 14px 16px;
  }

  .offer-card h3 {
    font-size: 1.7rem;
  }

  .contact-details a,
  .contact-details address {
    display: block;
  }

  .contact-details small,
  .contact-details strong {
    display: block;
  }

  .contact-details small {
    margin-bottom: 4px;
  }

  .impact-line b {
    display: none;
  }

  .impact-line span {
    width: 100%;
  }
}
