.home-slider {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: #ded8cc;
}

.home-slider-track {
  position: relative;
  aspect-ratio: 3.4 / 1;
  min-height: 330px;
  max-height: 500px;
}

.home-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--slide-background);
  color: var(--slide-color);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .65s ease, visibility .65s ease;
  text-decoration: none;
}

.home-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.home-slide picture,
.home-slide > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.home-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: min(45%, 570px);
  height: 100%;
  margin-right: max(5vw, calc((100vw - 1180px) / 2 + 32px));
  padding: 38px 0 70px;
}

.home-slide-content h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 2.7vw, 3rem);
  line-height: 1.3;
}

.home-slide-content p {
  max-width: 420px;
  margin: 0 0 18px;
  font-size: clamp(.9rem, 1.25vw, 1.1rem);
  line-height: 1.75;
}

.home-slide-button {
  display: inline-block;
  min-width: 108px;
  padding: 8px 22px;
  border-radius: 25px;
  background: #fff;
  color: #18211c;
  text-align: center;
  text-decoration: none;
  font-weight: 800;
}

.slider-arrow {
  position: absolute;
  z-index: 4;
  top: auto;
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .84);
  color: #18211c;
  font-size: 1.45rem;
  line-height: 1;
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(5px);
  transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}

.home-slider:hover .slider-arrow,
.home-slider:focus-within .slider-arrow {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.slider-arrow:hover {
  background: #fff;
}

.slider-arrow svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.slider-next {
  right: max(91px, calc((100vw - 1280px) / 2 + 91px));
  left: auto;
}

.slider-previous {
  right: max(32px, calc((100vw - 1280px) / 2 + 32px));
}

.slider-dots {
  position: absolute;
  z-index: 4;
  right: 50%;
  bottom: 9px;
  display: flex;
  gap: 7px;
  padding: 0;
  transform: translateX(50%);
}

.slider-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  background: rgba(24, 33, 28, .32);
  transition: transform .25s, background-color .25s;
}

.slider-dots button.is-active {
  background: #fff;
  transform: scale(1.25);
}

@media (max-width: 650px) {
  .home-slider {
    margin: 0;
  }

  .home-slider-track {
    aspect-ratio: 4 / 5;
    min-height: 0;
  }

  .home-slide-content {
    justify-content: flex-end;
    width: 100%;
    margin: 0;
    padding: 35px 25px 75px;
    background: linear-gradient(0deg, rgba(0, 0, 0, .68), transparent 75%);
  }

  .home-slide-content h2 {
    font-size: clamp(1.75rem, 8vw, 2.6rem);
  }

  .slider-arrow {
    width: 36px;
    height: 36px;
    font-size: 1.6rem;
  }

  .slider-next {
    right: 58px;
    left: auto;
  }

  .slider-previous {
    right: 12px;
  }
}

@media (hover: none) {
  .slider-arrow {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-slide {
    transition: none;
  }
}
