/* CSS for Testimonials Swiper Layout */

.acf-layout-testimonials {
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
}

.testimonials-heading {
  margin-bottom: 70px;
}

.testimonials-swiper-outer {
  position: relative;
  width: 100%;
  z-index: 1;
  mask-image: linear-gradient(
    to right,
    transparent 10%,
    #000 45%,
    #000 55%,
    transparent 90%
  );
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 10%,
    #000 45%,
    #000 55%,
    transparent 90%
  );
}

.testimonials-swiper-container {
  overflow: visible !important;
  padding: 20px 0;
}

.testimonials-swiper-container:not(.swiper-manual) .swiper-wrapper {
  align-items: center;
  transition-timing-function: linear !important; /* Force linear scroll speed */
}

/* Slide Width and Transitions */
.testimonial-slide {
  width: 292px; /* Set exact width on slide columns */
  height: auto;
  /* opacity: 0.35; */
  transform: scale(0.95);
  margin: 0 15px; /* Horizontal card spacing */
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.testimonial-slide.custom-active {
  opacity: 1;
  transform: scale(1);
}

.testimonial-card {
  border: 1px solid #ffffff80;
  padding: 30px 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: auto;
  width: 100%;
  border-radius: 4px;
  transition:
    border-color 0.4s ease,
    background-color 0.4s ease,
    box-shadow 0.4s ease;
}

.testimonial-slide.custom-active .testimonial-card {
  border: 1px solid #ffffff80;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* L-shaped Figma-style corner borders (only active on center slide) */
.corner-border {
  position: absolute;
  width: 12px;
  height: 12px;
  opacity: 0;
  transform: scale(0.8);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  pointer-events: none;
}

.testimonial-slide.custom-active .corner-border {
  opacity: 1;
  transform: scale(1);
}

.corner-tl {
  top: -8px;
  left: -8px;
  border-top: 2px solid var(--color-1, #e65125);
  border-left: 2px solid var(--color-1, #e65125);
}

.corner-tr {
  top: -8px;
  right: -8px;
  border-top: 2px solid var(--color-1, #e65125);
  border-right: 2px solid var(--color-1, #e65125);
}

.corner-bl {
  bottom: -8px;
  left: -8px;
  border-bottom: 2px solid var(--color-1, #e65125);
  border-left: 2px solid var(--color-1, #e65125);
}

.corner-br {
  bottom: -8px;
  right: -8px;
  border-bottom: 2px solid var(--color-1, #e65125);
  border-right: 2px solid var(--color-1, #e65125);
}

.testimonial-card-content {
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  margin-bottom: 30px;
  text-align: left;
  transition: color 0.4s ease;
}

.testimonial-slide.custom-active .testimonial-card-content {
  color: rgba(255, 255, 255, 0.85);
}

.testimonial-card-author {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: auto;
}

.testimonial-author-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #202023;
  flex-shrink: 0;
}

.testimonial-author-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: grayscale(100%);
  transition:
    opacity 0.4s ease,
    filter 0.4s ease;
}

.testimonial-slide.custom-active .testimonial-author-avatar {
  opacity: 1;
  filter: none;
}

.testimonial-author-avatar-fallback {
  width: 100%;
  height: 100%;
  background-color: #3f3f46;
  border-radius: 50%;
  transition: background-color 0.4s ease;
}

.testimonial-slide.custom-active .testimonial-author-avatar-fallback {
  background-color: #ffffff;
}

.testimonial-author-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.testimonial-author-name {
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 2px 0;
  transition: color 0.4s ease;
}

.testimonial-slide.custom-active .testimonial-author-name {
  color: #ffffff;
}

.testimonial-author-company {
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.4s ease;
}

.testimonial-slide.custom-active .testimonial-author-company {
  color: #88888b;
}

/* Mobile responsive fixes */
@media (max-width: 767px) {
  .testimonial-slide {
    width: 260px; /* slightly narrower on mobile */
  }

  .testimonial-card {
    padding: 30px 20px;
  }

  .corner-border {
    width: 10px;
    height: 10px;
  }
  .corner-tl {
    top: -6px;
    left: -6px;
  }
  .corner-tr {
    top: -6px;
    right: -6px;
  }
  .corner-bl {
    bottom: -6px;
    left: -6px;
  }
  .corner-br {
    bottom: -6px;
    right: -6px;
  }

  .testimonials-swiper-outer {
    mask-image: linear-gradient(
      to right,
      transparent 5%,
      #000 30%,
      #000 70%,
      transparent 95%
    );
    -webkit-mask-image: linear-gradient(
      to right,
      transparent 5%,
      #000 30%,
      #000 70%,
      transparent 95%
    );
  }
}
