/* ==========================================================================
   Ajustes e componentes exclusivos da versão ES
   (o styles.css original já contém todo o design system)
   ========================================================================== */

/* ==========================================================================
   Performance (PageSpeed)
   ========================================================================== */

/* A animação original (cta-pulse) animava box-shadow -> repaint na thread
   principal (6 CTAs = 6 elementos "não compostos"). Trocamos por um anel
   expansivo em ::after que anima apenas transform/opacity (roda na GPU). */
.gradient-cta { animation: none; position: relative; }
.gradient-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .45);
  animation: cta-ring-es 2s ease-out infinite;
}
.gradient-cta:hover::after { animation: none; opacity: 0; }
@keyframes cta-ring-es {
  0%   { transform: scale(1); opacity: .85; }
  70%  { transform: scale(1.075); opacity: 0; }
  100% { transform: scale(1.075); opacity: 0; }
}

/* Modo de movimento reduzido: desliga as animações decorativas */
@media (prefers-reduced-motion: reduce) {
  .gradient-cta::after,
  .vsl-play-btn::after { animation: none; }
}

/* Vídeo (Wistia) — o contêiner é preenchido pelo script.js */
#vsl { width: 100%; height: 100%; }
#vsl wistia-player { width: 100%; height: 100%; display: block; }

/* Player do VSL local (arquivo em espanhol) */
.vsl-wrap { position: relative; width: 100%; height: 100%; background: #000; }
.vsl-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* botão grande central (play/replay) */
.vsl-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: opacity .25s ease;
}
.vsl-play:focus-visible { outline: 3px solid #a855f7; outline-offset: -3px; }
.vsl-play--oculto { opacity: 0; pointer-events: none; }
.vsl-play-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 9999px;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 12px 32px -6px rgba(168, 85, 247, .65);
  transition: transform .2s ease;
}
.vsl-play:hover .vsl-play-btn { transform: scale(1.08); }
.vsl-play-btn::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 9999px;
  border: 2px solid rgba(168, 85, 247, .5);
  animation: vsl-ring 2s ease-out infinite;
}
.vsl-play-btn svg { width: 28px; height: 28px; }
@keyframes vsl-ring {
  0%   { transform: scale(.85); opacity: .9; }
  70%  { transform: scale(1.18); opacity: 0; }
  100% { transform: scale(1.18); opacity: 0; }
}

/* barra de controles */
.vsl-ui {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 26px 10px 8px;
  background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, .45) 55%, transparent);
  transition: opacity .25s ease, transform .25s ease;
}
.vsl-ui--oculto .vsl-ui { opacity: 0; transform: translateY(6px); pointer-events: none; }

.vsl-btn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background-color .15s ease;
}
.vsl-btn:hover { background: rgba(255, 255, 255, .16); }
.vsl-btn:focus-visible { outline: 2px solid #a855f7; outline-offset: 1px; }
.vsl-btn svg { width: 20px; height: 20px; }

/* progresso */
.vsl-bar {
  position: relative;
  flex: 1 1 auto;
  height: 18px;
  min-width: 40px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.vsl-bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .28);
  transition: height .12s ease;
}
.vsl-bar-fill {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  width: 0%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  transition: height .12s ease;
}
.vsl-bar-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 12px;
  height: 12px;
  transform: translate(-50%, -50%);
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .15s ease;
}
.vsl-bar:hover::before, .vsl-bar--activo::before { height: 6px; }
.vsl-bar:hover .vsl-bar-fill, .vsl-bar--activo .vsl-bar-fill { height: 6px; }
.vsl-bar:hover .vsl-bar-thumb, .vsl-bar--activo .vsl-bar-thumb { opacity: 1; }
.vsl-bar:focus-visible { outline: none; }
.vsl-bar:focus-visible .vsl-bar-thumb { opacity: 1; }

/* tempo */
.vsl-time {
  flex: none;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
  opacity: .92;
  white-space: nowrap;
}

/* volume (desktop) */
.vsl-vol { display: flex; align-items: center; flex: none; }
.vsl-vol-slider {
  width: 0;
  overflow: hidden;
  transition: width .2s ease;
}
.vsl-vol:hover .vsl-vol-slider,
.vsl-vol:focus-within .vsl-vol-slider { width: 72px; }
.vsl-vol-range {
  width: 72px;
  height: 18px;
  margin: 0 4px 0 0;
  padding: 0;
  accent-color: #a855f7;
  cursor: pointer;
}

/* tela cheia */
.vsl-wrap:fullscreen { background: #000; }
.vsl-wrap:fullscreen .vsl-video { object-fit: contain; }
.vsl-wrap:fullscreen .vsl-play-btn { width: 92px; height: 92px; }
.vsl-wrap:fullscreen .vsl-ui { padding: 40px 18px 14px; }
.vsl-wrap:fullscreen .vsl-btn { width: 42px; height: 42px; }
.vsl-wrap:fullscreen .vsl-btn svg { width: 24px; height: 24px; }
.vsl-wrap:-webkit-full-screen { background: #000; }
.vsl-wrap:-webkit-full-screen .vsl-video { object-fit: contain; }

/* mobile: sem controle de volume (iOS/Android não expõem volume via JS) */
@media (hover: none), (pointer: coarse) {
  .vsl-vol { display: none; }
  .vsl-btn { width: 40px; height: 40px; }
  .vsl-time { font-size: 10px; }
}

/* telas >= 640px: botão central um pouco maior */
@media (min-width: 640px) {
  .vsl-play-btn { width: 76px; height: 76px; }
  .vsl-play-btn svg { width: 30px; height: 30px; }
}

/* Card azul da seção "¿Por qué…?" — espaço para o mockup não cobrir o texto.
   O mockup tem 92% (mobile) / 85% (desktop) da largura do card e o conteúdo
   visível se estende ~39,6% da sua largura abaixo do centro. */
.card-manual-pt { padding-top: 42%; }
@media (min-width: 640px) {
  .card-manual-pt { padding-top: 38%; }
}

/* Acordeão do FAQ — reutiliza os keyframes do CSS original */
.faq-item [role="region"] { overflow: hidden; }
.faq-item [role="region"][data-state="open"] { animation: accordion-down .2s ease-out; }
.faq-item [role="region"][data-state="closed"] { animation: accordion-up .2s ease-out; }
.faq-item button svg { transition: transform .2s ease; }
.faq-item button[data-state="open"] svg { transform: rotate(180deg); }

/* Modal de upsell */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .8);
  animation: modal-fade .2s ease-out;
}
.modal-overlay[hidden] { display: none; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 28rem;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .4);
  animation: modal-pop .25s cubic-bezier(.16, 1, .3, 1);
}
.modal-close {
  position: absolute;
  top: .625rem;
  right: .875rem;
  z-index: 20;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.modal-close:hover { background: rgba(255, 255, 255, .35); }
.modal-radial {
  position: absolute;
  inset: 0;
  opacity: .2;
  background:
    radial-gradient(circle at 20% 20%, #fff, transparent 40%),
    radial-gradient(circle at 80% 80%, #fff, transparent 40%);
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop  { from { opacity: 0; transform: scale(.96) translateY(8px); } to { opacity: 1; transform: none; } }
body.modal-aberto { overflow: hidden; }

/* Aviso de checkout não configurado */
.toast-aviso {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 200;
  transform: translateX(-50%);
  max-width: calc(100vw - 2rem);
  padding: .75rem 1.25rem;
  border-radius: 9999px;
  background: #0f172b;
  color: #fff;
  font-size: .8125rem;
  font-weight: 600;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5);
  animation: modal-fade .2s ease-out;
}
