/* =============================================================
   Testimonios (index.html only).
   Layout: carrusel de opiniones (4 reseñas, 1 móvil · 2 desde tablet) a la
   izquierda + panel CTA FIJO a Doctoralia siempre visible a la derecha.
   En móvil se apilan (carrusel arriba, panel debajo). Navegación por flechas,
   puntos, deslizar o teclado. Sin JS, la pista sigue siendo scrollable.
   ============================================================= */
.testimonials-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 1120px; margin: 0 auto; }
@media (min-width: 900px) {
  .testimonials-layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: stretch; }
}

.testimonial-carousel { position: relative; min-width: 0; }

/* Pista: flex horizontal con scroll-snap nativo */
.testimonial-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;   /* imanta al deslizar en táctil, pero deja reposar donde toque */
  /* El desplazamiento suave de las flechas/puntos lo anima el JS (rAF): el
     scroll-behavior:smooth del CSS entra en conflicto con scroll-snap y aborta
     las animaciones crecientes en algunos motores, rompiendo el bucle infinito. */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;                 /* Firefox */
  padding: .5rem .25rem 1.25rem;         /* aire para sombra al hacer hover */
}
.testimonial-track::-webkit-scrollbar { display: none; } /* WebKit */
.testimonial-track:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 4px; border-radius: 20px; }

.testimonial-card {
  background: var(--paper); border-radius: 20px; padding: 2rem 2.1rem;
  border: 1px solid var(--line);
  flex: 0 0 100%;                        /* móvil: 1 tarjeta por vista */
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
}
/* Desde tablet, 2 opiniones por vista (el carrusel ya no ocupa todo el ancho:
   comparte fila con el panel CTA fijo). Con 4 reseñas → 2 pasos de carrusel. */
@media (min-width: 640px) { .testimonial-card { flex-basis: calc(50% - .75rem); } }

.testimonial-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(6,30,58,.12); border-color: var(--accent-2); }

/* Estrellas de valoración (oro de marca) */
.testimonial-stars { display: inline-flex; gap: .25rem; margin-bottom: 1.1rem; }
.testimonial-stars img { width: 18px; height: 18px; display: block; }

.testimonial-quote { font-family: var(--serif); font-style: italic; font-size: 1.15rem; line-height: 1.5; color: var(--ink-soft); margin-bottom: 1.5rem; flex: 1 0 auto; }

/* Pie: autor + fecha/fuente */
.testimonial-meta { display: flex; flex-direction: column; gap: .15rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.testimonial-author { font-family: var(--sans); font-size: .95rem; color: var(--ink); font-weight: 600; }
.testimonial-date { font-family: var(--sans); font-size: .78rem; color: var(--ink-mute); letter-spacing: .02em; }

/* ---- Panel CTA FIJO a Doctoralia (siempre visible, al lado del carrusel) ---- */
.testimonial-cta-static {
  background: var(--ink); color: var(--bg); border-radius: 20px;
  padding: 2rem 2.1rem;
  display: flex; flex-direction: column; justify-content: center; gap: .75rem;
  border: 1px solid transparent;
}
.testimonial-cta-kicker { font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); }
.testimonial-cta-title { font-family: var(--serif); font-size: 1.4rem; line-height: 1.25; color: var(--bg); }
.testimonial-cta-text { font-size: .92rem; line-height: 1.5; color: rgba(248,246,241,.78); }
.testimonial-cta-actions { display: flex; flex-direction: column; gap: .8rem; margin-top: .6rem; align-items: stretch; }
.testimonial-cta-actions .btn { width: 100%; text-align: center; }
.testimonial-cta-link { color: var(--accent-2); font-weight: 600; font-size: .92rem; text-decoration: underline; text-underline-offset: 3px; text-align: center; }

/* ---- Flechas ---- */
.tcar-arrow {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font-size: 1.6rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: 0 8px 22px rgba(6,30,58,.14);
  transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out), opacity .2s var(--ease-out);
}
.tcar-arrow span { position: relative; top: -2px; }
.tcar-arrow:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tcar-arrow:disabled { opacity: .35; cursor: default; box-shadow: none; }
.tcar-prev { left: -10px; }
.tcar-next { right: -10px; }
@media (min-width: 1180px) { .tcar-prev { left: -22px; } .tcar-next { right: -22px; } }

/* ---- Puntos ---- */
.tcar-dots { display: flex; justify-content: center; gap: .5rem; margin-top: .25rem; }
.tcar-dot {
  width: 9px; height: 9px; border-radius: 50%; padding: 0;
  border: none; background: rgba(6,30,58,.2); cursor: pointer;
  transition: background .2s var(--ease-out), transform .2s var(--ease-out);
}
.tcar-dot:hover { background: rgba(6,30,58,.4); }
.tcar-dot.is-active { background: var(--accent-2); transform: scale(1.35); }

@media (prefers-reduced-motion: reduce) {
  .testimonial-track { scroll-behavior: auto; }
  .testimonial-card { transition: none; }
}
