/**
 * Lightweight home slider.
 * Author: RedaXStudio
 */

.homeslider-container.rx-homeslider {
  --rx-slider-aspect: 16 / 7;
  --rx-slider-transition: 360ms;
  position: relative;
  float: none;
  width: 100%;
  margin: 0 0 50px;
  overflow: hidden;
  background: #f4f4f4;
  isolation: isolate;
}

.rx-homeslider .rx-homeslider__viewport {
  position: relative;
  width: 100%;
  aspect-ratio: var(--rx-slider-aspect);
  overflow: hidden;
  contain: layout paint;
}

/*
 * Absolute stacking prevents intrinsic image dimensions from affecting
 * the carousel track size. This avoids the first image becoming square.
 */
.rx-homeslider .rx-homeslider__slides {
  position: absolute;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: hidden;
  list-style: none;
}

.rx-homeslider .rx-homeslider__slide {
  position: absolute;
  inset: 0;
  width: auto;
  min-width: 0;
  height: auto;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--rx-slider-transition) ease, visibility 0s linear var(--rx-slider-transition);
}

.rx-homeslider .rx-homeslider__slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.rx-homeslider .rx-homeslider__link,
.rx-homeslider .rx-homeslider__picture {
  position: absolute;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  overflow: hidden;
}

.homeslider-container.rx-homeslider .rx-homeslider__image {
  position: absolute !important;
  inset: 0 !important;
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0;
  object-fit: cover;
  object-position: center;
}

.rx-homeslider .rx-homeslider__caption {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: none;
  padding: 12px 20px;
  margin: 0;
  color: #fff;
  font-size: 1rem;
  text-shadow: none;
  background: rgba(0, 0, 0, 0.6);
}

.rx-homeslider .rx-homeslider__caption > :last-child,
.rx-homeslider .rx-homeslider__caption div > :last-child {
  margin-bottom: 0;
}

.rx-homeslider .rx-homeslider__control {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 44px;
  height: 56px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  text-indent: 0;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
  opacity: 0.82;
  transform: translateY(-50%);
  transition: opacity 160ms ease, background-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.rx-homeslider .rx-homeslider__control::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}

.rx-homeslider .rx-homeslider__control--previous {
  left: 0;
}

.rx-homeslider .rx-homeslider__control--previous::before {
  transform: translate(-35%, -50%) rotate(-135deg);
}

.rx-homeslider .rx-homeslider__control--next {
  right: 0;
}

.rx-homeslider .rx-homeslider__control--next::before {
  transform: translate(-65%, -50%) rotate(45deg);
}

.rx-homeslider .rx-homeslider__control:hover,
.rx-homeslider .rx-homeslider__control:focus-visible {
  opacity: 1;
  background: rgba(0, 0, 0, 0.58);
}

.rx-homeslider .rx-homeslider__control:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: -4px;
}

.rx-homeslider .rx-homeslider__control:disabled {
  cursor: default;
  opacity: 0.3;
}

@media (max-width: 767px) {
  .homeslider-container.rx-homeslider {
    margin-bottom: 30px;
  }

  .rx-homeslider .rx-homeslider__control {
    width: 38px;
    height: 48px;
  }

  .rx-homeslider .rx-homeslider__caption {
    padding: 9px 14px;
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .homeslider-container.rx-homeslider {
    --rx-slider-transition: 0ms;
  }

  .rx-homeslider .rx-homeslider__slide,
  .rx-homeslider .rx-homeslider__control {
    transition: none;
  }
}
