/* ─── EWT Google Reviews ──────────────────────────────────────────────────── */

.ewt-gr {
  position: relative;
  overflow-x: hidden; /* clip the infinite track at the section level */
}

/* ── Section Header ───────────────────────────────────────────────────────── */
.ewt-gr__section-head {
  text-align: center;
  margin-bottom: 2.75rem;
}

.ewt-gr__eyebrow {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ewt-accent);
  margin: 0 0 0.875rem;
}

.ewt-gr__headline {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--ewt-text-primary);
  line-height: 1.18;
  margin: 0 0 0.875rem;
}

.ewt-gr__sub {
  font-size: 1.0625rem;
  color: var(--ewt-text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Combined Rating Badge ────────────────────────────────────────────────── */
.ewt-gr__badges {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.ewt-gr__badge {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  background: var(--ewt-card);
  border: 1px solid var(--ewt-border);
  border-radius: var(--radius-lg, 16px);
  padding: 1.25rem 2rem;
  box-shadow: var(--shadow-card, 0 4px 20px rgba(0,0,0,0.04));
}

.ewt-gr__badge-g {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ewt-gr__badge-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ewt-gr__badge-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ewt-text-primary);
  margin: 0;
  line-height: 1.3;
}

.ewt-gr__badge-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ewt-gr__badge-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--ewt-text-primary);
  line-height: 1;
}

.ewt-gr__badge-count {
  font-size: 0.8125rem;
  color: var(--ewt-text-muted);
  margin: 0;
}

/* ── Carousel ─────────────────────────────────────────────────────────────── */

/* clip-path ensures clipping even when parent containers have overflow:visible */
.ewt-gr__carousel-wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  overflow: hidden;
}

.ewt-gr__track {
  display: grid;
  grid-template-areas: "stack";
  width: 100%;
  position: relative;
}

.ewt-gr__page {
  grid-area: stack;
  display: flex;
  justify-content: center; /* Center-align cards if there are fewer than 4 */
  align-items: flex-start; /* Allows individual height expansion */
  gap: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
  pointer-events: none;
  width: 100%;
}

.ewt-gr__page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Card sizing on desktop (4 columns) */
.ewt-gr__page .ewt-gr__card {
  flex: 0 0 calc((100% - 60px) / 4) !important;
  width: calc((100% - 60px) / 4) !important;
  min-width: calc((100% - 60px) / 4) !important;
  height: auto !important;
  min-height: 240px;
  box-sizing: border-box;
  padding: 1.25rem; /* beautiful spacing for wider cards */
}

@media (max-width: 1023px) {
  /* Card sizing on tablet (2 columns) */
  .ewt-gr__page .ewt-gr__card {
    flex: 0 0 calc((100% - 20px) / 2) !important;
    width: calc((100% - 20px) / 2) !important;
    min-width: calc((100% - 20px) / 2) !important;
  }
}

@media (max-width: 599px) {
  /* Card sizing on mobile (1 column) */
  .ewt-gr__page .ewt-gr__card {
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;
  }

  /* Pull carousel out of container gutter and replace with exactly 20px sides */
  .ewt-gr__carousel-wrap {
    margin-left: calc(-1 * clamp(1rem, 5vw, 2.5rem)) !important;
    margin-right: calc(-1 * clamp(1rem, 5vw, 2.5rem)) !important;
    padding-left: 20px;
    padding-right: 20px;
    max-width: none !important;
  }
}

/* ── Review Card ──────────────────────────────────────────────────────────── */
.ewt-gr__card {
  background: var(--ewt-card);
  border: 1px solid var(--ewt-border);
  border-radius: var(--radius-lg, 16px);
  padding: 1.375rem;
  box-shadow: var(--shadow-card, 0 4px 20px rgba(0,0,0,0.04));
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  transition:
    box-shadow var(--duration-base, 0.25s) ease,
    transform  var(--duration-base, 0.25s) ease;
}

.ewt-gr__card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);
  transform: translateY(-2px);
}

/* Card Top Row */
.ewt-gr__card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.ewt-gr__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}

/* Avatar */
.ewt-gr__avatar-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--ewt-surface, #F0EFED);
}

.ewt-gr__avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ewt-gr__avatar-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

/* Author Info */
.ewt-gr__author-info {
  min-width: 0;
}

.ewt-gr__author-name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ewt-text-primary);
  margin: 0 0 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ewt-gr__author-date {
  font-size: 0.8125rem;
  color: var(--ewt-text-muted);
  margin: 0;
}

.ewt-gr__card-g {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  opacity: 0.85;
}

/* ── Stars ────────────────────────────────────────────────────────────────── */
.ewt-gr__stars {
  display: flex;
  gap: 2px;
}

.ewt-gr__star {
  font-size: 18px !important;
  line-height: 1;
  user-select: none;
}

.ewt-gr__star--filled  { color: var(--ewt-warning, #F59C00); }
.ewt-gr__star--empty   { color: var(--ewt-border-strong, #D0CFCC); }

.ewt-gr__stars--sm .ewt-gr__star { font-size: 16px !important; }

/* ── Review Text ──────────────────────────────────────────────────────────── */
.ewt-gr__text-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.ewt-gr__text {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ewt-text-body);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ewt-gr__text--open {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.ewt-gr__expand {
  display: none;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ewt-accent);
  cursor: pointer;
  line-height: 1.4;
  text-align: left;
}

.ewt-gr__expand:hover {
  text-decoration: underline;
}

/* ── Attribution Footer ───────────────────────────────────────────────────── */
.ewt-gr__attribution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 2.5rem;
  opacity: 0.6;
}

.ewt-gr__attribution-label {
  font-size: 0.8125rem;
  color: var(--ewt-text-muted);
}

/* ── Reduced motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ewt-gr__carousel-wrap {
    overflow: visible;
    clip-path: none;
  }
  .ewt-gr__track {
    flex-wrap: wrap;
    transition: none !important;
    transform: none !important;
  }
  .ewt-gr__track .ewt-gr__card {
    flex: 0 0 calc(33.333% - 16px) !important;
    min-width: 0 !important;
    margin-bottom: 1.25rem;
  }
}
