/* ═══════════════════════════════════════════════════════════════════
   TESTIMONIALS — "THE BLUEPRINT REVIEW WALL"
   ═══════════════════════════════════════════════════════════════════
   Architectural concept: a curated drawing sheet with one review
   displayed at a time, framed by dimension lines and corner
   construction marks, with 6 thumbnail tabs below like drawing
   index pages. Smooth cross-fade between reviews, auto-rotate,
   full RTL support, reduced-motion fallback.
   ═══════════════════════════════════════════════════════════════════ */


/* ── 1. WALL (section wrapper with blueprint dot grid) ────────────
   A subtle architectural drafting-paper grid — 1px gold dots at
   32px intervals — sits behind the whole review section. */
.testimonials-wall {
  position: relative;
  margin-top: 48px;
  padding: 12px 0 24px;
  background-image: radial-gradient(
    circle at 1px 1px,
    rgba(201,169,110,0.10) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
  background-position: 0 0;
}


/* ── 2. STAGE (the framed showcase area) ──────────────────────────
   Holds the active testimonial. Dark gradient background with
   a hairline gold border, generous padding. */
.testimonial-stage {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 56px clamp(32px, 5vw, 72px) 48px;
  background: linear-gradient(180deg, rgba(18,18,18,0.96), rgba(10,10,10,0.98));
  border: 1px solid rgba(201,169,110,0.14);
  border-radius: 2px;                        /* architectural = sharp */
  box-shadow:
    0 2px 8px rgba(0,0,0,0.22),
    0 24px 60px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.03);
  overflow: hidden;
  min-height: 340px;
}


/* ── 3. DIMENSION-LINE FRAMING (top and bottom of stage) ──────────
   Architectural measurement marks: ├────────┤ style.
   Built with 3 background layers stacked horizontally. */
.testimonial-stage::before,
.testimonial-stage::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  height: 1px;
  background:
    /* left tick */
    linear-gradient(90deg, rgba(201,169,110,0.55), transparent 1px) left / 1px 8px no-repeat,
    /* right tick */
    linear-gradient(90deg, transparent calc(100% - 1px), rgba(201,169,110,0.55)) right / 1px 8px no-repeat,
    /* horizontal line */
    linear-gradient(90deg,
      transparent 0%,
      rgba(201,169,110,0.25) 15%,
      rgba(201,169,110,0.25) 85%,
      transparent 100%);
  pointer-events: none;
}
.testimonial-stage::before { top: 16px; }
.testimonial-stage::after  { bottom: 16px; }


/* ── 4. CORNER CONSTRUCTION MARKS (+ at 4 corners of stage) ───────
   Built as ::before/::after on a dedicated inner element (we add
   two layers, since ::before/::after of stage are used for dim lines). */
.testimonial-stage-marks {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  z-index: 1;
}
.testimonial-stage-marks::before,
.testimonial-stage-marks::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background:
    linear-gradient(90deg, rgba(201,169,110,0.55), rgba(201,169,110,0.55)) center / 10px 1px no-repeat,
    linear-gradient(0deg,  rgba(201,169,110,0.55), rgba(201,169,110,0.55)) center / 1px 10px no-repeat;
}
/* top-left + top-right via ::before (positioned by transform) */
.testimonial-stage-marks::before { top: 0;    left: 0; }
.testimonial-stage-marks::after  { top: 0;    right: 0; }
/* bottom corners via a second pseudo-layer helper */
.testimonial-stage-marks-bottom::before { bottom: 0; left: 0; }
.testimonial-stage-marks-bottom::after  { bottom: 0; right: 0; }
.testimonial-stage-marks-bottom {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  z-index: 1;
}
.testimonial-stage-marks-bottom::before,
.testimonial-stage-marks-bottom::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background:
    linear-gradient(90deg, rgba(201,169,110,0.55), rgba(201,169,110,0.55)) center / 10px 1px no-repeat,
    linear-gradient(0deg,  rgba(201,169,110,0.55), rgba(201,169,110,0.55)) center / 1px 10px no-repeat;
}


/* ── 5. SLIDE (individual testimonial inside stage) ───────────────
   All 6 slides stack absolutely, with opacity crossfade. */
.testimonial-slide {
  position: absolute;
  inset: 56px clamp(32px, 5vw, 72px) 48px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 520ms,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  gap: 24px;
  z-index: 2;
}
.testimonial-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s,
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1);
}


/* ── 6. SERVICE CHIP (drawing stamp, top-right of stage) ──────────
   Small uppercase gold pill — indicates which service the client
   used. Positioned absolutely at top-right corner of each slide. */
.testimonial-chip {
  position: absolute;
  top: -8px;
  right: 0;
  font-family: var(--font-sans);
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.28);
  padding: 5px 11px;
  border-radius: 2px;
  z-index: 3;
}
[dir="rtl"] .testimonial-chip {
  right: auto;
  left: 0;
}


/* ── 7. STARS ─────────────────────────────────────────────────────
   Five gold stars, slightly bigger and better spaced. */
.testimonial-stars {
  display: flex;
  gap: 3px;
  margin-top: 8px;
}
.testimonial-star {
  color: var(--gold);
  font-size: 0.95rem;
  text-shadow: 0 0 10px rgba(201,169,110,0.22);
}


/* ── 8. TEXT — the pull quote ─────────────────────────────────────
   Large elegant serif, light weight, tight leading.
   No inline ::before quote mark (we handle it differently). */
.testimonial-text {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 300;
  line-height: 1.58;
  color: var(--off-white);
  flex: 1;
  margin: 0;
  letter-spacing: -0.005em;
}
.testimonial-text::before {
  /* Override old inline quote rule — we don't want a leading quote */
  content: none;
}


/* ── 9. RULE LINE — gold hairline above author ────────────────────
   Architectural construction line between quote and author block. */
.testimonial-author-rule {
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  margin-top: 8px;
}
[dir="rtl"] .testimonial-author-rule {
  background: linear-gradient(-90deg, var(--gold), transparent);
}


/* ── 10. AUTHOR BLOCK ─────────────────────────────────────────────
   Clean typography, no avatar circle — the stage IS the spotlight. */
.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.testimonial-name {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--off-white);
  letter-spacing: 0.01em;
}
.testimonial-location {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 400;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}


/* ── 11. ARROW CONTROLS (desktop only) ────────────────────────────
   Circular buttons at viewport edges — gold ring, glass backdrop. */
.testimonial-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(201,169,110,0.25);
  background: rgba(8,8,8,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition:
    background 260ms var(--ease-out),
    border-color 260ms var(--ease-out),
    color 260ms var(--ease-out),
    transform 260ms var(--ease-out);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.testimonial-arrow:hover,
.testimonial-arrow:focus-visible {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
  transform: translateY(-50%) scale(1.06);
  outline: none;
}
.testimonial-arrow:focus-visible {
  box-shadow: 0 0 0 3px rgba(201,169,110,0.3);
}
.testimonial-arrow-prev { left: -12px; }
.testimonial-arrow-next { right: -12px; }

[dir="rtl"] .testimonial-arrow-prev { left: auto; right: -12px; }
[dir="rtl"] .testimonial-arrow-next { right: auto; left: -12px; }
[dir="rtl"] .testimonial-arrow svg { transform: scaleX(-1); }


/* ── 12. THUMBNAIL NAVIGATION (6 drawing index tabs) ──────────────
   A row of 6 small cards below the stage. Each shows initial,
   name, location, mini star row. Active one has gold accent bar
   on top and is slightly elevated. */
.testimonial-thumbs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
  margin: 36px auto 0;
  padding: 0;
  list-style: none;
}
.testimonial-thumb {
  position: relative;
  padding: 16px 14px 14px;
  background: linear-gradient(180deg, rgba(20,20,20,0.6), rgba(12,12,12,0.6));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  color: inherit;
  transition:
    background 280ms ease,
    border-color 280ms ease,
    transform 280ms var(--ease-out);
}
.testimonial-thumb::before {
  /* Gold accent bar on top — hidden by default, revealed when active */
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 2px;
  background: var(--gold);
  opacity: 0;
  transform: scaleX(0.3);
  transform-origin: left center;
  transition: opacity 320ms ease, transform 320ms var(--ease-out);
}
[dir="rtl"] .testimonial-thumb::before {
  transform-origin: right center;
}
.testimonial-thumb:hover {
  background: linear-gradient(180deg, rgba(26,26,26,0.8), rgba(16,16,16,0.8));
  border-color: rgba(201,169,110,0.22);
  transform: translateY(-2px);
}
.testimonial-thumb.active {
  background: linear-gradient(180deg, rgba(30,26,20,0.95), rgba(20,16,12,0.95));
  border-color: rgba(201,169,110,0.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.3);
}
.testimonial-thumb.active::before {
  opacity: 1;
  transform: scaleX(1);
}


/* ── 13. THUMB INITIAL (gold circle with serif letter) ────────────*/
.testimonial-thumb-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(223,192,138,0.26), rgba(201,169,110,0.08));
  border: 1px solid rgba(201,169,110,0.28);
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-style: italic;
  font-weight: 300;
  color: var(--gold-light, #dfc08a);
  margin-bottom: 8px;
}


/* ── 14. THUMB NAME + LOCATION + MINI STARS ───────────────────────*/
.testimonial-thumb-name {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--off-white);
  line-height: 1.2;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.testimonial-thumb-location {
  display: block;
  font-size: 0.58rem;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.testimonial-thumb-stars {
  display: flex;
  gap: 1px;
}
.testimonial-thumb-stars span {
  color: var(--gold);
  font-size: 0.62rem;
}


/* ── 15. GOOGLE RATING BANNER (refined) ──────────────────────────
   Lives below the thumbnails. Cleaner treatment. */
.google-rating-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 28px 36px;
  margin-top: 48px;
  background: linear-gradient(180deg, rgba(18,18,18,0.95), rgba(10,10,10,0.98));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 2px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0,0,0,0.18);
}
.google-rating-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(201,169,110,0) 0%,
    rgba(201,169,110,0.7) 50%,
    rgba(201,169,110,0) 100%);
  animation: gRuleLinePulse 4s ease-in-out infinite;
}
[dir="rtl"] .google-rating-banner::before { left: auto; right: 0; }
@keyframes gRuleLinePulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1;   }
}


.google-rating-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.google-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.google-logo .g-blue   { color: #4285F4; }
.g-red     { color: #EA4335; }
.g-yellow  { color: #FBBC05; }
.g-green   { color: #34A853; }

.google-score {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.google-stars-row {
  display: flex;
  gap: 3px;
  margin-bottom: 4px;
}
.google-stars-row span {
  color: #FBBC05;
  font-size: 0.95rem;
}

.google-count {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.google-cta-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.02em;
}
.google-cta-text a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 220ms ease;
  margin-left: 4px;
}
.google-cta-text a:hover { color: var(--gold-light, #dfc08a); }


/* ── 16. TABLET (max 1024px) ──────────────────────────────────── */
@media (max-width: 1024px) {
  .testimonial-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}


/* ── 17. PHONE (max 700px) ────────────────────────────────────── */
@media (max-width: 700px) {
  .testimonials-wall {
    margin-top: 28px;
    padding: 4px 0 12px;
    background-size: 24px 24px;
  }
  .testimonial-stage {
    padding: 44px 24px 36px;
    min-height: 300px;
    border-radius: 2px;
  }
  .testimonial-stage::before,
  .testimonial-stage::after {
    width: calc(100% - 32px);
  }
  .testimonial-stage::before { top: 12px; }
  .testimonial-stage::after  { bottom: 12px; }

  .testimonial-slide {
    inset: 44px 24px 36px;
    gap: 16px;
  }
  .testimonial-chip {
    top: -6px;
    font-size: 0.5rem;
    padding: 4px 9px;
  }
  .testimonial-text {
    font-size: 1.02rem;
    line-height: 1.55;
  }
  .testimonial-arrow {
    display: none;       /* swipe only on phone */
  }
  .testimonial-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
  }
  .testimonial-thumb {
    padding: 12px 10px 10px;
  }
  .testimonial-thumb-initial {
    width: 24px;
    height: 24px;
    font-size: 0.78rem;
    margin-bottom: 6px;
  }
  .testimonial-thumb-name     { font-size: 0.68rem; }
  .testimonial-thumb-location { font-size: 0.54rem; }

  .google-rating-banner {
    flex-direction: column;
    gap: 14px;
    padding: 22px 18px;
    margin-top: 32px;
    text-align: center;
  }
  .google-rating-left {
    flex-direction: column;
    gap: 10px;
  }
  .google-score {
    font-size: 2.1rem;
  }
}


/* ── 18. REDUCED MOTION ──────────────────────────────────────────*/
@media (prefers-reduced-motion: reduce) {
  .testimonial-slide {
    transition: opacity 0.01ms, visibility 0s !important;
    transform: none !important;
  }
  .testimonial-thumb {
    transition: none !important;
    transform: none !important;
  }
  .google-rating-banner::before {
    animation: none !important;
  }
}


/* ── 19. RTL TEXT ALIGNMENT ──────────────────────────────────────*/
[dir="rtl"] .testimonial-slide {
  text-align: right;
}
[dir="rtl"] .testimonial-thumb {
  text-align: right;
}
