/*
 * Gamer Tech — CSS adicional (seção Antes e Depois)
 * Arquivo aditivo: carregado depois de styles.css, não o substitui.
 * Usa as variáveis de cor já definidas em styles.css (--primary, --accent,
 * --background, --foreground, --destructive) e as fontes já carregadas
 * (Inter / Montserrat) para manter a mesma identidade visual do site.
 */

.gt-before-after {
  text-align: center;
}

.gt-before-after-subtitle {
  max-width: 42rem;
  margin: 0.5rem auto 2.5rem;
  color: var(--foreground);
  opacity: 0.75;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}

.gt-ba-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  text-align: left;
}

@media (min-width: 40rem) {
  .gt-ba-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 64rem) {
  .gt-ba-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gt-ba-item {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--foreground) 12%, transparent);
}

.gt-ba-compare {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}

.gt-ba-compare:focus-visible {
  box-shadow: inset 0 0 0 3px var(--primary);
}

.gt-ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.gt-ba-img-before {
  clip-path: inset(0 50% 0 0);
}

.gt-ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.gt-ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gt-ba-handle::before,
.gt-ba-handle::after {
  content: "";
  position: absolute;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.gt-ba-handle::before {
  left: 8px;
  border-right: 8px solid var(--primary);
}

.gt-ba-handle::after {
  right: 8px;
  border-left: 8px solid var(--primary);
}

.gt-ba-label {
  position: absolute;
  top: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: #fff;
  background: rgba(8, 6, 16, 0.65);
  pointer-events: none;
}

.gt-ba-label-before {
  left: 0.75rem;
}

.gt-ba-label-after {
  right: 0.75rem;
}

/*
 * Animação de entrada sutil.
 * Por padrão a seção fica 100% visível (opacity:1) — assim, se o custom.js não
 * carregar por qualquer motivo, a seção nunca fica invisível. Só quando o JS
 * roda com sucesso é que a classe .gt-ba-anim-ready entra, deixando a seção
 * pronta para o fade-in controlado pelo IntersectionObserver (.gt-in-view).
 */
.gt-before-after.gt-ba-anim-ready {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.gt-before-after.gt-ba-anim-ready.gt-in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .gt-before-after.gt-ba-anim-ready {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/*
 * Depoimentos — carrossel contínuo (gt-tm-*)
 * Preenche o bloco .testimonials já existente no site (que hoje mostra só
 * um texto "Em breve..."). CSS puro, sem biblioteca externa.
 */
.gt-tm-wrap {
  margin-top: 1.25rem;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.gt-tm-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: gt-tm-scroll 55s linear infinite;
}

.gt-tm-wrap:hover .gt-tm-track {
  animation-play-state: paused;
}

@keyframes gt-tm-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.gt-tm-card {
  flex: 0 0 auto;
  width: 19rem;
  max-width: 80vw;
  margin: 0;
  padding: 1.25rem 1.4rem;
  border-radius: 1rem;
  background: var(--accent);
  border: 1px solid color-mix(in srgb, var(--foreground) 12%, transparent);
  text-align: left;
}

.gt-tm-stars {
  display: flex;
  gap: 0.15rem;
  margin-bottom: 0.6rem;
  font-size: 0.9rem;
  line-height: 1;
}

.gt-tm-star {
  color: color-mix(in srgb, var(--foreground) 25%, transparent);
}

.gt-tm-star-filled {
  color: var(--primary);
}

.gt-tm-card blockquote {
  margin: 0;
  color: var(--foreground);
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.92;
}

.gt-tm-card figcaption {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.gt-tm-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.gt-tm-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.gt-tm-meta cite {
  font-style: normal;
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--foreground);
}

.gt-tm-time {
  font-size: 0.75rem;
  color: var(--foreground);
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .gt-tm-track {
    animation: none;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
  }

  /* A lista é duplicada em JS para o loop do carrossel — com a animação
     desligada, escondemos a segunda cópia (20 cards reais por conjunto). */
  .gt-tm-track > :nth-child(n + 21) {
    display: none;
  }

  .gt-tm-wrap {
    overflow: visible;
    mask-image: none;
    -webkit-mask-image: none;
  }
}

/*
 * Redes sociais no Hero (gt-social) — ícones minimalistas, mesma
 * linguagem visual dos botões "ghost" já usados no site.
 */
.gt-social {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.gt-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--foreground) 20%, transparent);
  color: var(--foreground);
  opacity: 0.85;
  transition: border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.gt-social-link:hover,
.gt-social-link:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  opacity: 1;
}
