/* ==========================================================================
   Reseñas de Google — bloque estático (prefijo rg-) · vogroup.com.mx
   Se usa en: home (/), LP CDMX (/lp/oficinas-virtuales-cdmx/) y páginas de
   colonia (/servicios/<servicio>/<ciudad>/<colonia>/).
   El texto de cada reseña va TAL CUAL está publicado en Google: no editarlo.
   En la tarjeta se muestran solo las primeras líneas (line-clamp); el texto
   completo sigue íntegro en el HTML y se abre con "Leer completa" en una
   ventana modal (js/resenas-google.js).
   Fuente: Google Maps, 30-sep-2026. Para agregar una reseña se copia un <li>.
   ========================================================================== */

.rg {
  --rg-ink: #0f2540;
  --rg-muted: #4a5b70;
  --rg-accent: #45832e;
  --rg-link: #00387d;
  --rg-star: #f4b400;
  --rg-star-empty: #d9dde3;
  --rg-card: #ffffff;
  --rg-border: rgba(0, 56, 125, 0.10);
  --rg-shadow: 0 6px 24px rgba(0, 38, 94, 0.06);
  --rg-lines: 5;            /* líneas visibles del texto en la tarjeta */
}

/* Rejilla: en escritorio todas las tarjetas en UNA fila (5 en home/LP, 3-4 en colonia);
   en tableta 2 columnas; en celular 1. Las tarjetas de una fila miden lo mismo de alto. */
.rg-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Cada reseña: tarjeta blanca con filete superior en verde de marca */
.rg-item {
  flex: 1 1 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--rg-card);
  border: 1px solid var(--rg-border);
  border-top: 3px solid var(--rg-accent);
  border-radius: 16px;
  padding: 20px 20px 18px;
  color: var(--rg-ink);
  box-shadow: var(--rg-shadow);
  text-align: left;
}

/* Estrellas (símbolo SVG id="rg-star" definido una vez por página) */
.rg-stars {
  display: inline-flex;
  gap: 2px;
  line-height: 0;
}
.rg-stars svg {
  width: 17px;
  height: 17px;
  fill: var(--rg-star);
}
.rg-stars .is-empty {
  fill: var(--rg-star-empty);
}

/* Texto de la reseña: recortado a --rg-lines líneas en la tarjeta */
.rg-quote {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--rg-ink);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--rg-lines);
  line-clamp: var(--rg-lines);
  overflow: hidden;
}
.rg-quote p {
  margin: 0 0 0.6em;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}
.rg-quote p:last-child {
  margin-bottom: 0;
}
/* Texto completo: dentro del modal, o en la tarjeta si el navegador no soporta <dialog> */
.rg-quote.is-full,
.rg-item.is-open .rg-quote {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: none;
  overflow: visible;
}

/* Botón "Leer completa" (el JS lo oculta cuando el texto cabe completo) */
.rg-more {
  align-self: flex-start;
  margin: -2px 0 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--rg-link);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rg-more:hover {
  text-decoration-thickness: 2px;
}
.rg-more:focus-visible,
.rg-link:focus-visible,
.rg-dialog__close:focus-visible {
  outline: 2px solid var(--rg-accent);
  outline-offset: 3px;
  border-radius: 2px;
}
.rg-more[hidden] {
  display: none;
}

/* Autor, sede y enlace a las reseñas de la sede en Google */
.rg-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  font-size: 0.86rem;
  color: var(--rg-muted);
}
.rg-name {
  color: var(--rg-ink);
  font-weight: 600;
}
.rg-link {
  margin-left: auto;
  color: var(--rg-link);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.rg-link:hover {
  text-decoration-thickness: 2px;
}

/* Pie del bloque (página de colonia): enlace a todas las reseñas de la sede */
.rg-foot {
  text-align: center;
  margin: 28px 0 0;
}

/* Encabezado del bloque en páginas de colonia (usa .section__title/.section__subtitle globales) */
.rg .section__subtitle {
  margin-bottom: var(--spacing-lg, 40px);
}
.rg .section__title .green {
  color: #28a745;
}

/* --- Modal con la reseña completa ------------------------------------------ */
.rg-dialog {
  width: min(92vw, 640px);
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rg-ink, #0f2540);
}
.rg-dialog::backdrop {
  background: rgba(15, 37, 64, 0.55);
}
.rg-dialog__box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #fff;
  border-top: 3px solid var(--rg-accent, #45832e);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 24px 60px rgba(0, 38, 94, 0.28);
  text-align: left;
}
.rg-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #eef2f7;
  color: var(--rg-ink, #0f2540);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.rg-dialog__close:hover {
  background: #e1e8f1;
}
.rg-dialog .rg-quote {
  font-size: 1.05rem;
  line-height: 1.6;
  max-height: 60vh;
  overflow: auto;
  padding-right: 4px;
}
.rg-dialog .rg-meta {
  margin-top: 4px;
  font-size: 0.92rem;
}
body.rg-modal-open {
  overflow: hidden;
}

/* --- Columnas ---------------------------------------------------------------- */
@media (min-width: 700px) and (max-width: 1023.98px) {
  .rg-item { flex-basis: calc(50% - 8px); max-width: calc(50% - 8px); }
}
@media (min-width: 1024px) {
  .rg-grid { flex-wrap: nowrap; }
  .rg-item { flex: 1 1 0; max-width: none; }
  .rg-grid--1 .rg-item { flex: 0 1 720px; max-width: 720px; }
}
@media (max-width: 640px) {
  .rg-item { padding: 18px 18px 16px; }
  .rg-link { margin-left: 0; }
  .rg-dialog__box { padding: 24px 20px 20px; }
}
