/**
 * Testimonials page — premium video case studies.
 */

/* ── Page shell: menos negro, más aire ── */
body.page-testimonios,
body.page-testimonios #main {
  background: #eef1f6 !important;
  color: #1a1a1f;
}

body.page-testimonios .section-head h2,
body.page-testimonios .testimonials-proof h2 {
  color: #1a1a1f;
}

body.page-testimonios .section-head p {
  color: #5c5c66;
}

.section--testimonials-page {
  background: #f5f7fa;
}

.section--testimonials-grid {
  background: #fff;
}

/* ── Hero (oscuro suave, no negro puro) ── */
.testimonials-hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(165deg, #1e2430 0%, #252d3a 50%, #1a2030 100%);
  color: #f7f7f5;
}

.testimonials-hero__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(60, 183, 255, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 30% at 80% 20%, rgba(60, 183, 255, 0.08), transparent 60%);
  pointer-events: none;
}

.testimonials-hero__inner {
  position: relative;
}

.testimonials-hero .breadcrumbs,
.testimonials-hero .breadcrumbs a {
  color: #a8b0be;
}

.testimonials-hero .eyebrow {
  color: var(--accent);
}

.testimonials-hero__title {
  width: 100%;
  max-width: 100%;
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #fff;
}

.testimonials-hero__lead {
  max-width: 58ch;
  margin: 0 0 1.75rem;
  color: #b8c0cc;
  font-size: 1.1rem;
}

.testimonials-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.testimonials-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.testimonials-stat {
  padding: 1.1rem 1rem;
  border: 1px solid rgba(60, 183, 255, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
}

.testimonials-stat strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}

.testimonials-stat span {
  color: #b0b8c4;
  font-size: 0.82rem;
  line-height: 1.35;
}

.section--testimonials-page {
  padding-top: 2rem;
}

.testimonials-featured {
  display: grid;
  gap: 1.5rem;
}

/* ── Cards ── */
.testimonial-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: calc(var(--radius) + 4px);
  background: #fff;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.07);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.testimonial-card:hover {
  border-color: rgba(60, 183, 255, 0.35);
  box-shadow: 0 20px 50px rgba(60, 183, 255, 0.12);
  transform: translateY(-2px);
}

.testimonial-card--featured {
  flex-direction: row;
  align-items: stretch;
}

.testimonial-card__media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #0a0a0c;
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}

.testimonial-card--featured .testimonial-card__media {
  flex: 1.05;
  min-height: 300px;
}

.testimonial-card--default .testimonial-card__media {
  aspect-ratio: 16 / 9;
}

/* Badge miniatura: pequeño y discreto */
.testimonial-card__badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1f;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.15;
  pointer-events: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.12);
}

.testimonial-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

.testimonial-card__media:hover .testimonial-card__thumb {
  transform: scale(1.03);
  opacity: 0.92;
}

.testimonial-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(60, 183, 255, 0.92);
  box-shadow: 0 12px 40px rgba(60, 183, 255, 0.45);
  transform: translate(-50%, -50%);
  transition: transform 0.25s, background 0.25s;
  pointer-events: none;
}

.testimonial-card__play::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-35%, -50%);
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}

.testimonial-card__media:hover .testimonial-card__play {
  transform: translate(-50%, -50%) scale(1.08);
  background: var(--accent-hover);
}

/* Métrica: etiqueta pequeña abajo-izq, ancho al contenido */
.testimonial-card__metric {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 2;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  width: max-content;
  max-width: min(55%, 150px);
  padding: 0.32rem 0.48rem;
  border-radius: 6px;
  background: #fff;
  color: #1a1a1f;
  text-align: left;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.testimonial-card__metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.1;
  color: #0d7ec4;
}

.testimonial-card__metric span {
  display: block;
  margin-top: 0.05rem;
  font-size: 0.55rem;
  color: #4a5568;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.testimonial-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  padding: 1.35rem 1.5rem 1.5rem;
  min-width: 0;
}

.testimonial-card--featured .testimonial-card__body {
  flex: 1;
}

/* Etiquetas: texto simple con separador, sin pastillas */
.testimonial-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7a8494;
  line-height: 1.3;
}

.testimonial-card__tags span {
  display: inline;
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.testimonial-card__tags span + span::before {
  content: "·";
  margin: 0 0.45rem;
  font-weight: 400;
  opacity: 0.55;
}

.testimonial-card__client {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  color: #1a1a1f;
}

.testimonial-card__headline {
  margin: 0 0 0.65rem;
  color: #0d7ec4;
  font-family: var(--font-alt);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.testimonial-card__summary {
  margin: 0;
  color: #5c5c66;
  font-size: 0.92rem;
  line-height: 1.6;
}

.testimonial-card--default .testimonial-card__summary {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.testimonial-card__highlights {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}

.testimonial-card__highlights li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.35rem;
  color: #4a5568;
  font-size: 0.86rem;
  line-height: 1.45;
}

.testimonial-card__highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ── Grid ── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.testimonial-card--default {
  height: 100%;
}

/* ── Proof CTA ── */
.section--testimonials-proof {
  padding-bottom: 4rem;
  background: #eef1f6;
}

.testimonials-proof {
  padding: 2.5rem 2rem;
  border: 1px solid rgba(60, 183, 255, 0.2);
  border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(145deg, #1a8fd4 0%, #252d3a 60%);
  text-align: center;
}

.testimonials-proof h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: #fff;
}

.testimonials-proof p {
  max-width: 52ch;
  margin: 0 auto 1.25rem;
  color: #d8e4f0;
  font-size: 1rem;
  line-height: 1.6;
}

.testimonials-proof__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.testimonials-proof .btn--outline {
  border-color: rgba(255, 255, 255, 0.55) !important;
  color: #fff !important;
}

/* Lead CTA al final en página clara */
body.page-testimonios .section--lead-cta {
  background: #fff;
}

body.page-testimonios .lead-cta__title {
  color: #1a1a1f;
}

body.page-testimonios .lead-cta__text {
  color: #5c5c66;
}

/* ── Video modal ── */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.video-modal[hidden] {
  display: none;
}

.video-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.video-modal__dialog {
  position: relative;
  width: min(100%, 960px);
  z-index: 1;
}

.video-modal__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.video-modal__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.video-modal__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 1024px) {
  .testimonials-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-card--featured {
    flex-direction: column;
  }

  .testimonial-card--featured .testimonial-card__media {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .testimonials-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .testimonials-stats,
  .testimonials-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-card__body {
    padding: 1.15rem 1.2rem 1.25rem;
  }

  .testimonial-card--default .testimonial-card__summary {
    -webkit-line-clamp: 5;
  }

  .testimonial-card__metric {
    max-width: min(65%, 140px);
  }
}
