/* Testimonials Section */
.testimonials-section {
  background: white;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid #442d72;
  position: relative;
  margin-bottom: 2rem;
  overflow: visible; /* Allow slider arrows to overflow outside section borders */
}

@media (min-width: 640px) {
  .testimonials-section {
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .testimonials-section {
    padding: 2rem;
  }
}

.testimonials-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #442d72;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.testimonials-title i {
  color: #442d72; /* Updated purple color for testimonials title icon */
  margin-right: 0.5rem;
}

@media (min-width: 640px) {
  .testimonials-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

.star-icon {
  margin-right: 0.5rem;
  color: #442d72; /* Updated purple color */
}

/* Slick Slider Container */
.testimonials-slider-container {
  position: relative;
  max-width: 80rem;
  margin: 0 auto;
  width: 100%;
  padding: 0 1rem; /* Add padding to contain the slides within borders */
  box-sizing: border-box; /* Include padding in width calculation */
}

.testimonials-slick {
  /* Slick slider will handle the layout */
  width: 100%;
  overflow: hidden; /* Prevent overflow */
}

/* Center align testimonials on mobile only */
@media (max-width: 767px) {
  .testimonials-slider-container {
    display: block !important; /* Override desktop flexbox */
  }
  
  .testimonials-slick {
    width: 100% !important; /* Override desktop width calculation */
    margin: 0 !important; /* Override desktop margin */
  }
  
  .testimonials-slick .slick-track {
    display: flex !important;
    align-items: center;
  }
  
  .testimonials-slick .slick-slide {
    display: flex !important;
    justify-content: center;
    align-items: center;
  }
  
  .testimonials-slick .slick-slide > div {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  p.testimonial-text {
    padding-bottom: 0px !important;
  }
}

/* Ensure slick track and list stay within bounds */
.testimonials-slick .slick-track,
.testimonials-slick .slick-list {
  width: 100%;
}

/* Slick slide spacing - clean cards only */
.testimonials-slick .slick-slide {
  padding: 0 0.75rem; /* Spacing between cards */
  overflow: hidden;
}

.testimonials-slick .slick-slide > div {
  overflow: hidden;
}

/* Center the slider content between arrows */
.testimonials-slick .slick-list {
  margin: 0 -0.75rem; /* Negative margin to compensate for slide padding */
}

/* Desktop specific adjustments */
@media (min-width: 768px) {
  .testimonials-slick .slick-slide {
    padding: 0 1rem; /* Slightly more spacing on desktop */
  }
  
  .testimonials-slick .slick-list {
    margin: 0 -1rem;
  }
}

/* Desktop centering adjustments - no edge cards */
@media (min-width: 768px) {
  .testimonials-slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  
  .testimonials-slick {
    width: calc(100% - 120px); /* Account for arrow space */
    margin: 0 auto;
    overflow: hidden; /* Hide any edge overflow */
  }
  
  .testimonials-slick .slick-track {
    display: flex !important;
    align-items: center;
    justify-content: center; /* Center the track content */
  }
  
  .testimonials-slick .slick-list {
    overflow: hidden; /* Ensure no edge cards show */
  }
}

/* Mobile responsive - keep perfect appearance */
@media (max-width: 767px) {
  .testimonials-slick .slick-slide {
    padding: 0 0.5rem !important; /* Adjusted for mobile centering */
  }
  
  .testimonials-slick .slick-list {
    margin: 0 -0.5rem !important;
  }
  
  .testimonials-slider-container {
    padding: 0 !important; /* Remove padding to let centerMode handle spacing */
  }
}

/* Hide Slick dots if any appear */
.testimonials-slider-container .slick-dots {
  display: none !important;
}

/* Remove focus outline on slider track/slides */
.testimonials-slick,
.testimonials-slick .slick-slide,
.testimonials-slick .slick-track,
.testimonials-slick .slick-list {
  outline: none;
}

.testimonial-card {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f8f4ff 0%, white 100%);
  border-radius: 0.5rem;
  border: 1px solid #442d72;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

@media (min-width: 768px) {
  .testimonial-card {
    padding: 2rem;
  }
}

.testimonial-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 0.75rem;
}

@media (min-width: 640px) {
  .testimonial-avatar {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
  }
}

.testimonial-name {
  font-weight: 600;
  color: #442d72;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

@media (min-width: 640px) {
  .testimonial-name {
    font-size: 1rem;
  }
}

.testimonial-role {
  color: #442d72;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .testimonial-role {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }
}

.testimonial-rating {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .testimonial-rating {
    margin-bottom: 0.75rem;
  }
}

.star {
  color: #442d72; /* Updated purple color instead of yellow */
  font-size: 0.75rem;
}

@media (min-width: 640px) {
  .star {
    font-size: 1rem;
  }
}

.testimonial-text {
  color: #442d72;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
}

@media (min-width: 640px) {
  .testimonial-text {
    font-size: 0.875rem;
  }
}

/* Slick Arrow Styles */
.testimonials-slider-container .slick-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 2px solid #e5e7eb;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.2rem;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: #442d72; /* Updated purple color */
  z-index: 10;
}

.testimonials-slider-container .slick-arrow:hover {
  background: #442d72; /* Updated purple background on hover */
  color: white;
  border-color: #442d72; /* Updated purple border on hover */
}

.testimonials-slider-container .slick-arrow:before {
  display: none; /* Hide default Slick arrows */
}

.testimonials-slider-container .slick-arrow i {
  color: inherit; /* Inherit color from parent */
}

.testimonials-slider-container .slick-prev {
  left: 20px;
  z-index: 20;
}

.testimonials-slider-container .slick-next {
  right: 20px;
  z-index: 20;
}

@media (max-width: 767px) {
  .testimonials-slider-container {
    padding: 0 1rem;
    max-width: 100%;
  }
  
  .testimonials-slider-container .slick-arrow {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.25rem;
  }
  
  .testimonials-slider-container .slick-prev {
    left: 5px;
  }
  
  .testimonials-slider-container .slick-next {
    right: 5px;
  }
  
  .testimonials-section {
    padding: 1.5rem 1rem;
    margin: 2rem 0;
  }
  
  .testimonials-title {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
  }
  
  .testimonial-card {
    padding: 1.5rem;
    margin: 0 auto;
    max-width: 320px;
    box-shadow: 0 8px 16px rgba(68, 45, 114, 0.1);
  }
  
  .testimonial-avatar {
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* Additional responsive constraints for very small screens */
@media (max-width: 480px) {
  .testimonials-slider-container {
    padding: 0;
  }
  
  .testimonials-section {
    padding: 1rem 0.75rem;
  }
  
  .testimonials-slider-container .slick-prev {
    left: 5px;
  }
  
  .testimonials-slider-container .slick-next {
    right: 5px;
  }
  
  .testimonial-card {
    max-width: 280px;
    padding: 1.25rem;
  }
}

.testimonial-read-more {
  display: inline-block;
  margin-top: auto;
  background: transparent;
  color: #442d72;
  padding: 8px 20px;
  border-radius: 8px;
  border: 2px solid #442d72;
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
}

.testimonial-card-link:hover .testimonial-read-more {
  background: #442d72;
  color: white;
}