/* Testimonials Show More - Scoped styles */
.custom-testimonials {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card: #ffffff;
  --card-hover: #f9fafb;
  --accent: #16a34a;
  --accent-weak: #86efac;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.06);
  --radius: 14px;
  display: block;
  background: var(--bg);
  overflow: hidden;
  position: relative; /* Add this */
}

.custom-testimonials .t-title {
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.8rem);
  line-height: 1.2;
  font-weight: 700;
  margin: 0 0 18px 0;
}

/* Grid */
.custom-testimonials .t-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

/* Responsive columns */
.custom-testimonials .t-card {
  grid-column: span 12;
}
@media (min-width: 480px) {
  .custom-testimonials .t-card {
    grid-column: span 6;
  }
}
@media (min-width: 900px) {
  .custom-testimonials .t-card {
    grid-column: span 4;
  }
}

.custom-testimonials .t-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform 0.2s ease, background-color 0.2s ease,
    box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.custom-testimonials .t-card:hover {
  transform: translateY(-2px);
  background: var(--card-hover);
  box-shadow: var(--shadow);
  border-color: #e2e8f0;
}

.custom-testimonials .t-stars {
  font-size: 0.9rem;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.custom-testimonials .t-quote {
  margin: 0 0 14px 0;
  font-size: 0.98rem;
}
.custom-testimonials .t-quote em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent) 0%, #059669 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 600;
}

.custom-testimonials .t-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.custom-testimonials .t-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  color: #065f46;
  background: radial-gradient(
    120px 120px at 20% 20%,
    var(--accent-weak),
    #d1fae5
  );
  border: 1px solid #d1fae5;
}

.custom-testimonials .t-meta {
  line-height: 1.25;
}
.custom-testimonials .t-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.custom-testimonials .t-role {
  color: var(--muted);
  font-size: 0.85rem;
}

/* Reveal animation */
.custom-testimonials .t-card[hidden] {
  display: none;
}
.custom-testimonials .t-card.revealed {
  animation: fadeInUp 0.28s ease both;
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bottom fade overlay */
.custom-testimonials .t-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg) 60%, rgba(255, 255, 255, 0));
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1;
}
.custom-testimonials.is-all-visible .t-fade {
  opacity: 0;
  visibility: hidden;
}

/* Button row */
.custom-testimonials .t-actions {
  position: relative;
  display: flex;
  justify-content: center;
  margin-top: 12px;
  z-index: 2;
}
/* Button styling updates */
.custom-testimonials .t-button {
  appearance: none;
  border: 1px solid var(--border);
  background: #111827;
  color: #ffffff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.custom-testimonials .t-button:hover {
  transform: translateY(-1px);
  background: #0b1220;
}

.custom-testimonials .t-button:active {
  transform: translateY(0);
}

.custom-testimonials .t-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Different styling for "Show Less" state */
.custom-testimonials.is-all-visible .t-button {
  background: #dc2626;
  border-color: #dc2626;
}

.custom-testimonials.is-all-visible .t-button:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

/* Keep the fade visible when expanded but make it subtle */
.custom-testimonials.is-all-visible .t-fade {
  opacity: 0.3;
  visibility: visible;
}

/* Screen reader helper */
.custom-testimonials .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Button Animation Classes */
.button-animation-lift .t-button:hover {
  transform: translateY(-2px);
}

.button-animation-scale .t-button:hover {
  transform: scale(1.05);
}

.button-animation-pulse .t-button:hover {
  animation: pulse 0.6s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}
