/* MTB responsive polish: header, homepage sections and footer. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

@media (max-width: 1180px) {
  .mtb-mainbar__inner {
    min-height: 76px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 16px;
  }

  .mtb-brand__logo-image {
    height: 52px;
  }

  .mtb-primary-nav {
    max-height: calc(100dvh - 110px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mtb-hero-slider,
  .mtb-hero--slide .mtb-hero__inner {
    min-height: clamp(600px, 76vw, 690px);
  }

  .mtb-hero--slide .mtb-hero__content {
    width: min(650px, 72%);
    padding-block: 72px 116px;
  }

  .mtb-products__layout {
    gap: 44px;
  }

  .mtb-product-grid {
    height: auto;
    min-height: 0;
    grid-auto-rows: minmax(470px, auto);
  }

  .mtb-product-grid .mtb-product-card {
    min-height: 470px;
  }

  .mtb-manufacturing,
  .mtb-sustainability {
    min-height: 0;
  }
}

@media (max-width: 900px) {
  .mtb-topbar__inner {
    gap: 16px;
  }

  .mtb-mainbar__inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .mtb-hero-slider,
  .mtb-hero--slide .mtb-hero__inner {
    min-height: 640px;
  }

  .mtb-hero--slide .mtb-hero__content {
    width: min(600px, 78%);
  }

  .mtb-hero--factory,
  .mtb-hero--manufacturing,
  .mtb-hero--infrastructure,
  .mtb-hero--safety {
    background-position: center;
  }

  .mtb-products {
    padding-block: 72px;
  }

  .mtb-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 500px;
  }

  .mtb-product-grid .mtb-product-card {
    min-width: 0;
    min-height: 500px;
  }

  .mtb-manufacturing__visual,
  .mtb-manufacturing__image {
    min-height: 420px;
  }

  .mtb-sustainability__visual,
  .mtb-sustainability__image {
    min-height: 320px;
  }

  .mtb-footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .mtb-container {
    width: min(calc(100% - 32px), var(--mtb-content));
  }

  .mtb-topbar__inner {
    min-height: 36px;
  }

  .mtb-topbar p {
    max-width: calc(100% - 78px);
    font-size: 7px;
    letter-spacing: .09em;
  }

  .mtb-mainbar__inner {
    min-height: 68px;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
  }

  .mtb-brand {
    gap: 9px;
    max-width: calc(100vw - 82px);
  }

  .mtb-brand__logo-image {
    width: auto;
    height: 44px;
  }

  .mtb-brand__name {
    max-width: none;
    font-size: clamp(10px, 3.2vw, 13px);
  }

  .mtb-brand__name small {
    display: block;
    max-width: 150px;
    overflow: hidden;
    font-size: 5.7px;
    text-overflow: ellipsis;
  }

  .mtb-menu-toggle {
    width: 44px;
    height: 44px;
  }

  .mtb-primary-nav {
    padding: 12px 16px 20px;
  }

  .mtb-primary-nav__list a {
    padding: 13px 4px;
    font-size: 13px;
  }

  .mtb-hero-slider,
  .mtb-hero--slide .mtb-hero__inner {
    min-height: 620px;
  }

  .mtb-hero--slide .mtb-hero__content {
    width: 100%;
    padding-block: 66px 112px;
  }

  .mtb-hero--slide .mtb-display {
    max-width: 100%;
    font-size: clamp(35px, 10.5vw, 48px);
    line-height: 1.02;
    text-wrap: balance;
  }

  .mtb-hero__content .mtb-eyebrow {
    max-width: 86%;
    margin-bottom: 20px;
    font-size: 9px;
  }

  .mtb-hero__copy {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.55;
  }

  .mtb-hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 24px;
  }

  .mtb-hero__actions .mtb-button {
    min-height: 46px;
    padding-inline: 12px;
    font-size: 11px;
  }

  .mtb-hero-controls {
    bottom: 14px;
    gap: 7px;
  }

  .mtb-hero-arrow {
    width: 32px;
    height: 32px;
  }

  .mtb-hero-dots {
    gap: 2px;
  }

  .mtb-hero-dot {
    min-width: 27px;
    padding-inline: 2px;
    font-size: 9px;
  }

  .mtb-strengths__grid {
    grid-template-columns: 1fr;
  }

  .mtb-strength {
    min-height: 104px;
    grid-template-columns: 36px 1fr;
    gap: 14px;
    padding: 18px 0;
    border-right: 0;
  }

  .mtb-brands-strip {
    padding-block: 28px;
  }

  .mtb-brand-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mtb-brand-row > * {
    min-height: 76px;
    padding: 10px 12px;
  }

  .mtb-brand-mark {
    min-height: 76px;
  }

  .mtb-brand-mark img {
    width: 100%;
    max-width: 135px;
    max-height: 44px;
  }

  .mtb-products {
    padding-block: 64px;
  }

  .mtb-products__layout {
    gap: 34px;
  }

  .mtb-products__intro .mtb-copy {
    margin-top: 18px;
  }

  .mtb-product-grid {
    height: auto;
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(500px, auto);
    gap: 14px;
  }

  .mtb-product-grid .mtb-product-card {
    min-height: 500px;
    padding: 20px;
  }

  .mtb-product-card span {
    max-width: 170px;
    font-size: 18px;
  }

  .mtb-manufacturing__visual,
  .mtb-manufacturing__image {
    min-height: 300px;
  }

  .mtb-manufacturing__content {
    padding: 48px 20px;
  }

  .mtb-sustainability__visual,
  .mtb-sustainability__image {
    min-height: 280px;
  }

  .mtb-sustainability__intro {
    padding: 48px 20px;
  }

  .mtb-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 20px;
    padding-block: 42px 36px;
  }

  .mtb-footer-bottom {
    min-height: 78px;
    gap: 12px;
    padding-block: 16px;
  }
}

@media (max-width: 430px) {
  .mtb-brand__logo-image {
    height: 40px;
  }

  .mtb-brand__name {
    font-size: 10px;
  }

  .mtb-brand__name small {
    max-width: 122px;
    font-size: 5.2px;
  }

  .mtb-hero-slider,
  .mtb-hero--slide .mtb-hero__inner {
    min-height: 600px;
  }

  .mtb-hero__actions {
    grid-template-columns: 1fr;
  }

  .mtb-hero__actions .mtb-button {
    width: 100%;
  }

  .mtb-product-grid {
    grid-auto-rows: minmax(470px, auto);
  }

  .mtb-product-grid .mtb-product-card {
    min-height: 470px;
  }

  .mtb-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

html[lang^="fa"] .mtb-product-card,
html[lang^="ar"] .mtb-product-card {
  direction: rtl;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

/* Manufacturing page image-layout cleanup. */
.mtb-mfg .mtb-mfg-intro {
  padding-bottom: 96px !important;
}

.mtb-mfg .mtb-mfg-machine {
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr) !important;
  gap: 24px !important;
  margin-top: 56px !important;
  align-items: stretch !important;
  transform: none !important;
}

.mtb-mfg .mtb-mfg-machine figure {
  min-width: 0;
  height: 520px !important;
}

.mtb-mfg .mtb-mfg-machine__detail {
  align-self: stretch !important;
}

.mtb-mfg .mtb-mfg-machine__main img,
.mtb-mfg .mtb-mfg-machine__detail img {
  width: 100%;
  height: 100% !important;
  object-fit: cover !important;
}

.mtb-mfg .mtb-mfg-process {
  padding-top: 110px !important;
}

.mtb-mfg .mtb-mfg-infra__gallery {
  display: grid !important;
  grid-template-columns: minmax(0, 1.34fr) minmax(320px, .66fr) !important;
  grid-template-rows: 300px 300px !important;
  gap: 18px !important;
}

.mtb-mfg .mtb-mfg-infra__gallery .is-wide {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
}

.mtb-mfg .mtb-mfg-infra__gallery .is-wide img {
  width: 100%;
  height: 618px !important;
  object-fit: cover !important;
}

.mtb-mfg .mtb-mfg-infra__gallery figure:not(.is-wide) img {
  width: 100%;
  height: 300px !important;
  object-fit: cover !important;
}

.mtb-mfg .mtb-mfg-safety {
  margin-top: 72px !important;
}

@media (max-width: 1050px) {
  .mtb-mfg .mtb-mfg-intro {
    padding-bottom: 76px !important;
  }

  .mtb-mfg .mtb-mfg-machine {
    grid-template-columns: 1fr 1fr !important;
    gap: 16px !important;
  }

  .mtb-mfg .mtb-mfg-machine figure {
    height: 420px !important;
  }

  .mtb-mfg .mtb-mfg-infra__gallery {
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: auto !important;
  }

  .mtb-mfg .mtb-mfg-infra__gallery .is-wide {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
  }

  .mtb-mfg .mtb-mfg-infra__gallery .is-wide img {
    height: 470px !important;
  }

  .mtb-mfg .mtb-mfg-infra__gallery figure:not(.is-wide) img {
    height: 320px !important;
  }
}

@media (max-width: 700px) {
  .mtb-mfg .mtb-mfg-intro {
    padding-bottom: 56px !important;
  }

  .mtb-mfg .mtb-mfg-machine {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 38px !important;
    transform: none !important;
  }

  .mtb-mfg .mtb-mfg-machine figure {
    height: auto !important;
  }

  .mtb-mfg .mtb-mfg-machine__main img,
  .mtb-mfg .mtb-mfg-machine__detail img {
    height: auto !important;
    aspect-ratio: 4 / 3;
  }

  .mtb-mfg .mtb-mfg-process {
    padding-top: 82px !important;
  }

  .mtb-mfg .mtb-mfg-infra__gallery {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    gap: 12px !important;
  }

  .mtb-mfg .mtb-mfg-infra__gallery .is-wide {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .mtb-mfg .mtb-mfg-infra__gallery .is-wide img,
  .mtb-mfg .mtb-mfg-infra__gallery figure:not(.is-wide) img {
    height: auto !important;
    aspect-ratio: 4 / 3;
  }

  .mtb-mfg .mtb-mfg-safety {
    margin-top: 54px !important;
  }
}
