/* .button:focus, 
.button:hover, 
.hs-blog-post-listing__post-button:focus, 
.hs-blog-post-listing__post-button:hover, 
.hs-button:focus, 
.hs-button:hover, button:focus, button:hover {
  border: 0;
} */

/* Base testimonial slider styles with better performance optimizations */
.testimonial-slider {
  /* contain: content; */ /* Removed to prevent arrow cropping on mobile */
  will-change: transform; /* Optimize for animations */
}

.testimonial-slider .splide__track {
  margin: 0 auto;
  max-width: 1440px;
  overflow: hidden; /* Restore to hidden to clip slides correctly */
}

.testimonial-slider .splide__slide {
  display: flex;
  flex-flow: column;
  justify-content: center;
  opacity: 0.5;
  transform: scale(0.98);
  transition: opacity 0.5s cubic-bezier(0.215, 0.61, 0.355, 1),
    transform 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
  will-change: opacity, transform;
}

.testimonial-slider .splide__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.testimonial-slider .splide__slide__container {
  display: flex;
  flex-flow: column;
  align-items: center;
  gap: 2rem;
  margin: 0 auto;
  transition: all 0.5s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.testimonial-slider .splide__slide__container .col-1,
.testimonial-slider .splide__slide__container .col-2 {
  width: 100%;
}

.testimonial-slider .splide__slide__container .col-1 .splide-image {
  position: relative;
  transition: transform 0.3s ease-out;
  transform-origin: center;
  will-change: transform;
}

.testimonial-slider .splide__slide__container .col-1 .splide-image:hover {
  transform: translateY(-3px) scale(1.01);
}

.testimonial-slider .splide__slide__container .col-1 .splide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  backface-visibility: hidden; /* Reduce flickering during animations */
}

.testimonial-slider .splide__slide__container .col-2 .splide-content.left {
  text-align: left;
}

.testimonial-slider .splide__slide__container .col-2 .splide-content.right {
  text-align: right;
}

.testimonial-slider .splide__slide__container .col-2 .splide-content.center {
  text-align: center;
}

.testimonial-slider
  .splide__slide__container
  .col-2
  .splide-content
  .splide-quote {
  font-weight: 300;
  margin-bottom: 1rem;
  line-height: 1.2;
  transition: opacity 0.5s ease-out;
  transform: translateY(5px);
  opacity: 0;
  animation: fade-in-up 0.8s forwards 0.2s;
}

.testimonial-slider.dark
  .splide__slide__container
  .col-2
  .splide-content
  .splide-quote {
  color: #ffffff;
}

.testimonial-slider.light
  .splide__slide__container
  .col-2
  .splide-content
  .splide-quote {
  color: #0b496b;
}

.testimonial-slider
  .splide__slide__container
  .col-2
  .splide-content
  .splide-author {
  font-size: 0.875rem;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  animation: fade-in-up 0.8s forwards 0.5s;
  font-style: normal;
}

.testimonial-slider.dark
  .splide__slide__container
  .col-2
  .splide-content
  .splide-author {
  color: #ffffff;
}

.testimonial-slider.light
  .splide__slide__container
  .col-2
  .splide-content
  .splide-author {
  color: #f37c40;
}

.testimonial-slider .splide-cta {
  text-align: center;
  margin-top: 2rem;
  opacity: 0;
  animation: fade-in 1s forwards 0.7s;
}

/* Updated arrow styles - simplified to just carets */
.testimonial-slider .splide__arrow {
  opacity: 0.6;
  background: transparent;
  width: 3rem;
  height: 3rem;
  border-radius: 0;
  transition: opacity 0.3s ease;
  animation: fade-in 0.5s forwards 0.8s;
  top: 50%; /* Default to centered for mobile (mobile-first) */
  padding: 0.5rem;
}

/* Default arrow horizontal positioning (mobile-first) */
.testimonial-slider .splide__arrow--prev {
  left: -1.5rem; /* Positioned off the left edge for mobile */
}

.testimonial-slider .splide__arrow--next {
  right: -1.5rem; /* Positioned off the right edge for mobile */
}

.testimonial-slider .splide__arrow:hover {
  opacity: 1;
}

.testimonial-slider .splide__arrow svg {
  fill: #ffffff;
  width: 30px;
  height: 30px;
}

.testimonial-slider.light .splide__arrow svg {
  fill: #0b496b;
}

.testimonial-slider.dark .splide__arrow svg {
  fill: rgba(255, 255, 255, 0.75);
}

.testimonial-slider .splide__pagination {
  position: relative;
  margin-top: 3rem;
  opacity: 0;
  animation: fade-in 0.8s forwards 0.9s;
}

/* Animation keyframes */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Media query to adjust arrow position for tablet and non-large desktops */
@media (min-width: 768px) {
  .testimonial-slider .splide__arrow {
    top: 98%; /* Keep them where they were for tablet and up */
  }

  /* Desktop/Tablet: Arrows at the edges of the container (splide__track) */
  .testimonial-slider .splide__arrow--prev {
    left: 0rem; /* Small padding from the left edge of the track */
  }

  .testimonial-slider .splide__arrow--next {
    right: 0rem; /* Small padding from the right edge of the track */
  }
}

/* Mobile styles with horizontal padding */
@media (max-width: 767px) {
  .splide__slide__container {
    padding-left: 1.15rem; /* Add horizontal padding on mobile for the arrow to be visible */
    padding-right: 1.15rem;
  }
}

/* Fallback for browsers that don't support animations */
@supports not (animation: fade-in 1s) {
  .testimonial-slider
    .splide__slide__container
    .col-2
    .splide-content
    .splide-quote,
  .testimonial-slider
    .splide__slide__container
    .col-2
    .splide-content
    .splide-author,
  .testimonial-slider .splide-cta,
  .testimonial-slider .splide__arrow,
  .testimonial-slider .splide__pagination {
    opacity: 1;
    transform: none;
  }
}

/* Print styles for better accessibility */
@media print {
  .testimonial-slider .splide__track {
    overflow: visible;
  }

  .testimonial-slider .splide__slide {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    margin-bottom: 2cm;
    page-break-inside: avoid;
  }

  .testimonial-slider .splide__arrow,
  .testimonial-slider .splide__pagination {
    display: none !important;
  }
}

@media (min-width: 1566px) {
  .testimonial-slider .splide__arrow {
    top: 50%;
  }
}

@media (min-width: 767px) {
  .testimonial-slider .splide__slide__container {
    flex-flow: row;
  }
}

/* Reduced motion preference support */
@media (prefers-reduced-motion: reduce) {
  .testimonial-slider .splide__slide,
  .testimonial-slider .splide__slide__container,
  .testimonial-slider .splide__slide__container .col-1 .splide-image,
  .testimonial-slider .splide__arrow svg,
  .testimonial-slider
    .splide__slide__container
    .col-2
    .splide-content
    .splide-quote,
  .testimonial-slider
    .splide__slide__container
    .col-2
    .splide-content
    .splide-author {
    transition: none !important;
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

/* Hardware acceleration for smoother animations */
.testimonial-slider,
.testimonial-slider .splide__track,
.testimonial-slider .splide__list,
.testimonial-slider .splide__slide {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  perspective: 1000;
  -webkit-perspective: 1000;
}

/* Theme overrides remove default blockquote styles */

.testimonial-slider blockquote {
  border-left: none;
  margin: 0;
  padding-left: 0;
}

button.splide__arrow {
  border: none !important;
}
