/* =========================================
   1. VARIÁVEIS E CONFIGURAÇÕES GERAIS
   ========================================= */
:root {
    /* Identidade Visual */
    --cor-primaria: #ffc000;    /* Amarelo Bem Visto (Ação) */
    --cor-tech: #00D4FF;        /* Azul Dev (Detalhes) */
    --cor-fundo: #050507;       /* Dark Mode Puro */
    --cor-texto: #ffffff;
    
    /* Configuração do Vidro (Glassmorphism) */
    --vidro-bg: rgba(20, 20, 25, 0.7);
    --vidro-borda: 1px solid rgba(255, 255, 255, 0.1);
    
    /* Layout */
    --largura-max: 1200px;
    --altura-menu: 90px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--cor-fundo);
    color: var(--cor-texto);
    font-family: 'Inter', sans-serif;
    padding-top: 0; 
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }



/* Utilitário: Container Centralizado */
.container {
    max-width: var(--largura-max);
    margin: 0 auto;
    padding: 0 25px;
}

/* Utilitário: Vidro Base */
.glass {
    background: var(--vidro-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: var(--vidro-borda);
}

/* Utilitário: Botão de Destaque (Amarelo) */
.btn-destaque { 
    background: var(--cor-primaria) !important; 
    color: #000 !important; 
    padding: 14px 32px; 
    border-radius: 40px; 
    font-weight: 700;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn-destaque:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(255, 192, 0, 0.4);
}

.btn-outline {
    padding: 14px 32px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 40px;
    color: #fff;
    font-weight: 600;
    transition: 0.3s;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* Utilitário: Títulos de Seção */
/* CORRIGIDO: Faltava fechar a chave aqui no seu código original */
.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    text-align: center;
}

/* =========================================
   2. MENU: ILHA FLUTUANTE
   ========================================= */
.menu-fixo {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 1280px; height: var(--altura-menu);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 60px;
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    padding: 0 45px;
    display: flex; align-items: center; justify-content: space-between;
}

.flex-menu { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo a { font-size: 1.8rem; font-weight: 800; color: white; letter-spacing: -1px; }

.nav-links { display: flex; gap: 40px; align-items: center; }
.nav-links a { color: #ccc; font-size: 1.05rem; font-weight: 500; letter-spacing: 0.5px; }
.nav-links a:hover { color: #fff; }

.mobile-toggle { display: none; }

@media (max-width: 768px) {
    .menu-fixo {
        top: 0; width: 100%; border-radius: 0; border: none;
        height: 80px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .mobile-toggle { display: flex; flex-direction: column; gap: 6px; cursor: pointer; z-index: 1002; }
    .mobile-toggle span { width: 25px; height: 2px; background-color: #fff; transition: 0.3s; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 75%; height: 100vh;
        background: #0a0a0c; border-left: 1px solid rgba(255,255,255,0.1);
        flex-direction: column; justify-content: center; gap: 40px;
        transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        box-shadow: -10px 0 50px rgba(0,0,0,0.5);
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.2rem; color: #fff; }
    .mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .mobile-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }
}

/* =========================================
   3. HERO SECTION (VÍDEO BACKGROUND)
   ========================================= */
.hero-video-container {
    position: relative;
    height: 100vh; 
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0;
    padding-top: var(--altura-menu); 
}

.video-wrapper {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.bg-video {
    width: 100%; height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(5,5,7,0.8) 0%, rgba(5,5,7,0.5) 50%, #050507 100%);
    z-index: 1;
}

.hero-content {
    position: relative; z-index: 2;
    text-align: left; max-width: 900px;
    padding-bottom: 50px;
}

.hero-content h1 {
    font-size: 4.5rem; line-height: 1.1; margin-bottom: 25px; font-weight: 800; letter-spacing: -2px;
}

.hero-content .subtitle {
    font-size: 1.25rem; max-width: 650px; margin-bottom: 40px; color: #ddd; line-height: 1.6;
}

.buttons-wrapper { display: flex; gap: 20px; }

.code-tag {
    font-family: 'Fira Code', monospace; color: var(--cor-tech);
    background: rgba(0,212,255,0.1); padding: 5px 12px; border-radius: 4px;
    display: inline-block; margin-bottom: 20px; border: 1px solid rgba(0,212,255,0.2);
}

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.8rem; }
    .buttons-wrapper { flex-direction: column; }
}

/* =========================================
   4. FAIXA MARQUEE (INFINITA)
   ========================================= */
.marquee-container {
    width: 100%; background: #050507;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px 0; overflow: hidden; white-space: nowrap;
    margin-bottom: 100px; position: relative; z-index: 2;
}

.marquee-content { display: inline-block; animation: scroll 40s linear infinite; }
.marquee-content span {
    color: #777; font-family: 'Fira Code', monospace;
    font-weight: 700; font-size: 1rem; margin: 0 40px; letter-spacing: 1px;
    text-transform: uppercase;
}
.dot { color: var(--cor-tech); opacity: 0.5; }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* =========================================
   5. BENTO GRID & CARDS (COM 3D)
   ========================================= */
.bento-grid {
    display: grid; grid-template-columns: 2fr 1fr; gap: 25px; margin-bottom: 80px;
}

.card {
    background: var(--vidro-bg); border: var(--vidro-borda);
    border-radius: 24px; padding: 40px;
    display: flex; flex-direction: column; justify-content: space-between;
    transform-style: preserve-3d;
    will-change: transform;
}

.card-lg { grid-row: span 2; min-height: 350px; }
.card h3 { font-size: 1.6rem; margin-bottom: 15px; color: #fff; }
.card p { color: #bbb; font-size: 1rem; line-height: 1.6; }

.tech-tag {
    margin-top: 25px; font-family: 'Fira Code', monospace; color: var(--cor-tech);
    font-size: 0.85rem; background: rgba(0, 212, 255, 0.1);
    padding: 6px 12px; border-radius: 6px; display: inline-block; width: fit-content;
}

@media (max-width: 768px) { .bento-grid { grid-template-columns: 1fr; } }

/* =========================================
   6. ESTILOS DAS PÁGINAS INTERNAS
   ========================================= */
.internal-page-spacer { padding-top: 150px !important; }

/* Sobre/Timeline */
.about-header { text-align: center; padding: 60px 20px; }
.timeline-container { position: relative; max-width: 800px; margin: 0 auto; padding: 40px 0; }
.timeline-container::before {
    content: ''; position: absolute; left: 50%; transform: translateX(-50%);
    top: 0; bottom: 0; width: 2px;
    background: linear-gradient(180deg, var(--cor-tech) 0%, rgba(0,212,255,0.1) 100%);
}
.timeline-item { position: relative; margin-bottom: 60px; width: 50%; padding-right: 50px; text-align: right; }
.timeline-item:nth-child(even) { margin-left: 50%; padding-right: 0; padding-left: 50px; text-align: left; }
.timeline-dot {
    position: absolute; right: -11px; top: 5px; width: 22px; height: 22px;
    background: var(--cor-fundo); border: 2px solid var(--cor-tech); border-radius: 50%;
    z-index: 2; box-shadow: 0 0 15px var(--cor-tech); transition: transform 0.3s;
}
.timeline-item:nth-child(even) .timeline-dot { right: auto; left: -11px; }
.timeline-item:hover .timeline-dot { background: var(--cor-tech); transform: scale(1.3); }
.timeline-date {
    font-family: 'Fira Code', monospace; color: var(--cor-primaria);
    font-size: 0.9rem; margin-bottom: 10px; display: inline-block;
    padding: 4px 10px; background: rgba(255, 192, 0, 0.1); border-radius: 4px;
}

/* Serviços/Stack */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 15px; margin-top: 20px; }
.stack-item {
    background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px; padding: 20px; text-align: center; font-size: 0.9rem; color: #bbb; transition: all 0.3s;
}
.stack-item:hover {
    background: rgba(0, 212, 255, 0.1); color: var(--cor-tech); border-color: var(--cor-tech); transform: translateY(-5px);
}
.service-list { list-style: none; margin-top: 20px; }
.service-list li { padding-left: 25px; position: relative; margin-bottom: 12px; color: #ccc; font-size: 1rem; }
.service-list li::before {
    content: ">"; position: absolute; left: 0; color: var(--cor-primaria); font-family: 'Fira Code', monospace; font-weight: bold;
}

/* Contato/Forms */
.contact-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: start; }
.form-group { margin-bottom: 25px; }
.form-label { display: block; margin-bottom: 10px; color: #ccc; font-size: 0.95rem; font-weight: 600; }
.form-input {
    width: 100%; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; padding: 15px; color: #fff; font-family: 'Inter', sans-serif; font-size: 1rem; transition: all 0.3s ease;
}
.form-input:focus { outline: none; border-color: var(--cor-tech); background: rgba(0, 212, 255, 0.05); }
.contact-icon { color: var(--cor-primaria); margin-right: 15px; font-size: 1.3rem; margin-top: 3px; }

/* =========================================
   7. RODAPÉ & LOADING & ANIMAÇÕES
   ========================================= */
.site-footer {
    background: rgba(5, 5, 7, 0.95); border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 0 40px; margin-top: 120px; position: relative;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 60px; margin-bottom: 60px; }
.footer-links h4 { color: #fff; margin-bottom: 25px; font-size: 1.1rem; }
.footer-links ul li { margin-bottom: 15px; }
.footer-links a { color: #888; transition: 0.3s; }
.footer-links a:hover { color: var(--cor-tech); padding-left: 5px; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05); padding-top: 30px;
    display: flex; justify-content: space-between; align-items: center; color: #555; font-size: 0.9rem;
}
.system-status {
    display: flex; align-items: center; gap: 10px; font-family: 'Fira Code', monospace;
    font-size: 0.8rem; color: #666; background: rgba(255,255,255,0.03); padding: 6px 14px; border-radius: 20px;
}
.status-dot { width: 8px; height: 8px; background-color: #00ff88; border-radius: 50%; box-shadow: 0 0 10px #00ff88; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

/* Loading SPA */
#page-loader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--cor-fundo);
    z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; pointer-events: none; transition: opacity 0.4s ease;
}
#page-loader.active { opacity: 1; pointer-events: all; }
.spinner { width: 50px; height: 50px; border: 3px solid rgba(255,255,255,0.1); border-radius: 50%; border-top-color: var(--cor-tech); animation: spin 1s ease-in-out infinite; }
.loader-text { margin-top: 20px; font-family: 'Fira Code', monospace; color: var(--cor-tech); font-size: 0.9rem; letter-spacing: 2px; animation: blink 1.5s infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Animações Genéricas */
.fade-up { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.blink { animation: cursor-blink 1s step-end infinite; }
@keyframes cursor-blink { 50% { opacity: 0; } }

/* Responsividade Global */
@media (max-width: 768px) {
    .timeline-container::before { left: 20px; }
    .timeline-item, .timeline-item:nth-child(even) { width: 100%; padding-left: 50px; padding-right: 0; text-align: left; margin-left: 0; }
    .timeline-dot, .timeline-item:nth-child(even) .timeline-dot { left: 9px; right: auto; }
    .contact-container, .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}

/* =========================================
   8. GALERIA DE PROJETOS (SLIDER FIX - FINAL)
   ========================================= */

.projects-slider {
    display: flex;
    flex-wrap: nowrap; /* OBRIGATÓRIO: Impede que os cards caiam para a linha de baixo */
    gap: 30px;
    overflow-x: auto; /* Permite rolar horizontalmente */
    -webkit-overflow-scrolling: touch; /* Rolagem macia no iPhone */
    padding: 20px 5px 40px 5px; /* Espaço extra embaixo para a sombra não cortar */
    scroll-behavior: smooth; /* Rolagem suave via CSS */
    
    /* Esconde barra de rolagem */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

.projects-slider::-webkit-scrollbar {
    display: none;
}

.project-card {
    flex: 0 0 auto; /* Isso impede o card de encolher. Ele vai manter 350px sempre. */
    width: 350px;
    min-width: 350px; /* Garantia de segurança */
    
    background: var(--vidro-bg);
    border: var(--vidro-borda);
    border-radius: 16px;
    overflow: hidden;
    scroll-snap-align: start; 
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
    z-index: 1;
}

.project-card:hover {
    border-color: var(--cor-tech);
    transform: translateY(-5px);
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Imagem do Case */
.project-image {
    height: 200px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

/* Overlay Escuro */
.project-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.status-badge {
    background: var(--cor-primaria);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
}

/* Informações */
.project-info { padding: 20px; }
.project-info h3 { color: #fff; font-size: 1.2rem; margin-bottom: 8px; }
.project-info p { color: #aaa; font-size: 0.9rem; line-height: 1.5; margin-bottom: 15px; height: 60px; overflow: hidden; }

.tech-stack-mini { display: flex; gap: 8px; flex-wrap: wrap; }
.tech-stack-mini span {
    font-size: 0.7rem; color: var(--cor-tech);
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 2px 8px; border-radius: 10px;
    font-family: 'Fira Code', monospace;
}

/* Botões de Controle */
.slider-controls { display: flex; gap: 10px; }
.control-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer;
    transition: 0.3s; font-weight: bold; font-family: 'Fira Code', monospace;
}
.control-btn:hover { background: var(--cor-tech); color: #000; border-color: var(--cor-tech); }

/* Ajuste Mobile */
@media (max-width: 768px) {
    .project-card { 
        width: 280px;
        min-width: 280px; 
    } 
}

/* =========================================
   9. WIDGET DE CHAT (VISUAL REFERENCE)
   ========================================= */

.floating-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* --- BOTÃO GATILHO (ROSA) --- */
.floating-chat-btn {
    width: 65px;
    height: 65px;
    background-color: #ff0066; /* Rosa vibrante */
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(255, 0, 102, 0.5);
    transition: transform 0.3s ease;
}

.floating-chat-btn:hover {
    transform: scale(1.1);
}

/* --- O POPUP (JANELA) --- */
.chat-popup {
    width: 340px;
    background-color: #ffffff; /* FUNDO BRANCO (Como na referência) */
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    overflow: hidden;
    
    /* Animação */
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    
    position: absolute;
    bottom: 75px;
    right: 0;
}

.chat-popup.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

/* --- CABEÇALHO (PRETO/AZUL ESCURO) --- */
.chat-popup-header {
    background-color: #0f172a; /* Cor escura da referência */
    padding: 25px;
    position: relative;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #fff;
}

.header-text p {
    font-size: 0.9rem;
    margin: 0;
    color: #cbd5e1; /* Cinza claro */
    line-height: 1.3;
}

/* Botão Fechar (Círculo Branco com X) */
.close-popup {
    background: #fff;
    border: none;
    color: #000;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
    margin-left: 10px;
}

/* --- LISTA DE OPÇÕES --- */
.chat-options-list {
    padding: 15px;
    background-color: #fff; /* Garante fundo branco */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* --- BOTÕES AMARELOS --- */
.chat-option {
    background-color: #FFC000; /* AMARELO BEM VISTO */
    color: #000 !important; /* Texto preto forçado */
    text-decoration: none !important;
    padding: 15px 20px;
    border-radius: 12px; /* Arredondado como na foto */
    display: flex;
    align-items: center;
    transition: transform 0.2s, background-color 0.2s;
}

.chat-option:hover {
    background-color: #ffca2c;
    transform: translateY(-2px);
}

.icon-wrapper {
    width: 24px;
    display: flex;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.3rem; /* Tamanho do ícone */
}

.text-wrapper {
    display: flex;
    flex-direction: column;
}

.text-wrapper strong {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.text-wrapper span {
    font-size: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
}

/* Mobile */
@media (max-width: 768px) {
    .floating-chat-widget { bottom: 20px; right: 20px; }
    .chat-popup { width: 300px; }
}


/* Correção Dark Mode para o Quill */
.ql-toolbar { 
    background: #18181b; 
    border-color: #333 !important; 
    border-radius: 8px 8px 0 0; 
}
.ql-container { 
    background: #09090b; 
    border-color: #333 !important; 
    border-radius: 0 0 8px 8px; 
    color: #e4e4e7; 
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    min-height: 500px;
}
/* Ícones da toolbar brancos */
.ql-stroke { stroke: #a1a1aa !important; }
.ql-fill { fill: #a1a1aa !important; }
.ql-picker { color: #a1a1aa !important; }


/* gambiarra temporária */

.feature-img {
    background: linear-gradient(135deg, #111 0%, #000 100%);
    border-radius: 20px; 
    height: 400px; 
    border: 1px solid #333;
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;

    /* --- O QUE FAZ CENTRALIZAR A CAIXA --- */
    width: 70%;
    margin: 0 auto; /* "0" em cima/baixo, "auto" nas laterais (centraliza) */
}

