.testimonial-carousel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  margin: 40px auto;
  position: relative;
  overflow: hidden;
}

.testimonial-carousel h2 {
  font-size: 32px;
  color: #1C1C1C;;
  margin-bottom: 20px;
  font-family: 'Playfair Display';
  font-weight: 500;
}

.carousel-container {
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 20px 0;
  perspective: 1000px;
}

.testimonial-slider {
  display: flex;
  position: relative;
  width: 100%;
  align-items: center;
  min-height: 320px;
  justify-content: center;
  overflow: visible;
}

.carousel-card {
  display: flex;
  align-items: center;
  width: 803px;
  min-width: 803px;
  height: 298px;
  border-radius: 16px;
  border: 2px solid #ec441b;
  padding: 32px 36px;
  background-color: #fff;
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  transform: translateX(-50%) translateY(-50%) scale(0.8);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.6s ease, 
              border 0.3s ease,
              visibility 0.3s ease,
              left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  cursor: pointer;
  visibility: hidden;
  z-index: 1;
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
}

.carousel-card.active {
  opacity: 1;
  z-index: 3;
  border: 3px solid #ec441b;
  visibility: visible;
  cursor: default;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

.carousel-card.left,
.carousel-card.right {
  opacity: 1;
  z-index: 3;
  border: 3px solid #ec441b;
  visibility: visible;
}

.carousel-card.hidden {
  opacity: 0;
  z-index: 1;
  visibility: hidden;
}

.carousel-card:hover:not(.active) {
  opacity: 0.9;
  border: 3px solid #ec441b;
}

.card-content {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  margin-left: 20px;
  justify-content: center;
  gap: 12px;
}

.card-content p {
  position: relative;
  text-align: left;
  font-size: 18px;
  font-weight: 400;
  color: #000;
  padding-left: 20px;
  margin: 0 0 15px 0;
  line-height: 1.5;
}

.card-content p::before {
  content: '"';
  font-size: 36px;
  color: #ec441b;
  position: absolute;
  left: 0;
  top: -10px;
}

.card-footer {
  text-align: left;
  width: 100%;
  margin-left: 40px;
}

.card-footer strong {
  display: block;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.2;
  font-family: 'Roboto Serif';
}

.card-footer span {
  font-size: 16px;
  font-style: italic;
  color: #494949;
  font-weight: 400;
  font-family: 'Roboto Serif';
}

.carousel-controls {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  position: relative;
  z-index: 4;
}

.carousel-controls button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  margin: 0 10px;
  padding: 0;
  transition: transform 0.3s ease;
}

.carousel-controls button:hover {
  transform: scale(1.1);
}

.carousel-controls button svg {
  width: 38px;
  height: 38px;
}

.card-image {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  margin-top: 15px;
  position: relative;
  z-index: 4;
  gap: 8px;
  padding: 5px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  margin: 0;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: 1px solid transparent;
}

.indicator:hover {
  transform: scale(1.2);
  background-color: #aaa;
}

.indicator.active {
  background-color: #ec441b;
  transform: scale(1.2);
}

@media (max-width: 1200px) {
  .carousel-card {
    width: 700px;
    min-width: 700px;
    height: 280px;
    padding: 28px 32px;
  }
}

@media (max-width: 1024px) {
  .carousel-card {
    width: 600px;
    min-width: 600px;
    height: 260px;
    padding: 24px 28px;
  }
  .testimonial-carousel h2{
    font-size: 24px;
    font-weight: 600;
    margin: 0px;
  }
  .testimonial-carousel{
    margin-bottom: 0px;
  }
}

@media (max-width: 768px) {
  .testimonial-slider {
    min-height: 380px;
  }
  
  .carousel-card {
    width: 450px;
    min-width: 450px;
    height: 320px;
    flex-direction: column;
    text-align: center;
    padding: 20px;
    justify-content: center;
    align-items: center;
  }
  
  .carousel-card.active {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .carousel-card.left,
  .carousel-card.right {
    opacity: 0.5;
  }

  .card-content {
    margin-top: 15px;
    margin-left: 0;
    text-align: center;
    align-items: center;
  }

  .card-footer {
    margin-left: 0;
    text-align: center;
  }
  
  .card-content p {
    font-size: 16px;
  }
  
  .card-footer strong {
    font-size: 16px;
  }
  
  .card-footer span {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .testimonial-slider {
    min-height: 350px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .carousel-card {
    width: 95vw;
    min-width: 95vw;
    max-width: 98vw;
    height: 300px;
    padding: 12px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    left: 50% !important;
    transform: translateX(-50%) translateY(-50%) scale(1);
    scroll-snap-align: center;
  }

  .carousel-card.left,
  .carousel-card.right {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
  }

  .carousel-card.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 3;
  }

  .carousel-controls button {
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0 6px;
  }

  .carousel-controls button svg {
    width: 32px;
    height: 32px;
  }

  .card-image {
    width: 80px;
    height: 80px;
  }

  .card-content p {
    font-size: 13px;
    padding-left: 10px;
  }

  .card-content p::before {
    font-size: 22px;
    top: -6px;
  }

  .card-footer strong {
    font-size: 13px;
  }

  .card-footer span {
    font-size: 11px;
  }
}
