/* ============================================================================
   ENHANCED TESTIMONIAL CARDS WITH HIGHLIGHT EFFECT
   Fixed variable references to match styles.css
   ============================================================================ */

.testimonial-card {
  position: relative;
  background: var(--bg, #ffffff);
  border: 1px solid var(--line, rgba(15, 23, 42, 0.10));
  border-radius: var(--radius-lg, 24px);
  padding: 24px;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.7;
  transform: scale(0.97);
}

/* Active/Centered testimonial */
.testimonial-card.is-active {
  opacity: 1;
  transform: scale(1);
  box-shadow: var(--shadow-xl, 0 20px 25px rgba(0, 0, 0, 0.1));
  border-color: var(--green, #16a34a);
  background: linear-gradient(135deg, 
    rgba(22, 163, 74, 0.03) 0%, 
    var(--bg, #ffffff) 100%);
}

[data-theme="dark"] .testimonial-card.is-active {
  background: linear-gradient(135deg, 
    rgba(34, 197, 94, 0.08) 0%, 
    var(--bg, #0f172a) 100%);
}

/* Testimonial quote with highlighted text */
.testimonial-quote {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text, #0f172a);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

/* Highlighted text effect (like in the image) */
.testimonial-quote mark,
.highlight-text {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 30%,
    rgba(134, 239, 172, 0.4) 30%,
    rgba(134, 239, 172, 0.4) 85%,
    transparent 85%,
    transparent 100%
  );
  color: var(--text, #0f172a);
  font-weight: 600;
  padding: 0 4px;
  border-radius: 2px;
  transition: background 0.3s ease;
}

[data-theme="dark"] .testimonial-quote mark,
[data-theme="dark"] .highlight-text {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 30%,
    rgba(34, 197, 94, 0.25) 30%,
    rgba(34, 197, 94, 0.25) 85%,
    transparent 85%,
    transparent 100%
  );
}

/* Enhanced highlight on active card */
.testimonial-card.is-active .testimonial-quote mark,
.testimonial-card.is-active .highlight-text {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 25%,
    rgba(134, 239, 172, 0.6) 25%,
    rgba(134, 239, 172, 0.6) 90%,
    transparent 90%,
    transparent 100%
  );
}

[data-theme="dark"] .testimonial-card.is-active .testimonial-quote mark,
[data-theme="dark"] .testimonial-card.is-active .highlight-text {
  background: linear-gradient(
    180deg,
    transparent 0%,
    transparent 25%,
    rgba(34, 197, 94, 0.35) 25%,
    rgba(34, 197, 94, 0.35) 90%,
    transparent 90%,
    transparent 100%
  );
}

/* Testimonial author section */
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, 
    var(--green2, #1b8a58), 
    var(--green, #055f38));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1.25rem;
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.07));
  transition: transform 0.3s ease;
}

.testimonial-card.is-active .testimonial-avatar {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg, 0 10px 15px rgba(0, 0, 0, 0.1));
}

.testimonial-info {
  flex: 1;
}

.testimonial-name {
  font-weight: 700;
  font-size: 17px;
  color: var(--text, #0f172a);
  margin-bottom: 2px;
}

.testimonial-location {
  font-size: 14px;
  color: var(--muted, #64748b);
  display: flex;
  align-items: center;
  gap: 4px;
}

.testimonial-location::before {
  content: "📍";
  font-size: 0.875em;
}

.testimonial-date {
  font-size: 13px;
  color: var(--muted, #64748b);
  opacity: 0.8;
}

/* Quote marks */
.testimonial-quote::before {
  content: '"';
  position: absolute;
  left: -16px;
  top: -8px;
  font-size: 4rem;
  line-height: 1;
  color: var(--green, #16a34a);
  opacity: 0.15;
  font-family: Georgia, serif;
  z-index: -1;
}

.testimonial-card.is-active .testimonial-quote::before {
  opacity: 0.25;
}

/* Glow effect on active card */
.testimonial-card.is-active::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(
    135deg, 
    var(--green2, #1b8a58), 
    var(--green, #055f38)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, 
                linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.6;
  pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 640px) {
  .testimonial-card {
    padding: 16px;
  }
  
  .testimonial-quote {
    font-size: 15px;
  }
  
  .testimonial-avatar {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
  
  .testimonial-name {
    font-size: 15px;
  }
}

/* Smooth scrolling for testimonials */
.testimonial-grid {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
}

.testimonial-card {
  scroll-snap-align: center;
  scroll-margin: 20vh;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .testimonial-card,
  .testimonial-avatar,
  .testimonial-quote mark {
    transition: none;
  }
}