/* Widget "Testimonios" (templates/web/pages/widgets/testimonials.html).
   Colores del theme de la agencia (--brand-*); las estrellas siempre doradas. */
.tm {
    --tm-ink: var(--brand-ink, #16213e);
    --tm-accent: var(--brand-accent, #c0336d);
    --tm-muted: #5d6878;
    --tm-gold: #f5a524;
    --tm-gap: 20px;
    padding: 48px 0;
}
.tm--bg { padding: 60px 0; }
.tm-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- encabezado y resumen ---------- */
.tm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin: 0 0 28px; }
.tm-title { margin: 0; font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.1; color: var(--tm-title, var(--tm-ink)); }
.tm-subtitle { margin: 8px 0 0; font-size: 1.05rem; color: var(--tm-text, var(--tm-muted)); max-width: 640px; }
.tm-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; background: #fff; border-radius: 16px; padding: 12px 16px;
              box-shadow: 0 8px 24px rgba(16, 24, 40, .08); color: var(--tm-ink); }
.tm-summary__rating { font-size: 1.8rem; font-weight: 900; line-height: 1; }
.tm-summary__text { font-weight: 700; color: var(--tm-muted); }
.tm-summary__more { font-weight: 800; color: var(--tm-accent); text-decoration: none; white-space: nowrap; }
.tm-summary__more::after { content: " \2192"; }
.tm-summary__more:hover { text-decoration: underline; color: var(--tm-accent); }

/* ---------- testimonio ---------- */
.tm-item { position: relative; display: flex; flex-direction: column; gap: 12px; background: #fff; border-radius: 20px; padding: 22px;
           box-shadow: 0 10px 30px rgba(16, 24, 40, .07); color: var(--tm-ink); min-width: 0; }
.tm-stars { display: inline-flex; gap: 2px; font-size: 1.05rem; line-height: 1; }
.tm-star { color: #d0d5dd; }
.tm-star.is-on { color: var(--tm-gold); }
.tm-body { flex: 1; }
.tm-comment { margin: 0; line-height: 1.6; color: #344054; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.tm-comment.is-open { display: block; -webkit-line-clamp: unset; }
.tm-readmore { border: 0; background: none; padding: 6px 0 0; font-weight: 800; color: var(--tm-accent); }
.tm-item__foot, .tm-item__top { display: flex; align-items: center; gap: 12px; }
.tm-item__foot { padding-top: 14px; border-top: 1px solid #eef0f4; }
.tm-avatar { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
             background: color-mix(in srgb, var(--tm-accent) 14%, #fff); color: var(--tm-accent); font-weight: 900; font-size: .95rem; }
.tm-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tm-name { font-weight: 800; line-height: 1.2; }
.tm-trip { font-size: .85rem; color: var(--tm-muted); }
.tm-source { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
             background: #f2f4f7; color: #475467; text-decoration: none; font-size: .95rem; }
.tm-source svg.svg-inline--fa, .tm-source i, .tm-source .tm-ta { width: 15px; height: 15px; }
.tm-source .tm-ta { width: 17px; height: 17px; }
a.tm-source:hover { background: #e4e7ec; }
.tm-source--google { color: #4285f4; }
.tm-source--facebook { color: #1877f2; }
.tm-source--instagram { color: #d6249f; }
.tm-source--tripadvisor { color: #00af87; }
.tm-source--whatsapp { color: #25d366; }

/* ---------- lista sin carrusel (hasta 4) ---------- */
.tm-list { display: grid; gap: var(--tm-gap); grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tm-list--1 { grid-template-columns: minmax(0, 720px); justify-content: center; }

/* ---------- carrusel ---------- */
.tm-carousel { position: relative; }
.tm-track { display: flex; gap: var(--tm-gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 2px 20px; outline: none; }
.tm-track::-webkit-scrollbar { display: none; }
.tm-track:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--tm-accent) 40%, transparent); border-radius: 20px; }
.tm-track .tm-item { flex: 0 0 calc((100% - 3 * var(--tm-gap)) / 4); scroll-snap-align: start; }
.tm--google .tm-track .tm-item { flex-basis: calc((100% - 3 * var(--tm-gap)) / 4); }
.tm--cards .tm-track .tm-item { flex-basis: calc((100% - 2 * var(--tm-gap)) / 3); }
.tm-nav { position: absolute; top: 42%; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; background: #fff; color: var(--tm-ink);
          font-size: 1.8rem; line-height: 1; box-shadow: 0 6px 20px rgba(16, 24, 40, .18); }
.tm-nav--prev { left: -16px; }
.tm-nav--next { right: -16px; }
.tm-nav[disabled] { opacity: 0; pointer-events: none; }
.tm-dots { display: flex; justify-content: center; gap: 8px; }
.tm-dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--tm-ink) 22%, transparent); }
.tm-dots button.is-on { background: var(--tm-accent); transform: scale(1.2); }
.tm--bg .tm-dots button:not(.is-on) { background: color-mix(in srgb, var(--tm-text, var(--tm-ink)) 35%, transparent); }
.tm--quote.tm--bg .tm-quote { opacity: .6; }

/* ---------- cita destacada ---------- */
.tm--quote .tm-track .tm-item { flex: 0 0 100%; align-items: center; text-align: center; padding: 44px 12% 34px; background: transparent; box-shadow: none; }
.tm--quote .tm-quote { font-family: Georgia, serif; font-size: 6rem; line-height: .6; color: var(--tm-accent); opacity: .35; height: 40px; }
.tm--quote .tm-comment { font-size: clamp(1.1rem, 2.2vw, 1.45rem); line-height: 1.55; color: var(--tm-title, var(--tm-ink)); font-weight: 600; -webkit-line-clamp: 8; }
.tm--quote .tm-stars { font-size: 1.3rem; }
.tm--quote .tm-item__foot { border-top: 0; justify-content: center; text-align: left; }
.tm--quote .tm-name, .tm--quote .tm-trip { color: var(--tm-text, inherit); }
.tm--quote .tm-trip { color: var(--tm-text, var(--tm-muted)); }
.tm--quote .tm-nav { top: 40%; background: #fff; }

/* ---------- estilo reseña Google ---------- */
.tm--google .tm-item { padding: 18px; gap: 10px; border: 1px solid #eaecf0; box-shadow: 0 2px 8px rgba(16, 24, 40, .05); border-radius: 14px; }
.tm--google .tm-avatar { flex-basis: 40px; width: 40px; height: 40px; background: var(--tm-accent); color: #fff; }
.tm--google .tm-comment { font-size: .95rem; -webkit-line-clamp: 5; }
.tm--google .tm-stars { font-size: 1rem; }

/* ---------- muro ---------- */
.tm--wall .tm-list { display: block; columns: 3 280px; column-gap: var(--tm-gap); }
.tm--wall .tm-item { break-inside: avoid; margin: 0 0 var(--tm-gap); }
.tm--wall .tm-item[hidden] { display: none; }
.tm--wall .tm-comment { -webkit-line-clamp: 12; }
.tm-showmore { display: block; margin: 8px auto 0; border: 1.5px solid var(--tm-ink); background: #fff; color: var(--tm-ink); font-weight: 800;
               border-radius: 999px; padding: 10px 22px; }
.tm-showmore:hover { background: var(--tm-ink); color: #fff; }

@media (max-width: 991.98px) {
    .tm-track .tm-item, .tm--cards .tm-track .tm-item, .tm--google .tm-track .tm-item { flex-basis: calc((100% - var(--tm-gap)) / 2); }
    .tm--quote .tm-track .tm-item { flex-basis: 100%; padding: 36px 6% 28px; }
}
@media (max-width: 767.98px) {
    .tm { padding: 34px 0; }
    .tm-wrap { padding: 0 16px; }
    .tm-head { margin-bottom: 20px; }
    .tm-list { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 16px; }
    .tm-list::-webkit-scrollbar { display: none; }
    .tm-list .tm-item { flex: 0 0 86%; scroll-snap-align: start; }
    .tm--wall .tm-list { display: block; columns: 1; margin: 0; padding: 0; }
    .tm--wall .tm-list .tm-item { width: auto; }
    .tm-track { margin: 0 -16px; padding: 4px 16px 16px; gap: 14px; }
    .tm-track .tm-item, .tm--cards .tm-track .tm-item, .tm--google .tm-track .tm-item { flex-basis: 86%; }
    .tm--quote .tm-track .tm-item { flex-basis: 100%; padding: 26px 8px 20px; }
    .tm--quote .tm-quote { font-size: 4.5rem; }
    .tm-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tm-track { scroll-behavior: auto; } }
