/* Horizon layout corrections. Load after style.css; scope stays on the public site. */
.horizon-site .horizon-menu-toggle,
.horizon-site .horizon-submenu-toggle {
  display: none;
}

.horizon-site .horizon-menu-toggle:focus-visible,
.horizon-site .horizon-submenu-toggle:focus-visible,
.horizon-site .topbar a:focus-visible,
.horizon-site .horizon-table-scroll:focus-visible {
  outline: 3px solid var(--orange, #ff8a00);
  outline-offset: 3px;
}

.horizon-site .topbar .has:focus-within > .mega {
  display: block;
}

.horizon-site .topbar .nav[hidden],
.horizon-site .topbar .mega[hidden] {
  display: none !important;
}

.horizon-site .horizon-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.horizon-site .section [id],
.horizon-site .section[id] {
  scroll-margin-top: 90px;
}

/* The existing eight navigation links and brand no longer fit below 1200px. */
@media (max-width: 1199px) {
  .horizon-site .stats .wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .horizon-site .stats .stat,
  .horizon-site .section .news-grid > *,
  .horizon-site .section .news-body {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .horizon-site .section .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .horizon-site .topbar .nav-inner {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: var(--nav, 70px);
    gap: 16px;
  }

  .horizon-site .topbar .brand {
    min-width: 0;
  }

  .horizon-site .topbar.horizon-mobile-ready .horizon-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 8px;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--orange, #ff8a00);
    border-radius: 6px;
    background: #101418;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .horizon-site .topbar .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-height: calc(100vh - 70px);
    max-height: calc(100dvh - 70px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px 20px 20px;
    border-bottom: 1px solid #444;
    background: #101418;
    box-shadow: 0 12px 24px #0006;
  }

  .horizon-site .topbar .nav > a,
  .horizon-site .topbar .nav > .has > a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 12px 6px;
    overflow-wrap: anywhere;
  }

  .horizon-site .topbar .nav > .has {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    align-items: start;
    border-bottom: 1px solid #30363a;
  }

  .horizon-site .topbar .nav > .has > .arrow::after {
    content: none;
  }

  .horizon-site .topbar.horizon-mobile-ready .horizon-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    margin-top: 2px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #171b1f;
    color: var(--orange, #ff8a00);
    font: inherit;
    font-size: 22px;
    cursor: pointer;
  }

  .horizon-site .topbar .nav .has > .mega {
    position: static;
    grid-column: 1 / -1;
    display: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin: 0 0 12px;
    padding: 12px;
    transform: none;
    box-shadow: none;
  }

  .horizon-site .topbar .nav .has.horizon-submenu-open > .mega {
    display: block;
  }

  .horizon-site .topbar .mega h3 {
    font-size: 15px;
  }

  .horizon-site .topbar .mega .mega-row {
    gap: 12px;
    min-height: 44px;
    padding: 12px 0;
  }

  .horizon-site .topbar .mega-row > * {
    min-width: 0;
  }

  .horizon-site .topbar .mega-row img {
    width: 64px;
    max-width: 100%;
    height: auto;
  }

  .horizon-site .topbar .mega-row b {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .horizon-site .topbar .mega-row p {
    font-size: 13px;
    font-weight: 400;
    overflow-wrap: anywhere;
  }

  /* With JavaScript unavailable, keep all top-level destination links visible. */
  .horizon-site .topbar:not(.horizon-mobile-ready) {
    position: relative;
    height: auto;
  }

  .horizon-site .topbar:not(.horizon-mobile-ready) .nav-inner {
    flex-wrap: wrap;
    padding-top: 12px;
  }

  .horizon-site .topbar:not(.horizon-mobile-ready) .nav {
    position: static;
    flex-basis: 100%;
    max-height: none;
    box-shadow: none;
  }

  .horizon-site .section .grid5,
  .horizon-site .section .grid6 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .horizon-site .section img,
  .horizon-site .footer img {
    max-width: 100%;
  }

  .horizon-site .grid > *,
  .horizon-site .two > *,
  .horizon-site .factory > *,
  .horizon-site .intro > *,
  .horizon-site .specs > *,
  .horizon-site .footer-grid > *,
  .horizon-site .section [style*="display:flex"] > *,
  .horizon-site .section [style*="display: flex"] > * {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .horizon-site .wrap {
    min-width: 0;
    max-width: 100%;
    padding-right: 20px;
    padding-left: 20px;
    overflow-wrap: anywhere;
  }

  /* !important is limited to dimensions fixed by existing inline template styles. */
  .horizon-site .hero {
    height: auto !important;
    min-height: 320px !important;
    padding: 56px 0 !important;
    background-size: cover;
  }

  .horizon-site .hero h1 {
    max-width: 100%;
    font-size: clamp(34px, 8.8vw, 48px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .horizon-site .hero p {
    max-width: 100%;
    font-size: 19px;
  }

  .horizon-site .section h2,
  .horizon-site .dark-title {
    font-size: clamp(26px, 6.5vw, 32px);
    overflow-wrap: anywhere;
  }

  .horizon-site .btns,
  .horizon-site .icons-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .horizon-site .btn {
    max-width: 100%;
    min-height: 48px;
    padding: 12px 18px;
    white-space: normal;
    text-align: center;
  }

  .horizon-site .section .grid5,
  .horizon-site .section .grid4,
  .horizon-site .section .grid3,
  .horizon-site .section .grid2,
  .horizon-site .section .two,
  .horizon-site .section .specs,
  .horizon-site .section .wrap > [style*="grid-template-columns"],
  .horizon-site .section form [style*="grid-template-columns"] {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .horizon-site .section .grid6 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .horizon-site .two,
  .horizon-site .factory,
  .horizon-site .product-page .intro {
    gap: 28px;
  }

  .horizon-site .stats .stat,
  .horizon-site .stats .stat:not(:last-child) {
    padding: 22px 16px;
    background: none;
  }

  .horizon-site .section .process {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    padding: 28px 0;
  }

  .horizon-site .section .process .step::after {
    display: none;
  }

  .horizon-site .big-cta {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
  }

  .horizon-site .big-cta > * {
    min-width: 0;
    max-width: 100%;
  }

  .horizon-site .big-cta > div > div[style*="display: flex"] {
    flex-wrap: wrap;
    gap: 12px;
  }

  .horizon-site .section .app-card .pic {
    height: auto;
    min-height: 0;
  }

  .horizon-site .section .app-card .pic img {
    display: block;
    height: auto;
  }

  .horizon-site .horizon-table-scroll > table {
    min-width: 600px;
  }

  /* No-JS fallback for the existing stainless specification table. */
  .horizon-site .section table:not(.horizon-scroll-table),
  .horizon-site .article-body table:not(.horizon-scroll-table) {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }

  .horizon-site .section input,
  .horizon-site .section textarea,
  .horizon-site .section select {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .horizon-site .stats .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .horizon-site .topbar .nav-inner {
    gap: 10px;
    padding-right: 16px;
    padding-left: 16px;
  }

  .horizon-site .topbar .brand {
    gap: 8px;
  }

  .horizon-site .topbar .brand > img {
    width: 86px !important;
    height: auto;
  }

  .horizon-site .topbar .brand > span {
    font-size: 18px !important;
    letter-spacing: 1px;
  }

  .horizon-site .topbar .brand small {
    margin-top: -2px;
    font-size: 8px;
    letter-spacing: 3px;
  }

  .horizon-site .hero .btns > .btn,
  .horizon-site .big-cta .btns > .btn {
    flex: 1 1 220px;
  }

  .horizon-site .section .process,
  .horizon-site .section .grid6,
  .horizon-site .section .fact-grid,
  .horizon-site .section .news-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .horizon-site .section .app-card ul {
    columns: 1;
  }

  .horizon-site .footer-grid {
    gap: 28px;
  }
}
