/* /testimonios: resumen de calificaciones + reseñas de Google en mosaico. */
.tm-area {
    --tm-accent: #b28795;
    --tm-accent-dark: #7f324b;
    --tm-accent-darker: #64263a;
    --tm-pink: #ecc7ce;
    --tm-pink-soft: #fbf3f5;
    --tm-star: #e8a33d;
    --tm-text: #3d3d3d;
    --tm-heading: #2a2228;
    --tm-muted: #6b6168;
    --tm-border: #eadfe2;
    --tm-shadow: 0 18px 40px -28px rgba(127, 50, 75, .45);

    padding: 100px 0 90px;
}

.tm-area a:focus-visible,
.tm-area button:focus-visible {
    outline: 3px solid var(--tm-accent);
    outline-offset: 3px;
}

/* ----------------------------------------------------------- Resumen */

.tm-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 28px 44px;
    margin-bottom: 40px;
    padding: 30px 36px;
    border: 1px solid var(--tm-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--tm-shadow);
}

.tm-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-right: 44px;
    border-right: 1px solid var(--tm-border);
    text-align: center;
}

.tm-score-value {
    color: var(--tm-heading);
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
}

.tm-score-count { color: var(--tm-muted); font-size: 14px; }

.tm-stars { display: inline-flex; gap: 3px; color: var(--tm-star); font-size: 17px; }

.tm-bars {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tm-bars li {
    display: grid;
    grid-template-columns: 38px 1fr 28px;
    align-items: center;
    gap: 10px;
    color: var(--tm-muted);
    font-size: 14px;
}

.tm-bar-label i { color: var(--tm-star); font-size: 11px; }

.tm-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--tm-pink-soft);
    overflow: hidden;
}

.tm-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--tm-accent), var(--tm-accent-dark));
}

.tm-bar-count { text-align: right; }

.tm-cta p { margin: 0 0 14px; color: var(--tm-text); font-size: 15px; }

.tm-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 20px;
    border: 1px solid #dadce0;
    border-radius: 12px;
    background: #fff;
    color: #3c4043;
    font-weight: 600;
    transition: background-color .2s, box-shadow .2s;
}

.tm-btn:hover { background: #f8f9fa; color: #202124; box-shadow: 0 2px 8px -2px rgba(60, 64, 67, .3); }

/* ----------------------------------------------------------- Reseñas (mosaico) */

.tm-grid {
    columns: 3 300px;
    column-gap: 24px;
}

.tm-card {
    display: inline-block; /* evita que una tarjeta se parta entre columnas */
    width: 100%;
    margin: 0 0 24px;
    padding: 24px;
    border: 1px solid var(--tm-border);
    border-radius: 20px;
    background: #fff;
    break-inside: avoid;
    transition: border-color .2s, box-shadow .2s;
}

.tm-card:hover { border-color: var(--tm-pink); box-shadow: var(--tm-shadow); }

.tm-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.tm-area img.tm-avatar {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
    background: var(--tm-pink-soft);
}

.tm-author { min-width: 0; flex: 1; }

.tm-author h3 {
    margin: 0;
    color: var(--tm-heading);
    font-size: 16px;
    line-height: 1.3;
}

.tm-author span { color: var(--tm-muted); font-size: 13px; }

.tm-source {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tm-pink-soft);
    color: var(--tm-accent-dark);
    font-size: 14px;
}

.tm-card-stars { margin-bottom: 10px; font-size: 15px; }

.tm-text {
    position: relative;
    display: -webkit-box;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--tm-text);
    font-size: 15.5px;
    font-style: normal;
    line-height: 1.7;
    white-space: pre-line;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tm-card.is-expanded .tm-text { display: block; -webkit-line-clamp: unset; }

.tm-more {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--tm-accent-dark);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--tm-pink);
    text-underline-offset: 3px;
}

.tm-more:hover { color: var(--tm-accent-darker); }

.tm-empty {
    padding: 50px 24px;
    border: 1px dashed var(--tm-pink);
    border-radius: 20px;
    background: #fff;
    color: var(--tm-muted);
    text-align: center;
}

.tm-empty i { margin-bottom: 10px; color: var(--tm-accent); font-size: 32px; }
.tm-empty h3 { color: var(--tm-heading); font-size: 21px; }
.tm-empty p { margin: 0; }

/* ----------------------------------------------------------- Responsivo */

@media (max-width: 991.98px) {
    .tm-summary { grid-template-columns: auto minmax(0, 1fr); }
    .tm-cta { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid var(--tm-border); }
}

@media (max-width: 575.98px) {
    .tm-area { padding: 60px 0; }
    .tm-summary { grid-template-columns: 1fr; padding: 24px 20px; }
    .tm-score { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid var(--tm-border); }
    .tm-cta { padding-top: 0; border-top: 0; text-align: center; }
    .tm-card { padding: 20px; }
}
