{% require_css %}
{% scope_css %}

/* =========================
   Testimonios
   ========================= */

.qb-tm {
  padding: 48px 16px;
}

.qb-tm.is-fullheight {
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.qb-tm__wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.qb-tm__viewport {
  width: 100%;
}

/* =========================
   Layout general
   ========================= */

.qb-tm__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}

/* =========================
   Bloque lateral
   ========================= */

.qb-tm__aside {
  background: var(--qb-side-bg, #0B2D57);
  color: var(--qb-side-color, #D6EEFF);
  border-radius: var(--qb-radius, 20px);
  overflow: hidden;
}

.qb-tm__aside-inner {
  padding: 28px;
  min-height: 100%;
}

.qb-tm__aside-text {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 400;
}

.qb-tm__aside-text :where(p, div, span, strong, em, sup) {
  color: inherit;
}

.qb-tm__aside-text > :first-child {
  margin-top: 0;
}

.qb-tm__aside-text > :last-child {
  margin-bottom: 0;
}

/* =========================
   Panel principal
   ========================= */

.qb-tm__panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--qb-radius, 20px);
  margin: 0 auto;
  padding: 28px 24px 0;
  width: 100%;
}

/* Fondo color/gradiente */
.qb-tm__panel.bg--colors {
  background-image: linear-gradient(135deg, var(--qb-bg-start, #6D28D9), var(--qb-bg-end, #2563EB));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Fondo imagen */
.qb-tm__panel.bg--image {
  background-image: var(--qb-bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.qb-tm__panel.bg--image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

/* Blob decorativo */
.qb-tm__panel::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -120px;
  top: -160px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.qb-tm__track,
.qb-tm__inner,
.qb-tm__dots {
  position: relative;
  z-index: 1;
}

/* =========================
   Fade real
   ========================= */

.qb-tm__track {
  display: grid;
}

.qb-tm__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease-in-out;
}

.qb-tm__slide.is-active,
.qb-tm__slide.is-exiting,
.qb-tm__slide.is-pre-active {
  visibility: visible;
}

.qb-tm__slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

.qb-tm__slide.is-exiting {
  opacity: 0;
  z-index: 1;
}

.qb-tm__slide.is-pre-active {
  opacity: 0;
  z-index: 2;
}

/* =========================
   Layout mobile
   ========================= */

.qb-tm__inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0;
  min-height: 100%;
}

.qb-tm__content {
  order: 1;
  color: #fff;
  padding: 0 4px 16px;
  display: flex;
  flex-direction: column;
}

.qb-tm__media {
  order: 2;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  align-self: end;
  min-height: 230px;
}

.qb-tm__photo {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 260px;
  display: block;
  border-radius: 0;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.28));
  margin-bottom: -4px;
}

.qb-tm__photo--placeholder {
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
}

.qb-tm__quote {
  font-size: 18px;
  line-height: 1.45;
  max-width: 100%;
}

.qb-tm__quote :where(p, div, span, strong, em) {
  color: inherit;
}

.qb-tm__quote > :first-child {
  margin-top: 0;
}

.qb-tm__quote > :last-child {
  margin-bottom: 0;
}

.qb-tm__meta {
  margin-top: 18px;
  font-size: 16px;
  line-height: 1.3;
  opacity: 0.95;
}

.qb-tm__name {
  font-weight: 700;
}

.qb-tm__role {
  font-weight: 600;
  opacity: 0.9;
}

/* =========================
   Dots
   ========================= */

.qb-tm__dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.qb-tm__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,0.15);
  cursor: pointer;
  padding: 0;
}

.qb-tm__dot.is-active {
  background: rgba(109, 40, 217, 1);
}

.qb-tm__dot:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

/* =========================
   Tablet
   ========================= */

@media (min-width: 768px) {
  .qb-tm__layout {
    gap: 24px;
  }

  .qb-tm__panel {
    padding: 32px 32px 0;
  }

  .qb-tm__aside-inner {
    padding: 32px 28px;
  }

  .qb-tm__aside-text {
    font-size: 28px;
    line-height: 1.35;
  }

  .qb-tm__quote {
    font-size: 20px;
    max-width: 560px;
  }

  .qb-tm__photo {
    max-height: 300px;
  }

  .qb-tm__media {
    min-height: 260px;
  }
}

/* =========================
   Desktop
   ========================= */

@media (min-width: 1140px) {
  .qb-tm__layout {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 22px;
  }

  .qb-tm__aside {
    align-self: stretch;
  }

  .qb-tm__aside-inner {
    padding: 30px 24px;
    height: 100%;
  }

  .qb-tm__aside-text {
    font-size: 28px;
    line-height: 1.35;
    max-width: 240px;
  }

  .qb-tm__panel {
    padding: 30px 22px 0 24px;
    min-height: 405px;
  }

  .qb-tm__panel::after {
    width: 430px;
    height: 430px;
    right: -130px;
    top: -190px;
  }

  .qb-tm__inner {
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    align-items: stretch;
    min-height: 100%;
  }

  .qb-tm__content {
    order: 1;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 100%;
    padding: 0 0 30px;
  }

  .qb-tm__media {
    order: 2;
    justify-content: flex-end;
    align-items: flex-end;
    align-self: end;
    min-height: 370px;
  }

  .qb-tm__photo {
    max-height: 380px;
    margin-bottom: -4px;
  }

  .qb-tm__quote {
    font-size: 27px;
    line-height: 1.42;
    max-width: 520px;
  }

  .qb-tm__meta {
    margin-top: auto;
    padding-top: 28px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qb-tm__slide {
    transition: none;
  }
}

{% endscope_css %}