/* ========================================
   INSIGHTFLOW AI - CSS GLOBAL
   ======================================== */

/* ========================================
   VARIÁVEIS CSS (CSS CUSTOM PROPERTIES)
   ======================================== */
:root {
  /* Cores do tema dark */
  --background: hsl(0 0% 3.9%);
  --foreground: hsl(0 0% 98%);
  --card: hsl(0 0% 3.9%);
  --card-foreground: hsl(0 0% 98%);
  --popover: hsl(0 0% 3.9%);
  --popover-foreground: hsl(0 0% 98%);
  --primary: hsl(0 0% 98%);
  --primary-foreground: hsl(0 0% 9%);
  --secondary: hsl(0 0% 8%);
  --secondary-foreground: hsl(0 0% 98%);
  --muted: hsl(0 0% 12%);
  --muted-foreground: hsl(0 0% 63.9%);
  --accent: hsl(0 0% 9%);
  --accent-foreground: hsl(0 0% 98%);
  --destructive: hsl(0 62.8% 30.6%);
  --destructive-foreground: hsl(0 0% 98%);
  --border: hsl(0 0% 14.9%);
  --input: hsl(0 0% 14.9%);
  --ring: hsl(0 0% 83.1%);

  /* Tipografia */
  --font-family: ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Courier New", Courier, monospace;

  /* Espaçamentos */
  --container-max-width: 1400px;
  --border-radius: 0.375rem; /* 6px */
  --border-radius-lg: 0.5rem; /* 8px */

  /* Transições */
  --transition-fast: 0.2s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;

  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ========================================
   RESET E ESTILOS BASE
   ======================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-family);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LAYOUT E CONTAINER
   ======================================== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2.5rem;
  }
}

/* ========================================
   COMPONENTES DE NAVEGAÇÃO
   ======================================== */
.nav-link {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  height: 3rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  transition: all var(--transition-fast);
  border-radius: var(--border-radius);
}

.nav-link:hover {
  color: var(--foreground);
  background-color: hsl(0 0% 8% / 0.3);
}

.nav-link.active {
  color: var(--foreground);
}

/* ========================================
   BOTÕES E INTERAÇÕES
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 0.625rem 1rem;
  height: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  background-color: hsl(0 0% 98% / 0.9);
  box-shadow: var(--shadow-xl);
  transform: scale(1.05);
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-foreground);
  padding: 0.625rem 1rem;
  height: 2.5rem;
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--accent);
  color: var(--accent-foreground);
}

.btn-icon {
  padding: 0.5rem;
  background-color: transparent;
  color: var(--muted-foreground);
  border-radius: var(--border-radius-lg);
}

.btn-icon:hover {
  background-color: var(--secondary);
  color: var(--foreground);
}

/* ========================================
   CARDS E CONTAINERS
   ======================================== */
.card {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 1rem;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--ring);
  box-shadow: var(--shadow-md);
}

.card-secondary {
  background-color: hsl(0 0% 8% / 0.2);
}

.card-muted {
  background-color: hsl(0 0% 12% / 0.2);
}

/* ========================================
   TERMINAL E CÓDIGO
   ======================================== */
.terminal {
  background-color: hsl(0 0% 8% / 0.3);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-normal);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background-color: hsl(0 0% 8% / 0.2);
  border-bottom: 1px solid var(--border);
}

.terminal-controls {
  display: flex;
  gap: 0.5rem;
}

.terminal-control {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.terminal-control.red {
  background-color: #ef4444;
}
.terminal-control.yellow {
  background-color: #eab308;
}
.terminal-control.green {
  background-color: #22c55e;
}

.terminal-title {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-family: var(--font-mono);
}

.terminal-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-status-dot {
  width: 0.5rem;
  height: 0.5rem;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.terminal-status-text {
  font-size: 0.75rem;
  color: #22c55e;
  font-family: var(--font-mono);
}

.terminal-content {
  position: relative;
  background-color: hsl(0 0% 12% / 0.2);
  min-height: 400px;
  max-height: 500px;
  overflow-y: auto;
  padding: 1.5rem;
}

.terminal-prompt {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.terminal-prompt-text {
  color: #22c55e;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  margin-right: 0.5rem;
}

.terminal-typing {
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  border-right: 2px solid transparent;
}

.terminal-cursor {
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  animation: blink 1s infinite;
}

.terminal-output {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.terminal-line {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
  margin-bottom: 0.5rem;
}

/* ========================================
   CARROSSEL DE TECNOLOGIAS
   ======================================== */
.tech-carousel {
  overflow: hidden;
}

.carousel-right {
  animation: scroll-right 20s linear infinite;
  width: 200%;
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.carousel-left {
  animation: scroll-left 20s linear infinite;
  width: 200%;
  display: flex;
  gap: 0.5rem;
}

.tech-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background-color: hsl(0 0% 8% / 0.5);
  color: var(--secondary-foreground);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid hsl(0 0% 14.9% / 0.5);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tech-badge:hover {
  background-color: hsl(0 0% 8% / 0.7);
}

/* ========================================
   NAVEGAÇÃO DE SERVIÇOS
   ======================================== */
.service-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.service-nav-item {
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-lg);
  border: 1px solid hsl(0 0% 14.9% / 0.5);
  background-color: transparent;
  color: var(--foreground);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
}

.service-nav-item:hover {
  background-color: hsl(0 0% 8% / 0.5);
}

.service-nav-item.active {
  background-color: var(--secondary);
  border-color: var(--ring);
}

.service-nav-icon {
  margin-right: 0.75rem;
  color: var(--primary);
}

.service-nav-content {
  display: flex;
  flex-direction: column;
}

.service-nav-title {
  font-weight: 500;
  font-size: 0.875rem;
}

.service-nav-subtitle {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.service-content {
  transition: opacity var(--transition-normal);
}

.service-content.hidden {
  display: none;
}

/* ========================================
   BADGES E TAGS
   ======================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: var(--border-radius);
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-primary {
  background-color: hsl(0 0% 98% / 0.1);
  color: var(--primary);
}

/* ========================================
   SCROLLBAR PERSONALIZADO
   ======================================== */
.terminal-content::-webkit-scrollbar {
  width: 8px;
}

.terminal-content::-webkit-scrollbar-track {
  background: var(--secondary);
}

.terminal-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.terminal-content::-webkit-scrollbar-thumb:hover {
  background: hsl(0 0% 20%);
}

/* ========================================
   ANIMAÇÕES
   ======================================== */
@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scroll-right {
  0% {
    transform: translateX(25%);
  }
  100% {
    transform: translateX(-25%);
  }
}

@keyframes scroll-left {
  0% {
    transform: translateX(-25%);
  }
  100% {
    transform: translateX(25%);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* ========================================
   UTILITÁRIOS
   ======================================== */
.text-gradient {
  background: linear-gradient(to right, var(--foreground), hsl(0 0% 98% / 0.7));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.divide-border > * + * {
  border-left: 1px solid var(--border);
}

.border-border {
  border-color: var(--border);
}

.bg-secondary\/20 {
  background-color: hsl(0 0% 8% / 0.2);
}

.bg-secondary\/30 {
  background-color: hsl(0 0% 8% / 0.3);
}

.bg-accent\/30 {
  background-color: hsl(0 0% 9% / 0.3);
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .terminal-content {
    min-height: 300px;
    max-height: 400px;
  }

  .tech-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
  }
}

@media (max-width: 640px) {
  .terminal-header {
    padding: 0.75rem 1rem;
  }

  .terminal-content {
    padding: 1rem;
  }

  .service-nav-item {
    padding: 0.5rem 0.75rem;
  }
}

/* ========================================
   ESTADOS DE FOCO E ACESSIBILIDADE
   ======================================== */
.btn:focus,
.service-nav-item:focus,
.nav-link:focus {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn:focus:not(:focus-visible),
.service-nav-item:focus:not(:focus-visible),
.nav-link:focus:not(:focus-visible) {
  outline: none;
}

/* ========================================
   PROCESS STEPS E ANIMAÇÕES DE PROGRESSÃO
   ======================================== */
.process-container {
  position: relative;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.process-step {
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
  z-index: 10;
}

.process-step.animate {
  opacity: 1;
  transform: translateY(0);
}

.process-step-circle {
  width: 4rem;
  height: 4rem;
  background-color: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: all var(--transition-normal);
  position: relative;
  z-index: 10;
}

.process-step:hover .process-step-circle {
  background-color: var(--primary);
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.process-step-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary);
  transition: color var(--transition-normal);
}

.process-step:hover .process-step-number {
  color: var(--primary-foreground);
}

.process-step-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
  transition: color var(--transition-normal);
}

.process-step:hover .process-step-title {
  color: var(--primary);
}

.process-step-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color var(--transition-normal);
}

.process-step:hover .process-step-description {
  color: var(--foreground);
}

/* Linhas de Progressão */
.progress-line {
  position: relative;
  height: 2px;
  background-color: var(--border);
  border-radius: 1px;
  overflow: hidden;
  margin: 2rem 0;
  width: 100%;
  max-width: 200px;
  margin-left: auto;
  margin-right: auto;
}

/* Garantir que as linhas sejam visíveis */
.progress-line {
  background-color: var(--border) !important;
  opacity: 1 !important;
}

.progress-line::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--ring));
  border-radius: 1px;
  width: 0%;
  transition: width 1.2s ease-out;
}

.progress-line.animate::before {
  width: 100%;
}

/* Animações de entrada */
@keyframes processStepFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes progressLineFill {
  from {
    width: 0%;
  }
  to {
    width: 100%;
  }
}

/* Estados de animação */
.process-step.animate:nth-child(1) {
  animation-delay: 0.2s;
}
.process-step.animate:nth-child(2) {
  animation-delay: 0.4s;
}
.progress-line.animate:nth-child(1) {
  animation-delay: 0.6s;
}
.process-step.animate:nth-child(3) {
  animation-delay: 0.8s;
}
.progress-line.animate:nth-child(2) {
  animation-delay: 1s;
}
.process-step.animate:nth-child(4) {
  animation-delay: 1.2s;
}
.progress-line.animate:nth-child(3) {
  animation-delay: 1.4s;
}

/* Responsividade para Process Steps */
@media (max-width: 768px) {
  .process-steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .progress-line {
    display: none !important;
  }

  .process-step {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   FAQ INTERACTIVE STYLES
   ======================================== */
.faq-item {
  transition: all var(--transition-normal);
  border: none !important;
}

.faq-question {
  cursor: pointer;
  border: none;
  background: transparent;
  outline: none;
}

.faq-answer {
  transition: all var(--transition-normal);
  overflow: hidden;
}

.faq-answer.hidden {
  max-height: 0;
  opacity: 0;
}

.faq-answer:not(.hidden) {
  max-height: 200px;
  opacity: 1;
}

.faq-icon {
  color: var(--muted-foreground);
  transition: transform var(--transition-normal);
}

.faq-icon.rotate-180 {
  transform: rotate(180deg);
}

.faq-question:hover .faq-icon {
  color: var(--foreground);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .terminal,
  .tech-carousel,
  .btn,
  .progress-lines {
    display: none;
  }

  body {
    background: white;
    color: black;
  }
}
