/* Modern Testimonials Section Styles */

.testimonials {
  padding: 7rem 0;
  background-color: #f8fafc;
  position: relative;
  overflow: hidden;
}

/* Background elements */
.testimonials::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, rgba(124, 58, 237, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

.testimonials::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.06) 0%, rgba(79, 70, 229, 0) 70%);
  border-radius: 50%;
  z-index: 0;
}

/* Section header styling */
.testimonials .section-header {
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  z-index: 1;
}

.testimonials .section-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.testimonials .section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 120px;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
  transform: translateX(-50%);
  border-radius: 30px;
}

.testimonials .section-description {
  font-size: 1.2rem;
  color: #4b5563;
  max-width: 700px;
  margin: 1.5rem auto 0;
  line-height: 1.7;
}

/* Testimonials grid */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* Testimonial card styling - redesigned */
.testimonial-card {
  background: #fff;
  border-radius: 20px;
  padding: 3rem 2.5rem 2.5rem;
  position: relative;
  z-index: 2;
  transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.03), 0 8px 20px rgba(0, 0, 0, 0.04);
  border: none;
}

.testimonial-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.07), 0 12px 30px rgba(79, 70, 229, 0.06);
}

/* Testimonial decoration elements */
.testimonial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed, #ec4899);
  z-index: 3;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.testimonial-card:nth-child(1)::before {
  background: linear-gradient(90deg, #4f46e5 0%, #818cf8 100%);
}

.testimonial-card:nth-child(2)::before {
  background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 100%);
}

.testimonial-card:nth-child(3)::before {
  background: linear-gradient(90deg, #ec4899 0%, #f472b6 100%);
}

/* Quote icon styling */
.testimonial-card::after {
  content: '\201C';
  position: absolute;
  top: -20px;
  left: 35px;
  font-size: 150px;
  font-family: Georgia, serif;
  color: rgba(79, 70, 229, 0.07);
  line-height: 1;
  z-index: 1;
  transition: all 0.3s ease;
}

.testimonial-card:hover::after {
  transform: scale(1.1) rotate(-5deg);
  opacity: 0.12;
}

/* Redesigned testimonial header and author info for better consistency */
.testimonial-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 2rem;
  text-align: center;
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #ffffff;
  box-shadow: 0 10px 25px rgba(79, 70, 229, 0.15);
  position: relative;
  z-index: 5;
  margin-bottom: 1.2rem;
  transition: all 0.4s ease;
}

.testimonial-avatar::after {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.4), rgba(124, 58, 237, 0.1));
  z-index: -1;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.testimonial-card:nth-child(1) .testimonial-avatar::after {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.4), rgba(124, 58, 237, 0.1));
}

.testimonial-card:nth-child(2) .testimonial-avatar::after {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(167, 139, 250, 0.1));
}

.testimonial-card:nth-child(3) .testimonial-avatar::after {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.4), rgba(244, 114, 182, 0.1));
}

.testimonial-card:hover .testimonial-avatar {
  transform: scale(1.08);
  box-shadow: 0 15px 35px rgba(79, 70, 229, 0.25);
}

.testimonial-author {
  position: relative;
  z-index: 5;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.author-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.author-title {
  font-size: 0.85rem;
  color: #4b5563;
  margin: 0;
  position: relative;
  display: block;
  width: fit-content;
  padding: 0.3rem 1rem;
  background-color: rgba(79, 70, 229, 0.07);
  border-radius: 50px;
  white-space: nowrap;
}

.testimonial-card:nth-child(1) .author-title {
  background-color: rgba(79, 70, 229, 0.07);
}

.testimonial-card:nth-child(2) .author-title {
  background-color: rgba(124, 58, 237, 0.07);
}

.testimonial-card:nth-child(3) .author-title {
  background-color: rgba(236, 72, 153, 0.07);
}

/* Star rating - enhanced and centered */
.testimonial-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 5;
  padding: 0.4rem 0;
}

.testimonial-rating i {
  color: #fbbf24;
  font-size: 1.25rem;
  margin: 0 0.15rem;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(251, 191, 36, 0.2));
}

.testimonial-card:hover .testimonial-rating i {
  transform: scale(1.15);
  color: #f59e0b;
  filter: drop-shadow(0 3px 6px rgba(251, 191, 36, 0.3));
}

.testimonial-rating i.far {
  color: #e5e7eb;
  filter: none;
}

/* Quote text styling */
.testimonial-text {
  color: #4b5563;
  font-size: 1.05rem;
  line-height: 1.7;
  position: relative;
  z-index: 5;
  margin: 0;
  font-style: italic;
  text-align: center;
  padding: 0 0.5rem;
  min-height: 110px;
}

/* Decoration elements */
.testimonial-card .decoration {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 60px;
  height: 60px;
  opacity: 0.1;
  z-index: 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: all 0.3s ease;
}

.testimonial-card:hover .decoration {
  transform: rotate(10deg) scale(1.2);
  opacity: 0.15;
}

.testimonial-card:nth-child(1) .decoration {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234f46e5'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'%3E%3C/path%3E%3C/svg%3E");
}

.testimonial-card:nth-child(2) .decoration {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237c3aed'%3E%3Cpath d='M12 2L2 7v9.5C2 19.6 6.5 22 12 22s10-2.4 10-5.5V7L12 2zm0 2.7L20 9v7.5c0 1.3-3.2 3.5-8 3.5s-8-2.2-8-3.5V9l8-4.3z'%3E%3C/path%3E%3C/svg%3E");
}

.testimonial-card:nth-child(3) .decoration {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ec4899'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'%3E%3C/path%3E%3C/svg%3E");
}

/* Enhancing first testimonial card */
.testimonial-card:first-child {
  border-top: 4px solid #4f46e5;
}

.testimonial-card:nth-child(2) {
  border-top: 4px solid #7c3aed;
}

.testimonial-card:nth-child(3) {
  border-top: 4px solid #ec4899;
}

/* Subtle background pattern */
.testimonial-card::after {
  content: '';
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 60px;
  height: 60px;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zm20.97 0l9.315 9.314-1.414 1.414L34.828 0h2.83zM22.344 0L13.03 9.314l1.414 1.414L25.172 0h-2.83zM32 0l12.142 12.142-1.414 1.414L30 .828 17.272 13.556l-1.414-1.414L28 0h4zM.284 0l28 28-1.414 1.414L0 2.544V0h.284zM0 5.373l25.456 25.455-1.414 1.415L0 8.2V5.374zm0 5.656l22.627 22.627-1.414 1.414L0 13.86v-2.83zm0 5.656l19.8 19.8-1.415 1.413L0 19.514v-2.83zm0 5.657l16.97 16.97-1.414 1.415L0 25.172v-2.83zM0 28l14.142 14.142-1.414 1.414L0 30.828V28zm0 5.657L11.314 44.97 9.9 46.386l-9.9-9.9v-2.828zm0 5.657L8.485 47.8 7.07 49.212 0 42.143v-2.83zm0 5.657l5.657 5.657-1.414 1.415L0 47.8v-2.83zm0 5.657l2.828 2.83-1.414 1.413L0 53.456v-2.83zM54.627 60L30 35.373 5.373 60H8.2L30 38.2 51.8 60h2.827zm-5.656 0L30 41.03 11.03 60h2.828L30 43.858 46.142 60h2.83zm-5.656 0L30 46.686 16.686 60h2.83L30 49.515 40.485 60h2.83zm-5.657 0L30 52.343 22.344 60h2.83L30 55.172 34.828 60h2.83zM32 60l-2-2-2 2h4zM59.716 0l-28 28 1.414 1.414L60 2.544V0h-.284zM60 5.373L34.544 30.828l1.414 1.415L60 8.2V5.374zm0 5.656L37.373 33.656l1.414 1.414L60 13.86v-2.83zm0 5.656l-19.8 19.8 1.415 1.413L60 19.514v-2.83zm0 5.657l-16.97 16.97 1.414 1.415L60 25.172v-2.83zM60 28L45.858 42.142l1.414 1.414L60 30.828V28zm0 5.657L48.686 44.97l1.415 1.415 9.9-9.9v-2.828zm0 5.657L51.515 47.8l1.414 1.413 7.07-7.07v-2.83zm0 5.657l-5.657 5.657 1.414 1.415L60 47.8v-2.83zm0 5.657l-2.828 2.83 1.414 1.413L60 53.456v-2.83zM39.9 16.385l1.414-1.414L30 3.658 18.686 14.97l1.415 1.415 9.9-9.9 9.9 9.9zm-2.83 2.828l1.415-1.414L30 9.313 21.515 17.8l1.414 1.413L30 11.97l7.07 7.07z' fill='%234f46e5' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.3;
  transition: all 0.3s ease;
}

.testimonial-card:hover::after {
  opacity: 0.5;
}

/* Responsive design */
@media (max-width: 1100px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .testimonials {
    padding: 5rem 0;
  }
  
  .testimonials .section-title {
    font-size: 2.2rem;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Add a subtle bounce animation for hover */
@keyframes subtle-bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

/* Optional elements for additional visual interest */
.testimonials .container {
  position: relative;
}

.testimonials .container::before {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 17l-5-5 5-5M18 17l-5-5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.1;
  top: 20px;
  left: 0;
  transform: rotate(30deg) scale(1.5);
}

.testimonials .container::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ec4899' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 17l5-5-5-5M6 17l5-5-5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.1;
  bottom: 20px;
  right: 0;
  transform: rotate(-30deg) scale(1.5);
}
