/* HERO / SLIDER WRAPPER */
.overnight-hotels {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #000;

  /* best practice hero height */
  height: clamp(520px, 90vh, 820px);
  display: flex;
  align-items: center;
}

/* keep the divider inside the hero without taking layout space */
.overnight-hotels > .black-divider {
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100px;
  z-index: 0;
  pointer-events: none;
}

/* each slide should match the hero height */
.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

/* image always fills */
.slide-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.overnight-hotels button {
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  padding: 13px 20px;
  font-size: 24px;
  cursor: pointer;
  z-index: 2;
}

.overnight-hotels button:hover {
  background-color: #aaa;
}

.slider-wrapper {
  overflow: hidden;
  width: 100%;
}

/* .slider-wrapper-2 {
    height: 80%;
  } */

.overnight-slider {
  display: flex;
  transition: transform 0.8s ease-in-out;
  will-change: transform;
}

.slide {
  min-width: 100%;
  height: 100vh;
  position: relative; /* Ensure text is positioned relative to the slide */
}

.slide-img img {
  width: 100%;
  height: 100%;
  margin: auto;
  object-fit: cover;
  background-color: black;
}

/*.slide-img-2 img {
    position: absolute;
    top: 30%;
    transform: translateY(-50%);
  } */

.prev-button,
.next-button {
  position: absolute;
  top: 90%;
  transform: translateY(-50%);
}

.prev-button {
  left: 50%;
  transform: translate(-120%, -50%);
}

.next-button {
  left: 50%;
  transform: translate(20%, -50%);
}

.text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 90%);
  color: #fff;
  padding: 12px 14px;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 1.2s ease, transform 0.6s ease;
}

/* center the second overlay block */

.text-overlay h1 {
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.text-overlay-2 {
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.text-overlay.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.text-overlay-2.visible {
  transform: translate(-50%, -50%);
}

@media (max-width: 480px) {
  .slide {
    width: 100%;
    height: 100%;
  }

  .overnight-hotels {
    width: 100%;
    height: 60%;
  }

  .text-overlay {
    width: 80%;
    font-size: 14px !important;
    top: 1%;
    left: 40%;
    transform: translateX(-50%);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  }

  .text-overlay p {
    line-height: 1.3;
  }

  button {
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.5);
  }
}

@media (max-width: 768px) {
  .slide {
    width: 100%;
    height: 100%;
  }

  .overnight-hotels {
    width: 100%;
    height: 70vh; /* choose 70vh */
    min-height: 420px; /* prevents too small */
  }

  .text-overlay {
    width: 80%;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    text-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  }

  .text-overlay p {
    line-height: 1.3;
  }

  .overnight-hotels button {
    font-size: 18px;
    background-color: rgba(255, 255, 255, 0.55);
  }
}
