.home-ratings-section {
  position: relative;
  width: var(--vw);
  margin-left: 50%;
  transform: translateX(-50%);
  padding: clamp(4rem, 6.7vw, 6rem) 0;
  background: #fff;
  overflow: hidden;
}

/* ── Header ─────────────────────────────────────────── */
.home-ratings-section__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  margin: 0 auto clamp(2.5rem, 4vw, 3rem);
  padding: 0 var(--container-padding, 1.5rem);
  max-width: 80.625rem; /* ~1290px */
}

.home-ratings-section__logos {
  display: flex;
  align-items: center;
  gap: 1.875rem; /* 30px */
}

.home-ratings-section__logo {
  display: block;
  object-fit: contain;
}

.home-ratings-section__logo--google {
  width: 6.875rem;  /* 110px */
  height: 4.625rem; /* 74px */
}

.home-ratings-section__logo--yelp {
  width: 3.625rem;  /* 58px */
  height: 3.25rem;  /* 52px */
  border-radius: 0.375rem; /* 6px */
  object-fit: cover;
}

.home-ratings-section__title {
  font-family: "Nunito", sans-serif;
  font-size: clamp(2rem, 3.4vw, 2.9375rem); /* 47px */
  font-weight: 400;
  line-height: 1.1;
  color: #4a5565;
  margin: 0;
}

.home-ratings-section__subtitle {
  font-family: "Nunito", sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.1875rem);
  font-weight: 400;
  line-height: 1.7;
  color: #4a5565;
  margin: 0;
}

/* ── Oversized marquee container (breaks viewport) ── */
.home-ratings-section__marquee-wrap {
  width: min(80.625rem, calc(100% - 3rem));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.home-ratings-section__row {
  overflow: visible;
}

.home-ratings-section__track {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
}

/* ── Review card ─────────────────────────────────────── */
.home-ratings-section__card {
  flex: 0 0 29.375rem;   /* 470px */
  min-height: 19.0625rem;/* 305px */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.875rem;     /* 30px */
  background: #fff4f6;
  border: 2px solid #e5e7eb;
  border-radius: 1.5rem; /* 24px */
  box-sizing: border-box;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .home-ratings-section__card:hover,
  .home-ratings-section__card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 16px 28px rgba(16, 24, 40, 0.12);
    border-color: #f2c7d0;
    background: #fff8fa;
  }
}

.home-ratings-section__card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.home-ratings-section__card-stars {
  display: flex;
  gap: 0.25rem; /* 4px */
}

.home-ratings-section__star {
  display: block;
  width: 1.04375rem;  /* ~16.7px */
  height: 0.99375rem; /* ~15.9px */
  background: url('/wp-content/uploads/2026/04/star-icon.png') center / contain no-repeat;
}

.home-ratings-section__quote-bubble {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;  /* 44px */
  height: 2.75rem; /* 44px */
  background: #ffe2e7;
  border-radius: 50%;
}

.home-ratings-section__quote-icon {
  display: block;
  width: 1.25rem;  /* 20px */
  height: 1.25rem;
  background: url('/wp-content/uploads/2026/04/qoutation-icon.png') center / contain no-repeat;
}

.home-ratings-section__card-quote {
  font-family: "Nunito", sans-serif;
  font-size: 1rem; /* 16px */
  line-height: 1.7;
  color: #4a5565;
  margin: 0;
  flex: 1;
}

.home-ratings-section__card-author {
  display: block;
  margin-top: auto;
  font-family: "Nunito", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #101828;
}

.home-ratings-section__card-name {
  font-family: "Nunito", sans-serif;
  font-size: 1rem;     /* 16px */
  font-weight: 700;
  color: #101828;
}

.home-ratings-section__card-location {
  font-family: "Nunito", sans-serif;
  font-size: 0.875rem; /* 14px */
  font-weight: 400;
  color: #4a5565;
}

/* ── Bottom CTA ──────────────────────────────────────── */
.home-ratings-section__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem; /* 24px */
  margin-top: clamp(2.5rem, 4vw, 3rem);
  padding: 0 var(--container-padding, 1.5rem);
  text-align: center;
}

.home-ratings-section__cta-text {
  font-family: "Nunito", sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #4a5565;
  margin: 0;
}

.home-ratings-section__cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2.5rem; /* 14px 40px */
  border-radius: 9999px;
  border: 1px solid #0f0f0f;
  background: transparent;
  color: #0f0f0f;
  font-family: "Nunito", sans-serif;
  font-size: 1.125rem; /* 18px */
  font-weight: 500;
  line-height: 1.1;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.home-ratings-section__cta-btn:hover,
.home-ratings-section__cta-btn:focus-visible {
  background: rgba(15, 15, 15, 0.06);
  color: #0f0f0f;
}

@media (prefers-reduced-motion: reduce) {
  /* Intentionally empty: testimonial cards are static. */
}

/* ── Tablet / medium devices ────────────────────────── */
@media (max-width: 1024px) {
  .home-ratings-section__logos {
    gap: 1.25rem;
  }

  .home-ratings-section__logo--google {
    width: 5.5rem;
    height: 3.75rem;
  }

  .home-ratings-section__logo--yelp {
    width: 3rem;
    height: 2.75rem;
  }

  .home-ratings-section__card {
    flex-basis: 25rem;
    min-height: 16rem;
    padding: 1.5rem;
  }

  .home-ratings-section__track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Tablet landscape / medium mobile ───────────────── */
@media (max-width: 768px) {
  .home-ratings-section {
    width: 100%;
    margin-left: 0;
    transform: none;
    padding: clamp(2rem, 4vw, 3rem) 0;
  }

  .home-ratings-section__logos {
    gap: 1rem;
  }

  .home-ratings-section__logo--google {
    width: 5rem;
    height: 3.25rem;
  }

  .home-ratings-section__logo--yelp {
    width: 2.75rem;
    height: 2.75rem;
  }

  .home-ratings-section__title {
    font-size: clamp(1.5rem, 3vw, 2rem);
  }

  .home-ratings-section__subtitle {
    font-size: clamp(0.875rem, 1vw, 1rem);
  }

  /* Switch from marquee to vertical stack */
  .home-ratings-section__marquee-wrap {
    width: calc(100% - 32px);
    gap: 1.5rem;
  }

  .home-ratings-section__row {
    overflow: visible;
  }

  .home-ratings-section__track {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .home-ratings-section__card {
    flex-basis: auto;
    width: 100%;
    min-height: auto;
    padding: 1.25rem;
    margin: 0;
  }

}

/* ── Small phones ───────────────────────────────────── */
@media (max-width: 480px) {
  .home-ratings-section {
    width: 100%;
    margin-left: 0;
    transform: none;
    padding: 2rem 0;
  }

  .home-ratings-section__header {
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
  }

  .home-ratings-section__logos {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }

  .home-ratings-section__logo--google {
    width: 4rem;
    height: 2.75rem;
  }

  .home-ratings-section__logo--yelp {
    width: 2.25rem;
    height: 2.25rem;
  }

  .home-ratings-section__title {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  }

  .home-ratings-section__subtitle {
    font-size: clamp(0.8125rem, 2vw, 0.875rem);
  }

  /* Vertical stack on small phones too */
  .home-ratings-section__marquee-wrap {
    width: calc(100% - 24px);
    gap: 1rem;
  }

  .home-ratings-section__row {
    overflow: visible;
  }

  .home-ratings-section__track {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .home-ratings-section__card {
    flex-basis: auto;
    width: 100%;
    min-height: auto;
    padding: 1rem;
    gap: 0.75rem;
    margin: 0;
  }

  .home-ratings-section__card-top {
    gap: 0.75rem;
  }

  .home-ratings-section__quote-bubble {
    width: 2.25rem;
    height: 2.25rem;
  }

  .home-ratings-section__quote-icon {
    width: 1rem;
    height: 1rem;
  }

  .home-ratings-section__card-quote {
    font-size: 0.9375rem;
    line-height: 1.6;
  }

  .home-ratings-section__card-name {
    font-size: 0.9375rem;
  }

  .home-ratings-section__card-location {
    font-size: 0.8125rem;
  }

  .home-ratings-section__cta {
    margin-top: 1.5rem;
    gap: 1rem;
    padding: 0 1rem;
  }

  .home-ratings-section__cta-text {
    font-size: 0.9375rem;
  }

  .home-ratings-section__cta-btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
  }
}
