/* Canonical overview banner module.
 *
 * Products and Solutions intentionally keep different PHP/template markup, but
 * the first-screen banner must resolve to this single visual contract. Future
 * overview pages should be added here instead of redefining hero dimensions in
 * page-local styles.
 */
body:is(.post-type-archive-product, .page-template-page-products, .post-type-archive-solution) {
  --overview-hero-height: 560px;
  --overview-hero-max-width: 1776px;
  --overview-hero-side: max(72px, calc((100% - var(--overview-hero-max-width)) / 2));
  --overview-hero-gap: 48px;
  --overview-hero-top-gap: 58px;
  --overview-hero-media-width: min(calc((100vw - 144px) / 2), 900px);
  --overview-hero-media-height: calc(var(--overview-hero-media-width) / 2.05);
  --overview-hero-stats-overlap: -28px;
  /* Keep the Products capability strip visible inside the banner, above the
     category nav that is centered on the banner bottom edge. */
  --overview-products-stats-height: 84px;
  --overview-products-stats-overlap: -154px;
}

body.post-type-archive-solution {
  --overview-hero-stats-overlap: -50px;
}

html body:is(.post-type-archive-product, .page-template-page-products, .post-type-archive-solution) .site-breadcrumbs {
  height: auto;
  min-height: 0;
}

html body:is(.post-type-archive-product, .page-template-page-products, .post-type-archive-solution) .site-breadcrumbs__inner {
  width: min(calc(100% - 144px), var(--overview-hero-max-width));
  max-width: var(--overview-hero-max-width);
  height: auto;
  min-height: 56px;
  margin-inline: auto;
  padding-inline: 0;
}

@media (min-width: 761px) {
  html body:is(.post-type-archive-product, .page-template-page-products, .post-type-archive-solution) .site-breadcrumbs {
    height: 58px;
    min-height: 58px;
    border-top: 1px solid #edf0f3;
    border-bottom: 1px solid #e6eaee;
    box-sizing: border-box;
  }

  html body:is(.post-type-archive-product, .page-template-page-products, .post-type-archive-solution) .site-breadcrumbs__inner {
    height: 56px;
    min-height: 56px;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .product-center-hero,
  html body.post-type-archive-solution .solutions-live-hero {
    height: var(--overview-hero-height);
    min-height: var(--overview-hero-height);
    padding-block: 0;
    box-sizing: border-box;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .product-center-hero::after {
    content: "";
    position: absolute;
    z-index: 9;
    left: 50%;
    right: auto;
    bottom: 0;
    top: auto;
    width: min(calc(100% - 144px), var(--overview-hero-max-width));
    height: 1px;
    display: block;
    transform: translateX(-50%);
    background: #e4e9ef;
    border: 0;
    border-radius: 0;
    pointer-events: none;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .product-center-hero-inner,
  html body.post-type-archive-solution .solutions-live-hero-grid {
    width: min(calc(100% - 144px), var(--overview-hero-max-width));
    max-width: var(--overview-hero-max-width);
    height: var(--overview-hero-height);
    min-height: var(--overview-hero-height);
    margin-inline: auto;
    padding-inline: 0;
    padding-top: var(--overview-hero-top-gap);
    box-sizing: border-box;
    gap: var(--overview-hero-gap);
    align-items: start;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .product-center-hero-image {
    right: var(--overview-hero-side);
    top: var(--overview-hero-top-gap);
    bottom: auto;
    left: auto;
    width: min(calc((100vw - 144px) / 2), 820px);
    height: var(--overview-hero-media-height);
    min-height: 0;
    aspect-ratio: 2.05 / 1;
    border-radius: 8px;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .product-center-hero-copy {
    width: calc((100% - 48px) / 2);
    max-width: none;
    flex-basis: calc((100% - 48px) / 2);
    padding-right: 0;
  }

  html body.post-type-archive-solution .solutions-live-hero-media {
    width: var(--overview-hero-media-width);
    max-width: 820px;
    height: var(--overview-hero-media-height);
    justify-self: end;
    align-self: start;
  }

  html body.post-type-archive-solution .solutions-live-hero-media img {
    width: 100%;
    height: 100%;
    aspect-ratio: 2.05 / 1;
    object-fit: cover;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistics,
  html body.post-type-archive-solution .solutions-live-hero + .solutions-live-section {
    margin-top: var(--overview-hero-stats-overlap);
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistics {
    position: relative;
    z-index: 11;
    height: var(--overview-products-stats-height);
    min-height: 0;
    margin-top: var(--overview-products-stats-overlap);
    margin-bottom: calc(-1 * var(--overview-products-stats-overlap) - var(--overview-products-stats-height));
    padding: 0;
    background: transparent;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistics-grid {
    width: min(calc(100% - 144px), var(--overview-hero-max-width));
    max-width: var(--overview-hero-max-width);
    height: var(--overview-products-stats-height);
    min-height: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    column-gap: clamp(34px, 4.1vw, 78px);
    row-gap: 0;
    margin: 0 auto;
    padding: 0 28px;
    overflow: visible;
    background: rgba(255, 255, 255, .94);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
    box-sizing: border-box;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic,
  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic:nth-child(n) {
    min-height: 0;
    height: var(--overview-products-stats-height);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
    gap: 11px;
    padding: 0;
    background: transparent;
    border: 0;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: grid;
    place-items: center;
    color: var(--c-brand);
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic-icon svg {
    width: 25px;
    height: 25px;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic > span:last-child {
    min-width: 0;
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic strong {
    color: #111827;
    font-size: var(--font-size-lead);
    font-weight: var(--font-weight-heading);
    line-height: var(--line-height-heading);
    white-space: nowrap;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic small {
    margin-top: 2px;
    color: #5f6b7a;
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-heading);
    white-space: nowrap;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-category-nav,
  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .product-center-categories > .products-container {
    width: min(calc(100% - 144px), var(--overview-hero-max-width));
    max-width: var(--overview-hero-max-width);
    margin-inline: auto;
    padding-inline: 0;
    box-sizing: border-box;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-category-nav {
    transform: translateY(-50%);
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .product-center-categories .product-center-heading-rich,
  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .product-center-category-grid {
    width: 100%;
    max-width: none;
    margin-inline: auto;
  }
}

/* The shared Header owns the separator immediately above the breadcrumb.
 * Solutions had an additional top border here, which rendered as a double
 * horizontal rule below the Header. */
html body.post-type-archive-solution .site-breadcrumbs {
  border-top: 0;
}

/* Products capability strip: part of the Hero, not a separate elevated card. */
@media (min-width: 761px) {
  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistics {
    height: 56px;
    margin-top: -56px;
    margin-bottom: 0;
    top: -72px;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistics-grid {
    height: 56px;
    width: min(calc(100% - 144px), var(--overview-hero-max-width));
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    column-gap: clamp(20px, 2.2vw, 36px);
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic,
  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic:nth-child(n) {
    height: 56px;
    min-height: 56px;
    gap: 8px;
    padding: 0;
    flex: 0 0 auto;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic-icon {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic-icon svg {
    width: 26px;
    height: 26px;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic strong {
    font-size: var(--font-size-lead);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-display);
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-statistic small {
    margin-top: 1px;
    font-size: var(--font-size-micro);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-heading);
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-category-nav {
    transform: none;
    margin-top: 0;
    position: relative;
    top: -72px;
    margin-inline: auto;
    left: auto;
    right: auto;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .products-category-nav-wrap {
    margin-bottom: -72px;
  }
}

@media (min-width: 761px) and (max-width: 1199px) {
  body:is(.post-type-archive-product, .page-template-page-products, .post-type-archive-solution) {
    --overview-hero-top-gap: 52px;
    --overview-hero-media-width: min(calc((100vw - 128px) / 2), 860px);
  }
}

@media (max-width: 760px) {
  html body:is(.post-type-archive-product, .page-template-page-products, .post-type-archive-solution) .site-breadcrumbs__inner {
    width: calc(100% - 32px);
    max-width: none;
    min-height: 48px;
  }

  html body:is(.post-type-archive-product, .page-template-page-products) .products-page .product-center-hero-inner,
  html body.post-type-archive-solution .solutions-live-hero-grid {
    width: calc(100% - 32px);
    max-width: none;
    margin-inline: auto;
    padding-inline: 0;
  }
}
