/* -------------------------------------------------------------
   AVALIAÇÕES DO GOOGLE (google-reviews.css) - BNMA Advocacia
   Selo do hero, vitrine da home e página /avaliacoes.
   Dados vindos de api/reviews.php (plugin próprio, sem Elfsight).
   ------------------------------------------------------------- */

:root {
  --gr-star: #FBBC04;
  --gr-star-off: rgba(255, 255, 255, 0.18);
  --gr-card-bg: var(--white);
  --gr-card-bg-hover: var(--white);
  --gr-card-border: rgba(11, 12, 14, 0.08);
  --gr-card-border-hover: rgba(11, 12, 14, 0.16);
  --gr-name: var(--text-main-light);
  --gr-text: #3A3F47;
  --gr-muted: #6B7280;
  --gr-reply-bg: var(--gray-light);
  --gr-ring: var(--lead-deep);
}

.gr-theme-light {
  --gr-star-off: rgba(11, 12, 14, 0.14);
  --gr-card-bg: var(--white);
  --gr-card-bg-hover: var(--white);
  --gr-card-border: rgba(11, 12, 14, 0.08);
  --gr-card-border-hover: rgba(11, 12, 14, 0.16);
  --gr-name: var(--text-main-light);
  --gr-text: #3A3F47;
  --gr-muted: #6B7280;
  --gr-reply-bg: var(--gray-light);
  --gr-ring: var(--white);
}

/* ---------- Primitivas ---------- */
.gr-stars {
  display: inline-flex;
  gap: 2px;
  line-height: 0;
}

.gr-stars svg {
  width: var(--gr-star-size, 16px);
  height: var(--gr-star-size, 16px);
  fill: var(--gr-star-off);
}

.gr-stars svg.on {
  fill: var(--gr-star);
}

.gr-g {
  width: var(--gr-g-size, 18px);
  height: var(--gr-g-size, 18px);
  flex-shrink: 0;
  display: block;
}

.gr-avatar {
  --gr-size: 44px;
  position: relative;
  width: var(--gr-size);
  height: var(--gr-size);
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--lead-light);
}

.gr-avatar img,
.gr-avatar__ini {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.gr-avatar img {
  object-fit: cover;
}

.gr-avatar__ini {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gr-tone, #2F333B);
  color: var(--white);
  font-size: calc(var(--gr-size) * 0.38);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Selo do hero (estilo "prova social") ---------- */
.gr-badge {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "faces brand"
    "count count";
  align-items: center;
  column-gap: 0.9rem;
  row-gap: 0.35rem;
  padding: 0.7rem 1.15rem 0.6rem 0.75rem;
  background: rgba(22, 24, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition: transform var(--t-snappy), background-color var(--t-snappy), border-color var(--t-snappy);
}

.gr-badge:hover {
  background: rgba(35, 38, 43, 0.8);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-2px);
}

.gr-badge:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.gr-badge__faces {
  grid-area: faces;
  display: flex;
  align-items: center;
  padding-left: 10px;
}

.gr-face {
  width: 40px;
  height: 40px;
  margin-left: -10px;
  border-radius: 50%;
  border: 2px solid rgba(22, 24, 28, 0.95);
  object-fit: cover;
  background: var(--lead-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.35s var(--ease-premium), opacity 0.35s var(--ease-premium);
}

.gr-face.is-swapping {
  opacity: 0;
  transform: scale(0.7);
}

.gr-badge__brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  --gr-g-size: 20px;
  --gr-star-size: 15px;
}

.gr-badge__brand .gr-stars svg.on {
  filter: drop-shadow(0 0 4px rgba(251, 188, 4, 0.35));
}

.gr-badge__rating {
  color: var(--white);
  font-weight: 700;
  font-size: 0.9rem;
}

.gr-badge__count {
  grid-area: count;
  text-align: center;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
}

.gr-badge__count strong {
  color: var(--white);
  font-weight: 700;
}

/* ---------- Card de avaliação ---------- */
.gr-card {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.6rem 1.6rem 1.5rem;
  background: var(--gr-card-bg);
  border: 1px solid var(--gr-card-border);
  border-radius: 14px;
  transition: transform var(--t-smooth), border-color var(--t-smooth), background-color var(--t-smooth), box-shadow var(--t-smooth);
}

.gr-card:hover {
  background: var(--gr-card-bg-hover);
  border-color: var(--gr-card-border-hover);
  transform: translateY(-3px);
}

.gr-theme-light .gr-card {
  box-shadow: 0 1px 2px rgba(11, 12, 14, 0.04);
}

.gr-theme-light .gr-card:hover {
  box-shadow: 0 14px 34px rgba(11, 12, 14, 0.08);
}

.gr-card__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.gr-card__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.gr-card__name {
  color: var(--gr-name);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.gr-card__name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gr-card__meta {
  font-size: 0.8rem;
  color: var(--gr-muted);
}

.gr-card__source {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  --gr-g-size: 16px;
  flex-shrink: 0;
}

.gr-theme-light .gr-card__source {
  box-shadow: 0 0 0 1px rgba(11, 12, 14, 0.08);
}

.gr-card__text {
  color: var(--gr-text);
  font-size: 0.95rem;
  line-height: 1.65;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.gr-card__more {
  display: inline;
  margin-left: 0.25rem;
  color: var(--gr-name);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gr-card__reply {
  margin-top: 0.2rem;
  padding: 0.85rem 1rem;
  background: var(--gr-reply-bg);
  border-left: 2px solid var(--gr-card-border-hover);
  border-radius: 0 8px 8px 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--gr-muted);
}

.gr-card__reply strong {
  display: block;
  color: var(--gr-name);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

/* ---------- Vitrine da home ---------- */
.gr-showcase {
  margin: -1rem 0 3rem;
}

.gr-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  padding: 1.4rem 1.75rem;
  margin-bottom: 1.75rem;
  background: var(--white);
  border: 1px solid rgba(11, 12, 14, 0.08);
  border-radius: 16px;
}

.gr-summary__score {
  display: flex;
  align-items: center;
  gap: 1rem;
  --gr-g-size: 34px;
  --gr-star-size: 18px;
}

.gr-summary__num {
  font-size: 2.6rem;
  line-height: 1;
  color: var(--text-main-light);
  font-weight: 600;
}

.gr-summary__label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: #6B7280;
}

.gr-summary__label strong {
  color: var(--text-main-light);
}

.gr-summary__faces {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.85rem;
  color: var(--gray-text);
}

.gr-stack {
  display: flex;
  padding-left: 10px;
}

.gr-stack .gr-avatar {
  margin-left: -10px;
  box-shadow: 0 0 0 2px var(--gr-ring);
}

.gr-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, calc((100% - 3rem) / 3));
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 2px;
  padding: 4px 2px 1.25rem;
  scrollbar-width: none;
  align-items: start;
  overscroll-behavior-x: contain;
}

.gr-rail::-webkit-scrollbar {
  display: none;
}

.gr-rail > .gr-card {
  scroll-snap-align: start;
  min-height: 100%;
}

.gr-rail-nav {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.gr-rail-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--t-snappy), border-color var(--t-snappy), opacity var(--t-snappy);
}

.gr-rail-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}

.gr-rail-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.gr-rail-btn svg {
  width: 18px;
  height: 18px;
}

.gr-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.gr-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.05rem 1.8rem;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  min-height: 52px;
  transition: background-color var(--t-snappy), border-color var(--t-snappy), transform var(--t-snappy);
  --gr-g-size: 18px;
}

.gr-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.gr-theme-light .gr-btn-ghost {
  color: var(--text-main-light);
  border-color: rgba(11, 12, 14, 0.18);
}

.gr-theme-light .gr-btn-ghost:hover {
  background: rgba(11, 12, 14, 0.04);
  border-color: rgba(11, 12, 14, 0.35);
}

/* ---------- Página /avaliacoes ---------- */
.grp-hero {
  position: relative;
  overflow: hidden;
  padding: 9.5rem 0 5.5rem;
  background:
    radial-gradient(ellipse 60% 70% at 12% 30%, rgba(35, 38, 43, 0.8) 0%, transparent 70%),
    radial-gradient(circle at 88% 60%, rgba(251, 188, 4, 0.05) 0%, transparent 55%),
    var(--lead-deep);
  border-bottom: 1px solid var(--lead-border);
}

.grp-hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.grp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray-text);
  margin-bottom: 1.4rem;
  --gr-g-size: 16px;
}

.grp-title {
  font-size: 3.2rem;
  line-height: 1.12;
  color: var(--white);
  margin-bottom: 1.4rem;
}

.grp-lead {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--gray-text);
  max-width: 540px;
  margin-bottom: 2.2rem;
}

.grp-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.grp-cta .btn-primary {
  --gr-g-size: 18px;
}

.grp-score {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem 2rem 1.75rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.grp-score__top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--lead-border);
  --gr-star-size: 20px;
}

.grp-score__num {
  font-size: 4.2rem;
  line-height: 0.9;
  color: var(--white);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.grp-score__meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--gray-text);
}

.grp-score__meta strong {
  color: var(--white);
}

.grp-score__g {
  margin-left: auto;
  align-self: flex-start;
  --gr-g-size: 30px;
}

.grp-bars {
  display: grid;
  gap: 0.5rem;
  padding: 1.4rem 0 0.25rem;
}

.grp-bar {
  display: grid;
  grid-template-columns: 1.6rem 1fr 3.2rem;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--gray-text);
}

.grp-bar__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.grp-bar__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--gr-star);
  transition: width 1.2s var(--ease-premium);
}

.grp-bar__count {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.grp-wall {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.4rem;
  font-size: 0.86rem;
  color: var(--gray-text);
}

.grp-wall .gr-stack {
  --gr-ring: #1B1D21;
}

/* Lista */
.grp-list {
  background: var(--gray-light);
  padding: 4.5rem 0 6rem;
  color: var(--text-main-light);
}

.grp-list__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.grp-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 2.25rem;
}

.grp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  flex: 1 1 520px;
}

.grp-chips::-webkit-scrollbar {
  display: none;
}

.grp-chip {
  flex-shrink: 0;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 12, 14, 0.12);
  background: var(--white);
  color: var(--gray-dark);
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background-color var(--t-snappy), color var(--t-snappy), border-color var(--t-snappy);
}

.grp-chip span {
  opacity: 0.55;
  margin-left: 0.2rem;
}

.grp-chip:hover {
  border-color: rgba(11, 12, 14, 0.3);
}

.grp-chip[aria-pressed="true"] {
  background: var(--lead-deep);
  border-color: var(--lead-deep);
  color: var(--white);
}

.grp-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.grp-search,
.grp-select {
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(11, 12, 14, 0.12);
  background: var(--white);
  color: var(--text-main-light);
  font: inherit;
  font-size: 0.88rem;
  padding: 0 0.85rem;
}

.grp-search {
  width: 220px;
  padding-left: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px;
  background-position: 0.75rem center;
}

.grp-search:focus,
.grp-select:focus,
.grp-chip:focus-visible {
  outline: 2px solid var(--lead-deep);
  outline-offset: 1px;
}

.grp-grid {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.grp-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.grp-col > .gr-card {
  animation: gr-in 0.7s var(--ease-premium) both;
}

@keyframes gr-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.gr-skeleton {
  height: 190px;
  border-radius: 14px;
  background: linear-gradient(100deg, rgba(11, 12, 14, 0.05) 30%, rgba(11, 12, 14, 0.09) 50%, rgba(11, 12, 14, 0.05) 70%);
  background-size: 300% 100%;
  animation: gr-shimmer 1.4s linear infinite;
}

@keyframes gr-shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}

.grp-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
  text-align: center;
}

.grp-status {
  font-size: 0.85rem;
  color: var(--gr-muted);
}

.grp-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gr-muted);
}

.grp-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--gr-muted);
  --gr-g-size: 14px;
}

.grp-note a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* CTA final */
.grp-final {
  background: linear-gradient(to bottom, var(--lead-deep), #000);
  padding: 6rem 2rem;
  text-align: center;
}

.grp-final h2 {
  font-size: 2.4rem;
  color: var(--white);
  margin-bottom: 1rem;
}

.grp-final p {
  color: var(--gray-text);
  max-width: 560px;
  margin: 0 auto 2.2rem;
}

[data-gr-page] [hidden] {
  display: none !important;
}

.grp-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.grp-bar__label svg {
  width: 11px;
  height: 11px;
  fill: var(--gr-star);
}

.grp-more {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 1rem 2rem;
  border-radius: var(--radius-btn);
  background: var(--lead-deep);
  color: var(--white);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  transition: background-color var(--t-snappy), transform var(--t-snappy), opacity var(--t-snappy);
}

.grp-more:hover:not(:disabled) {
  background: var(--lead-light);
  transform: translateY(-2px);
}

.grp-more:disabled {
  opacity: 0.55;
  cursor: progress;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1024px) {
  .gr-rail {
    grid-auto-columns: minmax(300px, calc((100% - 1.5rem) / 2));
  }

  .grp-hero__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .grp-score {
    max-width: 520px;
  }
}

@media (max-width: 968px) {
  .gr-badge {
    align-self: center;
  }
}

@media (max-width: 768px) {
  .gr-summary {
    padding: 1.2rem;
  }

  .gr-summary__num {
    font-size: 2.2rem;
  }

  .gr-rail {
    grid-auto-columns: 86%;
    gap: 1rem;
  }

  .gr-card {
    padding: 1.35rem;
  }

  .grp-hero {
    padding: 7.5rem 0 3.5rem;
  }

  .grp-hero__inner,
  .grp-list__inner {
    padding: 0 1rem;
  }

  .grp-title {
    font-size: 2.2rem;
  }

  .grp-lead {
    font-size: 0.98rem;
  }

  .grp-cta > * {
    flex: 1 1 100%;
    max-width: none;
    justify-content: center;
  }

  .grp-score {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .grp-score__num {
    font-size: 3.4rem;
  }

  .grp-list {
    padding: 2.5rem 0 4rem;
  }

  .grp-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -1rem;
    padding: 0 1rem;
    flex-basis: 100%;
  }

  .grp-controls {
    width: 100%;
  }

  .grp-search {
    flex: 1 1 100%;
    width: auto;
    min-width: 0;
  }

  .grp-select {
    flex: 1 1 0;
    min-width: 0;
  }

  .gr-actions > * {
    flex: 1 1 100%;
    max-width: 360px;
    justify-content: center;
  }

  .grp-grid,
  .grp-col {
    gap: 1rem;
  }

  .grp-final h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 400px) {
  .gr-badge {
    padding: 0.6rem 0.9rem 0.55rem 0.6rem;
    column-gap: 0.6rem;
  }

  .gr-face {
    width: 34px;
    height: 34px;
  }

  .gr-badge__brand {
    --gr-star-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gr-skeleton,
  .grp-col > .gr-card {
    animation: none;
  }
}
