/*
 * Services Image Box Carousel
 * */

.services-image-box-carousel-wrap {
  overflow-x: clip;
}

.services-image-box-carousel {
  opacity: 0;
  visibility: hidden;
}

.services-image-box-carousel.slick-initialized {
  opacity: 1;
  visibility: visible;
}

.services-image-box-carousel .slick-list {
  margin: 0 -15px;
}

.services-image-box-carousel .slick-slide {
  margin: 0 15px;
}

.service-image-box {
  position: relative;
  overflow: hidden;
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.service-image-box .service-image {
  position: relative;
}

.service-image-box .service-image:before {
  content: "";
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--e-global-color-primary);
  opacity: 30%;
  width: 100%;
  height: 100%;
  transition: all 0.4s ease-in-out;
}

/* .services-image-box-carousel .slick-slide.slick-current.slick-active .service-image-box .service-image:before,
 * .service-image-box.active .service-image:before */
.service-image-box:hover .service-image:before {
  opacity: 50%;
}

.service-image-box .service-image img {
  width: 100%;
  aspect-ratio: 1 / 1.205;
  object-fit: cover;
}

.service-image-box .service-image .service-title {
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 30px;
  opacity: 1;
  transition: all 0.3s ease-in-out;
}

.service-image-box:hover .service-image .service-title {
  opacity: 0;
}

.service-image-box .service-box-content {
  position: absolute;
  top: auto;
  left: 0;
  right: 0;
  bottom: -100%;
  background-color: var(--e-global-color-accent);
  padding: 30px;
  transition: all 0.4s ease-in-out;
}

/* .services-image-box-carousel .slick-slide.slick-current.slick-active .service-image-box .service-box-content */

.service-image-box:hover .service-box-content {
  /* .service-image-box.active .service-box-content{ */
  bottom: 0;
}

.service-image-box .service-box-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

.service-image-box .service-box-content .content-left {
  width: calc(100% - 42px);
  border-right: 1px solid var(--white-color);
  padding-right: 20px;
  box-sizing: border-box;
}

.service-image-box .service-image .service-title h2,
.service-image-box .service-box-content h2 {
  font-size: var(--e-global-typography-secondary-font-size);
  font-weight: var(--e-global-typography-secondary-font-weight);
  text-transform: var(--e-global-typography-secondary-text-transform);
  font-style: var(--e-global-typography-secondary-font-style);
  color: var(--white-color);
}

.service-image-box .service-image .service-title h3,
.service-image-box .service-box-content h3 {
  font-size: var(--e-global-typography-secondary-font-size);
  font-weight: var(--e-global-typography-secondary-font-weight);
  text-transform: var(--e-global-typography-secondary-text-transform);
  font-style: var(--e-global-typography-secondary-font-style);
  color: var(--white-color);
}

.service-image-box .service-box-content .service-desc {
  font-size: 16px;
  color: var(--white-color);
  margin-top: 5px;
}

.service-image-box .service-box-content .content-right {
  width: 42px;
  text-align: end;
  display: flex;
  align-items: center;
  justify-content: end;
  box-sizing: border-box;
}

.service-image-box .service-box-content .service-btn {
  line-height: 0;
  padding: 0;
}

.service-image-box .service-box-content .service-btn svg {
  width: 18px;
  height: auto;
  transition: all 0.3s ease-in-out;
}

.service-image-box .service-box-content .service-btn:hover svg {
  fill: var(--e-global-color-primary);
}

.services-image-box-carousel .slick-arrow {
  position: absolute;
  top: -110px;
  left: auto;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  width: 50px;
  height: 50px;
  padding: 0;
  transition: all 0.3s ease-in-out;
  z-index: 10;
}

.services-image-box-carousel .slick-arrow:hover,
.services-image-box-carousel .slick-arrow.next-arrow:hover {
  color: var(--white-color);
  background-color: var(--e-global-color-primary);
}

.services-image-box-carousel .slick-arrow svg {
  width: 18px;
  height: auto;
}

.services-image-box-carousel .slick-arrow.prev-arrow {
  right: 60px;
}

.services-image-box-carousel .slick-arrow.next-arrow {
  background-color: var(--light-bg);
  color: var(--e-global-color-primary);
}

/* No Slider CSS */
.services-image-disable-slider-wrap {
}

.services-image-disable-slider {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

.services-image-disable-slider .slick-slide {
  width: calc(33.33% - 20px);
  display: block;
}

@media only screen and (max-width: 1024px) {
  .services-image-box-carousel {
    padding-bottom: 80px;
  }

  .service-image-box .service-box-content {
    padding: 20px;
  }

  .services-image-box-carousel .slick-arrow {
    --left-right-arrow: calc(50% - 60px);
    top: auto;
    left: var(--left-right-arrow);
    right: auto;
    bottom: 0;
  }

  .services-image-box-carousel .slick-arrow.next-arrow {
    left: auto;
    right: var(--left-right-arrow);
  }

  /* No Slider CSS */
  .services-image-disable-slider .slick-slide {
    width: calc(50% - 15px);
  }
}

@media only screen and (max-width: 767px) {
  .services-image-box-carousel {
    padding-bottom: 60px;
  }

  .services-image-box-carousel .slick-arrow {
    --left-right-arrow: calc(50% - 45px);
    width: 40px;
    height: 40px;
  }

  .services-image-box-carousel .slick-arrow svg {
    width: 16px;
  }

  /* No Slider CSS */
  .services-image-disable-slider .slick-slide {
    width: 100%;
  }
}

/************************************************************************************************/
/* Services Carousel - Tablet Always-On & Mobile In-View Reveal */

/* Tablet: force every card into the reveal state so the description and
   button stay showing across all cards. */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .service-image-box .service-image:before {
    opacity: 50%;
  }

  .service-image-box .service-image .service-title {
    opacity: 0;
  }

  .service-image-box .service-box-content {
    bottom: 0;
  }
}

/* Mobile: card reveals once it is sufficiently in the viewport.
   .in-view is toggled by IntersectionObserver in the frontend script. */
@media only screen and (max-width: 767px) {
  .service-image-box.in-view .service-image:before {
    opacity: 50%;
  }

  .service-image-box.in-view .service-image .service-title {
    opacity: 0;
  }

  .service-image-box.in-view .service-box-content {
    bottom: 0;
  }
}

/************************************************************************************************/
/* Image Marquee (Auto Scroll) */
.at-marquee {
  width: 100%;
}

.at-marquee__viewport {
  width: 100%;
  overflow: hidden;
}

.at-marquee__track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  animation: at-marquee-scroll 30s linear infinite;
  animation-play-state: paused;
  will-change: transform;
}

/* JS adds .is-ready once the seamless loop has been built */
.at-marquee.is-ready .at-marquee__track {
  animation-play-state: running;
}

.at-marquee__item {
  flex: 0 0 auto;
  margin-right: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.at-marquee__item img {
  display: block;
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: filter 0.3s ease-in-out;
}

@keyframes at-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-1 * var(--at-scroll, 100%)));
  }
}

/* Accessibility: respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .at-marquee__track {
    animation: none;
  }
}
