:root {
    --bg-dark: #0A192F;
    --text-primary: #E6F1FF;
    --text-secondary: #8892B0;
    --gradient-start: #64FFDA;
    --gradient-startup: #53dfbe;
    --gradient-end: #7A53E0;
    --card-bg: #0a192e;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { 
    scroll-behavior: smooth;
}

body {
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Internet Explorer/Edge */
    user-select: none;         /* Padrão */
    
    -webkit-user-drag: none;   /* Safari */
    -khtml-user-drag: none;    /* Versões antigas de navegadores */
    -moz-user-drag: none;      /* Firefox */
    -o-user-drag: none;        /* Opera */
    user-drag: none;
}

/* Reativa a seleção de texto APENAS para campos de formulário, permitindo que sejam usados normalmente */
input, textarea {
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

/* Torna as imagens não interativas a eventos de mouse, dificultando o "Salvar como..." */
img {
    pointer-events: none;
}


body { 
    background-color: var(--bg-dark); 
    color: var(--text-secondary); 
    font-family: var(--font-secondary); 
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
body.menu-open { overflow: hidden; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3, h4 { font-family: var(--font-primary); color: var(--text-primary); font-weight: 600; }
section { padding: 90px 0; }
.section-title { font-size: 2.7rem; text-align: center; margin-bottom: 20px; }
.section-subtitle { text-align: center; max-width: 600px; margin: 0 auto 60px; font-size: 1.1rem; color: var(--text-secondary); }
.btn-cta { display: inline-block; padding: 12px 28px; background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); color: #000 !important; font-family: var(--font-primary); font-weight: 600; text-decoration: none; border-radius: 5px; transition: transform 0.3s ease, box-shadow 0.3s ease; border: none; cursor: pointer; }
.btn-cta:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); }
.anim-on-scroll { opacity: 0; transform: translateY(30px); transition: opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1); }
.anim-on-scroll.visible { opacity: 1; transform: translateY(0); }
.header { position: fixed; width: 100%; top: 0; left: 0; z-index: 1000; transition: background-color 0.3s ease, box-shadow 0.3s ease, height 0.3s ease, transform 0.3s ease; height: 120px; }
.header.scrolled { background-color: rgba(10, 25, 47, 0.85); backdrop-filter: blur(10px); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); height: 80px; }
.header.hidden { transform: translateY(-100%); }
.header .container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.logo img { max-height: 60px; width: auto; transition: transform 0.3s ease; transform: translateY(4px); }
.header.scrolled .logo img { transform: scale(0.8) translateY(4px); }
.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav ul { display: flex; list-style: none; align-items: center; gap: 0px 40px; }
.main-nav a { color: var(--text-primary); text-decoration: none; font-size: 1rem; position: relative; padding-top: 5px; padding-bottom: 5px; }
.main-nav a:not(.btn-cta)::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); transition: width 0.3s ease; }
.main-nav a:not(.btn-cta):hover::after { width: 100%; }
.mobile-menu-button { display: none; width: 30px; height: 24px; background: none; border: none; cursor: pointer; position: relative; z-index: 1002; }
.mobile-menu-button span { display: block; width: 100%; height: 2px; background-color: var(--text-primary); border-radius: 2px; position: absolute; left: 0; transition: transform 0.3s ease, opacity 0.3s ease; }
.mobile-menu-button span:nth-child(1) { top: 0; }
.mobile-menu-button span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.mobile-menu-button span:nth-child(3) { bottom: 0; }
.mobile-menu-button.is-open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.mobile-menu-button.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-button.is-open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }
.nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); z-index: 998; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.nav-overlay.is-open { opacity: 1; pointer-events: auto; }
.hero { min-height: 100vh; display: flex; align-items: center; text-align: center; position: relative; overflow: hidden; }
#hero-bg-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.bg-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.5s ease-in-out; filter: brightness(0.5); }
.bg-slide.active { opacity: 1; }
#hero-typing-container { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-dark); z-index: 1001; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease; }
#typed-text { font-family: var(--font-mono); color: var(--gradient-start); font-size: 5rem; font-weight: 500; }
.typed-cursor { font-family: var(--font-mono); color: var(--gradient-start); font-size: 5rem; opacity: 1; animation: typed-blink 0.7s infinite; position: relative; top: -15px; }
@keyframes typed-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.hero-content { position: relative; z-index: 2; opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s; }
.hero-content.visible { opacity: 1; transform: translateY(0); }
.hero h1 { font-size: 4rem; }
.hero .highlight { background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; max-width: 700px; margin: 20px auto 40px; }
.hero .hero-btn { font-size: 1.1rem; padding: 15px 35px; }
.hero-fade-overlay { position: absolute; bottom: -2px; left: 0; width: 100%; height: 150px; background: linear-gradient(to top, var(--bg-dark), transparent); z-index: 3; }
.solutions { background-color: var(--card-bg); position: relative; z-index: 5; }
.solutions-subtitle { font-size: 1.8rem; margin: 60px 0 30px; padding-left: 15px; border-left: 3px solid var(--gradient-start); }
.solutions-subtitle:first-of-type { margin-top: 0; }
.solutions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.solution-card { background-color: var(--bg-dark); padding: 30px; border-radius: 5px; border: 1px solid #233554; transition: transform 0.3s ease, border-color 0.3s ease; }
.solution-card:hover { transform: translateY(-5px); border-color: var(--gradient-start); }
.solution-icon { font-size: 2rem; margin-bottom: 20px; color: var(--gradient-start); }
.solution-card h4 { font-size: 1.4rem; margin-bottom: 15px; }
.portfolio-view-switcher { display: flex; justify-content: center; gap: 20px; margin-bottom: 40px; }
.portfolio-view-switcher button { background: none; border: none; color: var(--text-secondary); font-size: 1.5rem; cursor: pointer; transition: color 0.3s ease, transform 0.3s ease; padding: 5px 10px; }
.portfolio-view-switcher button.active { color: var(--gradient-start); }
.portfolio-view-switcher button:hover { transform: translateY(-2px); color: var(--text-primary); }
.portfolio-card { display: flex; flex-direction: column; height: 100%; background-color: var(--card-bg); border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.3); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.portfolio-card:hover { transform: translateY(-5px); box-shadow: 0 15px 40px rgba(0,0,0,0.4); }
.portfolio-slider { width: 100%; padding-bottom: 50px; }
.swiper-button-next, .swiper-button-prev { color: var(--gradient-start); }
.browser-mockup { transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1); }
.browser-header { background-color: #1E2D48; padding: 5px; border-bottom: 1px solid #233554; border-radius: 12px 12px 0px 0px; }
.browser-content { overflow: hidden; }
.browser-content img { display: block; width: 100%; object-position: top center; transition: opacity 0.3s ease-in-out; }
.portfolio-info { padding: 15px 20px; border-top: 1px solid #1E2D48; margin-top: auto; }
.portfolio-info h3 { font-size: 1.3rem; color: var(--text-primary); }
.portfolio-info p { color: var(--text-secondary); font-size: 0.9rem; }
.portfolio-image-link { display: block; }
.browser-mockup.view-mobile { max-width: 280px; margin: 0 auto; border-radius: 20px 20px 0px 0px; border: 8px solid var(--card-bg); box-shadow: 0 0 15px rgba(0,0,0,0.2); }
.browser-mockup.view-mobile .browser-content {border-radius: 0px 0px 12px 12px; }
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px 40px; }
.feature-item { display: flex; align-items: flex-start; gap: 20px; }
.feature-icon { flex-shrink: 0; font-size: 2rem; background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.feature-content h3 { font-size: 1.3rem; margin-bottom: 10px; }
#contato .container > p.anim-on-scroll { text-align: center; margin-bottom: 40px; margin-top: -15px; }
.contact-form { max-width: 600px; margin: 0 auto; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; background-color: var(--card-bg); border: 1px solid #233554; border-radius: 5px; color: var(--text-primary); font-family: var(--font-secondary); font-size: 1rem; transition: border-color 0.3s ease; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--gradient-start); }
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form button[type="submit"]:disabled { cursor: not-allowed; opacity: 0.7; }
#form-status { margin-top: 20px; padding: 15px; border-radius: 5px; text-align: center; font-weight: 500; display: none; }
#form-status.success { background-color: rgba(100, 255, 218, 0.1); color: var(--gradient-start); border: 1px solid var(--gradient-start); }
#form-status.error { background-color: rgba(255, 87, 87, 0.1); color: #FF5757; border: 1px solid #FF5757; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }
.footer { padding: 80px 0 0; border-top: 1px solid #233554; background-color: #081428; }
.footer .container { display: block; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; margin-bottom: 60px; }
.footer-column h4 { font-size: 1.2rem; margin-bottom: 20px; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column ul a, .footer-column p a { color: var(--text-secondary); text-decoration: none; transition: color 0.3s ease; }
.footer-column ul a:hover, .footer-column p a:hover { color: var(--gradient-start); }
.footer-link-cta { color: var(--gradient-start); font-weight: 600; text-decoration: none; transition: letter-spacing 0.3s ease; }
.footer-link-cta:hover { letter-spacing: 0.5px; }
.footer-social { display: flex; gap: 20px; margin-top: 20px; }
.footer-social a { color: var(--text-secondary); font-size: 1.5rem; transition: color 0.3s ease, transform 0.3s ease; }
.footer-social a:hover { color: var(--gradient-start); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid #233554; padding: 30px 0; text-align: center; }
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 40px; right: 40px; background-color: #25d366; color: #FFF; border-radius: 50px; z-index: 100; display: flex; justify-content: center; align-items: center; text-decoration: none; transition: transform 0.3s ease; font-size: 30px; box-shadow: 2px 2px 10px rgba(0,0,0,0.3); }
.whatsapp-float:hover { transform: scale(1.1); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--card-bg); }
::-webkit-scrollbar-thumb { background: var(--bg-dark); border: 1px solid var(--gradient-start); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gradient-startup); }

/* =================================================================== */
/* --- ESTILOS DO MENU DROPDOWN (VERSÃO COMPLETA E CORRIGIDA) --- */
/* =================================================================== */

.main-nav .dropdown {
    position: relative;
    /* FIX: Adiciona padding inferior para criar uma "ponte" para o mouse, evitando que o menu suma rápido */
    padding-bottom: 15px;
    margin-bottom: -15px;
}

.main-nav .dropdown-caret {
    font-size: 0.7rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

/* ESTILOS PARA DESKTOP (MAIOR QUE 768px) */
.dropdown-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 50%;
    list-style: none;
    background-color: var(--card-bg);
    border: 1px solid #233554;
    border-radius: 5px;
    padding: 10px 0;
    width: 210px; /* FIX: Largura fixa e mais estreita conforme solicitado */
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1001;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-50%) translateY(10px); /* Começa um pouco abaixo */
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.dropdown:hover > .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0); /* Sobe para a posição final */
    pointer-events: auto;
}

.dropdown-menu li a {
    display: block; /* Garante que o link ocupe toda a largura do <li>, tornando a área toda clicável */
    padding: 9px 20px; 
    font-size: 0.95rem;
    white-space: nowrap;
    text-align: left; 
    transition: background-color 0.2s ease, color 0.2s ease;
    min-width: 210px;
}

@media (min-width: 768px) {
.dropdown-menu li a:hover {
    background-color: rgba(100, 255, 218, 0.1);
    color: var(--gradient-start);
}
}
.dropdown-menu li a::after {
    display: none;
}

@media (max-width: 900px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: 1fr; }
}

/* =================================================================== */
/* --- ESTILOS RESPONSIVOS E MENU MOBILE (CORRIGIDO) --- */
/* =================================================================== */

@media (max-width: 768px) {
    .bg-slide { background-position: center 20%; }
    #typed-text, .typed-cursor { font-size: 3rem; top: -10px; }
    .hero h1 { font-size: 2.5rem; }
    .build { font-size: 1.6rem; }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: min(75vw, 320px);
        height: 100vh;
        background-color: var(--card-bg);
        box-shadow: -10px 0 30px rgba(0,0,0,0.3);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        transform: translateX(100%);
        z-index: 999;
        padding: 100px 0 40px;
        overflow-y: auto;
    }
    .main-nav.is-open {
        transform: translateX(0);
    }
    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
        padding: 0;
    }
    /* FIX: Reseta o padding do item dropdown no mobile para não afetar o layout */
    .main-nav .dropdown {
        padding-bottom: 0;
        margin-bottom: 0;
    }
    .main-nav li {
        width: 100%;
        text-align: left;
    }
    .main-nav a:not(.btn-cta) {
        font-size: 1.5rem;
        display: block;
        padding: 15px 30px;
        font-weight: 600;
        width: 100%;
    }
    .main-nav a::after { display: none; }
    .main-nav .header-cta {
        display: block;
        margin: 40px auto 0;
        text-align: center;
    }
    .mobile-menu-button {
        display: block;
    }
    .solutions-grid { grid-template-columns: 1fr; }

    /* --- LÓGICA DO DROPDOWN MOBILE TOTALMENTE REESCRITA --- */
    
    .dropdown:hover > .dropdown-menu {
        /* Desativa completamente o hover do desktop */
        visibility: hidden; 
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        max-height: 0; 
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        
        /* FIX: Garante que os itens dentro do menu sejam visíveis quando ele se expandir */
        /* Isso resolve o bug do "espaço em branco" */
        visibility: visible !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
    }
    
    .dropdown.active > .dropdown-menu {
        max-height: 500px;
    }
    
    .dropdown.active > a > .dropdown-caret {
        transform: rotate(180deg);
    }
    
    .dropdown-menu li a {
        font-size: 1rem !important;
        font-weight: 400;
        color: var(--text-secondary);
        padding: 12px 30px 12px 45px;
        background-color: rgba(10, 25, 47, 0.5);
    }
    .dropdown-menu li:last-child a {
        padding-bottom: 15px;
    }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
}