/* =====================================================================
   Home — Reviews ("Trusted by +100k investors")
   Figma: desktop 10125:20638 (1240 inside .container) / mobile 10125:20995.
   Token-only. BEM, all classes prefixed .hp-reviews-.
   ===================================================================== */

.hp-reviews {
  background: var(--pale-blue);
}

.hp-reviews__inner {
  display: flex;
  flex-direction: column;
  gap: var(--hp-reviews-section-gap);
  padding-block: var(--home-sec-pad-y);
}

/* --- Headline row: title left, platform logos right --- */
.hp-reviews__headline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: var(--hp-reviews-section-gap);
  column-gap: var(--home-stack-gap);
  width: 100%;
}

.hp-reviews__title {
  margin: 0;
  font-weight: var(--fw-medium);
  font-size: var(--fs-32);
  line-height: var(--lh-45);
  color: var(--gray-8);
}

.hp-reviews__logos {
  display: flex;
  align-items: center;
  gap: var(--home-stack-gap);
  height: var(--hp-reviews-logos-h);
}

.hp-reviews__logo-item {
  display: flex;
  align-items: center;
}

.hp-reviews__logo {
  display: block;
  width: auto;
  /* Explicit height so SVG logos (no intrinsic size) don't collapse to 0 in
     the flex row; width follows each logo's aspect ratio. */
  height: 30px;
  max-width: 100%;
}

/* --- Cards row --- */
.hp-reviews__list {
  display: flex;
  gap: var(--home-stack-gap);
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

.hp-reviews__card {
  flex: 0 1 var(--hp-reviews-card-w);
  max-width: var(--hp-reviews-card-w);
  min-height: var(--hp-reviews-card-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--hp-reviews-card-pad);
  background: var(--gray-0);
  border: 1px solid var(--soft-blue);
  border-radius: var(--radius-20);
}

.hp-reviews__card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--home-stack-gap);
  width: 100%;
}

.hp-reviews__stars {
  display: block;
  width: var(--hp-reviews-stars-w);
  height: var(--hp-reviews-stars-h);
  flex: none;
}

.hp-reviews__name {
  margin: 0;
  font-weight: var(--fw-bold);
  font-size: var(--fs-20);
  line-height: 1.3;
  color: var(--gray-8);
  text-align: center;
}

.hp-reviews__location {
  margin: 0;
  font-weight: var(--fw-regular);
  font-size: var(--fs-16);
  line-height: normal;
  color: var(--gray-7);
  text-align: center;
}

.hp-reviews__quote {
  margin: 0;
  font-weight: var(--fw-regular);
  font-size: var(--fs-16);
  line-height: normal;
  color: var(--gray-8);
  text-align: center;
}

/* --- Tablet (768–1023): Archetype A — 3-up row, step text ----------- */
@media (max-width: 1023.98px) {
  .hp-reviews__title {
    font-size: var(--fs-28);
    line-height: var(--lh-36);
  }

  /* Cards wrap to 2-per-row at narrow tablet */
  .hp-reviews__list {
    flex-wrap: wrap;
  }

  .hp-reviews__card {
    flex: 1 1 calc(50% - var(--home-stack-gap));
  }
}

/* --- Large-mobile (600–767): 2-col cards, stacked headline ---------- */
@media (max-width: 767.98px) {
  .hp-reviews__inner {
    gap: var(--home-stack-gap);
    padding-block: var(--ba-pad-y);
  }

  .hp-reviews__headline {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: var(--home-reviews-gap);
  }

  .hp-reviews__title {
    font-size: var(--fs-26);
    line-height: var(--lh-36);
    text-align: center;
    width: 100%;
  }

  .hp-reviews__logos {
    justify-content: center;
  }
}

/* --- Phone (≤599): horizontal carousel (Figma mobile design) -------- */
@media (max-width: 599.98px) {
  /* Cards become a horizontal scroller; gutters bleed to the screen edge. */
  .hp-reviews__list {
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: calc(var(--pad-mobile) * -1);
    padding-inline: var(--pad-mobile);
    /* keep the snap start offset by the gutter so the first card isn't glued
       to the edge (scroll-snap otherwise eats the start padding) */
    scroll-padding-inline: var(--pad-mobile);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* clean carousel: hide the native scrollbar */
    scrollbar-width: none;
  }
  .hp-reviews__list::-webkit-scrollbar { display: none; }

  .hp-reviews__card {
    flex: 0 0 var(--hp-reviews-card-w-mobile);
    max-width: var(--hp-reviews-card-w-mobile);
    scroll-snap-align: start;
  }
}
