.projects-slider {
  max-width: 1100px;
  margin: 40px auto;
  text-align: center;
  font-family: Arial, sans-serif;
}

.slider-title {
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 30px;
}

.slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  perspective: 1200px;
  min-height: 500px; 
  overflow: visible;
}

/* Slide */
.slide {
  position: absolute;
  width: 80%;
  max-width: 900px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  transform: scale(0.9) translateX(200px);
  /* transition: opacity 0.6s ease-in-out; */
  display: flex;
  flex-direction: row-reverse;
  opacity: 0;
  z-index: 1;
}

.slide-img {
  width: 40%;
}

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

.slide-content {
  padding: 20px;
  width: 60%;
  text-align: left;
  min-height: 400px;
  max-height: 400px;
}

/* Active states */
.slide.active {
  opacity: 1;
  /* transform: scale(1) translateX(0);
  z-index: 10; */
  flex-direction: row;
  transform: scale(1) translateX(0px);
  z-index: 6;
}

/* .slide.prev {
  opacity: 1;
  transform: scale(0.95) translateX(120px);
  z-index: 9;
}

.slide.next {
  opacity: 1;
  transform: scale(0.85) translateX(280px);
  z-index: 3;
} */

/* Next */
.slide.next1 {
  opacity: 1;
  transform: scale(0.95) translateX(70px);
  z-index: 5;
}

.slide.next2 {
  opacity: 1;
  transform: scale(0.9) translateX(140px);
  z-index: 4;
}

.slide.next3 {
  opacity: 1;
  transform: scale(0.85) translateX(210px);
  z-index: 3;
}

.slide.next4 {
  opacity: 1;
  transform: scale(0.8) translateX(280px);
  z-index: 2;
}

.slide.next5 {
  opacity: 1;
  transform: scale(0.75) translateX(350px);
  z-index: 1;
}

/* Controls */
.slider-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  gap: 15px;
}

.slider-controls button {
  border: none;
  background: #fff;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  color: red;
}

.dots {
  display: flex;
  gap: 8px;
}

.dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #bbb;
  display: block;
  cursor: pointer;
}

.dots span.active {
  background: #e60023;
} 


/* 📱 Tablet & Mobile: smooth transition instead of hide/show */
@media (max-width: 1024px) {
  .slider-wrapper {
    perspective: none;
    overflow: hidden;         /* keep inside viewport */
    position: relative;
    width: 100%;  
    min-height: 600px;
  }

  .slide {
    flex: 0 0 100%;            /* one full slide width */
    min-width: 100%;
    max-width: 100%;
    position: absolute;        /* stack slides */
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateX(100%); /* start off-screen right */ 
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
    flex-direction: column;
    box-shadow: none;
    display: none;
  }

  /* Active slide */
  .slide.active {
    transform: scale(1) translateX(0%);
    opacity: 1;
    z-index: 6;
    flex-direction: column;
    display: flex;
  }

  /* Previous slide (to left) */
  /* .slide.prev {
    transform: translateX(-100%);
    opacity: 0;
    z-index: 4;
  } */

  /* Next slide (to right) */
  .slide.next1 {
    transform: scale(1) translateX(100%);
    opacity: 1;
    z-index: 5;
  }

  .slide.next2 {
    transform: scale(1) translateX(100%);
    opacity: 1;
    z-index: 4;
  }

  .slide.next3 {
    transform: scale(1) translateX(100%);
    opacity: 1;
    z-index: 3;
  }

  .slide.next4 {
    transform: scale(1) translateX(100%);
    opacity: 1;
    z-index: 2;
  }

  .slide.next5 {
    transform: scale(1) translateX(100%);
    opacity: 1;
    z-index: 1;
  }

  .slide-img {
    width: 100%;
    height: 220px;
  }

  .slide-content {
    width: 100%;
    text-align: center;
    padding: 15px;
    min-height: auto;
    max-height: none;
  }
}
