/* ============================================================
   TESTIMONIOS - Slider con parallax
   ============================================================ */

/* ------------------------------------------------------------
   1. CONTENEDOR PRINCIPAL
   ------------------------------------------------------------ */
.testimonios {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #0b0908;
}

/* ------------------------------------------------------------
   2. FONDO PARALLAX (imagen + overlay)
   ------------------------------------------------------------ */
.testimonios__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.testimonios__img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  position: absolute;
  top: -10%;
  left: 0;
  will-change: transform;
}

.testimonios__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,9,8,0.88) 0%, rgba(11,9,8,0.55) 45%, rgba(11,9,8,0.30) 100%);
  pointer-events: none;
}

/* ------------------------------------------------------------
   3. CONTENIDO
   ------------------------------------------------------------ */
.testimonios__content {
  position: relative;
  z-index: 2;
  padding: 0 8vw;
  max-width: 780px;
  width: 100%;
}

.testimonios__kicker {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e2a24a;
  margin-bottom: 1.5rem;
}

.testimonios__comilla {
  display: block;
  width: 48px;
  height: 36px;
  color: #e2a24a;
  opacity: 0.85;
  margin-bottom: 1rem;
}

.testimonios__comilla svg {
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------------
   4. SLIDES (desktop: horizontal, móvil: solo fade)
   ------------------------------------------------------------ */
.testimonios__slides {
  position: relative;
  min-height: 280px;
}

.testimonios__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  /* Desktop: animación horizontal */
  transform: translateX(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.testimonios__slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 2;
}

.testimonios__slide.is-leaving {
  opacity: 0;
  transform: translateX(-30px);
  z-index: 2;
}

/* ---- Cita ---- */
.testimonios__cita {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.35;
  color: #efe7db;
  margin: 0 0 1.5rem 0;
}

/* ---- Atribución ---- */
.testimonios__atribucion {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.testimonios__nombre {
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  color: #efe7db;
}

.testimonios__rol {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(239, 231, 219, 0.55);
}

/* ------------------------------------------------------------
   5. CONTROLES
   ------------------------------------------------------------ */
.testimonios__controles {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 2.5rem;
}

.testimonios__contador {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  color: rgba(239, 231, 219, 0.5);
}

.testimonios__contador .js-contador-actual {
  color: #e2a24a;
  font-weight: 500;
}

.testimonios__flechas {
  display: flex;
  gap: 0.75rem;
}

.testimonios__flecha {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(239, 231, 219, 0.25);
  background: transparent;
  color: #efe7db;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.testimonios__flecha:hover {
  border-color: #e2a24a;
  color: #e2a24a;
  background: rgba(226, 162, 74, 0.08);
}

/* ============================================================
   RESPONSIVE — MÓVIL (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* ---- 1. Contenedor ---- */
  .testimonios {
    min-height: 75vh;
    align-items: center;
    padding: 0.5rem 0;
  }

  /* ---- 2. Overlay ---- */
  .testimonios__overlay {
    background: linear-gradient(180deg, rgba(11,9,8,0.45) 0%, rgba(11,9,8,0.85) 60%, rgba(11,9,8,0.96) 100%);
  }

  /* ---- 3. Contenido ---- */
  .testimonios__content {
    padding: 0 5vw;
    max-width: 100%;
  }

  /* ---- 4. Kicker ---- */
  .testimonios__kicker {
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
  }

  /* ---- 5. Comilla ---- */
  .testimonios__comilla {
    width: 28px;
    height: 20px;
    margin-bottom: 0.5rem;
  }

  /* ---- 6. Slides (solo fade, sin translate) ---- */
  .testimonios__slides {
    min-height: 220px;
  }

  .testimonios__slide {
    transform: none !important;  /* ← Elimina translateX en móvil */
    transition: opacity 0.4s ease, visibility 0.4s ease;
    visibility: hidden;           /* ← Oculta el slide por defecto */
  }

  .testimonios__slide.is-active {
    opacity: 1;
    visibility: visible;          /* ← Muestra el activo */
    transform: none !important;
    pointer-events: auto;
    z-index: 2;
  }

  .testimonios__slide.is-leaving {
    opacity: 0;
    visibility: hidden;           /* ← Oculta el que sale */
    transform: none !important;
    z-index: 2;
  }

  /* ---- 7. Cita (tamaño ajustado) ---- */
  .testimonios__cita {
    font-size: clamp(1.4rem, 5.5vw, 2rem);  /* Aumentado */
    line-height: 1.6;                        /* Más espacio entre líneas */
    margin: 0 0 1.5rem 0;    
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
  }

  /* ---- 8. Atribución ---- */
  .testimonios__nombre {
    font-size: 0.9rem;
  }

  .testimonios__rol {
    font-size: 0.7rem;
  }

  /* ---- 9. Controles ---- */
  .testimonios__controles {
    gap: 1.5rem;
    margin-top: 1.5rem;
  }

  .testimonios__flecha {
    width: 38px;
    height: 38px;
  }
}