/* =========================================
   GOOGLE REVIEWS – HOME SECTION (NO FRECCE)
   File: home-google.css
   Namespace: .vr-gr*
   BASE NUOVA:
   - la LARGHEZZA è comandata dall’immagine
   - l’ALTEZZA è naturale (NON fissata)
   - responsive rimodulato su questa logica
========================================= */

.vr-gr {
  /* larghezza card DESKTOP */
  --vr-gr-card: 420px;
  --vr-gr-gap: 18px;

  background: #ffffff;
  padding: 48px 16px;
  border-top: 10px solid #4285f4;
  border-bottom: 10px solid #4285f4;
}

.vr-gr__container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================= HEADER ================= */

.vr-gr__header {
  text-align: center;
  margin: 0 0 clamp(28px, 4vw, 40px);
  color: #202124;
}

.vr-gr__eyebrow {
  display: inline-block;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5f6368;
  margin-bottom: 6px;
}

.vr-gr__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
  margin: 0 0 8px;
  color: #202124;
}

.vr-gr__subtitle {
  margin: 0;
  font-size: 16px;
  color: #5f6368;
}

/* ================= BRAND ================= */

.vr-gr__brandwrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #f1f3f4;
  border: 1px solid #dadce0;
}

.vr-gr__gicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid #dadce0;
}

.vr-gr__g {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
}

.g--b { color: #4285f4; }

.vr-gr__brand-text {
  font-weight: 700;
  font-size: 14px;
  color: #202124;
}

.vr-gr__rating,
.vr-gr__rating small {
  font-weight: 800;
  font-size: 14px;
  color: #fbbc05;
}

.vr-gr__rating {
  color: #000;
}

/* ================= CAROUSEL ================= */

.vr-gr__carousel-wrapper {
  margin: 0 auto;
  max-width: 1600px;
}

.vr-gr__carousel {
  display: flex;
  gap: var(--vr-gr-gap);
  overflow-x: auto;
  overflow-y: hidden;

  /* spazio per centrare prima/ultima card */
  padding-inline: calc(50% - (var(--vr-gr-card) / 2));
  padding-bottom: 6px;

  cursor: grab;

  scroll-snap-type: x proximity;
  scroll-behavior: auto;

  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;
  -ms-overflow-style: none;

  contain: paint;
  will-change: scroll-position;
}

.vr-gr__carousel::-webkit-scrollbar {
  display: none;
}

.vr-gr__carousel:active {
  cursor: grabbing;
}

/* ================= SLIDE ================= */

/* la slide segue l’immagine */
.vr-gr__slide {
  flex: 0 0 auto;
  width: var(--vr-gr-card);
  scroll-snap-align: center;
  transform: translateZ(0);
}

/* ================= CARD ================= */

.vr-gr__link {
  display: block;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dadce0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.vr-gr__link:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

/* ================= IMAGE ================= */
/* BASE DEFINITIVA: LARGHEZZA FISSA, ALTEZZA NATURALE */

.vr-gr__image {
  display: block;
  width: 100%;
  max-width: var(--vr-gr-card);
  height: auto;
  object-fit: contain;
  background: #ffffff;
}

/* ================= OVERLAY ================= */

.vr-gr__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
  color: #202124;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.vr-gr__link:hover .vr-gr__overlay {
  opacity: 1;
  pointer-events: auto;
}

/* ================= CTA ================= */

.vr-gr__cta {
  text-align: center;
  margin-top: clamp(24px, 4vw, 32px);
}

.vr-gr__btn {
  font-size: 14px;
  padding-inline: 26px;
  background: #4285f4;
  color: #ffffff;
  border: none;
  transition: .15s ease !important;
}

.vr-gr__btn:hover {
  background: #2a6bd5;
  color: #fff;
}

/* =========================================
   RESPONSIVE — ORA COERENTE CON IMMAGINE
========================================= */

/* Tablet */
@media (max-width: 899px) {
  .vr-gr {
    --vr-gr-card: 360px;
  }

  .vr-gr__carousel {
    padding-inline: calc(50% - (var(--vr-gr-card) / 2));
  }
}

/* Mobile */
@media (max-width: 599px) {
  .vr-gr {
    --vr-gr-card: 85vw;
    --vr-gr-gap: 14px;
    padding: 40px 0;
  }

  .vr-gr__header {
    margin-bottom: 24px;
  }

  .vr-gr__title {
    font-size: 24px;
  }

  .vr-gr__subtitle {
    font-size: 14px;
  }

  .vr-gr__brandwrap {
    margin-top: 12px;
    padding: 5px 12px;
  }

  .vr-gr__carousel {
    padding-inline: calc(50% - (var(--vr-gr-card) / 2));
  }

  .vr-gr__btn {
    font-size: 13px;
    padding: 11px 20px;
  }
}
