/* ----------------------------------------
   Testimonials Section Styles
---------------------------------------- */

/* Wrapper for Testimonials Section */
.wrapper.style3 {
  background: #f3f3f3;
  color: #484d55;
  padding: 4em 2em;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Title Styling */
#testimonials .title {
  position: absolute;
  top: -3em;
  left: 50%;
  transform: translateX(-50%);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.25em;
  font-size: 1em;
  background: inherit;
  color: #000;
  z-index: 10;
}

/* Decorative Elements for the Title */
#testimonials .title:before,
#testimonials .title:after {
  content: "";
  position: absolute;
  bottom: -10px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: rotate(45deg);
  z-index: -1;
}

#testimonials .title:before {
  left: -5px;
}

#testimonials .title:after {
  right: -5px;
}

/* Testimonial Container */
.testimonial-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  min-height: 250px; /* Ensure consistent container height */
}

/* Individual Testimonial */
.testimonial {
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateX(-100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
  text-align: center;
  padding: 0em 1em;
  box-sizing: border-box;
}

.testimonial.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
}

.testimonial p {
  font-size: 1.2em;
  line-height: 1.6;
  color: #000;
  margin-bottom: 1em;
}

.testimonial h3 {
  font-size: 1em;
  font-weight: bold;
  color: #e97770;
}

/* Dots Controls */
.controls {
  display: flex;
  justify-content: center; /* Center-align the dots */
  align-items: center;
  margin-top: 1em;
  position: relative;
  width: 100%; /* Stretch to align centrally */
}

.controls .dot {
  width: 12px;
  height: 12px;
  background: #ddd;
  border-radius: 50%;
  margin: 0 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.controls .dot.active {
  background: #484d55;
}

/* Responsive Adjustments */

/* Screens 426px and smaller */
@media screen and (max-width: 426px) {
  #testimonials .title {
    font-size: 0.7em;
    top: -2.5em;
  }

  .testimonial p {
    font-size: 1em;
  }

  .testimonial h3 {
    font-size: 0.9em;
  }

  .controls .dot {
    width: 10px;
    height: 10px;
  }
}

/* Screens 427px to 768px */
@media screen and (min-width: 427px) and (max-width: 768px) {
  #testimonials .title {
    font-size: 0.9em;
    top: -3em;
  }

  .testimonial p {
    font-size: 1.1em;
  }

  .testimonial h3 {
    font-size: 1em;
  }
}

/* Screens 1367px to 1439px */
@media screen and (min-width: 1367px) and (max-width: 1439px) {
  #testimonials .title {
    font-size: 1.2em;
    top: -3em;
  }

  .testimonial p {
    font-size: 1.3em;
  }

  .testimonial h3 {
    font-size: 1.2em;
  }

  .controls {
    margin-top: 3em; /* Adjust margin for spacing */
  }

  .controls .dot {
    width: 15px;
    height: 15px;
  }
}

/* Screens 1440px to 2559px */
@media screen and (min-width: 1440px) and (max-width: 2559px) {
  #testimonials .title {
    font-size: 1.5em;
    top: -3em;
  }

  .testimonial p {
    font-size: 1.4em;
  }

  .testimonial h3 {
    font-size: 1.3em;
  }

  .controls {
    margin-top: 4em;
  }

  .controls .dot {
    width: 20px;
    height: 20px;
  }
}

/* Screens 2560px and above */
@media screen and (min-width: 2560px) {
  #testimonials .title {
    font-size: 2em;
    top: -3em;
  }

  .testimonial p {
    font-size: 1.6em;
  }

  .testimonial h3 {
    font-size: 1.5em;
  }

  .controls {
    margin-top: 5em;
  }

  .controls .dot {
    width: 25px;
    height: 25px;
  }
}
