/* Reseñas de Google - Carrusel
 * Personaliza colores con las variables de .grc
 */
.grc {
  --grc-star: #f5b301;
  --grc-star-empty: #dadce0;
  --grc-card-bg: #fff;
  --grc-card-border: #e6e6e6;
  --grc-text: #3c4043;
  --grc-muted: #70757a;
  --grc-accent: currentColor;
  --grc-radius: 12px;
  --grc-gap: 20px;
  --grc-per-view: 1;
  margin: 48px 0;
  color: var(--grc-text);
}
@media (min-width: 768px)  { .grc { --grc-per-view: 2; } }
@media (min-width: 1100px) { .grc { --grc-per-view: 3; } }

.grc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 20px;
}
.grc__title { margin: 0; }

.grc__summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grc__score { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.grc__count, .grc__count a { color: var(--grc-muted); font-size: .9rem; }
.grc__count a:hover { text-decoration: underline; }

/* Estrellas con relleno proporcional (soporta medias, p. ej. 4,6) */
.grc__stars {
  --grc-size: 16px;
  display: inline-block;
  width: calc(var(--grc-size) * 5);
  height: var(--grc-size);
  background: linear-gradient(90deg, var(--grc-star) var(--grc-fill, 100%), var(--grc-star-empty) var(--grc-fill, 100%));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") repeat-x left center / var(--grc-size) var(--grc-size);
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E") repeat-x left center / var(--grc-size) var(--grc-size);
}
.grc__stars--lg { --grc-size: 22px; }

/* Carrusel */
.grc__viewport { position: relative; }
@media (min-width: 768px) { .grc__viewport { padding: 0 52px; } }
.grc__track {
  display: flex;
  gap: var(--grc-gap);
  margin: 0;
  padding: 4px 2px 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.grc__track::-webkit-scrollbar { display: none; }
.grc__track:focus-visible { box-shadow: 0 0 0 2px #1a73e8; border-radius: var(--grc-radius); }

.grc__slide {
  flex: 0 0 calc((100% - (var(--grc-per-view) - 1) * var(--grc-gap)) / var(--grc-per-view));
  scroll-snap-align: start;
  display: flex;
}
.grc__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 20px;
  background: var(--grc-card-bg);
  border: 1px solid var(--grc-card-border);
  border-radius: var(--grc-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.grc__author { display: flex; align-items: center; gap: 12px; }
.grc__avatar {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 50%;
  object-fit: cover;
}
.grc__avatar--initial {
  display: inline-flex; align-items: center; justify-content: center;
  background: #e8eaed; color: #5f6368; font-weight: 700; font-size: 1.1rem;
}
.grc__meta { display: flex; flex-direction: column; min-width: 0; }
.grc__name { font-weight: 600; color: var(--grc-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.grc__name:hover { text-decoration: underline; }
.grc__date { font-size: .8rem; color: var(--grc-muted); }

.grc__text {
  margin: 0;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.grc__card.is-expanded .grc__text { -webkit-line-clamp: unset; display: block; }
.grc__more {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: #1a73e8;
  font-size: .875rem;
  cursor: pointer;
}
.grc__more:hover { text-decoration: underline; }

.grc__source { margin-top: auto; font-size: .78rem; color: var(--grc-muted); }
.grc__source a { color: inherit; }
.grc__source a:hover { text-decoration: underline; }

/* Flechas */
.grc__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  margin-top: -20px;
  padding: 0;
  border: 1px solid var(--grc-card-border);
  border-radius: 50%;
  background: #fff;
  color: var(--grc-text);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  cursor: pointer;
  transition: opacity .2s;
}
.grc__nav--prev { left: 0; }
.grc__nav--next { right: 0; }
.grc__nav[disabled] { opacity: .35; cursor: default; }
@media (max-width: 767px) { .grc__nav { display: none; } }

/* Puntos */
.grc__dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.grc__dot {
  width: 8px; height: 8px; padding: 0;
  border: 0; border-radius: 50%;
  background: var(--grc-star-empty);
  cursor: pointer;
  transition: width .2s, background .2s;
}
.grc__dot[aria-selected="true"] { width: 22px; border-radius: 4px; background: var(--grc-text); }

.grc__cta { margin: 24px 0 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .grc__track { scroll-behavior: auto; }
}
