/* Royal Routes - Customer Reviews page */
#rr-reviews-page {
  --rr-navy: #123a73;
  --rr-gold: #f4b400;
  --rr-ink: #1c2433;
  --rr-muted: #5d6879;
  --rr-line: #e6ebf2;
}

.rr-reviews {
  background: linear-gradient(180deg, #f4f7fb 0%, #ffffff 60%);
}

/* ---------- Intro ---------- */
.rr-reviews__intro {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}
.rr-reviews__tagline {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(245, 166, 35, 0.14);
  color: #b87408;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rr-reviews__title {
  margin: 16px 0 12px;
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--rr-ink);
}
.rr-reviews__lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: var(--rr-muted);
}

/* ---------- Summary pill ---------- */
.rr-reviews__summary {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding: 14px 26px 14px 18px;
  background: #fff;
  border: 1px solid var(--rr-line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(20, 57, 111, 0.08);
  text-align: left;
}
.rr-reviews__score {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: var(--rr-navy);
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}
.rr-reviews__summary-stars { display: flex; gap: 2px; }
.rr-reviews__summary-count {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  color: var(--rr-muted);
}

/* ---------- Trustpilot widget (replaces the average pill) ---------- */
.rr-reviews__tp {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  max-width: 820px;
  margin: 34px auto 0;
  padding: 26px 30px;
  overflow: hidden;
  background: linear-gradient(120deg, #0d2a55 0%, #123a73 55%, #1d5aa8 100%);
  border-radius: 22px;
  box-shadow: 0 22px 48px rgba(18, 58, 115, 0.28);
  text-align: left;
  color: #fff;
}
/* soft decorative glows */
.rr-reviews__tp::before,
.rr-reviews__tp::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.rr-reviews__tp::before {
  top: -70px;
  right: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(244, 180, 0, 0.3), transparent 70%);
}
.rr-reviews__tp::after {
  bottom: -90px;
  left: -40px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(0, 182, 122, 0.22), transparent 70%);
}
.rr-reviews__tp > * { position: relative; z-index: 1; }

.rr-reviews__tp-icon {
  flex: 0 0 64px;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  background: #00b67a;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(0, 182, 122, 0.4);
}
.rr-reviews__tp-icon svg { fill: #fff; }

.rr-reviews__tp-copy { flex: 1 1 auto; min-width: 0; }
.rr-reviews__tp-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f4b400;
}
.rr-reviews__tp-title {
  margin: 4px 0 4px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}
.rr-reviews__tp-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

.rr-reviews__tp-action { flex: 0 0 230px; }
.rr-reviews__tp .trustpilot-widget {
  position: static !important;
  left: auto !important;
  width: 100% !important;
  transition: transform 0.2s ease;
}
.rr-reviews__tp .trustpilot-widget:hover { transform: translateY(-2px) scale(1.04); }

@media (max-width: 767px) {
  .rr-reviews__tp {
    flex-direction: column;
    text-align: center;
    padding: 26px 20px;
  }
  .rr-reviews__tp-action { flex: 0 0 auto; width: 100%; max-width: 260px; }
}

/* ---------- Stars ---------- */
.rr-reviews svg.is-on  { fill: var(--rr-gold); }
.rr-reviews svg.is-off { fill: #d9dee7; }

/* ---------- Grid ---------- */
.rr-reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px 28px;
  align-items: stretch;
  grid-auto-rows: 1fr;
}
@media (max-width: 991px) { .rr-reviews__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
@media (max-width: 640px) { .rr-reviews__grid { grid-template-columns: 1fr; } }

/* ---------- Card: white card, large photo overlapping the top edge, stars top right ---------- */
.rr-review-card {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: 38px;
  padding: 20px 26px 24px;
  background: #fff;
  border: 1px solid var(--rr-line);
  border-radius: 20px;
  box-shadow: 0 8px 28px rgba(18, 58, 115, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.rr-review-card:hover {
  transform: translateY(-4px);
  border-color: rgba(18, 58, 115, 0.18);
  box-shadow: 0 18px 40px rgba(18, 58, 115, 0.12);
}
.rr-review-card--new { animation: rr-review-in 0.45s ease both; }
@keyframes rr-review-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.rr-review-card__avatar {
  position: absolute;
  top: -38px;
  left: 22px;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  border: 4px solid #fff;
  box-shadow: 0 6px 16px rgba(18, 58, 115, 0.2);
}
.rr-review-card__avatar--initial {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--rr-navy), #2f6bc2);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
}

.rr-review-card__stars {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  min-height: 26px;
  margin-bottom: 18px;
}
.rr-review-card__stars svg { width: 20px; height: 20px; }

.rr-review-card__text {
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 22px;
  font-size: 15.5px;
  line-height: 1.7;
  color: #3a4457;
  overflow-wrap: anywhere;
}
.rr-review-card__text.is-open { display: block; -webkit-line-clamp: unset; }
.rr-review-card__text a { color: var(--rr-navy); text-decoration: underline; }
.rr-review-card__text p,
.rr-review-card__text ul,
.rr-review-card__text ol { margin: 0 0 0.5em; }
.rr-review-card__text ul { list-style: disc; padding-left: 1.2em; }
.rr-review-card__text ol { list-style: decimal; padding-left: 1.2em; }
.rr-review-card__text > :last-child { margin-bottom: 0; }

.rr-review-card__toggle {
  align-self: flex-start;
  margin: -14px 0 18px;
  padding: 0;
  background: none;
  border: 0;
  color: var(--rr-navy);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.rr-review-card__toggle:hover { text-decoration: underline; }

.rr-review-card__author {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--rr-line);
}
.rr-review-card__meta { display: flex; flex-direction: column; min-width: 0; }
.rr-review-card__name { font-size: 17px; font-weight: 700; color: var(--rr-navy); }
.rr-review-card__date { font-size: 13px; color: var(--rr-muted); }

/* ---------- View more ---------- */
.rr-reviews__more { margin-top: 44px; text-align: center; }
.rr-reviews__more[hidden] { display: none; }
.rr-reviews__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 34px;
  background: var(--rr-navy);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 57, 111, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.rr-reviews__more-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(20, 57, 111, 0.32);
}
.rr-reviews__more-btn:disabled { opacity: 0.8; cursor: progress; }
.rr-reviews__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rr-spin 0.7s linear infinite;
}
.rr-reviews__more-btn.is-loading .rr-reviews__spinner { display: inline-block; }
@keyframes rr-spin { to { transform: rotate(360deg); } }

.rr-reviews__empty { color: var(--rr-muted); }

@media (prefers-reduced-motion: reduce) {
  .rr-review-card, .rr-reviews__more-btn { transition: none; }
  .rr-review-card--new, .rr-reviews__spinner { animation: none; }
}
