/* ════════════════════════════════════════════════════════════════════
   Wolf IPTV — Reviews Section (M1.7.A Stacked Deck)
   ════════════════════════════════════════════════════════════════════

   File:    wolf-home-reviews.css
   Loaded:  via index.php extra_css (after wolf-home-pricing.css)
   Scoped:  .reviews-section, .reviews-stack, .review-card, .reviews-btn,
            .avatar, .stars, .social-link

   Structure:
     1. Avatar (shared, reusable utility)
     2. Star rating display
     3. Social link (X / Twitter button)
     4. Stacked review deck container
     5. Individual review card
     6. Card head / body / foot
     7. Carousel controls (prev/next + counter)
     8. Responsive breakpoints
     9. Reduced motion

   Note: Built faithfully from the design's reviews section
   (full-home.html lines 2591-2829).
   ════════════════════════════════════════════════════════════════════ */


/* ── 1. Avatar (shared, reusable utility) ────────────────────────── */
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.avatar--lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
  border-radius: 14px;
}


/* ── 2. Star rating display ──────────────────────────────────────── */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--gold);
}

.stars svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.stars--lg svg {
  width: 16px;
  height: 16px;
}


/* ── 3. Social link button (X / Twitter) ─────────────────────────── */
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.social-link svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.social-link:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-3);
  transform: translateY(-1px);
}


/* ── 4. Stacked review deck container ────────────────────────────── */
.reviews-stack {
  position: relative;
  height: 420px;
  max-width: 600px;
  margin: 0 auto;
  user-select: none;
  touch-action: pan-y;
}

.reviews-stack:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 6px;
  border-radius: var(--r-2xl);
}

.reviews-stack__track {
  position: relative;
  width: 100%;
  height: 100%;
}


/* ── 5. Individual review card ───────────────────────────────────── */
.review-card {
  position: absolute;
  inset: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  box-shadow: var(--shadow-lg);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.55s ease;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.94) translateY(10px);
  z-index: 1;
}

/* The active card is the one visible to the user.
   Compound specificity (0,2,0) — no !important needed. */
.review-card.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  z-index: 5;
}

.review-card.is-flying {
  transition: transform 0.5s ease-in, opacity 0.5s ease-in;
}


/* ── 6. Card head / body / foot ──────────────────────────────────── */
.review-card__head {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.review-card__id {
  flex: 1;
  min-width: 0;
}

.review-card__name {
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
}

.review-card__handle {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.review-card__quote {
  width: 40px;
  height: 32px;
  color: var(--brand);
  opacity: 0.4;
}

.review-card__quote svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.review-card__text {
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1.65;
  color: var(--text);
  font-weight: 600;
  flex: 1;
}

.review-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

.review-card__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}


/* ── 7. Carousel controls ────────────────────────────────────────── */
.reviews-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.reviews-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background-color 0.2s ease, color 0.2s ease,
              border-color 0.2s ease, transform 0.2s ease,
              box-shadow 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
}

.reviews-btn:hover:not(:disabled) {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: scale(1.05);
  box-shadow: var(--shadow-brand);
}

.reviews-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.reviews-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.reviews-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.reviews-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reviews-btn--filled {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: var(--shadow-brand);
}

.reviews-btn--filled:hover:not(:disabled) {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}

.reviews-counter {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  min-width: 60px;
  text-align: center;
  /* Hotfix 001 (2026-06-10): direction:ltr prevents RTL reversal of
     "1 / 3" → "3 / 1". Numbers + slash must always read LTR. */
  direction: ltr;
  unicode-bidi: isolate;
}

.reviews-counter b {
  color: var(--text);
  font-weight: 800;
}


/* ── 8. Responsive breakpoints ───────────────────────────────────── */
@media (max-width: 720px) {
  .reviews-stack { height: 440px; }
  .review-card { padding: var(--sp-6) var(--sp-5); gap: var(--sp-4); }
  .review-card__text { font-size: 17px; }
  .review-card__name { font-size: 16px; }
  .review-card__handle { font-size: 12px; }
}

@media (max-width: 480px) {
  .reviews-stack { height: 460px; }
  .review-card { padding: var(--sp-5) var(--sp-4); }
  .review-card__text { font-size: 16px; line-height: 1.6; }
  .review-card__quote { width: 32px; height: 26px; }
  .avatar--lg { width: 48px; height: 48px; font-size: 18px; }
}


/* ── 9. Reduced motion accessibility ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .review-card,
  .reviews-btn,
  .social-link {
    transition: opacity 0.3s ease;
  }
  .reviews-btn:hover:not(:disabled),
  .social-link:hover {
    transform: none;
  }
}
