/* Review / testimonial cards. Shared by /tutoring (three newest published
   reviews) and /reviews (all of them). Cards are rendered from
   GET /api/reviews/public by js/utils/review-card.js. */

.testimonial-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-radius: 12px;
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid var(--primary-color);
  background: transparent;
}

.testimonial-stars {
  display: flex;
  gap: 0.15rem;
  margin-bottom: -0.5rem;
}

.testimonial-star {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: #ffd233;
}

.testimonial-quote {
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0;
  opacity: 0.82;
  color: var(--secondary-color);
  position: relative;
  padding-left: 0;
}

.testimonial-quote::before {
  content: "\201C";
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.testimonial-footer {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid transparent;
  border-image: linear-gradient(
      90deg,
      transparent 0%,
      rgba(16, 172, 132, 0.2) 50%,
      transparent 100%
    )
    1;
}

.testimonial-avatar {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--primary-color);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.testimonial-avatar::before {
  content: attr(data-initials);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary-color);
  text-transform: uppercase;
}

.testimonial-avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.testimonial-avatar-img.loaded {
  opacity: 1;
}

.testimonial-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--secondary-color);
  line-height: 1.2;
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.testimonial-location {
  font-size: 0.8rem;
  line-height: 1.2;
  color: var(--secondary-color);
  opacity: 0.6;
}

/* Placeholder while the reviews request is in flight: same box as a card so
   nothing jumps when the real ones arrive. */
.testimonial-card--skeleton {
  min-height: 300px;
  border-color: rgba(16, 172, 132, 0.35);
}

.testimonial-card--skeleton .testimonial-skeleton-line {
  height: 0.8rem;
  border-radius: 999px;
  background: rgba(232, 232, 233, 0.08);
}

.testimonial-card--skeleton .testimonial-skeleton-line:nth-child(2) { width: 85%; }
.testimonial-card--skeleton .testimonial-skeleton-line:nth-child(3) { width: 70%; }

.testimonial-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--secondary-color);
  opacity: 0.7;
}

@media (max-width: 480px) {
  .testimonial-card {
    padding: 1.25rem 1.15rem 1.15rem;
  }

  .testimonial-quote {
    font-size: 0.88rem;
  }

  .testimonial-quote::before {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .testimonial-quote {
    font-size: 0.92rem;
  }
}
