/**
 * Testimonials Grid - Landing Page
 * Dosya yolu: /assets/css/testimonials-grid.css
 */

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin: 60px 0 0 0;
}

.testimonial-grid-card {
  background: #fff;
  border-radius: 20px;
  padding: 22px 22px 20px;
  position: relative;
  width: 100%;
  min-height: 240px;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  border: 1px solid transparent;
}

.testimonial-grid-card:hover {
  background-color: var(--color-gray-light);
  border-color: var(--color-blue);
}

.testimonial-grid-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.testimonial-grid-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.testimonial-grid-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-grid-card__avatar-placeholder {
  font-size: 18px;
  font-weight: 700;
  color: #bbb;
  text-transform: uppercase;
}

.testimonial-grid-card__share {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
  padding: 0;
}

.testimonial-grid-card__share:hover {
  opacity: 1;
}

.testimonial-grid-card__share img {
  width: 48px;
  height: 48px;
}

.testimonial-grid-card__name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 2px;
}

.testimonial-grid-card__like {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}

.testimonial-grid-card__name {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.2;
}

.testimonial-grid-card__job {
  font-size: 12px;
  font-weight: 400;
  color: #666;
  margin: 0 0 8px 0;
}

.testimonial-grid-card__text {
  font-weight: 300;
  color: #666;
  line-height: 1.5;
  margin: 0 0 auto 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.testimonial-grid-card__button {
  padding: 10px 20px;
  border: 1.5px solid var(--color-green);
  background: transparent;
  color: var(--color-green);
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: flex-start;
  margin-top: 12px;
  text-decoration: none;
  display: inline-block;
}

.testimonial-grid-card__button:hover {
  background: var(--color-green);
  color: white;
}

/* Loader */
.testimonials-grid-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  margin: 0 0 40px 0;
  width: 100%;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.testimonials-grid-loader--hidden {
  opacity: 0;
  visibility: hidden;
  height: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.testimonials-grid-loader img {
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.testimonials-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
  font-size: 16px;
  grid-column: 1 / -1;
}

.testimonials-error-message {
  text-align: center;
  padding: 20px;
  color: #dc3232;
  background: #fff;
  border: 1px solid #dc3232;
  border-radius: 4px;
  margin: 20px 0;
  grid-column: 1 / -1;
}

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

@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0;
  }

  .testimonial-grid-card {
    min-height: auto;
    padding: 20px;
  }
}
