.khub-anim-card {
  /* Reskin escuro para igualar o visual dos cards Ignite */
  --khub-accent: #006cff;
  --khub-surface: #101012;
  --khub-surface-alt: #333338;
  --khub-text-primary: #ffffff;
  --khub-text-secondary: rgba(255, 255, 255, 0.5);
  --khub-text-muted: rgba(255, 255, 255, 0.35);
  --khub-font-heading: 'Orbitron', sans-serif;
  --khub-font-body: 'Space Grotesk', sans-serif;

  background: var(--khub-surface);
  border-radius: 12px;
  padding: 28px 22px;
  width: 100%;
  max-width: 640px;
  box-sizing: border-box;
  font-family: var(--khub-font-body);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.khub-anim-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.khub-anim-label {
  font-size: 13px;
  color: var(--khub-text-primary);
}

.khub-anim-badge {
  font-size: 12px;
  color: var(--khub-accent);
  background: rgba(0, 108, 255, 0.15);
  padding: 3px 10px;
  border-radius: 6px;
}

.khub-anim-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.khub-anim-box {
  background: var(--khub-surface-alt);
  border-radius: 8px;
  padding: 14px;
}

.khub-anim-box-accent {
  background: #ffffff;
}

.khub-anim-title {
  font-family: var(--khub-font-heading);
  font-size: 16px;
  font-weight: 500;
  margin: 10px 0 4px;
  color: var(--khub-text-primary);
}

.khub-anim-title-accent {
  color: var(--khub-accent);
}

.khub-anim-sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--khub-text-secondary);
  margin: 0 0 10px;
}

.khub-anim-sub-accent {
  color: var(--khub-accent);
  opacity: 0.8;
}

.khub-anim-footer {
  font-size: 12px;
  color: var(--khub-text-primary);
  margin: 1.25rem 0 0;
  margin-top: auto;
  padding-top: 1.25rem;
}

/* Animação 1 — barras e track */
.khub-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.khub-bar-static {
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

.khub-track {
  margin-top: 10px;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.khub-track-fill {
  height: 100%;
  width: 0%;
  background: var(--khub-accent);
  border-radius: 2px;
}

.khub-mini-chart {
  margin-top: 10px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
}

.khub-chart-bar {
  width: 6px;
  background: var(--khub-accent);
  border-radius: 2px;
  height: 0%;
}

/* Animação 2 — mensagens, contador, linha KPI */
.khub-msg-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.khub-msg-bar {
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  width: 0%;
  transition: width 0.3s;
}

.khub-lead-count {
  font-family: var(--khub-font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--khub-text-primary);
}

.khub-lead-caption {
  font-size: 11px;
  color: var(--khub-text-muted);
  margin: 2px 0 0;
}

#khub-kpi-line {
  stroke: var(--khub-accent);
}

@media (max-width: 640px) {
  .khub-anim-grid-3 {
    grid-template-columns: 1fr;
  }
}

.khub-anim-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ===== Bolinhas de carousel (mobile) — partilhadas por Ops e Ignite ===== */
.khub-carousel-dots {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.khub-carousel-dots .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
  transition: background 0.25s ease, transform 0.25s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.khub-carousel-dots .dot.active {
  background: #006cff;
  transform: scale(1.3);
}

@media (max-width: 860px) {
  .khub-anim-row {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .khub-anim-row::-webkit-scrollbar {
    display: none;
  }
  .khub-anim-row .khub-anim-card {
    flex: 0 0 88%;
    max-width: none;
    height: auto;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .khub-anim-row + .khub-carousel-dots {
    display: flex;
  }
}

/* ===== Pilares "O que construímos" — cards animados ===== */
.khub-pilares-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.khub-pilares-card {
  background: linear-gradient(160deg, #0d0d10 0%, #14141a 60%, #10131f 100%);
  border-radius: 8px;
  padding: 32px 28px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.khub-pilares-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.khub-pilares-card-title {
  font-family: "Orbitron", sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 10px;
}
.khub-pilares-card-desc {
  font-family: "Space Grotesk", sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin: 0;
}

.khub-pilares-visual-wrap {
  position: relative;
  width: 100%;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

/* Card 1 — Estratégia: radar/mira */
.khub-radar-ring {
  position: absolute;
  border: 1px solid rgba(80,140,255,0.35);
  border-radius: 50%;
}
.khub-radar-ring.r1 { width: 40px; height: 40px; }
.khub-radar-ring.r2 { width: 80px; height: 80px; }
.khub-radar-ring.r3 { width: 120px; height: 120px; }
@keyframes khubRadarPulse {
  0% { transform: scale(0.6); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scale(1.15); opacity: 0; }
}
.khub-radar-ring.pulse {
  animation: khubRadarPulse 3s ease-out infinite;
  border-color: rgba(80,140,255,0.6);
}
.khub-radar-ring.r2.pulse { animation-delay: 0.6s; }
.khub-radar-ring.r3.pulse { animation-delay: 1.2s; }
.khub-radar-center {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5b8cff;
  box-shadow: 0 0 12px rgba(91,140,255,0.9);
}

/* Card 2 — Sistemas: rede de nós */
.khub-node-svg { width: 100%; height: 140px; overflow: visible; }
.khub-node-line {
  stroke: rgba(80,140,255,0.25);
  stroke-width: 1.2;
}
.khub-node-dot {
  fill: #5b8cff;
}
.khub-node-pulse {
  fill: #8fb4ff;
  opacity: 0;
}
@keyframes khubNodeTravel1 { 0% { opacity:0; transform: translate(30px,70px);} 10% {opacity:1;} 45% { opacity:1; transform: translate(105px,35px);} 55% {opacity:0;} 100% {opacity:0;} }
@keyframes khubNodeTravel2 { 0% { opacity:0; transform: translate(105px,35px);} 50% {opacity:0;} 60% {opacity:1;} 95% { opacity:1; transform: translate(180px,90px);} 100% {opacity:0;} }
.khub-np1 { animation: khubNodeTravel1 3.4s ease-in-out infinite; }
.khub-np2 { animation: khubNodeTravel2 3.4s ease-in-out infinite; }

/* Card 3 — Branding: ondas de sinal */
.khub-signal-center {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #5b8cff;
  box-shadow: 0 0 16px rgba(91,140,255,0.9);
  z-index: 2;
}
@keyframes khubSignalWave {
  0% { transform: scale(0.3); opacity: 0.8; border-width: 3px; }
  100% { transform: scale(3.2); opacity: 0; border-width: 0.5px; }
}
.khub-signal-wave {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #5b8cff;
  animation: khubSignalWave 2.8s ease-out infinite;
}
.khub-signal-wave.w2 { animation-delay: 0.9s; }
.khub-signal-wave.w3 { animation-delay: 1.8s; }

@media (max-width: 820px) {
  .khub-pilares-grid {
    grid-template-columns: 1fr;
  }
  .khub-pilares-card {
    min-height: 300px;
  }
}

/* ===== Ignite — progressão de marca (3 cartões) ===== */
.khub-ignite-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin: 0;
}

.khub-ignite-card {
  background: #101012;
  border-radius: 12px;
  padding: 28px 22px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.khub-ignite-title {
  font-family: "Orbitron", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  margin: 0 0 6px;
}
.khub-ignite-sub {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  margin: 0 0 22px;
  line-height: 1.4;
}

.khub-ignite-visual {
  margin-top: auto;
}

/* Card 1 — Brand desalinhada (caos, estático) */
.khub-ignite-chaos-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.khub-ignite-chaos-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 300;
  color: #006cff;
}
.khub-ignite-chaos-item .dot {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  flex-shrink: 0;
  background: currentColor;
}
.khub-ignite-chaos-item:nth-child(odd) { transform: rotate(-3deg); }
.khub-ignite-chaos-item:nth-child(even) { transform: rotate(3deg); }
.khub-ignite-chaos-item:nth-child(1) { opacity: 1; }
.khub-ignite-chaos-item:nth-child(2) { opacity: 0.85; }
.khub-ignite-chaos-item:nth-child(3) { opacity: 0.7; }
.khub-ignite-chaos-item:nth-child(4) { opacity: 0.7; }
.khub-ignite-chaos-item:nth-child(5) { opacity: 0.7; }
.khub-ignite-chaos-item:nth-child(6) { opacity: 0.7; }

/* Card 2 — Brand structured (ordem) */
.khub-ignite-structured-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.khub-ignite-structured-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  opacity: 0;
  animation: khubIgniteReveal 5s ease-in-out infinite;
}
.khub-ignite-structured-item .icon {
  display: flex;
  flex-shrink: 0;
  color: #006cff;
}
.khub-ignite-structured-item .icon svg {
  display: block;
}
@keyframes khubIgniteReveal {
  0% { opacity: 0; transform: translateX(-4px); }
  8% { opacity: 1; transform: translateX(0); }
  92% { opacity: 1; }
  100% { opacity: 1; }
}
.khub-ignite-structured-item:nth-child(1) { animation-delay: 0s; }
.khub-ignite-structured-item:nth-child(2) { animation-delay: 0.25s; }
.khub-ignite-structured-item:nth-child(3) { animation-delay: 0.5s; }
.khub-ignite-structured-item:nth-child(4) { animation-delay: 0.75s; }
.khub-ignite-structured-item:nth-child(5) { animation-delay: 1s; }

/* Card 3 — Brand aligned for growth */
.khub-ignite-metric-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}
.khub-ignite-metric {
  font-family: "Orbitron", sans-serif;
  font-size: 26px;
  font-weight: 600;
  color: #006cff;
}
.khub-ignite-metric-label {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.6);
}
.khub-ignite-illustrative {
  font-size: 10px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  margin: 0 0 16px;
}
.khub-ignite-growth-svg { width: 100%; height: 60px; overflow: visible; }
.khub-ignite-growth-path {
  fill: none;
  stroke: #006cff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 112;
  stroke-dashoffset: 112;
  animation: khubGrowthDraw 4s ease-in-out infinite;
}
@keyframes khubGrowthDraw {
  0% { stroke-dashoffset: 112; }
  55% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; }
}
.khub-ignite-growth-dot {
  fill: #006cff;
  opacity: 0;
  animation: khubGrowthDot 4s ease-in-out infinite;
}
@keyframes khubGrowthDot {
  0%, 50% { opacity: 0; transform: scale(0.4); }
  58% { opacity: 1; transform: scale(1.4); }
  68%, 100% { opacity: 1; transform: scale(1); }
}

@media (max-width: 720px) {
  .khub-ignite-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .khub-ignite-grid::-webkit-scrollbar {
    display: none;
  }
  .khub-ignite-grid .khub-ignite-card {
    flex: 0 0 88%;
    height: auto;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }
  .khub-ignite-grid + .khub-carousel-dots {
    display: flex;
  }
}

/* ===== Row "Growing up smart" (Strategy/Operations/Branding) =====
   Row nativa do WPBakery (não é um dos nossos blocos Raw HTML), identificada
   pelo Element ID definido manualmente na Inner Row Settings do editor.
   Altura igual nos 3 breakpoints é feita via JS (khubEqualizeGrowingCards em
   khub-custom.js), porque cada coluna é a sua própria "table" isolada — o
   browser não as iguala sozinho. Aqui só tratamos do carousel em mobile. */
#khub-growing-cards-row .wpb_column {
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  #khub-growing-cards-row .wpb_row.row-inner.cols-md-responsive {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  #khub-growing-cards-row .wpb_row.row-inner.cols-md-responsive::-webkit-scrollbar {
    display: none;
  }
  /* Tablet: 2 cards inteiros visíveis, o 3º só aparece com swipe/dot */
  #khub-growing-cards-row .wpb_row.row-inner.cols-md-responsive > .wpb_column {
    flex: 0 0 calc(50% - 8px);
    width: calc(50% - 8px);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  #khub-growing-cards-row .wpb_row.row-inner.cols-md-responsive + .khub-carousel-dots {
    display: flex;
  }
}

@media (max-width: 575px) {
  /* Mobile: 1 card inteiro por vez, sem espreitar o seguinte */
  #khub-growing-cards-row .wpb_row.row-inner.cols-md-responsive > .wpb_column {
    flex: 0 0 100%;
    width: 100%;
  }
}

/* Card "Strategy" não tinha o mesmo padding-top que Operations/Branding
   nestes breakpoints, o que desalinhava o conteúdo mesmo com a altura do
   card já igualada via JS. Força os 3 ao mesmo padding-top dos que já
   estavam corretos. */
@media (max-width: 959px) {
  #khub-growing-cards-row > .row-child > .row-inner > .wpb_column {
    padding-top: 36px !important;
  }
}

/* ===== Row "Ops metrics" (Improve productivity / Maximize confidence /
   Operational control) — dentro do separador "Ops" do widget de Tabs =====
   Row nativa do WPBakery com 6 colunas alternadas (Pie Chart, Heading, Pie
   Chart, Heading, Pie Chart, Heading), identificada pelo Element ID
   #khub-ops-metrics-row. O JS (khubInitOpsMetricsCarousel em khub-custom.js)
   agrupa cada par ícone+texto num wrapper .khub-ops-metrics-item, para o
   swipe mostrar sempre os dois juntos.
   display:contents é o que permite ao wrapper "desaparecer" em desktop/
   tablet (≥960px), deixando as 6 colunas originais funcionarem como antes
   dentro do table nativo do Uncode — sem isto, o wrapper parte o layout de
   6-em-linha do desktop. Só a partir de ≤959px é que o wrapper passa a
   existir de verdade, como item do carousel. */
#khub-ops-metrics-row .khub-ops-metrics-item {
  display: contents;
}

@media (max-width: 959px) {
  #khub-ops-metrics-row .wpb_row.row-inner {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  #khub-ops-metrics-row .wpb_row.row-inner::-webkit-scrollbar {
    display: none;
  }
  #khub-ops-metrics-row .khub-ops-metrics-item {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }
  #khub-ops-metrics-row .wpb_row.row-inner + .khub-carousel-dots {
    display: flex;
  }
}

/* O tema-pai (Uncode) tem uma regra genérica que dá padding-top:36px a
   qualquer div filho direto de .row-inner que não tenha classe col-md*
   (exceto o :first-child) — pensada para espaçar colunas WPBakery normais
   quando empilham em mobile. Os wrappers .khub-ops-metrics-item, por serem
   divs nossos sem essa classe, caíam nessa regra: o 1º item (:first-child)
   ficava bem, o 2º e 3º ganhavam 36px extra no topo, o que desalinhava o
   carousel. É a mesma causa-raiz do padding-top que já tínhamos corrigido
   no #khub-growing-cards-row, só que a atingir os itens errados aqui. */
@media (max-width: 959px) {
  #khub-ops-metrics-row .wpb_row.row-inner > .khub-ops-metrics-item {
    padding-top: 0 !important;
  }
}

/* ===== Row "Pricing cards" (Growth audit / Ops / Ignite) =====
   3 colunas WPBakery reais, cada uma já um card completo — não precisa do
   truque de wrappers/display:contents da row Ops metrics. Confirmado via
   document.styleSheets antes de escrever isto: o tema-pai aplica a mesma
   regra genérica "row-inner > div não-:first-child → padding-top:36px" às
   colunas 2 e 3 (a 1ª fica isenta por ser :first-child) — por isso a
   neutralização de padding-top já vai incluída desde o início, em vez de
   à espera de um bug reportado. Em desktop (≥960px) as colunas já são
   display:table-cell nativo e ficam com a mesma altura sozinhas — só
   mexemos em ≤959px. */
@media (max-width: 959px) {
  #khub-pricing-cards .wpb_row.row-inner > .wpb_column {
    padding-top: 0 !important;
  }
  #khub-pricing-cards .wpb_row.row-inner {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 16px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  #khub-pricing-cards .wpb_row.row-inner::-webkit-scrollbar {
    display: none;
  }
  #khub-pricing-cards .wpb_row.row-inner > .wpb_column {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    box-sizing: border-box;
  }
  #khub-pricing-cards .wpb_row.row-inner + .khub-carousel-dots {
    display: flex;
  }
}
