/* --- CONFIGURAÇÕES GERAIS --- */
:root {
  --qsti-dark: #0f172a;        
  --qsti-dark-light: #1e293b; 
  --qsti-orange: #ff6a00;
  --qsti-orange-hover: #e65f00;
  --qsti-gray: #64748b;
  --qsti-bg-light: #f8fafc;
  --qsti-blue-tech: #3b82f6; 
  --qsti-hero-bg: #0b0f19;
}

.text-qsti-orange {
    color: var(--qsti-orange) !important;
}

.text-qsti-blue {
    color: var(--qsti-blue-tech) !important;
}

.text-qsti-gray {
    color: var(--qsti-hero-bg) !important;
}

html {
    /* Força a barra de rolagem para evitar pulos laterais entre páginas curtas e longas */
    overflow-y: scroll; 
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--qsti-bg-light);
  color: var(--qsti-dark);
  overflow-x: hidden;
  /* Trava contra o padding injetado pelo Bootstrap */
  padding-right: 0px !important;
  margin-right: 0px !important;
}

/* --- ESTABILIZAÇÃO DA NAVBAR (FIXED-TOP) --- */
.fixed-top, .navbar {
    padding-right: 0px !important;
    margin-right: 0px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
}

/* --- NAVBAR --- */
.navbar {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 0.8rem 0; /* Reduzido levemente para estabilidade */
  min-height: 80px; /* Trava a altura para a logo não empurrar o layout */
  /* Removemos o 'all' para a navbar não "escorregar" ao carregar */
  transition: background-color 0.3s ease; 
}

/* Trava a largura do contentor de cada botão do menu */
.navbar-nav .nav-item {
    width: 115px; /* Reserva espaço suficiente até para as palavras maiores como "Soluções" */
    display: flex;
    justify-content: center;
}

/* Remove a trava de 110px do último item (Fale Conosco) e impede a quebra de linha */
.navbar-nav .nav-item:last-child {
    width: auto !important; 
}

.btn-outline-dark-custom {
    white-space: nowrap; /* Garante que o texto do botão fique sempre em uma única linha */
}

/* 2. Máscara de Fade-in para esconder o piscar da troca de fonte */
.navbar-collapse {
    opacity: 0;
    animation: fadeInMenu 1.0s ease-out forwards;
}

@keyframes fadeInMenu {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Trava da Logo */
.navbar-brand img {
    width: auto; /* Ajuste para o tamanho real da sua logo */
    height: auto;
    display: block;
}

.nav-link { 
    font-weight: 600; 
    font-size: 0.95rem; 
    color: var(--qsti-dark) !important; 
    transition: color 0.2s ease;
    display: inline-block;
    text-align: center;
    padding-left: 15px !important;
    padding-right: 15px !important;
}


.nav-link:hover { 
    color: var(--qsti-orange) !important; 
}

/* Estilo para a página ativa (JS ou manual) */
.nav-link.active {
    color: var(--qsti-orange) !important;
    /* Usamos text-shadow em vez de mudar o font-weight para 700 para o texto não "engordar" e tremer */
	font-weight: 600;
    .text-shadow: 0.5px 0 0 var(--qsti-orange);
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 20%;
    width: 60%;
    height: 2px;
    background-color: var(--qsti-orange);
}

/* Botão Hamburguer */
.navbar-toggler {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 106, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* --- PAGE HEADER MODERN --- */
.page-header-modern {
  position: relative;
  padding: 160px 0 100px;
  color: white;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.page-header-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  pointer-events: none;
  transform: perspective(1000px) rotateX(20deg) scale(1.2);
}

.page-header-modern h1 { 
    font-weight: 800; font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem; 
}

.page-header-modern h1 span {
  display: block; font-weight: 400; color: rgba(255,255,255,0.7);
  font-size: 0.38em; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px;
}

.page-header-modern .lead { font-size: 1.2rem; font-weight: 300; opacity: 0.9; line-height: 1.6; }

.page-header-modern::after {
    content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(255, 106, 0, 0.15) 0%, rgba(255, 106, 0, 0) 70%);
    border-radius: 50%; pointer-events: none;
}

.header-grid-pattern {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 40px 40px; opacity: 0.1; pointer-events: none;
}

.breadcrumb-modern {
    background: rgba(255, 255, 255, 0.05); display: inline-flex; padding: 5px 15px;
    border-radius: 50px; font-size: 0.8rem; font-weight: 600; color: rgba(255,255,255,0.8);
    margin-bottom: 20px; backdrop-filter: blur(5px); border: 1px solid rgba(255,255,255,0.1);
}

.modern-title {
    font-size: 3.5rem; font-weight: 800; letter-spacing: -1px; line-height: 1.1; margin-bottom: 15px;
    background: linear-gradient(90deg, #fff, #cbd5e1); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.modern-subtitle {
    font-size: 1.15rem; color: #94a3b8; font-weight: 300; max-width: 600px; line-height: 1.6;
}

.animate-up { animation: fadeInUp 0.8s ease-out forwards; opacity: 0; transform: translateY(20px); }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* --- COMPONENTES --- */
.btn-qsti {
  background: var(--qsti-orange); color: #fff; border-radius: 6px; padding: 12px 32px;
  font-weight: 700; border: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(255, 106, 0, 0.3); text-transform: uppercase; font-size: 0.9rem;
}

.btn-qsti:hover { background: var(--qsti-orange-hover); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(255, 106, 0, 0.4); color: #fff; }

.btn-outline-dark-custom { border: 2px solid var(--qsti-dark); color: var(--qsti-dark); border-radius: 50px; padding: 10px 30px; font-weight: 600; transition: all 0.3s; text-decoration: none;}
.btn-outline-dark-custom:hover { background: var(--qsti-dark); color: white; }

.icon-circle-small { width: 50px; height: 50px; transition: all 0.3s ease; }
.col-md-4:hover .icon-circle-small { background-color: var(--qsti-orange) !important; color: white !important; transform: scale(1.1); }

/* --- CLASSES UTILITÁRIAS DE PERFORMANCE (CLEAN CODE) --- */
/* Controlam o tempo em que cada elemento aparece na tela */
.delay-0  { animation-delay: 0s; }
.delay-1  { animation-delay: 0.1s; }
.delay-2  { animation-delay: 0.2s; }
.delay-3  { animation-delay: 0.3s; }
.delay-15 { animation-delay: 1.5s; }
.delay-25 { animation-delay: 2.5s; }

/* Garante que o elemento fique invisível antes da animação começar */
.animate-up { 
    opacity: 0; 
    transform: translateY(20px);
    animation-fill-mode: forwards; /* Mantém o estado final da animação */
}

/* A classe active, quando adicionada pelo JS, dispara a animação */
.active .animate-up {
    animation-name: fadeInUp;
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
}

@media (min-width: 768px) { .border-start-md { border-left: 1px solid rgba(0,0,0,0.1); } }

.whatsapp-float { position: fixed; bottom: 30px; right: 30px; background: #25d366; color: #fff; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4); z-index: 1000; transition: all 0.3s ease; text-decoration: none; }
.whatsapp-float:hover { transform: scale(1.1); color: #fff; box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6); }

.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s all ease; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- BANNER DE COOKIES --- */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background-color: var(--qsti-dark);
    padding: 20px 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: bottom 0.5s ease-in-out;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cookie-banner.show {
    bottom: 0;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 991.98px) {
    .modern-title {
        font-size: 3rem !important;
    }
    .hero-glass-content {
        padding: 2.5rem !important;
    }
}

@media (max-width: 768px) {
    .ramos-container { flex-direction: column; height: auto; }
    .ramo-card { width: 100%; height: 250px; flex: none; }
    .ecosistema-orbital { display: none !important; }
    .hero { padding-top: 130px; }
    .hero h1 { font-size: 2.3rem; }
    .modern-title { font-size: 2.2rem !important; letter-spacing: -1px !important; }
    .modern-subtitle { font-size: 1.1rem !important; line-height: 1.5 !important; }
    .hero-glass-content { padding: 1.5rem !important; border-radius: 20px !important; }
    .page-header-modern { padding: 120px 0 80px !important; min-height: auto !important; }
    .reveal { opacity: 1 !important; transform: translateY(0) !important; transition: opacity 0.3s ease-out !important; }
    .reveal.active { transform: translateY(0); }
}