/* =============================================================================
   Google Reviews Carousel – front.css
   Modern card design, fully responsive, no external dependencies.
   ============================================================================= */

/* ── Variables ── */
:root {
  --gr-blue: #4285f4;
  --gr-blue-dark: #2a6dd9;
  --gr-yellow: #fbbc05;
  --gr-green: #34a853;
  --gr-red: #ea4335;
  --gr-star-empty: #e0e0e0;
  --gr-bg: #f0f4ff;
  --gr-card-bg: #ffffff;
  --gr-text-dark: #202124;
  --gr-text-mid: #3c4043;
  --gr-text-light: #6b7280;
  --gr-shadow: 0 4px 24px rgba(32, 33, 36, 0.09);
  --gr-shadow-hover: 0 14px 40px rgba(32, 33, 36, 0.18);
  --gr-radius: 20px;
  --gr-transition: 0.26s ease;
  /* Overridden at runtime by module settings */
  --gr-section-padding: 60px;
  --gr-section-bg: linear-gradient(160deg, #eef2ff 0%, #f8f9ff 55%, #fff 100%);
  --gr-title-size: 32px;
  --gr-text-size: 14px;
  --gr-card-padding: 26px 24px 22px;
}

/* ── Section ── */
.gr-section {
  padding: var(--gr-section-padding) 0 calc(var(--gr-section-padding) * 0.9);
  background: var(--gr-section-bg);
  overflow: hidden;
}

/* ── Header ── */
.gr-header {
  text-align: center;
  margin-bottom: 48px;
}

.gr-google-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: 100px;
  padding: 8px 20px 8px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: var(--gr-text-dark);
}

.gr-g-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.gr-badge-text {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.gr-badge-sep {
  color: #c0c0c0;
  margin: 0 2px;
}

.gr-badge-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  color: var(--gr-text-mid);
}

.gr-star-sm {
  width: 14px;
  height: 14px;
  fill: var(--gr-yellow);
  flex-shrink: 0;
}

.gr-badge-total {
  color: var(--gr-text-light);
  font-size: 0.82rem;
}

.gr-title {
  font-size: clamp(1.1rem, 2.5vw + 0.5rem, var(--gr-title-size));
  font-weight: 800;
  color: var(--gr-text-dark);
  margin: 0 0 12px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.gr-subtitle {
  font-size: 1rem;
  color: var(--gr-text-light);
  margin: 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ── Carousel wrapper ── */
.gr-carousel-wrapper {
  position: relative;
  padding: 0 56px;
}

/* ── Carousel viewport ── */
.gr-carousel {
  overflow: hidden;
  border-radius: 4px;
}

/* ── Track ── */
.gr-track {
  display: flex;
  /* transition set via JS */
}

/* ── Individual card outer ── */
.gr-card {
  box-sizing: border-box;
  padding: 10px 12px;
  /* flex and max-width set via JS */
}

/* ── Card inner (the visual card) ── */
.gr-card-inner {
  position: relative;
  background: var(--gr-card-bg);
  border-radius: var(--gr-radius);
  padding: var(--gr-card-padding);
  box-shadow: var(--gr-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 240px;
  overflow: hidden;
  transition:
    transform var(--gr-transition),
    box-shadow var(--gr-transition);
  border: 1px solid rgba(232, 234, 237, 0.6);
}

.gr-card-inner:hover {
  transform: translateY(-6px);
  box-shadow: var(--gr-shadow-hover);
}

/* ── Large decorative quote ── */
.gr-quote-deco {
  position: absolute;
  top: -12px;
  right: 22px;
  font-size: 110px;
  line-height: 1;
  color: #eef2ff;
  font-family: Georgia, "Times New Roman", serif;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ── Card header ── */
.gr-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.gr-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.gr-avatar-init {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gr-blue) 0%, var(--gr-green) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(66, 133, 244, 0.35);
  letter-spacing: 0;
}

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

.gr-author-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--gr-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gr-date {
  font-size: 0.78rem;
  color: var(--gr-text-light);
  display: block;
}

/* ── Star rating row ── */
.gr-stars-row {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.gr-star {
  width: 18px;
  height: 18px;
  fill: var(--gr-yellow);
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(251, 188, 5, 0.4));
}

.gr-star.gr-star-empty {
  fill: var(--gr-star-empty);
  filter: none;
}

.gr-rating-num {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gr-text-light);
  margin-left: 4px;
}

/* ── Review text ── */
.gr-text {
  font-size: var(--gr-text-size);
  line-height: 1.68;
  color: var(--gr-text-mid);
  margin: 0 0 6px;
  flex: 1;
  position: relative;
  z-index: 1;
}

.gr-text-empty {
  color: var(--gr-text-light);
}

/* ── Read more button ── */
.gr-read-more {
  background: none;
  border: none;
  padding: 4px 0 0;
  color: var(--gr-blue);
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: color var(--gr-transition);
  position: relative;
  z-index: 1;
}

.gr-read-more:hover {
  color: var(--gr-blue-dark);
  text-decoration: underline;
}

/* ── Google watermark ── */
.gr-watermark {
  position: absolute;
  bottom: 16px;
  right: 18px;
  opacity: 0.18;
  transition: opacity var(--gr-transition);
  z-index: 0;
}

.gr-watermark svg {
  width: 22px;
  height: 22px;
  display: block;
}

.gr-card-inner:hover .gr-watermark {
  opacity: 0.32;
}

/* ── Navigation arrows ── */
.gr-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gr-card-bg);
  border: 1px solid #e0e3eb;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition:
    background var(--gr-transition),
    border-color var(--gr-transition),
    box-shadow var(--gr-transition),
    color var(--gr-transition);
  color: var(--gr-text-dark);
  padding: 0;
  line-height: 1;
}

.gr-nav svg {
  width: 20px;
  height: 20px;
  display: block;
}

.gr-nav:hover:not(:disabled) {
  background: var(--gr-blue);
  border-color: var(--gr-blue);
  color: #fff;
  box-shadow: 0 6px 22px rgba(66, 133, 244, 0.38);
}

.gr-nav:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  box-shadow: none;
}

.gr-prev {
  left: 0;
}
.gr-next {
  right: 0;
}

/* ── Dots ── */
.gr-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
}

.gr-dot {
  width: 8px;
  height: 8px;
  border-radius: 100px;
  background: #d1d5db;
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    background var(--gr-transition),
    width var(--gr-transition),
    transform var(--gr-transition);
  flex-shrink: 0;
}

.gr-dot:hover {
  background: #9ca3af;
}

.gr-dot.active {
  background: var(--gr-blue);
  width: 24px;
  border-radius: 100px;
}

/* ── CTA button ── */
.gr-cta {
  text-align: center;
  margin-top: 36px;
}

.gr-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: #fff;
  color: #3c4043;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid #dadce0;
  border-radius: 100px;
  text-decoration: none;
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  cursor: pointer;
}

.gr-cta-btn:hover {
  box-shadow: 0 2px 12px rgba(66, 133, 244, 0.18);
  border-color: var(--gr-blue);
  background: #f8fbff;
  color: #1a1a1a;
  text-decoration: none;
}

.gr-cta-g {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.gr-cta-arrow {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--gr-blue);
  transition: transform 0.2s ease;
}

.gr-cta-btn:hover .gr-cta-arrow {
  transform: translateX(3px);
}

/* =============================================================================
   Responsive
   ============================================================================= */

@media (max-width: 1199px) {
  /* clamp() on .gr-title handles font-size scaling automatically */
}

@media (max-width: 991px) {
  .gr-section {
    padding: calc(var(--gr-section-padding) * 0.75) 0
      calc(var(--gr-section-padding) * 0.65);
  }
  .gr-carousel-wrapper {
    padding: 0 46px;
  }
}

@media (max-width: 767px) {
  .gr-section {
    padding: calc(var(--gr-section-padding) * 0.6) 0
      calc(var(--gr-section-padding) * 0.5);
  }
  .gr-carousel-wrapper {
    padding: 0 42px;
  }
  .gr-nav {
    width: 38px;
    height: 38px;
  }
  .gr-card {
    padding: 8px;
  }
  .gr-card-inner {
    padding: 18px 16px 16px;
  }
}

@media (max-width: 575px) {
  .gr-section {
    padding: calc(var(--gr-section-padding) * 0.5) 0
      calc(var(--gr-section-padding) * 0.42);
  }
  .gr-carousel-wrapper {
    padding: 0 38px;
  }
  .gr-subtitle {
    font-size: 0.9rem;
  }
  .gr-nav {
    width: 34px;
    height: 34px;
  }
  .gr-nav svg {
    width: 16px;
    height: 16px;
  }
  .gr-card-inner {
    min-height: 200px;
    padding: 14px 14px 14px;
  }
  .gr-dots {
    gap: 6px;
  }
}

/* =============================================================================
   Print: hide navigation
   ============================================================================= */

@media print {
  .gr-nav,
  .gr-dots,
  .gr-cta {
    display: none !important;
  }
  .gr-carousel {
    overflow: visible !important;
  }
  .gr-track {
    flex-wrap: wrap;
    transform: none !important;
  }
  .gr-card {
    flex: 0 0 33.333% !important;
    page-break-inside: avoid;
  }
}
