/* --- Grid Layout (Desktop) --- */
.testimonial-grid-row {
  margin: 2rem auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Desktop: 4 columns */
  gap: 20px;
}

/* Add margin to separate the two rows */
.testimonial-grid-row:first-of-type {
  margin-bottom: 20px;
}

/* --- Testimonial Card --- */
.testimonial-card {
  border: 1px solid var(--border-light);
  border-radius: var(--card-border-radius);
  padding: 20px;
  background: var(--card-bg);
  transition: box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
  display: flex;
  justify-content: flex-end;
}

.card-header img {
  height: 2rem;
  border-radius: 50%;
}

.card-body-text {
  flex-grow: 1;
  /* Pushes footer down */
}

.card-body-text p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-dark);
}

/* --- Video Card Specifics --- */
/* Video cards have no padding */
.testimonial-card--video {
  padding: 0;
  justify-content: flex-start;
}

.card-body-video {
  position: relative;
  border-radius: var(--card-border-radius);
  overflow: hidden;
}

.video-thumbnail {
  width: 100%;
  height: auto;
  filter: grayscale(100%) opacity(0.8);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.3s ease;
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: white;
}

.play-button i {
  width: 20px;
  height: 20px;
  margin-left: 2px;
}

/* This footer is ON the video */
.video-overlay-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.video-overlay-footer .name,
.video-overlay-footer .title {
  color: var(--text-light);
}

.video-overlay-footer .name {
  font-weight: 600;
  font-size: 1rem;
}

.video-overlay-footer .title {
  font-size: 0.85rem;
  opacity: 0.9;
}

/* --- Text Card Footer --- */
.card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-info .name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.user-info .title {
  font-size: 0.85rem;
  color: var(--text-gray);
}

/*
========================================
--- RESPONSIVE STYLES (Desktop-First) ---
========================================
*/

/* --- 1024px Breakpoint (Tablets) --- */
@media (max-width: 1024px) {
  .testimonial-grid-row {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns for tablets */
  }
}

/* --- 767px Breakpoint (Mobile) --- */
/* Using 767px to avoid overlap with 768px */
@media (max-width: 767px) {
  .testimonial-grid-row {
    grid-template-columns: 1fr;
    /* 1 column for mobile */
  }
}