@import url("https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Jost", sans-serif;
}

.slider-container {
  width: 100%;

  background: url('') no-repeat center center/cover;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.slider-images {
  display: flex;
  gap: 92px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Default: Horizontal Layout */
.slider-img {
  width: 100px;
  height: 240px;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: 0.7s ease;
  overflow: hidden;
}

.slider-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}



h1 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(270deg);
  white-space: nowrap;
}

.details {
  position: absolute;
  bottom: 20px;
  
  right: 10px;
  left: 20px;
  color: #fff;
  display: none;
  background-color: black;
  opacity: 0.8;
padding: 20px;
border-radius: 20px;
}

.details h2 {
  font-size: 18px;
  font-weight: 700;
  color: red !important;

}
.details .collbtn{
  background-color: white;
  color: #b40000;
  font-size: 16px;
  padding: 10px 20px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 35px;
}
.details p {
  font-size: 14px;
  color: white !important;
}

/* Active Image */
.slider-img.active {
  width: 350px;
  height: 450px;
}

.slider-img.active h1 {
  display: none;
}

.slider-img.active .details {
  display: block;
}

/* ✅ Below 768px: Vertical Layout */
@media (max-width: 768px) {
  .slider-container {
    flex-direction: column;
    padding: 10px;
    /* width: fit-content; */
  }

  .slider-images {
    flex-direction: column;
    width: 100%;
    height: fit-content;
    width: fit-content;
    align-items: center;
  }

  .slider-img {
    width: 90%;
    max-width: 350px;
    height: auto;
  }

  .slider-img img {
    width: 100%;
    height: auto;
  }

  h1 {
    font-size: 16px;
    transform: translate(-50%, -50%);
  }

  .details h2 {
    font-size: 16px;
  }

  .details p {
    font-size: 14px;
  }

  .slider-img.active {
    width: 90%;
    max-width: 400px;
    height: auto;
  }
}

.slider-images .slider-img:first-child, 
.slider-images .slider-img:last-child {
  max-height: 55vh; /* Adjusts dynamically */
}

.slider-images .slider-img:nth-child(2), 
.slider-images .slider-img:nth-child(6) {
  max-height: 60vh;
}

.slider-images .slider-img:nth-child(3), 
.slider-images .slider-img:nth-child(4), 
.slider-images .slider-img:nth-child(5) {
  max-height: 65vh;
}

/* ✅ Responsive Fix: Adjust heights on smaller screens */
@media (max-width: 768px) {
  .slider-images {
    flex-direction: row;
  display: flex;
  flex-wrap: wrap;
    align-items: center;
  }

  .slider-img {
    width: 45%;
    max-width: 350px;
    height: auto; /* Automatically adjusts */
    max-height: 400px; /* Limits height to avoid oversized images */
  }

  .slider-img img {
    width: 100%;
    height: 250px;
    object-fit: cover; /* Ensures proper scaling */
  }
}

@media (max-width: 700px){
  .slider-img img{
    max-width: 600px;
    max-height: 200px;
    object-fit: cover;
  }
  .details{
    top:15px;
  }
  .details .collbtn{
    background-color: white;
    color: #b40000;
    font-size: 12px;
    padding: 8px 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 35px;
  }
  .details p {
    font-size: 10px;
    color: white !important;
  }
  

}

@media (max-width: 555px){
  

  .slider-images {
    flex-direction: column;
  display: flex;
  flex-wrap:nowrap;
    align-items: center;
  }
  .slider-img img{
    max-width: 500px;
    max-height: 200px;
    object-fit: cover;
  }
  .slider-img {
    width: 90%;
    max-width: 350px;
    height: auto; /* Automatically adjusts */
    max-height: 400px; /* Limits height to avoid oversized images */
  }

 
}




