/* T Graphics — Reviews UI (public homepage + portal card)         */

/* ─────────────────────────────────────────────────────
   HOMEPAGE — testimonials section (carousel)
───────────────────────────────────────────────────── */
#tg-home-reviews {
  padding: 80px 24px 60px;
  background: linear-gradient(180deg, #0d1117 0%, #0a0e16 100%);
  position: relative;
  overflow: hidden;
}
#tg-home-reviews::before {
  content: '';
  position: absolute;
  top: -50%; left: 50%;
  transform: translateX(-50%);
  width: 70%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(34, 211, 238, 0.05), transparent 60%);
  pointer-events: none;
}
#tg-home-reviews .tg-rw-wrap {
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ── Header ── */
.tg-rw-header {
  text-align: center;
  margin-bottom: 40px;
}
.tg-rw-eyebrow {
  display: inline-block;
  font-family: 'Plus Jakarta Sans', 'Roboto Condensed', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #67e8f9;
  margin-bottom: 14px;
  padding: 4px 12px;
  background: rgba(34, 211, 238, 0.08);
  border-radius: 20px;
}
.tg-rw-title {
  font-family: 'Plus Jakarta Sans', 'Roboto Condensed', sans-serif;
  font-size: 42px;
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.tg-rw-title span {
  background: linear-gradient(135deg, #22d3ee, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
@media (max-width: 720px) { .tg-rw-title { font-size: 30px; } }
.tg-rw-lead {
  font-size: 16px;
  color: #94a3b8;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* ── Bento stats grid (Redesigned Option 1) ── */
.tg-rw-bento-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto 40px;
  text-align: left;
}

.tg-bento-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.tg-bento-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* Main card */
.tg-bento-main {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
}

.tg-bento-main:hover {
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 25px rgba(34, 211, 238, 0.04);
}

.tg-bento-main-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.tg-bento-score-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tg-bento-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 54px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.04em;
}

.tg-bento-stars {
  font-size: 18px;
  color: #fbbf24;
  letter-spacing: 2px;
  margin: 4px 0;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.25);
}

.tg-bento-out {
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

.tg-bento-ring-wrap {
  position: relative;
  width: 90px;
  height: 90px;
  flex-shrink: 0;
}

.tg-bento-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.tg-bento-ring circle {
  fill: none;
  stroke-width: 8;
}

.tg-bento-ring-bg {
  stroke: rgba(255, 255, 255, 0.05);
}

.tg-bento-ring-fg {
  stroke: #22d3ee;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.4));
}

.tg-bento-pct {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
}

/* Stat cards */
.tg-bento-stat {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.tg-bento-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s;
}

.tg-bento-card:hover .tg-bento-icon {
  transform: scale(1.08);
}

.tg-bento-verified .tg-bento-icon {
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.15);
}
.tg-bento-verified:hover {
  border-color: rgba(34, 197, 94, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 25px rgba(34, 197, 94, 0.04);
}

.tg-bento-fivestar .tg-bento-icon {
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.15);
}
.tg-bento-fivestar:hover {
  border-color: rgba(251, 191, 36, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 25px rgba(251, 191, 36, 0.04);
}

.tg-bento-recommend .tg-bento-icon {
  background: rgba(34, 211, 238, 0.08);
  color: #22d3ee;
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.tg-bento-recommend:hover {
  border-color: rgba(34, 211, 238, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 25px rgba(34, 211, 238, 0.04);
}

.tg-bento-icon svg {
  width: 20px;
  height: 20px;
}

.tg-bento-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tg-bento-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tg-bento-label {
  font-size: 10.5px;
  color: #94a3b8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Responsive bento layout */
@media (max-width: 1024px) {
  .tg-rw-bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .tg-bento-main {
    grid-column: span 3;
  }
}

@media (max-width: 640px) {
  .tg-rw-bento-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tg-bento-main {
    grid-column: span 1;
  }
  .tg-bento-card {
    padding: 20px;
  }
  .tg-bento-main-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .tg-bento-ring-wrap {
    align-self: center;
  }
  .tg-bento-stat {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
  }
  .tg-bento-info {
    gap: 0;
  }
}

/* ── Filter chips ── */
.tg-rw-filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}
.tg-rw-chip {
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  color: #cbd5e1;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  background: transparent;
  transition: all 0.13s;
  font-family: inherit;
}
.tg-rw-chip.active {
  background: rgba(34, 211, 238, 0.15);
  border-color: rgba(34, 211, 238, 0.4);
  color: #67e8f9;
}
.tg-rw-chip:hover:not(.active) { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.04); }

/* Count badge inside each filter chip */
.tg-rw-chip-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: #94a3b8;
}
.tg-rw-chip.active .tg-rw-chip-count {
  background: rgba(34, 211, 238, 0.25);
  color: #cffafe;
}

/* Status line above the filtered grid (e.g. "Showing all 60 reviews.") */
.tg-rw-grid-status {
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  margin: 0 0 18px;
}

/* ── Carousel track ── */
.tg-rw-carousel {
  position: relative;
  overflow: hidden;
  margin: 0 -24px;
  padding: 0 24px;
}

/* Fade edges */
.tg-rw-carousel::before,
.tg-rw-carousel::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.tg-rw-carousel::before {
  left: 0;
  background: linear-gradient(90deg, #0a0e16, transparent);
}
.tg-rw-carousel::after {
  right: 0;
  background: linear-gradient(270deg, #0a0e16, transparent);
}

.tg-rw-track {
  display: flex;
  gap: 20px;
  animation: tg-rw-scroll 25s linear infinite;
  width: max-content;
}

.tg-rw-carousel:hover .tg-rw-track {
  animation-play-state: paused;
}

@keyframes tg-rw-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Keep the testimonials carousel scrolling even when reduced-motion is on —
   the global *::before/*::after override in a11y.css and index.html otherwise
   collapses animation-duration to 0.01ms and freezes it. */
@media (prefers-reduced-motion: reduce) {
  .tg-rw-track {
    animation-duration: 25s !important;
    animation-iteration-count: infinite !important;
  }
}

/* ── Review tile (carousel card) ── */
.tg-rw-tile {
  width: 370px;
  min-height: 240px;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.015) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tg-rw-tile:hover {
  border-color: rgba(34, 211, 238, 0.3);
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.06) 0%, rgba(255,255,255,0.02) 100%);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3), 0 0 40px rgba(34, 211, 238, 0.04);
}
.tg-rw-tile .qm {
  position: absolute; top: 14px; right: 20px;
  font-family: Georgia, serif;
  font-size: 52px; line-height: 1;
  color: rgba(34, 211, 238, 0.1);
  font-weight: 700;
}
.tg-rw-tile .stars { font-size: 15px; color: #fbbf24; letter-spacing: 2px; margin-bottom: 12px; }
.tg-rw-tile .quote {
  color: #e2e8f0; font-size: 14px; line-height: 1.65;
  margin-bottom: 18px; flex: 1;
  font-style: italic;
}
.tg-rw-tile .author {
  display: flex; align-items: center; gap: 12px;
  padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06);
}
.tg-rw-tile .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.tg-rw-tile .name { font-weight: 600; color: #f1f5f9; font-size: 13px; }
.tg-rw-tile .company { font-size: 11px; color: #94a3b8; }
.tg-rw-tile .service-tag {
  position: absolute; bottom: 24px; right: 24px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 12px;
}
.tg-rw-tile .service-tag.web        { background: rgba(34, 211, 238, 0.12); color: #67e8f9; }
.tg-rw-tile .service-tag.translation{ background: rgba(168, 85, 247, 0.12); color: #c4b5fd; }
.tg-rw-tile .service-tag.voice      { background: rgba(244, 114, 182, 0.12); color: #f9a8d4; }
.tg-rw-tile .service-tag.animation  { background: rgba(251, 146, 60, 0.12); color: #fdba74; }

/* ── Navigation dots ── */
.tg-rw-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.tg-rw-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  cursor: default;
  transition: all 0.3s ease;
}
.tg-rw-dot.active {
  background: #22d3ee;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.4);
  width: 24px;
  border-radius: 4px;
}

.tg-rw-empty {
  text-align: center;
  padding: 60px 20px;
  color: #64748b;
  font-style: italic;
}

/* ── Fallback: grid for filtered view ── */
.tg-rw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tg-rw-grid .tg-rw-tile {
  width: auto;
  min-height: auto;
}
@media (max-width: 1000px) { .tg-rw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .tg-rw-grid { grid-template-columns: 1fr; } }

/* ── Responsive carousel ── */
@media (max-width: 640px) {
  .tg-rw-tile { width: 300px; min-height: 220px; padding: 20px; }
}

/* PORTAL — review submission card */
#tg-portal-review {
  max-width: 720px;
  margin: 36px auto 0;
  background: #1a2030;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 12px;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
#tg-portal-review::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #22d3ee, #a78bfa);
}
.tg-pr-ribbon {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: #67e8f9;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px; margin-bottom: 14px;
}
.tg-pr-h3 {
  font-family: 'Plus Jakarta Sans', 'Roboto Condensed', sans-serif;
  font-size: 22px; font-weight: 700; color: #f1f5f9;
  margin: 0 0 6px; letter-spacing: -0.01em;
  text-transform: none !important;
  line-height: 1.2;
}
#tg-portal-review { margin-top: 16px !important; }
#tg-portal-review .tg-pr-h3 { text-transform: none !important; }
.tg-pr-lead { color: #94a3b8; font-size: 14px; margin-bottom: 22px; }

.tg-pr-rating { margin-bottom: 22px; }
.tg-pr-label {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #94a3b8; margin-bottom: 10px;
}
.tg-pr-stars { display: inline-flex; gap: 4px; font-size: 36px; line-height: 1; }
.tg-pr-star { cursor: pointer; color: rgba(255,255,255,0.15); transition: all 0.13s; user-select: none; }
.tg-pr-star.filled { color: #fbbf24; text-shadow: 0 0 12px rgba(251, 191, 36, 0.4); }
.tg-pr-star:hover { color: #fde047; transform: scale(1.08); }
.tg-pr-caption { display: inline-block; margin-left: 14px; font-size: 14px; color: #94a3b8; vertical-align: super; }

.tg-pr-aspects { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
@media (max-width: 580px) { .tg-pr-aspects { grid-template-columns: 1fr; } }
.tg-pr-aspect {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 12px 14px;
}
.tg-pr-aspect-name { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #94a3b8; margin-bottom: 6px; }
.tg-pr-aspect-stars { display: flex; gap: 2px; font-size: 18px; }
.tg-pr-aspect-stars .s { color: rgba(255,255,255,0.15); cursor: pointer; }
.tg-pr-aspect-stars .s.filled { color: #fbbf24; }

.tg-pr-field { margin-bottom: 22px; }
.tg-pr-textarea {
  width: 100%; min-height: 110px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 12px 14px;
  color: #f1f5f9; font-family: inherit; font-size: 14px;
  resize: vertical;
  transition: border-color 0.13s, box-shadow 0.13s;
}
.tg-pr-textarea:focus {
  outline: none;
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}
.tg-pr-help { font-size: 12px; color: #64748b; margin-top: 6px; }

.tg-pr-consent {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: rgba(34, 211, 238, 0.05);
  border: 1px solid rgba(34, 211, 238, 0.15);
  border-radius: 8px; margin-bottom: 22px;
}
.tg-pr-consent input[type="checkbox"] {
  width: 18px; height: 18px; margin-top: 1px;
  accent-color: #22d3ee; flex-shrink: 0;
}
.tg-pr-consent label { font-size: 13px; color: #cbd5e1; cursor: pointer; }
.tg-pr-consent label small { display: block; font-size: 11.5px; color: #94a3b8; margin-top: 3px; }

.tg-pr-submit-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.tg-pr-btn {
  font-family: 'Plus Jakarta Sans', 'Roboto Condensed', sans-serif;
  font-weight: 700;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 13px; cursor: pointer; border: none;
  letter-spacing: 0.02em;
  transition: all 0.13s;
}
.tg-pr-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tg-pr-btn.primary {
  background: linear-gradient(135deg, #22d3ee, #6366f1);
  color: #fff;
  box-shadow: 0 4px 14px rgba(34, 211, 238, 0.25);
}
.tg-pr-btn.primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 211, 238, 0.4);
}
.tg-pr-btn.skip { background: transparent; color: #64748b; text-decoration: underline; padding: 11px 14px; }
.tg-pr-btn.skip:hover { color: #94a3b8; }

.tg-pr-submitted {
  background: #1a2030;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 12px;
  padding: 26px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tg-pr-submitted::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #22c55e, #16a34a);
}
.tg-pr-check {
  width: 56px; height: 56px;
  background: rgba(34, 197, 94, 0.15);
  border: 2px solid #22c55e;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px; color: #4ade80; margin-bottom: 14px;
}
.tg-pr-submitted h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 19px; font-weight: 700; color: #f1f5f9; margin-bottom: 4px;
}
.tg-pr-submitted p { color: #94a3b8; font-size: 13.5px; max-width: 460px; margin: 0 auto 18px; }
.tg-pr-recap {
  display: inline-flex; flex-direction: column; gap: 6px;
  padding: 14px 22px;
  background: rgba(255,255,255,0.03); border-radius: 8px;
}
.tg-pr-recap-stars { color: #fbbf24; font-size: 22px; letter-spacing: 2px; }
.tg-pr-recap-q { font-style: italic; color: #cbd5e1; font-size: 13px; max-width: 380px; }

.tg-pr-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* Pending review state */
.tg-pr-pending {
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.25);
  border-radius: 12px;
  padding: 20px 22px;
  margin: 24px auto 0;
  max-width: 720px;
  text-align: center;
}
.tg-pr-pending strong { color: #fcd34d; }
.tg-pr-pending p { color: #cbd5e1; font-size: 13.5px; margin-top: 6px; }
