.slider {
  position: relative;
  background: white;
  padding: 20px 0;
  width: 100%;
  overflow: visible;
}

.slider-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "stage"
    "nav";
  width: 100%;
  height: 800px;
  max-height: 560px;
}

.image-container {
  grid-area: stage;
  position: relative;
  width: 100%;
  min-height: 0;
  overflow: hidden;
}

.image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
}

.image-container img.image-active {
  opacity: 1;
}

.title-display {
  grid-area: stage;
  align-self: end;
  position: relative;
  z-index: 1;
  color: white;
  padding: 12px 20px;
  background: rgba(15, 61, 42, 0.72);
  width: 100%;
  box-sizing: border-box;
  letter-spacing: 0.03em;
  font-size: 0.95rem;
  pointer-events: none;
}

.nav-container {
  grid-area: nav;
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px 16px 0;
  box-sizing: border-box;
}

.nav-btn {
  flex: 0 0 auto;
  height: 16px;
  width: 16px;
  display: inline-block;
  margin: 0;
  background-color: #c4d5bd;
  border-radius: 50%;
  border: none;
  cursor: pointer;
}

.nav-btn.btn-active {
  background-color: #126441;
}

.nav-btn:hover,
.nav-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(18, 100, 65, 0.35);
  outline: none;
}

.carousel-nav-btn {
  border: none;
  background: #126441;
  color: #fff;
  cursor: pointer;
  transition: opacity 300ms ease-in-out;
  padding: 0;
  border-radius: 50%;
  height: 48px;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.carousel-nav-btn:hover,
.carousel-nav-btn:focus-visible {
  opacity: 0.9;
  outline: 2px solid #126441;
  outline-offset: 2px;
}

.arrow {
  border: solid #d4e3ce;
  border-width: 0 3px 3px 0;
  display: inline-block;
  padding: 7px;
}

.right {
  transform: rotate(-45deg);
  margin-right: 3px;
}

.left {
  transform: rotate(135deg);
  margin-left: 3px;
}

.prev-btn {
  position: absolute;
  top: calc(45% - 24px);
  left: 12px;
}

.next-btn {
  position: absolute;
  top: calc(45% - 24px);
  right: 12px;
}

@media screen and (max-width: 900px) {
  .slider-container {
    width: 100%;
  }

  .prev-btn {
    left: 8px;
  }

  .next-btn {
    right: 8px;
  }

  .carousel-nav-btn {
    height: 44px;
    width: 44px;
  }

  .arrow {
    padding: 6px;
  }
}

@media screen and (max-width: 500px) {
  .nav-container {
    gap: 8px;
    padding: 16px 12px 0;
  }

  .nav-btn {
    height: 14px;
    width: 14px;
  }

  .slider-container {
    max-height: 460px;
  }

  .slider {
    padding: 12px 0 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-container img {
    transition: none;
  }
}
