/*--------------------------------------------------------------
# Premium Testimonials Section V2
# Modern redesign: credible, human, quietly impressive
# Design decisions documented inline
--------------------------------------------------------------*/

/* ==========================================================================
   SECTION CONTAINER
   ========================================================================== */

/*
  UX: Off-white background with subtle green warmth creates visual separation
  while maintaining brand cohesion. Signals a distinct content zone.
*/
.testimonials-v2.section {
  background: linear-gradient(180deg, var(--green-50, #f3faf5) 0%, #ffffff 100%);
  padding: 5rem 0 6rem;
  position: relative;
}

/* Subtle top border to define section boundary */
.testimonials-v2.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 800px);
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(0, 0, 0, 0.08) 20%, 
    rgba(0, 0, 0, 0.08) 80%, 
    transparent 100%
  );
}

/* ==========================================================================
   SECTION HEADER
   ========================================================================== */

/*
  UX: Minimal, confident header. No overselling.
  Typography establishes authority without being flashy.
*/
.testimonials-v2__header {
  text-align: center;
  margin-bottom: 3.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.testimonials-v2__title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--color-gray-900, #111827);
  margin: 0 0 0.75rem;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.testimonials-v2__subtitle {
  font-size: 1rem;
  color: var(--color-gray-500, #6b7280);
  margin: 0;
  line-height: 1.6;
  font-weight: 400;
}

/* ==========================================================================
   TESTIMONIALS GRID
   ========================================================================== */

/*
  CSS Grid with auto-fit for natural responsiveness.
  Cards stretch to equal height for visual harmony.
*/
.testimonials-v2__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ==========================================================================
   TESTIMONIAL CARD
   ========================================================================== */

/*
  UX: Left accent border signals "quote/testimonial" pattern 
  seen in quality publications. Subtle but meaningful.
*/
.testimonial-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem 2rem 1.75rem;
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.03);
  transition: 
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

/* Left accent border - semantic green indicating testimonial/quote */
.testimonial-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 3px;
  background: var(--green-primary, #2d6a4f);
  border-radius: 0 3px 3px 0;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

/* Hover: subtle lift, enhanced shadow */
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.08);
}

.testimonial-card:hover::before {
  opacity: 1;
}

/* Focus state for keyboard navigation */
.testimonial-card:focus-within {
  outline: 3px solid var(--green-primary, #2d6a4f);
  outline-offset: 4px;
}

/* ==========================================================================
   BLOCKQUOTE & QUOTE TEXT
   ========================================================================== */

.testimonial-card__quote {
  margin: 0;
  padding: 0;
  border: none; /* Reset default blockquote styles */
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

/*
  UX: Large decorative quote mark adds visual interest
  without interfering with content. Positioned behind text.
  Uses muted green for subtle brand reinforcement.
*/
.testimonial-card__quote::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: -0.25rem;
  font-size: 4rem;
  font-family: Georgia, 'Times New Roman', serif;
  color: rgba(45, 106, 79, 0.08);
  line-height: 1;
  pointer-events: none;
  z-index: 0;
}

/*
  Quote text: Legible size, comfortable line height.
  Slightly darker than body text for emphasis.
*/
.testimonial-card__quote > p {
  font-size: 0.9375rem; /* 15px - optimal reading size */
  line-height: 1.75;
  color: var(--color-gray-700, #374151);
  margin: 0 0 1.5rem;
  position: relative;
  z-index: 1;
  flex: 1;
}

/* ==========================================================================
   ATTRIBUTION FOOTER
   ========================================================================== */

/*
  UX: Inline photo with name grounds the testimonial to a real person.
  Separator line provides visual rhythm.
*/
.testimonial-card__attribution {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin: 0;
}

/* ==========================================================================
   PORTRAIT PHOTO
   ========================================================================== */

/*
  UX: Small, consistent size keeps focus on the words.
  Soft rounded corners for approachability.
*/
.testimonial-card__photo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-card__photo {
  transform: scale(1.05);
}

/* ==========================================================================
   NAME & ROLE
   ========================================================================== */

.testimonial-card__info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/*
  Name: Strong visual weight to anchor identity.
  Not italic - cite is semantic, styling is manual.
*/
.testimonial-card__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-gray-900, #111827);
  font-style: normal;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/*
  Role: Muted, uppercase establishes hierarchy.
  Smaller size keeps focus on name.
*/
.testimonial-card__role {
  font-size: 0.6875rem; /* 11px */
  color: var(--color-gray-500, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  line-height: 1.4;
}

/* ==========================================================================
   REDUCED MOTION SUPPORT
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .testimonial-card,
  .testimonial-card::before,
  .testimonial-card__photo {
    transition: none;
  }

  .testimonial-card:hover {
    transform: none;
  }

  .testimonial-card:hover .testimonial-card__photo {
    transform: none;
  }
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

/* Tablet */
@media (max-width: 991px) {
  .testimonials-v2.section {
    padding: 4rem 0 5rem;
  }

  .testimonials-v2__header {
    margin-bottom: 2.5rem;
  }

  .testimonials-v2__grid {
    gap: 1.5rem;
  }

  .testimonial-card {
    padding: 1.75rem;
  }
}

/* Mobile */
@media (max-width: 639px) {
  .testimonials-v2.section {
    padding: 3rem 0 4rem;
  }

  .testimonials-v2__title {
    font-size: 1.5rem;
  }

  .testimonials-v2__header {
    margin-bottom: 2rem;
  }

  .testimonials-v2__grid {
    gap: 1.25rem;
  }

  .testimonial-card {
    padding: 1.5rem;
    border-radius: 10px;
  }

  .testimonial-card::before {
    top: 1rem;
    bottom: 1rem;
    width: 2px;
  }

  .testimonial-card__quote > p {
    font-size: 0.875rem;
    line-height: 1.7;
  }

  .testimonial-card__photo {
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }

  .testimonial-card__name {
    font-size: 0.875rem;
  }

  .testimonial-card__role {
    font-size: 0.625rem;
  }
}

/* ==========================================================================
   LEGACY STYLES OVERRIDE
   (Prevent old .testimonials styles from affecting new section)
   ========================================================================== */

.testimonials-v2 .testimonial-item,
.testimonials-v2 .testimonial-img,
.testimonials-v2 .quote-mark,
.testimonials-v2 .quote-icon-left,
.testimonials-v2 .quote-icon-right {
  display: none !important;
}
