/* ========== RESEÑAS DE GOOGLE ========== */

.gr-section {
    --gr-card-bg: #f6f6f9;
    --gr-btn-bg: #0066ff;
    --gr-btn-fg: #ffffff;
    --gr-nav-bg: #5a5a5a;
    --gr-nav-fg: #ffffff;
    --gr-dot: #111111;
    padding: 2.5rem 0;
}

.gr-titulo {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #111;
    margin: 0 0 1.5rem;
}

.gr-section .gr-descripcion {
    text-align: center;
    max-width: 720px;
    margin: -.75rem auto 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* ---------- Estrellas (relleno parcial con --p) ---------- */
.gr-stars {
    --p: 100%;
    display: inline-block;
    font-size: 1.15rem;
    line-height: 1;
    letter-spacing: 2px;
    background: linear-gradient(90deg, #fbbc04 var(--p), #d1d5db var(--p));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.gr-stars::before { content: "\2605\2605\2605\2605\2605"; }
.gr-stars--lg { font-size: 1.5rem; }

/* ---------- Cabecera ---------- */
.gr-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #f6f6f9;
    border-radius: 10px;
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.25rem;
    text-align: left;
}
.gr-header__brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: #111;
}
.gr-header__brand i { color: #4285f4; font-size: 1.3rem; }
.gr-header__rating { display: flex; align-items: center; gap: .5rem; margin-top: .25rem; }
.gr-header__score { font-size: 1.5rem; font-weight: 700; color: #111; line-height: 1; }
.gr-header__count { font-size: .85rem; color: #6b7280; }

.gr-btn {
    display: inline-block;
    background: var(--gr-btn-bg);
    color: var(--gr-btn-fg) !important;
    font-weight: 600;
    font-size: .9rem;
    padding: .65rem 1.4rem;
    border-radius: 999px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: filter .2s ease, transform .2s ease;
}
.gr-btn:hover { filter: brightness(.9); transform: translateY(-1px); }

/* ---------- Carrusel ---------- */
.gr-carousel { position: relative; }

.gr-swiper { overflow: hidden; }

/* Si Swiper no cargó, el listado sigue siendo usable con scroll horizontal */
.gr-swiper:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
}
.gr-swiper:not(.swiper-initialized) .gr-card {
    flex: 0 0 min(280px, 85%);
    scroll-snap-align: start;
}

.gr-card {
    height: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    background: var(--gr-card-bg);
    border-radius: 10px;
    padding: 1.1rem 1.1rem 1.25rem;
    text-align: left;
    min-height: 200px;
}

.gr-card__head { display: flex; align-items: center; gap: .7rem; }

.gr-avatar {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}
.gr-avatar__img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gr-card__autor { min-width: 0; display: flex; flex-direction: column; }
.gr-card__nombre {
    font-size: .95rem;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gr-card__fecha { color: #8a8f98; font-size: .75rem; }

/* ---- Texto con despliegue animado ---- */
.gr-card__cuerpo { display: flex; flex-direction: column; gap: .35rem; }
.gr-card__wrap { position: relative; }

.gr-card__texto {
    margin: 0;
    font-size: .95rem;
    line-height: 1.45;
    color: #222;
    overflow-wrap: anywhere;
}
/* 5 líneas visibles; JS fija max-height en px al abrir para que la transición sea fluida */
.gr-card__texto.is-clamped {
    max-height: 7.25em;   /* 5 x line-height */
    overflow: hidden;
    transition: max-height .4s ease;
}

/* Degradado inferior que sugiere que hay más texto */
.gr-card__fade {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2.4em;
    background: linear-gradient(to bottom, rgba(246, 246, 249, 0), var(--gr-card-bg));
    pointer-events: none;
    transition: opacity .3s ease;
}
.gr-card.is-open .gr-card__fade,
.gr-card__wrap.is-fit .gr-card__fade { opacity: 0; }

.gr-card__mas {
    align-self: flex-start;
    background: none;
    border: 0;
    padding: 0;
    color: #6b7280;
    font-size: .85rem;
    cursor: pointer;
}
.gr-card__mas[hidden] { display: none; }
.gr-card__mas:hover { color: #111; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .gr-card__texto.is-clamped,
    .gr-card__fade { transition: none; }
}

/* ---------- Navegación ---------- */
.gr-nav {
    position: absolute;
    top: 45%;
    z-index: 5;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: var(--gr-nav-bg);
    color: var(--gr-nav-fg);
    opacity: .9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.gr-nav:hover { opacity: 1; }
.gr-prev { left: -10px; }
.gr-next { right: -10px; }
.gr-nav.swiper-button-disabled { opacity: 0; pointer-events: none; }

.gr-pagination {
    display: block;
    text-align: center;
    min-height: 14px;
    margin-top: 1rem;
}

.gr-carousel > .gr-pagination.swiper-pagination-bullets {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    transform: none;
    margin: 1rem auto 0;
}
.gr-pagination .swiper-pagination-bullet { background: var(--gr-dot); opacity: .35; }
.gr-pagination .swiper-pagination-bullet-active { opacity: 1; }

@media (max-width: 575.98px) {
    .gr-section { padding: 1.75rem 0; }
    .gr-titulo { font-size: 1.3rem; }
    .gr-header { padding: 1rem; }
    .gr-btn { width: 100%; text-align: center; }
    .gr-prev { left: -4px; }
    .gr-next { right: -4px; }
}
