/* ==========================================================================
   TESTIMONIALS / RECOMENDACIONES (Lo que dicen mis clientes)
   Transición desde el blanco nítido (#ffffff) del Portafolio hacia
   el negro obsidiana (#0a0a0a) del Hero / Enfoque
   ========================================================================== */

/* Puente de transición arquitectónica: Blanco (#ffffff) -> Obsidiana (#0a0a0a) */
.portfolio-to-testimonials-transition {
  background: #ffffff;
  padding: clamp(50px, 7vw, 90px) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.transition-bridge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 2;
  margin-bottom: -22px; /* Superpone la pastilla sobre el corte */
}

.transition-bridge-line {
  width: 1px;
  height: 55px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.05));
}

.transition-bridge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--dark, #0a0a0a);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.transition-bridge-arrow {
  font-size: 12px;
  color: var(--accent-green, #84cc16);
  animation: bridgeBounce 2s infinite ease-in-out;
}

@keyframes bridgeBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(3px); }
}

/* Sección Recomendaciones con fondo oscuro obsidiana */
.testimonials {
  position: relative;
  z-index: 30;
  background: var(--dark, #0a0a0a);
  color: #ffffff;
  padding: clamp(90px, 12vw, 150px) var(--gutter) clamp(70px, 9vw, 110px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -40px 80px rgba(0, 0, 0, 0.7);
}

.testimonials .section-top {
  color: #a1a1aa;
}

.testimonials-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-top: clamp(24px, 3.5vw, 42px);
  margin-bottom: clamp(45px, 6vw, 75px);
  flex-wrap: wrap;
}

.testimonials-title {
  font-family: Baskerville, "Baskerville Old Face", "Hoefler Text", Garamond, "Times New Roman", serif;
  font-size: clamp(46px, 7.5vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 400;
  margin: 0;
  color: #ffffff;
}

.testimonials-subtitle {
  max-width: 420px;
  font-size: 15px;
  line-height: 1.55;
  color: #a1a1aa;
  margin: 0;
}

/* Stacking Sheets de testimonios */
.testimonials-stack,
.testimonials-grid {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: clamp(28px, 4vw, 48px);
}

.testimonial-sheet {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: calc(90px + var(--i, 0) * 18px) !important;
  margin-bottom: clamp(60px, 12vh, 120px);
  background: #141416 !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: clamp(28px, 3.5vw, 44px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  transform-origin: center top;
  will-change: transform, opacity;
  transition: transform 0.25s var(--ease, ease), box-shadow 0.25s var(--ease, ease), opacity 0.25s var(--ease, ease);
}

.testimonial-sheet:last-child {
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .testimonial-sheet {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: calc(72px + var(--i, 0) * 12px) !important;
    margin-bottom: 50px;
    padding: 24px 18px;
    border-radius: 14px;
  }
}

/* Tarjeta individual de recomendación */
.testimonial-card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: clamp(28px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  transition: transform 0.4s var(--ease, ease), border-color 0.4s var(--ease, ease), box-shadow 0.4s var(--ease, ease), background 0.4s var(--ease, ease);
  backdrop-filter: blur(8px);
}

.testimonial-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(132, 204, 22, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 24px rgba(132, 204, 22, 0.08);
}

.testimonial-card:hover .testimonial-tag {
  border-color: rgba(132, 204, 22, 0.4);
  color: var(--accent-green, #84cc16);
  background: rgba(132, 204, 22, 0.06);
}

.testimonial-card:hover .testimonial-avatar {
  border-color: var(--accent-green, #84cc16);
  color: var(--accent-green, #84cc16);
}

/* Header de la tarjeta con insignia y rating */
.testimonial-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.testimonial-tag {
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.01em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #a1a1aa;
  font-weight: 500;
}

.testimonial-stars {
  color: #e5b94c;
  letter-spacing: 2px;
  font-size: 12px;
  user-select: none;
}

/* Cita textual */
.testimonial-quote {
  font-family: inherit;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.6;
  color: #f4f4f5;
  margin: 0;
  position: relative;
  letter-spacing: -0.01em;
}

.testimonial-quote::before {
  content: "“";
  font-family: Baskerville, Georgia, serif;
  font-size: 50px;
  line-height: 0;
  position: absolute;
  top: 14px;
  left: -20px;
  opacity: 0.2;
  color: #a1a1aa;
  pointer-events: none;
}

/* Autor del testimonio */
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: #ffffff;
  flex-shrink: 0;
}

.testimonial-author-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-name {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.testimonial-role {
  font-size: 12px;
  color: #a1a1aa;
  opacity: 0.85;
}

/* Responsive */
@media (max-width: 900px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .testimonials {
    padding: 70px var(--gutter) 60px;
  }
  .testimonials-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  .testimonial-card {
    padding: 24px;
    gap: 20px;
  }
  .testimonial-quote {
    font-size: 14px;
  }
  .testimonial-quote::before {
    display: none;
  }
}
