/**
 * Google Reviews Carousel - Estilos.
 *
 * Los colores y tamaños principales son variables para que cada sitio los
 * ajuste desde su tema sin tocar el plugin.
 */
.gr-carousel-wrapper,
.gr-carousel-wrapper *,
.gr-top-bar,
.gr-top-bar * {
  box-sizing: border-box;
}

.gr-carousel-wrapper {
  --gr-star: #f5a623;
  --gr-star-off: #e5e7eb;
  --gr-card-bg: #ffffff;
  --gr-card-border: #e5e7eb;
  --gr-card-radius: 8px;
  --gr-card-shadow: none;
  --gr-card-padding: 24px 26px;
  --gr-text: #1a1a1a;
  --gr-muted: #888888;
  --gr-name: #111111;
  --gr-gap: 20px;
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

/* --- INSIGNIA DE CALIFICACIÓN --- */
.gr-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 14px;
  width: 100%;
  padding-right: 6px;
}

.gr-top-bar--left {
  justify-content: flex-start;
}

.gr-top-bar--center {
  justify-content: center;
}

.gr-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  text-decoration: none;
}

.gr-top-badge-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gr-top-badge-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gr-top-badge-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gr-top-badge-score {
  font-size: 15.5px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}

.gr-top-badge-sub {
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

/* Insignia apilada: número grande, estrellas y texto. */
.gr-top-badge--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.gr-top-badge--stacked .gr-top-badge-score {
  font-size: 30px;
  font-weight: 700;
  line-height: 45px;
  color: #242424;
}

.gr-top-badge--stacked .gr-star {
  width: 16px;
  height: 16px;
}

.gr-top-badge--stacked .gr-top-badge-sub {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.8px;
  line-height: 19.2px;
  color: #777777;
}

/* Área del slider */
.gr-carousel-slider-area {
  position: relative;
  width: 100%;
}

/* Pista deslizable */
.gr-carousel-track {
  display: flex;
  gap: var(--gr-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding: 10px 4px 20px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.gr-carousel-track::-webkit-scrollbar {
  display: none;
}

/* 3 columnas en desktop */
.gr-carousel-item {
  flex: 0 0 calc((100% - 2 * var(--gr-gap)) / 3);
  min-width: 280px;
  scroll-snap-align: start;
  display: flex;
}

/* 2 columnas en tablets */
@media (max-width: 992px) {
  .gr-carousel-item {
    flex: 0 0 calc((100% - var(--gr-gap)) / 2);
  }
}

/* 1 columna en móviles */
@media (max-width: 640px) {
  .gr-carousel-item {
    flex: 0 0 100%;
    min-width: unset;
  }
}

/* Tarjeta */
.gr-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background-color: var(--gr-card-bg);
  border: 1px solid var(--gr-card-border);
  border-radius: var(--gr-card-radius);
  box-shadow: var(--gr-card-shadow);
  padding: var(--gr-card-padding);
  font-family: inherit;
  color: var(--gr-text);
  overflow-wrap: break-word;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}

@media (hover: hover) {
  .gr-layout-classic .gr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.03);
    border-color: #d1d5db;
  }
}

.gr-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.gr-stars {
  display: flex;
  gap: 3px;
}

.gr-star {
  width: 17px;
  height: 17px;
  fill: var(--gr-star, #f5a623);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gr-star--off {
  fill: var(--gr-star-off, #e5e7eb);
}

@media (hover: hover) {
  .gr-layout-classic .gr-card:hover .gr-star:nth-child(1) { transform: scale(1.2) rotate(-6deg); transition-delay: 0.02s; }
  .gr-layout-classic .gr-card:hover .gr-star:nth-child(2) { transform: scale(1.2) rotate(-3deg); transition-delay: 0.06s; }
  .gr-layout-classic .gr-card:hover .gr-star:nth-child(3) { transform: scale(1.2) rotate(0deg);  transition-delay: 0.10s; }
  .gr-layout-classic .gr-card:hover .gr-star:nth-child(4) { transform: scale(1.2) rotate(3deg);  transition-delay: 0.14s; }
  .gr-layout-classic .gr-card:hover .gr-star:nth-child(5) { transform: scale(1.2) rotate(6deg);  transition-delay: 0.18s; }
}

.gr-google-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .gr-card:hover .gr-google-icon {
    transform: rotate(12deg) scale(1.18);
  }
}

.gr-quote {
  flex-grow: 1;
  font-size: 15px;
  line-height: 1.55;
  color: var(--gr-text);
  margin: 0 0 24px 0;
  font-weight: 400;
}

.gr-divider {
  border: 0;
  height: 1px;
  background-color: #ededed;
  margin: 0 0 18px 0;
}

.gr-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gr-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #f5a623;
  color: #111111;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.gr-avatar--photo {
  background-color: #e5e7eb;
}

.gr-avatar--photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: hover) {
  .gr-card:hover .gr-avatar {
    transform: scale(1.05);
  }
}

.gr-author-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gr-name);
  text-decoration: none;
}

a.gr-author-name:hover,
a.gr-author-name:focus {
  text-decoration: underline;
}

/* --- TARJETA CON EL AUTOR ARRIBA --- */
.gr-card--author-top .gr-author {
  gap: 13px;
}

.gr-card--author-top .gr-avatar {
  width: 48px;
  height: 48px;
}

.gr-author-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gr-card--author-top .gr-quote {
  flex-grow: 0;
  margin: 20px 0;
}

.gr-source {
  margin: auto 0 0;
  font-size: 10px;
  line-height: 15px;
  color: var(--gr-muted);
}

/* Botones de navegación */
.gr-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.25s ease;
  padding: 0;
}

.gr-nav:hover {
  background-color: #f9fafb;
  border-color: #cbd5e1;
  color: #111827;
  transform: translateY(-50%) scale(1.08);
}

.gr-nav-prev {
  left: -20px;
}

.gr-nav-next {
  right: -20px;
}

/* Sin flechas cuando todas las reseñas entran en pantalla (lo marca el JS). */
.gr-carousel-wrapper.is-static .gr-nav {
  display: none;
}

@media (max-width: 640px) {
  .gr-nav-prev {
    left: -10px;
  }
  .gr-nav-next {
    right: -10px;
  }
  .gr-card {
    padding: 20px 18px;
  }
  .gr-quote {
    font-size: 14px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gr-carousel-track {
    scroll-behavior: auto;
  }
  .gr-card,
  .gr-star,
  .gr-avatar,
  .gr-google-icon {
    transition: none;
  }
}
