/* Pazhoohan customer testimonials - refined */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 8px 0 24px;
}

.testimonial-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 20px 20px 18px;
  background:
    linear-gradient(180deg, rgba(249, 251, 254, 0.96), rgba(255, 255, 255, 1));
  border: 1px solid #dbe5f0;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(18, 44, 78, 0.05);
  overflow: hidden;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.testimonial-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #1d4f80 0%, #3f77a8 52%, #c69b57 100%);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  border-color: #cfdceb;
  box-shadow: 0 18px 36px rgba(18, 44, 78, 0.1);
}

.testimonial-card:nth-child(3n + 1) {
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.98), rgba(255, 255, 255, 1));
}

.testimonial-card:nth-child(3n + 2) {
  background:
    linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(255, 255, 255, 1));
}

.testimonial-card:nth-child(3n + 3) {
  background:
    linear-gradient(180deg, rgba(248, 252, 250, 0.98), rgba(255, 255, 255, 1));
}

.testimonial-quote-mark {
  align-self: flex-start;
  color: #c69b57;
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1;
  margin-bottom: 10px;
  opacity: 0.95;
}

.testimonial-text {
  margin: 0 0 18px;
  color: #314965;
  font-size: 13px;
  line-height: 2.05;
  overflow-wrap: anywhere;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #e6edf5;
}

.testimonial-author strong {
  color: #153151;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.6;
}

.testimonial-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: #315f91;
  background: linear-gradient(180deg, #eef4fb, #e5eef8);
  border: 1px solid #d6e1ee;
  border-radius: 50%;
  font-size: 12px;
}

#reviewList:has(> .empty-review:only-child) {
  display: none;
}

@media (max-width: 950px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .testimonial-card {
    padding: 18px 18px 16px;
  }
}

@media (max-width: 620px) {
  .testimonials-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .testimonial-card {
    padding: 17px 16px 15px;
    border-radius: 16px;
  }

  .testimonial-text {
    font-size: 12.8px;
    line-height: 1.95;
    margin-bottom: 15px;
  }

  .testimonial-author strong {
    font-size: 13.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .testimonial-card {
    transition: none;
  }

  .testimonial-card:hover {
    transform: none;
  }
}
