.testimonials {
  overflow: hidden;
  position: relative;
  z-index: 4;
  padding-top: 5rem;
}

.testimonial-floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.floating-element {
  position: absolute;
  z-index: 0;
  opacity: 0.07;
  border-radius: 50%;
  filter: blur(2px);
}
/* 
זה סוד: אם תשנה את זה, הדפדפן יקרוס לך באהבה.
*/
.floating-element-1 {
  top: 20%;
  right: 10%;
  width: 150px;
  height: 150px;
  background-color: var(--primary-color);
  animation: float 13s ease-in-out infinite;
}

.floating-element-2 {
  bottom: 15%;
  left: 8%;
  width: 180px;
  height: 180px;
  background-color: var(--accent-color);
  animation: float 16s ease-in-out infinite alternate;
}

.floating-element-3 {
  top: 60%;
  right: 20%;
  width: 100px;
  height: 100px;
  background-color: var(--primary-dark);
  animation: float 11s ease-in-out infinite 2s alternate;
}

.testimonials:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background: linear-gradient(
    135deg,
    rgba(233, 244, 252, 0.8) 0%,
    rgba(240, 248, 255, 0.8) 100%
  ); */
  z-index: -1;
}

.testimonial-slider {
  position: relative;
  margin: 0 auto;
  max-width: 1200px;
  overflow: hidden;
  direction: rtl;
  perspective: 1200px;
}

.testimonial-container {
  display: flex;
  padding: 2rem 0;
  overflow: visible;
  width: 100%;
  position: relative;
}

.testimonial-track {
  display: flex;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  transform-style: preserve-3d;
}

.testimonial-card {
  flex: 0 0 350px;
  margin: 0 1.5rem;
  padding: 2.5rem;
  background-color: white;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0.4;
  filter: blur(2px);
  transform-origin: center center;
  will-change: transform, opacity, filter;

  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    box-shadow 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    filter 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: scale(0.9) translateY(20px);
}

.testimonial-card:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  height: 5px;
  width: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.testimonial-card.visible-card {
  opacity: 1;
  filter: blur(0);
  transform: scale(1) translateY(0);
}

.testimonial-card.visible-card:hover {
  transform: translateY(-15px) scale(1.02);
  z-index: 10;
}

.testimonial-card.visible-card:hover:before {
  width: 100%;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: scale(0.8) translateX(60px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateX(0);
    filter: blur(0);
  }
}

@keyframes cardExit {
  from {
    opacity: 1;
    transform: scale(1) translateX(0);
    filter: blur(0);
  }
  to {
    opacity: 0.4;
    transform: scale(0.8) translateX(-60px);
    filter: blur(2px);
  }
}

@keyframes cardEntranceRtl {
  from {
    opacity: 0;
    transform: scale(0.8) translateX(-60px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateX(0);
    filter: blur(0);
  }
}

@keyframes cardExitRtl {
  from {
    opacity: 1;
    transform: scale(1) translateX(0);
    filter: blur(0);
  }
  to {
    opacity: 0.4;
    transform: scale(0.8) translateX(60px);
    filter: blur(2px);
  }
}

.testimonial-quote-icon {
  position: absolute;
  top: 2.5rem;
  left: 2.5rem;
  color: #f0f0f0;
  transform: rotate(180deg);
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.6s ease;
  z-index: 0;
}

.testimonial-card:hover .testimonial-quote-icon {
  opacity: 1;
  transform: rotate(180deg) scale(1.1);
}

.testimonial-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 1;
}

.testimonial-text {
  flex: 1;
  font-style: italic;
  margin-bottom: 2rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #555;
  transition: color 0.3s ease;
}

.testimonial-card:hover .testimonial-text {
  color: #333;
}

.testimonial-author {
  display: flex;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding-top: 1.2rem;
  justify-content: flex-start;
  flex-wrap: wrap;
  transition: border-top-color 0.3s ease;
}

.testimonial-card:hover .testimonial-author {
  border-top-color: rgba(var(--primary-color-rgb), 0.2);
}

.author-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1rem;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.author-avatar:after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.6s ease;
}

@keyframes shine {
  0% {
    transform: translateY(100%) rotate(45deg);
    opacity: 0.5;
  }
  100% {
    transform: translateY(-100%) rotate(45deg);
    opacity: 0;
  }
}

.author-initial {
  color: white;
  font-weight: 700;
  font-size: 1.2rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.author-info {
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.testimonial-card:hover .author-info {
  transform: translateX(5px);
}

.author-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 0.3rem;
  transition: color 0.3s ease;
}

.testimonial-card:hover .author-name {
  color: var(--primary-color);
}

.author-stars {
  color: gold;
  display: flex;
  transition: transform 0.4s ease;
}

.testimonial-card:hover .author-stars {
  transform: scale(1.1);
}

.author-stars svg {
  transition: transform 0.3s ease;
}

.testimonial-card:hover .author-stars svg {
  animation: pulse 1s infinite alternate;
}

.author-stars svg:nth-child(1) {
  animation-delay: 0s;
}
.author-stars svg:nth-child(2) {
  animation-delay: 0.1s;
}
.author-stars svg:nth-child(3) {
  animation-delay: 0.2s;
}
.author-stars svg:nth-child(4) {
  animation-delay: 0.3s;
}
.author-stars svg:nth-child(5) {
  animation-delay: 0.4s;
}

.testimonial-badge {
  /* margin-right: auto;
  margin-left: 0;
  z-index: 3;
  transform: rotate(-3deg);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0.95; */
}

.testimonial-card:hover .testimonial-badge {
  /* transform: rotate(0deg) scale(1.05);
  opacity: 1; */
}

.badge-content {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-dark) 100%
  );
  color: white;
  border-radius: 12px;
  padding: 0.6rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.testimonial-card:hover .badge-content {
  box-shadow: 0 12px 25px rgba(var(--primary-color-rgb), 0.35);
}

.badge-content:before {
  content: "";
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 0%,
    rgba(255, 255, 255, 0) 70%
  );
  transition: transform 0.6s ease;
  opacity: 0;
}

.testimonial-card:hover .badge-content:before {
  opacity: 1;
  animation: pulsate 2s infinite;
}

@keyframes pulsate {
  0% {
    transform: scale(0.8);
    opacity: 0.3;
  }
  50% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.3;
  }
}

.badge-label {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.9;
}

/* .badge-amount {
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
} */

.slider-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.slider-btn {
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  z-index: 10;
}

.slider-btn:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px) scale(1.1);
}

.slider-btn:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.7);
  opacity: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.6s ease;
}

.slider-btn:hover:after {
  opacity: 1;
  width: 120%;
  height: 120%;
  background: rgba(255, 255, 255, 0.15);
}

.slider-btn:active {
  transform: translateY(-1px) scale(1.05);
}

.slider-indicators {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  gap: 0.8rem;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(var(--primary-color-rgb), 0.15);
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  border: 2px solid transparent;
  outline: none;
}

.slider-dot:hover {
  background-color: rgba(var(--primary-color-rgb), 0.3);
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(var(--primary-color-rgb), 0.2);
}

.slider-dot.active {
  background-color: var(--primary-color);
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.15),
    0 0 8px rgba(var(--primary-color-rgb), 0.5);
}

.slider-dot:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background-color: rgba(var(--primary-color-rgb), 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.4s ease;
  z-index: -1;
}

.slider-dot:hover:after,
.slider-dot.active:after {
  width: 24px;
  height: 24px;
}

@media (hover: none) {
  .testimonial-container {
    cursor: grab;
  }

  .testimonial-container:active {
    cursor: grabbing;
  }

  .testimonial-card {
    opacity: 0.7;
    transform: scale(0.95);
    filter: blur(1px);
  }

  .testimonial-card.visible-card {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.section-title .highlight {
  color: var(--primary-color);
  position: relative;
}

.section-subtitle {
  font-size: 1.2rem;
  color: #555;
  margin-top: -1.5rem;
  margin-bottom: 2rem;
}

.testimonial-cta {
  text-align: center;
  margin-top: 4rem;
  padding: 2rem;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1200px) {
  .testimonial-card {
    flex: 0 0 330px;
  }
}

@media (max-width: 992px) {
  .testimonial-card {
    flex: 0 0 310px;
    padding: 2rem;
  }
}

@media (max-width: 768px) {
  .testimonial-card {
    flex: 0 0 280px;
    padding: 1.8rem;
  }

  .testimonial-text {
    font-size: 1rem;
  }

  .slider-btn {
    width: 45px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .testimonial-card {
    flex: 0 0 250px;
    padding: 1.5rem;
    margin: 0 1rem;
  }

  .author-avatar {
    width: 40px;
    height: 40px;
  }

  .author-initial {
    font-size: 1rem;
  }

  .badge-content {
    padding: 0.5rem 1rem;
  }

  .badge-amount {
    font-size: 0.9rem;
  }

  .slider-btn {
    width: 40px;
    height: 40px;
  }
}
