/* Visual fidelity layer for the optimized home page. */

.home-service-highlights img {
  width: calc(100% - 20px) !important;
  box-sizing: content-box;
  aspect-ratio: 400 / 106;
}

.home-hero {
  display: block;
}

.home-hero::before {
  display: none;
}

.home-hero__slide {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.55s ease, visibility 0s linear 0.55s;
}

.home-hero__slide.is-active {
  z-index: 1;
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.home-hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.5);
}

.home-hero__slide .container {
  position: relative;
  z-index: 2;
}

.home-hero__title--medium {
  margin-bottom: 20px !important;
  font-size: 50px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

.home-hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.18);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.home-hero:hover .home-hero__arrow,
.home-hero:focus-within .home-hero__arrow {
  opacity: 1;
}

.home-hero__arrow:hover,
.home-hero__arrow:focus-visible {
  background: rgba(0, 0, 0, 0.55);
}

.home-hero__arrow--previous {
  left: 16px;
}

.home-hero__arrow--next {
  right: 16px;
}

.home-hero__arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.home-hero__arrow--previous::before {
  transform: translate(-35%, -50%) rotate(-135deg);
}

.home-hero__arrow--next::before {
  transform: translate(-65%, -50%) rotate(45deg);
}

.home-hero__dots {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.home-hero__dot {
  position: relative;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.home-hero__dot::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.38);
  transition: background-color 0.2s ease;
}

.home-hero__dot.is-active::before,
.home-hero__dot:hover::before,
.home-hero__dot:focus-visible::before {
  background: #fff;
}

.brand-grid {
  display: flex !important;
  align-items: center;
  gap: 50px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.brand-grid::-webkit-scrollbar {
  display: none;
}

.brand-grid > [role="listitem"] {
  flex: 0 0 calc((100% - 250px) / 6);
  min-width: 0;
  padding: 20px;
  scroll-snap-align: start;
}

.brand-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.brand-grid img:hover {
  opacity: 1;
}

.home-kicker {
  margin-bottom: 0.5rem;
  color: inherit;
  font-family: Poppins, Helvetica, Arial, sans-serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: normal;
  text-transform: none;
}

#blog.grid-layout.home-masonry[data-masonry-ready="true"] {
  display: block !important;
  position: relative;
  width: calc(100% + 20px);
  margin: 0 -20px 30px 0 !important;
  gap: 0;
}

#blog.grid-layout.home-masonry[data-masonry-ready="true"] > .post-item {
  position: absolute !important;
  inset: auto !important;
  top: 0 !important;
  left: 0 !important;
  width: var(--masonry-width) !important;
  max-width: var(--masonry-width) !important;
  margin: 0 !important;
  padding: 0 20px 20px 0 !important;
  transform: translate3d(var(--masonry-x), var(--masonry-y), 0) !important;
}

@media (max-width: 991px) {
  #header {
    height: auto !important;
    min-height: 80px;
  }

  body.mainMenu-open #header #mainMenu:not(.menu-overlay) {
    max-height: calc(100vh - 80px) !important;
    max-height: calc(100dvh - 80px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  #mainMenu nav > ul > li > a,
  #mainMenu nav > ul > li > span,
  #mainMenu nav > ul > li .dropdown-menu a,
  #mainMenu nav > ul > li .dropdown-menu span {
    display: block;
    min-height: 0;
  }

  .home-hero__title--medium {
    font-size: 40px !important;
    line-height: 40px !important;
  }

  .brand-grid > [role="listitem"] {
    flex-basis: calc((100% - 150px) / 4);
  }
}

@media (max-width: 767px) {
  .brand-grid > [role="listitem"] {
    flex-basis: calc((100% - 100px) / 3);
  }
}

@media (max-width: 480px) {
  .home-hero__title--medium {
    font-size: 34px !important;
    line-height: 36px !important;
  }

  .brand-grid > [role="listitem"] {
    flex-basis: calc((100% - 50px) / 2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__slide,
  .brand-grid {
    transition: none;
    scroll-behavior: auto;
  }
}
