/* Natural-height product rows support three cards without overlapping the next component. */
.products-grid .product-card > .ratio {
  --raya-aspect-ratio: calc(100 / 89 * 100%);
  min-height: 26rem;
}

/* A continuous industries ticker avoids per-slide autoplay pauses on separators. */
.industries-home__marquee {
  overflow: hidden;
}

.industries-home__track {
  display: flex;
  width: max-content;
  animation: r9-industries-scroll 40s linear infinite;
  will-change: transform;
}

.industries-home__group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-around;
  gap: 32px;
  min-width: 100vw;
  padding-inline: 16px;
}

.industries-home__item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 32px;
  white-space: nowrap;
}

@keyframes r9-industries-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .industries-home__track {
    width: 100%;
    animation: none;
    will-change: auto;
  }

  .industries-home__group {
    flex-wrap: wrap;
    justify-content: center;
    min-width: 0;
    width: 100%;
    gap: 16px;
  }

  .industries-home__group[aria-hidden="true"] {
    display: none;
  }

  .industries-home__item {
    white-space: normal;
    gap: 16px;
  }
}

/* Center certification artwork inside equal cells and balance incomplete rows. */
.certifications-home__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 24px;
  max-width: 680px;
  margin-inline: auto;
}

.certifications-home__item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 calc(50% - 12px);
  max-width: 144px;
  min-width: 0;
  min-height: 104px;
}

.certifications-home__icon {
  display: block;
  width: 100%;
  max-width: 130px;
  height: 82px;
  object-fit: contain;
  object-position: center;
}

@media (min-width: 1280px) {
  .certifications-home__grid {
    max-width: none;
    column-gap: 32px;
  }

  .certifications-home__item {
    flex-basis: 130px;
    max-width: 130px;
  }
}

/* Let the homepage hero contain its CTA before the About section on smaller screens. */
@media (max-width: 1279.98px) {
  body.home .hero {
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    padding-bottom: 80px !important;
  }

  body.home #about-us-home > .container {
    margin-top: 0 !important;
  }
}

@media (min-width: 1280px) {
  .products-grid > .col {
    flex: 0 0 auto;
    width: 33.333333%;
  }
}

/* Keep homepage service names together instead of breaking individual words. */
#services-slider .card-title,
#services-slider .card-title strong {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

@media (max-width: 1439.98px) {
  #services-slider .card-body,
  #services-slider .card-footer {
    padding-inline: 24px !important;
  }
}

@media (max-width: 767.98px) {
  #services-slider .card-body,
  #services-slider .card-footer {
    padding-inline: 16px !important;
  }

  #services-slider .card-title {
    font-size: 26px !important;
  }
}

/* Keep theme CSS external so the security policy can block untrusted styles. */
body.admin-bar .app-header { top: 32px !important; }
.component-wrapper { margin: 30px 0; }
.component-info { border-bottom: 1px solid #ddd; width: 80%; padding-bottom: 20px; margin: auto auto 40px; }
.component-info h2 { font-size: 30px; }
.component-info .component-name { padding: 2px 10px; color: #fff; font-size: 14px; border-radius: 4px; }
