/* EdgeHTML and older Chromium discard the entire min() or clamp() declaration.
   Keep the shared page frame and carousel controls usable with older CSS. */
@supports not ((width: min(100%, 100px)) and (font-size: clamp(1rem, 2vw, 2rem))) {
  .container,
  .hero-carousel__slide .hero__inner,
  .hero-carousel__controls {
    width: calc(100% - 48px);
  }

  @media (min-width: 1328px) {
    .container,
    .hero-carousel__slide .hero__inner,
    .hero-carousel__controls {
      width: 1280px;
    }
  }

  @media (max-width: 820px) {
    .container {
      width: calc(100% - 34px);
    }
  }

  @media (max-width: 480px) {
    .container {
      width: calc(100% - 24px);
    }
  }

  @media (min-width: 769px) {
    .page-hero__title {
      font-size: 3rem;
    }

    .section-title,
    .site-footer__newsletter-title {
      font-size: 2.35rem;
    }

    .feature-card__title,
    .resource-card__title,
    .manual-card__title,
    .video-card__title,
    .list-card__title,
    .contact-panel__title {
      font-size: 1.45rem;
    }

    .hero-carousel .hero-carousel__layout {
      grid-template-columns: minmax(0, 35rem) minmax(0, 23rem);
      grid-column-gap: 2rem;
      justify-content: center;
    }

    .hero-carousel .hero__content {
      width: 100%;
      padding: 2rem 0 3rem;
    }

    .hero-carousel .hero__title {
      max-width: 18ch;
      font-size: 2.75rem;
      line-height: 1.02;
    }

    .hero-install-card,
    .hero-hcu-promo-card,
    .hero-dashboard-card,
    .hero-cert-card {
      width: 100%;
      max-width: 21.5rem;
    }

    .hero-install-card__qr {
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .hero-carousel__arrow--prev {
      left: 12px;
      right: auto;
    }

    .hero-carousel__arrow--next {
      left: auto;
      right: 12px;
    }

    .page-hero__grid,
    .split-layout {
      grid-gap: 2rem;
    }

    .feature-grid,
    .resource-grid,
    .manual-grid,
    .video-grid,
    .training-events-grid {
      grid-gap: 1.5rem;
    }

    body.menu-is-open #primary-navigation {
      width: 420px;
      max-width: 100%;
      left: auto;
      right: 0;
      top: 0;
      bottom: 0;
    }
  }

  @media (min-width: 769px) and (max-width: 991px) and (orientation: landscape) {
    .hero-carousel .hero__title {
      font-size: 2rem;
    }
  }

  @media (min-width: 1101px) and (max-width: 1250px) and (orientation: landscape) {
    .training-events-hero .page-hero__title {
      max-width: 13em;
    }
  }

  @media (min-width: 1181px), (min-width: 1101px) and (max-height: 699px) {
    #primary-navigation .primary-navigation__dropdown {
      width: calc(100vw - 56px);
      max-width: 1180px;
    }
  }
}

/* Some versions support min() before the logical padding shorthand.
   Reserve the arrow space even when the slide width is already correct. */
@supports not (padding-inline: 1px) {
  @media (min-width: 769px) {
    .hero-carousel__slide .hero__inner {
      padding-left: 3.5rem;
      padding-right: 3.5rem;
    }
  }
}

/* Older engines implement grid gaps but omit flex gaps. Use child margins
   for both axes so buttons keep their separation when they wrap. */
@supports not (inset: 0) {
  @media (min-width: 769px) {
    .button-row,
    .training-events-filter-row,
    .training-event-card__actions,
    .cta-band__actions,
    .cta-panel__actions,
    .cookie-consent__actions {
      gap: 0;
    }

    .button-row > *,
    .training-events-filter-row > *,
    .training-event-card__actions > *,
    .cta-band__actions > *,
    .cta-panel__actions > *,
    .cookie-consent__actions > * {
      margin: 0 0.75rem 0.5rem 0;
    }
  }
}

@media (min-width: 769px) and (max-width: 1400px) {
  .page-hero__lead,
  .hero__copy,
  .section-copy,
  .feature-card__copy {
    text-wrap: pretty;
  }
}

/* A reserved image box keeps the three course headers aligned with mixed
   source image dimensions or lazy loading. */
@supports not (aspect-ratio: 4 / 3) {
  @media (min-width: 769px) {
    .training-pathway-card .feature-card__media,
    .training-event-card .feature-card__media {
      position: relative;
      flex: 0 0 auto;
    }

    .training-pathway-card .feature-card__media::before,
    .training-event-card .feature-card__media::before {
      content: "";
      display: block;
      padding-top: 75%;
    }

    .training-pathway-card .feature-card__media img,
    .training-event-card .feature-card__media img {
      position: absolute;
      top: 0;
      left: 0;
      height: 100%;
      width: 100%;
      object-fit: cover;
    }
  }
}

/* Leave a rail for the fixed chat launcher alongside laptop page content. */
@media (min-width: 769px) and (max-width: 1400px) and (orientation: landscape) {
  .is-hct-front-page .hero-carousel__slide--install .hero__title {
    max-width: 18ch;
  }

  .site-main > .section > .container,
  .site-main > .page-hero > .container,
  .site-footer .container,
  .cookie-consent > .container {
    width: calc(100% - 120px);
  }

  body .aipkit_popup_wrapper .aipkit_popup_trigger.aipkit_popup_position-bottom-right {
    right: 8px;
  }

  /* The delayed chat invitation extends over cookie choices and course links.
     The labeled launcher stays available in the reserved margin. */
  .aipkit_popup_wrapper .aipkit_popup_hint {
    display: none !important;
  }
}

@media (min-width: 769px) and (max-width: 899px) and (orientation: landscape) {
  .is-hct-front-page .hero-carousel__slide--install .hero__title {
    font-size: 2rem;
  }
}

/* When the arrows are visible, reserve a separate column of space for them. */
@media (min-width: 992px) and (max-width: 1400px) and (orientation: landscape) {
  .hero-carousel__slide .hero__inner {
    padding-left: 3.5rem;
    padding-right: 3.5rem;
  }

  .hero-carousel__arrow--prev {
    left: 12px;
  }

  .hero-carousel__arrow--next {
    right: 12px;
  }
}

@media (min-width: 992px) and (max-width: 1400px) and (max-height: 780px) {
  .is-hct-front-page .hero--homepage.hero-carousel {
    height: calc(100vh - 102px);
    min-height: 480px;
  }
}

/* On a short screen, keep the introduction, image and first action together. */
@media (min-width: 900px) and (max-width: 1400px) and (max-height: 780px) and (orientation: landscape) {
  .training-events-hero,
  .user-guides-page-hero {
    padding: 2.5rem 0;
  }

  .training-events-hero .page-hero__grid,
  .user-guides-page-hero .page-hero__grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    grid-gap: 2rem;
  }

  .training-events-hero .page-hero__title,
  .user-guides-page-hero .page-hero__title {
    font-size: calc(1.2vw + 20px);
    font-size: clamp(2.25rem, 3.7vw, 3.2rem);
  }

  .training-events-hero .page-hero__media,
  .user-guides-page-hero .page-hero__media {
    height: 49vh;
    min-height: 240px;
    max-height: 380px;
  }

  .training-events-hero .page-hero__media img,
  .user-guides-page-hero .page-hero__media img {
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }
}

@media (min-width: 769px) and (max-width: 1400px) and (max-height: 780px) and (orientation: landscape) {
  .is-hct-front-page .hero-carousel + .quick-access {
    margin-top: 0;
    padding-top: 2rem;
  }
}

/* The public reporting dashboard has its own frame and illustrated report. */
@media (min-width: 701px) {
  @supports not (width: min(100%, 100px)) {
    .hcu-dashboard-landing .hcl-container {
      width: 88.9%;
      max-width: 1280px;
    }

    .hcu-dashboard-landing h1,
    .hcu-dashboard-landing h2,
    .hcu-dashboard-landing h3 {
      font-family: var(--hcl-display);
      font-weight: 700;
      text-transform: uppercase;
    }

    .hcu-dashboard-landing .hcl-hero-copy h1 {
      max-width: 15ch;
      font-size: 4rem;
    }

    .hcu-dashboard-landing h2 {
      font-size: 2.75rem;
    }

    .hcu-dashboard-landing .hcl-entry-request,
    .hcu-dashboard-landing .hcl-entry-login {
      padding: 2rem;
    }

    .hcu-dashboard-landing .hcl-training-stat {
      width: 80%;
      max-width: 320px;
    }

    .hcu-dashboard-landing .hcl-workflow-inner {
      grid-column-gap: 5vw;
    }
  }

  @supports not (margin-inline: auto) {
    .hcu-dashboard-landing .hcl-container {
      margin-left: auto;
      margin-right: auto;
    }
  }

  @supports not (padding-block: 1px) {
    .hcu-dashboard-landing .hcl-capabilities,
    .hcu-dashboard-landing .hcl-workflow-inner,
    .hcu-dashboard-landing .hcl-entry {
      padding-top: 4rem;
      padding-bottom: 4rem;
    }
  }

  @supports not (aspect-ratio: 1 / 1) {
    .hcu-dashboard-landing .hcl-workflow-visual::after {
      content: "";
      display: block;
      padding-top: 110%;
    }

    .hcu-dashboard-landing .hcl-workflow-visual::before {
      height: 30.3%;
    }

    .hcu-dashboard-landing .hcl-workflow-photo {
      top: 3.64%;
      left: 4%;
    }

    .hcu-dashboard-landing .hcl-trust {
      list-style: none;
      padding-left: 0;
    }

    .hcu-dashboard-landing .hcl-actions > a,
    .hcu-dashboard-landing .hcl-trust li {
      margin: 0 0.875rem 0.5rem 0;
    }

    .hcu-dashboard-landing .hcl-eyebrow::before,
    .hcu-dashboard-landing .hcl-trust img,
    .hcu-dashboard-landing .hcl-feature li img {
      margin-right: 0.5rem;
    }
  }
}

/* The dashboard login and request forms share this Access template. */
@media (min-width: 769px) {
  @supports not (width: min(100%, 100px)) {
    .hcu-access .hcu-access__wrap {
      width: 88.9%;
      max-width: 1280px;
    }

    .hcu-access .hcu-access__hero h1 {
      font-size: 3.5rem;
    }

    .hcu-access .hcu-access__panel,
    .hcu-access .hcu-access__login {
      padding: 2rem;
    }

    .hcu-access .hcu-access__panel-head h2,
    .hcu-access .hcu-access__login h2,
    .hcu-access .hcu-access__included-head h2 {
      font-size: 2rem;
    }
  }

  @supports not (margin-inline: auto) {
    .hcu-access .hcu-access__wrap {
      margin-left: auto;
      margin-right: auto;
    }
  }

  @supports not (padding-block: 1px) {
    .hcu-access .hcu-access__hero-grid {
      padding-top: 4rem;
      padding-bottom: 8.25rem;
    }

    .hcu-access .hcu-access__included {
      padding-top: 4rem;
      padding-bottom: 4rem;
    }
  }

  @supports not (inset: 0) {
    .hcu-access .hcu-access__hero::before,
    .hcu-access .hcu-access__hero .hcu-access__photo {
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
    }
  }
}
