/* ==========================================================================
   REACT-BITS DEPTH CAROUSEL (3D Spatial Stack with Moving Border Beam)
   ZenyDesk O.S. — Componente Hero 3D com Feixe de Luz Conico Circulante
   ========================================================================== */

.hero-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  min-width: 0;
  overflow: visible !important;
}

.hero-carousel-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(37, 99, 235, 0.08) 45%, transparent 70%);
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.hero-depth-container {
  height: 500px;
  position: relative;
  width: 100%;
}

.depth-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: var(--dc-perspective, 1400px);
  perspective-origin: 50% 50%;
  touch-action: pan-y;
  outline: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.depth-carousel:active {
  cursor: grabbing;
}

.depth-carousel:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.5);
  outline-offset: 4px;
  border-radius: 24px;
}

.depth-carousel__stage {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}

/* O Card 3D no Depth Carousel */
.depth-carousel__card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  border-radius: 22px;
  padding: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 35px 70px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
  will-change: transform, opacity, filter;
  cursor: pointer;
  transform: translate(-50%, -50%);
  isolation: isolate;
  pointer-events: auto;
  transition: box-shadow 0.3s ease;
  box-sizing: border-box;
}

.depth-carousel__card:hover {
  box-shadow: 0 40px 85px -10px rgba(0, 0, 0, 0.95), 0 0 30px rgba(56, 189, 248, 0.4);
}

/* O Feixe de Luz / Brilho Circulante ao Redor do Card (Moving Border Beam) */
.depth-carousel__beam {
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  pointer-events: none;
  z-index: 0;
  background: conic-gradient(
    from 0deg,
    #ffffff 0deg,
    transparent 1.5deg,
    transparent 230deg,
    rgba(59, 130, 246, 0.05) 245deg,
    rgba(59, 130, 246, 0.5) 275deg,
    #3b82f6 305deg,
    #10b981 335deg,
    #38bdf8 355deg,
    #ffffff 360deg
  );
  filter: drop-shadow(0 0 10px #10b981) drop-shadow(0 0 20px rgba(56, 189, 248, 0.85));
  animation: depthBeamSpin 4.5s linear infinite;
  will-change: transform;
}

@keyframes depthBeamSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Conteudo Interno do Card Glassmorphism */
.depth-carousel__card-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 19px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.98) 0%, rgba(9, 14, 28, 0.99) 100%);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
}

/* Cabecalho do Card */
.hero-carousel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-carousel-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hero-pulse-indicator {
  position: relative;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.hero-pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #34d399;
  opacity: 0.75;
  animation: heroPulsePing 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.hero-pulse-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: #10b981;
  display: block;
  box-shadow: 0 0 8px #10b981;
}

@keyframes heroPulsePing {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.hero-carousel-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #38bdf8;
  display: block;
  line-height: 1.2;
}

.hero-carousel-title {
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  color: #ffffff;
  margin: 2px 0 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

/* Badge de Categoria Tecnica do Nicho */
.hero-carousel-category-tag {
  font-size: 0.7rem;
  font-weight: 800;
  font-family: monospace;
  letter-spacing: 0.04em;
  padding: 5px 11px;
  border-radius: 9999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Area do Conteudo do Slide */
.hero-carousel-body {
  padding: 10px 0 6px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  flex: 1;
}

.hero-carousel-client {
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.hero-carousel-action {
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.35;
  margin: 0;
  letter-spacing: -0.01em;
}

/* Caixas de Especificacoes Tecnicas */
.hero-carousel-specs {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.hero-spec-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 9px 12px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-spec-box:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
}

.hero-spec-icon-wrap {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.hero-spec-icon-wrap.blue {
  background: rgba(37, 99, 235, 0.22);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.35);
}

.hero-spec-icon-wrap.emerald {
  background: rgba(16, 185, 129, 0.22);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.hero-spec-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  display: block;
  margin-bottom: 2px;
}

.hero-spec-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
  display: block;
}

/* Barra de Status */
.hero-carousel-status-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 2px;
}

.hero-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hero-status-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  flex-shrink: 0;
}

/* Overlay de escurecimento / profundidade */
.depth-carousel__tint {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  background: #05060a;
  z-index: 2;
  transition: opacity 0.25s ease;
}

/* Controles de Navegacao (Setas) */
.depth-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3500;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.depth-carousel__arrow:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.4);
}

.depth-carousel__arrow:active {
  transform: translateY(-50%) scale(0.92);
}

.depth-carousel__arrow--prev {
  left: 6px;
}

.depth-carousel__arrow--next {
  right: 6px;
}

/* Indicadores / Dots na Base */
.depth-carousel__dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3500;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(14, 16, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  max-width: 90%;
  overflow-x: auto;
}

.depth-carousel__dot {
  width: 5px;
  height: 5px;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
  flex-shrink: 0;
}

.depth-carousel__dot.is-active {
  width: 16px;
  background: linear-gradient(90deg, #38bdf8, #60a5fa);
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
}

@media (max-width: 768px) {
  .depth-carousel,
  .depth-carousel__stage,
  .depth-carousel__card {
    touch-action: pan-y !important;
  }
  .depth-carousel__card {
    filter: none !important;
    will-change: transform, opacity;
  }
  .depth-carousel__tint {
    display: none !important;
  }
  .hero-carousel-wrapper {
    max-width: 100%;
  }
  .hero-depth-container {
    height: 480px;
  }
  .depth-carousel__arrow--prev {
    left: 4px;
  }
  .depth-carousel__arrow--next {
    right: 4px;
  }
}

/* ==========================================================================
   SEGMENTS DEPTH CAROUSEL (12 Nichos Técnicos ZenyDesk O.S.)
   ========================================================================== */
.segments-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  min-width: 0;
  overflow: visible !important;
}

.segments-carousel-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, rgba(37, 99, 235, 0.07) 45%, transparent 70%);
  filter: blur(55px);
  pointer-events: none;
  z-index: 0;
}

.segments-depth-container {
  height: 490px;
  position: relative;
  width: 100%;
}

.segment-carousel-card {
  box-sizing: border-box;
}

.segment-card-inner {
  padding: 24px 22px;
  background: linear-gradient(155deg, rgba(15, 23, 42, 0.98) 0%, rgba(9, 14, 28, 0.99) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 19px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
}

.segment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.segment-card-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 4px 10px;
  border-radius: 9999px;
  white-space: nowrap;
}

.segment-card-cat-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  font-family: monospace;
  white-space: nowrap;
}

.segment-card-body {
  padding: 12px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.segment-card-title {
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.segment-card-desc {
  font-size: 0.83rem;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
}

.segment-card-footer {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.segment-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

@media (max-width: 768px) {
  .segments-carousel-wrapper {
    max-width: 100%;
  }
  .segments-depth-container {
    height: 480px;
  }
}

/* ==========================================================================
   OTIMIZACOES EXCLUSIVAS PARA DISPOSITIVOS MOVEIS (CELULARES & TABLETS)
   Esqueleto Inicial Instantaneo + Zero Glitches de GPU + Preservacao de Animacao
   ========================================================================== */
@media (max-width: 768px) {
  /* 1. Esqueleto inicial ultra leve antes da hidratacao */
  .depth-carousel:not([data-hydrated="true"]) {
    min-height: 440px;
  }
  .depth-carousel:not([data-hydrated="true"]) .depth-carousel__stage {
    transform-style: flat;
  }
  .depth-carousel:not([data-hydrated="true"]) .depth-carousel__card:first-child {
    transform: translate(-50%, -50%) scale(0.92) !important;
    opacity: 1 !important;
    filter: none !important;
    z-index: 10;
  }
  .depth-carousel:not([data-hydrated="true"]) .depth-carousel__card:not(:first-child) {
    opacity: 0 !important;
    pointer-events: none;
  }

  /* 2. Otimizacao dos Cards 3D no Celular (Elimina Tearing / Glitches de GPU) */
  .depth-carousel {
    perspective: 1000px !important;
    -webkit-perspective: 1000px !important;
  }
  .depth-carousel__card {
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-style: preserve-3d;
  }

  /* 3. Feixe Circulante Inteligente (Moving Border Beam):
     Gira com fluidez total no card em foco (is-active);
     Desliga nos cards de fundo para poupar 90% da GPU do celular */
  .depth-carousel__card:not(.is-active) .depth-carousel__beam {
    display: none !important;
  }
  .depth-carousel__card.is-active .depth-carousel__beam {
    display: block !important;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.75)) !important;
  }

  /* 4. Glassmorphism mais leve no mobile */
  .depth-carousel__card-inner {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
