/* ==========================================================================
   Carrusel de reseñas de Google
   --------------------------------------------------------------------------
   Va en el layout, justo antes del footer, para que aparezca en todo el sitio.
   Tres tarjetas visibles en escritorio, dos en tablet y una en movil. Los
   controles los maneja resenas.js; sin JavaScript la pista sigue siendo
   desplazable con el dedo o el trackpad.
   ========================================================================== */

.resenas {
    padding: 54px 0 50px;
    background: #fff;
    border-top: 1px solid var(--line, #e6ecf5);
}

/* --- Cabecera: titulo a la izquierda, resumen de Google a la derecha ------ */

.resenas__cabecera {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 24px;
    margin-bottom: 26px;
}

.resenas__eyebrow {
    margin: 0 0 6px;
    color: #007994;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .18em;
    line-height: 1.4;
    text-transform: uppercase;
}

.resenas__titulo {
    margin: 0;
    color: var(--ink, #0d1738);
    font-size: clamp(1.25rem, 1.05rem + .6vw, 1.5rem);
    font-weight: 600;
    letter-spacing: -.015em;
    line-height: 1.25;
}

.resenas__google {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    background: #fff;
    border: 1px solid var(--line, #e6ecf5);
    border-radius: 999px;
    color: var(--body, #52607a);
    font-size: 12.5px;
    line-height: 1;
    text-decoration: none;
    transition: border-color .25s var(--ease, ease), box-shadow .25s var(--ease, ease);
}

.resenas__google:hover,
.resenas__google:focus-visible {
    color: var(--body, #52607a);
    border-color: #cfdcef;
    box-shadow: var(--shadow-sm, 0 4px 16px rgba(5, 19, 80, .06));
    text-decoration: none;
}

.resenas__nota {
    color: var(--ink, #0d1738);
    font-size: 14px;
    font-weight: 700;
}

.resenas__estrellas {
    display: inline-flex;
    gap: 2px;
    color: #f0a92b;
    font-size: 11px;
}

/* --- Pista ------------------------------------------------------------- */

.resenas__pista {
    display: flex;
    gap: 18px;
    margin: 0;
    padding: 2px 2px 6px;
    list-style: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.resenas__pista::-webkit-scrollbar {
    display: none;
}

.resenas__pista:focus-visible {
    outline: 2px solid rgba(18, 140, 126, .45);
    outline-offset: 4px;
}

/* Arrastre con raton: mientras se arrastra se cancela el snap para que el
   movimiento siga al puntero en tiempo real. */
.resenas__pista.esta-arrastrando {
    scroll-snap-type: none;
    scroll-behavior: auto;
    cursor: grabbing;
    -webkit-user-select: none;
    user-select: none;
}

/* --- Tarjeta ----------------------------------------------------------- */

.resena {
    display: flex;
    flex-direction: column;
    flex: 0 0 calc((100% - 36px) / 3);
    min-width: 0;
    padding: 20px 20px 18px;
    background: var(--soft, #f6f9fd);
    border: 1px solid var(--line, #e6ecf5);
    border-radius: 14px;
    scroll-snap-align: start;
}

.resena__estrellas {
    display: inline-flex;
    gap: 2px;
    margin-bottom: 10px;
    color: #f0a92b;
    font-size: 11.5px;
}

.resena__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.resena__texto {
    display: -webkit-box;
    margin: 0 0 16px;
    overflow: hidden;
    color: var(--body, #52607a);
    font-size: .925rem;
    line-height: 1.62;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}

.resena__autor {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.resena__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    background: #eaf1fb;
    border-radius: 50%;
    color: #2b5aa9;
    font-size: 12px;
    font-weight: 700;
}

.resena__datos {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.resena__datos strong {
    color: var(--ink, #0d1738);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
}

.resena__datos small {
    color: #8a97ad;
    font-size: .75rem;
    line-height: 1.3;
}

/* --- Controles --------------------------------------------------------- */

.resenas__controles {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 22px;
}

.resenas__flecha {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #fff;
    border: 1px solid var(--line, #e6ecf5);
    border-radius: 50%;
    color: var(--brand, #051350);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background .25s var(--ease, ease), color .25s var(--ease, ease), border-color .25s var(--ease, ease), opacity .25s var(--ease, ease);
}

.resenas__flecha:hover:not(:disabled),
.resenas__flecha:focus-visible:not(:disabled) {
    background: var(--brand, #051350);
    border-color: var(--brand, #051350);
    color: #fff;
}

.resenas__flecha:focus-visible {
    outline: 2px solid rgba(18, 140, 126, .45);
    outline-offset: 2px;
}

.resenas__flecha:disabled {
    opacity: .35;
    cursor: default;
}

.resenas__puntos {
    display: flex;
    align-items: center;
    gap: 7px;
}

.resenas__punto {
    width: 7px;
    height: 7px;
    padding: 0;
    background: #cbd6e6;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: width .25s var(--ease, ease), background .25s var(--ease, ease);
}

.resenas__punto:hover {
    background: #a9b8cf;
}

.resenas__punto.esta-activo {
    width: 20px;
    background: var(--brand, #051350);
}

.resenas__punto:focus-visible {
    outline: 2px solid rgba(18, 140, 126, .45);
    outline-offset: 3px;
}

/* --- Adaptacion -------------------------------------------------------- */

@media (max-width: 991.98px) {
    .resenas {
        padding: 46px 0 42px;
    }

    .resena {
        flex-basis: calc((100% - 18px) / 2);
    }
}

@media (max-width: 767.98px) {
    .resenas {
        padding: 38px 0 36px;
    }

    .resenas__cabecera {
        margin-bottom: 20px;
    }

    .resena {
        flex-basis: 100%;
        padding: 18px 18px 16px;
    }

    .resena__texto {
        -webkit-line-clamp: 6;
    }

    .resenas__controles {
        margin-top: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .resenas__pista,
    .resenas__punto,
    .resenas__flecha {
        scroll-behavior: auto;
        transition: none;
    }
}
