/* Carrossel do primeiro bloco da Home.
   Cada slide contém o primeiro bloco REAL de uma página (CSS original já carregado:
   style.css, forensic-analyst.css, san-sebastian.css e hero-carousel-pixprotect.css). */

.hc { position: relative; overflow: hidden; background: #050d16; }

/* Todos os slides ocupam a mesma célula. Cada bloco real tem a sua altura; o JS anima a altura
   do palco para a do slide ativo (sem JS, o palco tem a altura do maior). */
.hc-stage { position: relative; display: grid; overflow: hidden; touch-action: pan-y; cursor: pointer; }
.hc-stage :is(a, button, video, input, summary) { cursor: auto; }
.hc-stage a, .hc-stage button { cursor: pointer; }
.hc-slide {
  grid-area: 1 / 1; align-self: start; min-width: 0;
  display: flex; flex-direction: column;
  visibility: hidden; opacity: 0; pointer-events: none;
}
.hc-slide.is-active { visibility: visible; opacity: 1; pointer-events: auto; }
.hc-slide > section { flex: 1 1 auto; }

/* Slides inativos não gastam CPU com animações CSS contínuas. */
.hc-slide:not(.is-active),
.hc-slide:not(.is-active) *,
.hc-slide:not(.is-active) *::before,
.hc-slide:not(.is-active) *::after { animation-play-state: paused !important; }

.hc-viewport { position: relative; }

/* Setas nas laterais do bloco: voltar à esquerda, avançar à direita. */
.hc-arrow {
  position: absolute; top: 50%; z-index: 4;
  width: 48px; height: 48px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%;
  background: rgba(5, 13, 22, .55); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 28px; line-height: 1; cursor: pointer;
  transform: translateY(-50%);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
}
.hc-arrow--prev { left: clamp(8px, 2vw, 28px); }
.hc-arrow--next { right: clamp(8px, 2vw, 28px); }
.hc-arrow:hover { background: rgba(25, 199, 232, .22); border-color: #19c7e8; transform: translateY(-50%) scale(1.08); }
.hc-arrow:focus-visible, .hc-dot:focus-visible, .hc-visit:focus-visible { outline: 2px solid #19c7e8; outline-offset: 3px; }

/* Barra de controles própria, para não cobrir o conteúdo real dos blocos. */
.hc-controls {
  position: relative; z-index: 3;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 20px;
  padding: 14px 20px;
  background: #050d16; border-top: 1px solid rgba(255, 255, 255, .06);
}
.hc-visit {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 20px;
  border: 1px solid rgba(25, 199, 232, .65); border-radius: 999px;
  background: rgba(25, 199, 232, .12); color: #fff;
  font-size: 13px; font-weight: 700; text-decoration: none;
  transition: background .25s ease, transform .25s ease;
}
.hc-visit::after { content: "→"; transition: transform .25s ease; }
.hc-visit:hover { background: rgba(25, 199, 232, .3); }
.hc-visit:hover::after { transform: translateX(3px); }
.hc-visit[hidden] { display: none; }

.hc-dots { display: flex; align-items: center; gap: 8px; }
.hc-dot {
  position: relative; width: 26px; height: 18px; padding: 0;
  border: 0; background: none; cursor: pointer;
  transition: width .45s cubic-bezier(.2, .72, .25, 1);
}
.hc-dot::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 4px; margin-top: -2px; border-radius: 4px;
  background: rgba(255, 255, 255, .24); transition: background .3s ease;
}
.hc-dot:hover::before { background: rgba(255, 255, 255, .45); }
.hc-dot.is-active { width: 64px; }
.hc-dot-fill {
  position: absolute; left: 0; top: 50%; width: 100%; height: 4px; margin-top: -2px;
  border-radius: 4px; background: #19c7e8;
  transform: scaleX(0); transform-origin: left center;
}
/* Sem autoplay (movimento reduzido), o ponto ativo fica preenchido. */
.hc.is-static .hc-dot.is-active .hc-dot-fill { transform: scaleX(1); }

@media (max-width: 640px) {
  .hc-controls { gap: 12px; padding: 12px 14px; }
  .hc-arrow { width: 38px; height: 38px; font-size: 24px; }
  .hc-arrow--prev { left: 6px; }
  .hc-arrow--next { right: 6px; }
  .hc-dot { width: 18px; }
  .hc-dot.is-active { width: 40px; }
  .hc-dots { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .hc-dot, .hc-arrow, .hc-visit { transition: none; }
}

/* Tablet/mobile: os botões do bloco ficam ABAIXO da imagem/vídeo (texto → visual → botões).
   Não vale para o PixProtect, que já nasce nessa ordem. O contêiner de texto vira `display: contents`
   para que cada parte participe da ordem do grid do hero. */
@media (max-width: 980px) {
  .hc-slide--home .fa-hero-inner > div:first-child,
  .hc-slide--purple .fa-rt-hero-copy,
  .hc-slide--red .fa-rt-hero-copy,
  .hc-slide--pentest .fa-rt-hero-copy { display: contents; }

  .hc-slide--home .fa-hero-inner,
  .hc-slide--purple .fa-rt-hero-grid,
  .hc-slide--red .fa-rt-hero-grid,
  .hc-slide--pentest .fa-rt-hero-grid { row-gap: 0; }

  .hc-slide--home .fa-hero-video,
  .hc-slide--purple .fa-rt-hero-visual,
  .hc-slide--red .fa-rt-hero-visual,
  .hc-slide--pentest .fa-pt-hero-visual { order: 1; margin-top: 32px; }

  .hc-slide--home .fa-actions,
  .hc-slide--purple .fa-actions,
  .hc-slide--red .fa-actions,
  .hc-slide--pentest .fa-actions { order: 2; margin-top: 30px; }
}

@media (max-width: 1080px) {
  .hc-slide--ffa .ffa-hero-copy { display: contents; }
  .hc-slide--ffa .ffa-hero-grid { row-gap: 0; }
  .hc-slide--ffa .ffa-agent-visual { order: 1; margin-top: 28px; }
  .hc-slide--ffa .ffa-hero-actions { order: 2; margin-top: 28px; }
  .hc-slide--ffa .ffa-access-note { order: 3; }
}
