/* Testimonial Read More Styles - Updated with specificity */
.testimonial-item .comment-content {
  position: relative;
}

.testimonial-item .comment-content p {
  display: -webkit-box !important;
  -webkit-line-clamp: 5 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  transition: all 0.3s ease;
  margin-bottom: 0;
}

.testimonial-item.expanded .comment-content p {
  -webkit-line-clamp: unset !important;
  display: block !important;
}

.read-more-btn {
  color: #423E32;
  cursor: pointer;
  font-weight: 600;
  margin-top: 12px;
  display: inline-block;
  font-size: 14px;
  transition: opacity 0.2s ease;
  user-select: none;
}

.read-more-btn:hover {
  opacity: 0.7;
}

/* Ensure consistent card heights when collapsed */
.testimonial-item:not(.expanded) {
  align-items: stretch;
}

.testimonial-item:not(.expanded) .testimonial-box {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Reposition profile image to bottom-right corner */
.testimonial-item .testimonial-box {
  position: relative;
  padding-bottom: 90px; /* Make room for image at bottom */
}

.testimonial-item .comment-bio {
  position: absolute !important;
  bottom: 20px;
  right: 20px;
  top: auto !important;
  left: auto !important;
  margin-bottom: 0 !important;
}

.testimonial-item .comment-bio .profile-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
}

.testimonial-item .comment-bio .profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Adjust text area to not overlap with bottom-right image */
.testimonial-item .comment-content {
  padding-right: 10px;
  padding-bottom: 10px;
}

/* Ensure rating stars don't overlap */
.testimonial-item .rating-stars {
  padding-right: 80px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .testimonial-item .comment-bio {
    bottom: 15px;
    right: 15px;
  }
  
  .testimonial-item .comment-bio .profile-image {
    width: 50px;
    height: 50px;
  }
  
  .testimonial-item .testimonial-box {
    padding-bottom: 80px;
  }
}
