/* Global reset */

.slider-background,
.slider-wrapper,
.slide {
  height: calc(100svh - 58px);
}

.slider-background {
  width: 100%;
  position: relative;
  flex-direction: column;
}

.slider-wrapper {
  position: relative;
  width: 100%;
  max-width: 2000px;
  margin-inline: auto;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.slider {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

/* Base styling for slide-content */
.slide-content {
  text-shadow: 0 0 0.5em rgba(0, 0, 0, 0.5);
  position: absolute;
  top: 50%;
  max-width: 46% !important;
  text-align: center;
  font-family: sans-serif;
  color: var(--active-color-2);
  z-index: 2;
  opacity: 0; /* Start hidden for animation */
  animation: fadeSlideIn 1s ease-out forwards;
  width: 100%; /* Ensures proper centering */
  max-width: 1200px; /* Optional: Limits content width */
}

.slide-content h2 {
  text-transform: uppercase;
}

.slide-content p {
  font-weight: 200;
  margin-bottom: 20px;
}

/* Reusable alignment classes */
.align-center {
  transform: translate(-50%, -50%);
  text-align: center;
}

.align-left {
  left: 15%;
  transform: translateY(-50%); /* Keeps vertical centering intact */
  text-align: left;
}

.align-right {
  right: 15%;
  left: auto; /* Ensure 'left' is not affecting the position */
  transform: translateY(-50%);
  text-align: right;
}

@keyframes fadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(10%);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%);
  }
}

.slide {
  position: relative;
  min-width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: var(--overlay);
}

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

/* Navigation button styling */
.prev,
.next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
  padding: 5px;
}

.prev {
  left: calc(5px + env(safe-area-inset-left));
}

.next {
  right: calc(5px + env(safe-area-inset-right));
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Dot indicators */
.dots-wrapper {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.dot {
  height: 15px;
  width: 15px;
  margin: -60px 12px 0;
  background-color: var(--inactive-color);
  filter: opacity(0.7);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.dot.active {
  background-color: var(--active-color-2);
  filter: opacity(1);
}

@media (max-width: 899px) {
  .slider-background,
  .slider-wrapper,
  .slide {
    height: calc(100svh - 116px - max(env(safe-area-inset-bottom) - 10px, 0px));
  }

  .align-left,
  .align-right {
    left: auto;
    right: auto;
    transform: translate(-50%, -50%);
    text-align: center;
  }

  .slide-content {
    max-width: 74% !important;
  }

  .slide-content p {
    margin-bottom: 2rem;
  }

  @media screen and (orientation: landscape) {
    .slide-content {
      top: 45%;
    }
    .slide-content h2 {
      margin-bottom: 0.2rem;
    }
    .slide-content p {
      margin-bottom: 1.3rem;
    }
  }
}
