/* =====================================================================
   testimonios.css
   Estilos scoped para la pagina /testimonios-de-clientes/
   Aplica solo bajo body.testimonios-page
   Colores marca: verde #2e7d32, verde oscuro #1b5e20, amarillo CTA #fdd835
   Tipografias: Fraunces (display), Inter (cuerpo) -- cargadas globalmente
   Creada: 19/05/2026
   ===================================================================== */

/* Fix: garantizar que [hidden] siempre oculte, incluso si tiene display:flex */
body.testimonios-page [hidden] {
  display: none !important;
}

body.testimonios-page {
  --ts-verde: #2e7d32;
  --ts-verde-oscuro: #1b5e20;
  --ts-verde-suave: #e8f5e9;
  --ts-amarillo: #fdd835;
  --ts-amarillo-oscuro: #f9a825;
  --ts-crema: #faf7f2;
  --ts-blanco: #ffffff;
  --ts-texto: #2a2a2a;
  --ts-texto-suave: #5a5a5a;
  --ts-texto-mut: #8a8a8a;
  --ts-borde: #e6e3dc;
  --ts-sombra-card: 0 4px 16px rgba(27, 94, 32, 0.06);
  --ts-sombra-card-hover: 0 12px 32px rgba(27, 94, 32, 0.12);
  --ts-radius: 16px;
  --ts-radius-sm: 8px;
}

/* ========== HERO ========== */
body.testimonios-page .ts-hero {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) 1.5rem clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  background: linear-gradient(140deg, var(--ts-verde-oscuro) 0%, var(--ts-verde) 60%, #2c6e2e 100%);
  color: var(--ts-blanco);
  isolation: isolate;
}

body.testimonios-page .ts-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(253, 216, 53, 0.4) 0, transparent 38%),
    radial-gradient(circle at 82% 80%, rgba(255, 255, 255, 0.18) 0, transparent 45%);
  pointer-events: none;
}

body.testimonios-page .ts-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 60px,
      rgba(255, 255, 255, 0.025) 60px,
      rgba(255, 255, 255, 0.025) 61px
    );
  pointer-events: none;
  z-index: -1;
}

body.testimonios-page .ts-hero-inner {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

body.testimonios-page .ts-hero-eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.5rem 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(253, 216, 53, 0.5);
  border-radius: 100px;
  color: var(--ts-amarillo);
  background: rgba(0, 0, 0, 0.12);
}

body.testimonios-page .ts-hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
  color: var(--ts-blanco);
}

body.testimonios-page .ts-hero-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 2.5rem;
  color: rgba(255, 255, 255, 0.92);
}

body.testimonios-page .ts-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ========== BOTONES ========== */
body.testimonios-page .ts-btn-primary,
body.testimonios-page .ts-btn-secondary {
  display: inline-block;
  padding: 0.95rem 2rem;
  border-radius: 100px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
}

body.testimonios-page .ts-btn-primary {
  background: var(--ts-amarillo);
  color: var(--ts-verde-oscuro);
  box-shadow: 0 4px 14px rgba(253, 216, 53, 0.35);
}

body.testimonios-page .ts-btn-primary:hover {
  background: var(--ts-amarillo-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(253, 216, 53, 0.45);
}

body.testimonios-page .ts-btn-secondary {
  background: transparent;
  color: var(--ts-blanco);
  border-color: rgba(255, 255, 255, 0.5);
}

body.testimonios-page .ts-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--ts-blanco);
  transform: translateY(-2px);
}

/* ========== METRICAS ========== */
body.testimonios-page .ts-metricas {
  padding: clamp(3rem, 5vw, 4.5rem) 1.5rem;
  background: var(--ts-crema);
  border-bottom: 1px solid var(--ts-borde);
}

body.testimonios-page .ts-metricas-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

body.testimonios-page .ts-metrica {
  text-align: center;
  padding: 1.5rem 1rem;
}

body.testimonios-page .ts-metrica-num {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.5rem, 5vw, 3.6rem);
  font-weight: 600;
  color: var(--ts-verde);
  line-height: 1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

body.testimonios-page .ts-metrica-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ts-texto-suave);
  letter-spacing: 0.02em;
}

/* ========== SECCIONES BASE ========== */
body.testimonios-page .ts-section {
  padding: clamp(3rem, 6vw, 5rem) 1.5rem;
  max-width: 1240px;
  margin: 0 auto;
}

body.testimonios-page .ts-section-intro {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}

body.testimonios-page .ts-section-intro h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 500;
  font-style: italic;
  color: var(--ts-verde-oscuro);
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

body.testimonios-page .ts-section-intro p {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--ts-texto-suave);
  margin: 0;
}

/* ========== FILTROS ========== */
body.testimonios-page .ts-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto 1.5rem;
}

body.testimonios-page .ts-filtro-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border: 1.5px solid var(--ts-borde);
  border-radius: 100px;
  background: var(--ts-blanco);
  color: var(--ts-texto);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.testimonios-page .ts-filtro-btn:hover {
  border-color: var(--ts-verde);
  color: var(--ts-verde-oscuro);
  transform: translateY(-1px);
}

body.testimonios-page .ts-filtro-btn.is-active {
  background: var(--ts-verde);
  border-color: var(--ts-verde);
  color: var(--ts-blanco);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

body.testimonios-page .ts-filtro-count {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 700;
}

body.testimonios-page .ts-filtro-btn.is-active .ts-filtro-count {
  background: rgba(255, 255, 255, 0.25);
  color: var(--ts-blanco);
}

body.testimonios-page .ts-filtro-status {
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  color: var(--ts-texto-mut);
  margin: 0 auto;
}

/* ========== GRID DE TESTIMONIOS ========== */
body.testimonios-page .ts-grid-section {
  padding-top: 1rem;
}

body.testimonios-page .ts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  align-items: start;
  grid-auto-rows: min-content;
}

body.testimonios-page .ts-card {
  position: relative;
  background: var(--ts-blanco);
  border: 1px solid var(--ts-borde);
  border-radius: var(--ts-radius);
  padding: 2rem 1.75rem 1.5rem;
  box-shadow: var(--ts-sombra-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

body.testimonios-page .ts-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ts-sombra-card-hover);
  border-color: rgba(46, 125, 50, 0.25);
}

body.testimonios-page .ts-card-quote {
  position: absolute;
  top: -0.5rem;
  left: 1.2rem;
  font-family: 'Fraunces', serif;
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ts-verde);
  opacity: 0.18;
  pointer-events: none;
  user-select: none;
}

body.testimonios-page .ts-card-text {
  font-family: 'Fraunces', serif;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ts-texto);
  margin: 0 0 1.5rem;
  font-weight: 400;
}

body.testimonios-page .ts-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ts-borde);
}

body.testimonios-page .ts-card-author {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ts-verde-oscuro);
  letter-spacing: -0.01em;
}

body.testimonios-page .ts-card-date {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ts-texto-mut);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

body.testimonios-page .ts-grid-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ts-texto-suave);
  font-family: 'Inter', sans-serif;
  grid-column: 1 / -1;
}

body.testimonios-page .ts-grid-empty p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

body.testimonios-page .ts-grid-empty .ts-btn-secondary {
  color: var(--ts-verde-oscuro);
  border-color: var(--ts-verde);
}

body.testimonios-page .ts-grid-empty .ts-btn-secondary:hover {
  background: var(--ts-verde);
  color: var(--ts-blanco);
}

/* ========== CTA INLINE EN GRID ========== */
body.testimonios-page .ts-cta-inline {
  grid-column: 1 / -1;
  margin: 1rem 0;
}

body.testimonios-page .ts-cta-inline-inner {
  background: linear-gradient(125deg, var(--ts-verde) 0%, var(--ts-verde-oscuro) 100%);
  color: var(--ts-blanco);
  padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--ts-radius);
  text-align: center;
  position: relative;
  overflow: hidden;
}

body.testimonios-page .ts-cta-inline-inner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(253, 216, 53, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

body.testimonios-page .ts-cta-inline-inner h3 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
  font-weight: 500;
  margin: 0 0 0.75rem;
  position: relative;
}

body.testimonios-page .ts-cta-inline-inner p {
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 1.75rem;
  color: rgba(255, 255, 255, 0.92);
  position: relative;
}

body.testimonios-page .ts-cta-inline-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  position: relative;
}

/* ========== GOOGLE CTA ========== */
body.testimonios-page .ts-google-cta {
  padding: clamp(4rem, 7vw, 6rem) 1.5rem;
  background: var(--ts-crema);
  text-align: center;
  border-top: 1px solid var(--ts-borde);
  border-bottom: 1px solid var(--ts-borde);
}

body.testimonios-page .ts-google-inner {
  max-width: 640px;
  margin: 0 auto;
}

body.testimonios-page .ts-google-icon {
  display: inline-flex;
  width: 86px;
  height: 86px;
  align-items: center;
  justify-content: center;
  background: var(--ts-blanco);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  margin-bottom: 1.5rem;
}

body.testimonios-page .ts-google-cta h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-style: italic;
  font-weight: 500;
  color: var(--ts-verde-oscuro);
  margin: 0 0 1rem;
}

body.testimonios-page .ts-google-lead {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ts-texto-suave);
  margin: 0 0 2rem;
}

body.testimonios-page .ts-btn-google {
  font-size: 1.05rem;
  padding: 1.05rem 2.25rem;
}

body.testimonios-page .ts-google-small {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--ts-texto-mut);
  margin: 1.5rem 0 0;
  font-style: italic;
}

/* ========== CTA FINAL ========== */
body.testimonios-page .ts-cta-final {
  text-align: center;
}

body.testimonios-page .ts-cta-final h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-style: italic;
  font-weight: 500;
  color: var(--ts-verde-oscuro);
  margin: 0 0 1rem;
}

body.testimonios-page .ts-cta-final-lead {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  color: var(--ts-texto-suave);
  margin: 0 auto 3rem;
  max-width: 620px;
  line-height: 1.6;
}

body.testimonios-page .ts-cta-final-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 920px;
  margin: 0 auto;
}

body.testimonios-page .ts-cta-card {
  display: block;
  padding: 2.5rem 2rem;
  background: var(--ts-blanco);
  border: 2px solid var(--ts-borde);
  border-radius: var(--ts-radius);
  text-decoration: none;
  text-align: left;
  transition: all 0.25s ease;
}

body.testimonios-page .ts-cta-card:hover {
  border-color: var(--ts-verde);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(46, 125, 50, 0.12);
}

body.testimonios-page .ts-cta-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ts-verde-oscuro);
  margin: 0 0 0.75rem;
}

body.testimonios-page .ts-cta-card p {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--ts-texto-suave);
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

body.testimonios-page .ts-cta-card-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ts-verde);
  letter-spacing: 0.02em;
}

body.testimonios-page .ts-cta-card:hover .ts-cta-card-link {
  color: var(--ts-verde-oscuro);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  body.testimonios-page .ts-metricas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  body.testimonios-page .ts-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  body.testimonios-page .ts-card {
    padding: 1.75rem 1.5rem 1.25rem;
    min-height: auto;
  }

  body.testimonios-page .ts-card-quote {
    font-size: 4.5rem;
    top: -0.3rem;
  }

  body.testimonios-page .ts-card-text {
    font-size: 1.02rem;
  }

  body.testimonios-page .ts-filtros {
    gap: 0.5rem;
  }

  body.testimonios-page .ts-filtro-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  body.testimonios-page .ts-hero-cta,
  body.testimonios-page .ts-cta-inline-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  body.testimonios-page .ts-btn-primary,
  body.testimonios-page .ts-btn-secondary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body.testimonios-page .ts-metricas-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========== ANIMACION SUTIL DE ENTRADA ========== */
@media (prefers-reduced-motion: no-preference) {
  body.testimonios-page .ts-card {
    animation: tsCardIn 0.5s ease-out backwards;
  }

  body.testimonios-page .ts-card:nth-child(1) { animation-delay: 0.05s; }
  body.testimonios-page .ts-card:nth-child(2) { animation-delay: 0.1s; }
  body.testimonios-page .ts-card:nth-child(3) { animation-delay: 0.15s; }
  body.testimonios-page .ts-card:nth-child(4) { animation-delay: 0.2s; }
  body.testimonios-page .ts-card:nth-child(5) { animation-delay: 0.25s; }
  body.testimonios-page .ts-card:nth-child(6) { animation-delay: 0.3s; }

  @keyframes tsCardIn {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ========== PRINT ========== */
@media print {
  body.testimonios-page .ts-hero,
  body.testimonios-page .ts-google-cta,
  body.testimonios-page .ts-cta-final,
  body.testimonios-page .ts-cta-inline,
  body.testimonios-page .ts-filtros {
    display: none;
  }

  body.testimonios-page .ts-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
