/* Modern Testimonials Styling */
.modern-testimonial {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  margin: 10px;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 350px; /* Fixed height for all cards */
  width: 90%; /* Use percentage width instead of fixed width */
  max-width: 300px; /* Maximum width for larger screens */
  display: flex;
  flex-direction: column;
  border-top: 3px solid #4fc1e9;
  margin-left: auto;
  margin-right: auto;
}

.modern-testimonial:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.modern-testimonial-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.modern-testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 15px;
  border: 2px solid #f5f5f5;
}

.modern-testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modern-testimonial-author {
  flex: 1;
}

.modern-testimonial-name {
  font-weight: 600;
  margin: 0;
  color: #333;
  font-size: 16px;
}

.modern-testimonial-date {
  color: #999;
  font-size: 12px;
  margin-top: 3px;
}

.modern-testimonial-rating {
  margin-bottom: 10px;
  color: #4fc1e9;
}

.modern-testimonial-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  margin-bottom: 15px;
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  height: 160px; /* Fixed height for content area */
}

.modern-testimonial-text {
  height: 100%;
  overflow-y: auto;
  padding-right: 5px;
  scrollbar-width: thin;
}

.modern-testimonial-text::-webkit-scrollbar {
  width: 4px;
}

.modern-testimonial-text::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.modern-testimonial-footer {
  text-align: right;
}

.modern-testimonial-link {
  display: inline-block;
  color: #4fc1e9;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.modern-testimonial-link:hover {
  color: #1e88e5;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .modern-testimonial {
    padding: 15px;
    margin: 8px;
  }
  
  .modern-testimonial-avatar {
    width: 40px;
    height: 40px;
  }
  
  .modern-testimonial-name {
    font-size: 14px;
  }
  
  .modern-testimonial-content {
    font-size: 13px;
  }
  
  .modern-testimonial-text {
    max-height: 100px;
  }
}

/* Custom Owl Carousel Styling */
.modern-testimonials-carousel .owl-stage {
  display: flex;
}

.modern-testimonials-carousel .owl-item {
  display: flex;
  flex: 1 0 auto;
  justify-content: center; /* Center items horizontally */
  padding: 0 5px; /* Add some spacing between items */
}

/* Ensure the carousel doesn't create horizontal overflow */
.modern-testimonials-carousel .owl-wrapper-outer {
  overflow: hidden;
}

.modern-testimonials-carousel .owl-dots {
  text-align: center;
  margin-top: 20px;
}

.modern-testimonials-carousel .owl-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transition: background 0.3s ease;
}

.modern-testimonials-carousel .owl-dot.active {
  background: #fff;
}

/* Use default owl carousel navigation styles */
.modern-testimonials-carousel .owl-controls .owl-buttons {
  position: absolute;
  top: 50%;
  width: 100%;
  transform: translateY(-50%);
}

.modern-testimonials-carousel .owl-controls .owl-buttons div {
  position: absolute;
  width: 40px;
  height: 40px;
  line-height: 40px;
  border-radius: 50%;
  font-size: 0;
  text-align: center;
  opacity: 0.8;
  background: #4fc1e9;
  color: #fff;
  transition: all 0.3s;
}

.modern-testimonials-carousel .owl-controls .owl-buttons .owl-prev {
  left: -20px;
}

.modern-testimonials-carousel .owl-controls .owl-buttons .owl-next {
  right: 30px;
}

.modern-testimonials-carousel .owl-controls .owl-buttons div i {
  font-size: 20px;
  line-height: 40px;
}

.modern-testimonials-carousel .owl-controls .owl-buttons div:hover {
  opacity: 1;
  background: #1e88e5;
}

/* Add a subtle animation to indicate scrolling */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.modern-testimonials-carousel .owl-nav:after {
  content: 'Scroll for more';
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 12px;
  opacity: 0.8;
  animation: pulse 2s infinite;
}

/* Google Reviews Badge */
.google-badge-wrapper {
  margin-bottom: 20px;
}

.google-reviews-badge {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 8px 15px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.google-reviews-badge:hover {
  background: rgba(255, 255, 255, 0.25);
}

.google-stars {
  display: flex;
  align-items: center;
  margin-right: 12px;
}

.google-stars i {
  color: #FBBC05;
  font-size: 16px;
  margin-right: 2px;
}

.google-stars span {
  color: white;
  font-weight: 600;
  font-size: 16px;
  margin-left: 8px;
}

.google-reviews-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.google-reviews-count {
  color: white;
  font-size: 14px;
  font-weight: 600;
}

.google-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
}

.title-icon-wrapper {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

/* Simple carousel container */
.modern-testimonials-carousel {
  position: relative;
  padding: 0 30px; /* Increased padding to accommodate arrows */
  margin-bottom: 20px;
  width: 100%; /* Ensure it takes full width of parent */
  overflow: hidden; /* Prevent horizontal overflow */
}

@media (max-width: 767px) {
  .modern-testimonials-carousel {
    padding: 0 10px; /* Reduce padding on mobile */
  }
  
  .modern-testimonials-carousel .owl-controls .owl-buttons {
    display: none; /* Hide navigation arrows on mobile */
  }
  
  .google-badge-wrapper {
    margin-bottom: 25px;
    margin-top: 5px;
  }
}
