/* ================= HERO ================= */
.services-hero {
    position: relative;
    padding: 160px 0 100px 0;
    background: #020c1b;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.circuit-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0.1;
    background-image: radial-gradient(#64ffda 1px, transparent 1px);
    background-size: 30px 30px;
}

.hero-content-serv h1 { font-size: 3.5rem; margin-bottom: 20px; color: #fff; }
.hero-content-serv p { font-size: 1.2rem; color: #8892b0; max-width: 600px; }

/* ================= LAYOUT GERAL ================= */
.main-services-wrapper {
    background: var(--color-bg-main);
    padding: 80px 0;
}

.services-layout {
    display: grid;
    grid-template-columns: 300px 1fr; /* Menu Fixo Esquerda | Conteúdo Direita */
    gap: 60px;
    align-items: start;
}

/* --- SIDEBAR FIXA (STICKY NAV) --- */
.services-nav {
    position: sticky;
    top: 120px;
    border-right: 1px solid rgba(255,255,255,0.1);
    padding-right: 20px;
}

.sticky-menu li { margin-bottom: 20px; }

.spy-link {
    display: block;
    color: var(--color-text-secondary);
    font-size: 1rem;
    padding: 10px 0;
    transition: all 0.3s;
    position: relative;
}

.spy-link:hover, .spy-link.active {
    color: var(--color-accent);
    padding-left: 15px;
    font-weight: 600;
}
.spy-link.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 6px; height: 6px; background: var(--color-accent); border-radius: 50%;
}

/* --- CONTEÚDO DOS SERVIÇOS (BLOCOS PADRÃO) --- */
.service-block {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 120px;
    align-items: center;
    scroll-margin-top: 150px;
}

/* Inverte a ordem nos pares */
.service-block:nth-child(even) { direction: rtl; }
.service-block:nth-child(even) .service-info { direction: ltr; }

.step-num {
    font-size: 5rem; font-weight: 900; color: rgba(255,255,255,0.03);
    line-height: 1; display: block; margin-bottom: -20px;
}

.service-info h2 { font-size: 2rem; color: #fff; margin-bottom: 15px; }
.lead { font-size: 1.1rem; color: var(--color-accent); margin-bottom: 20px; }
.service-info p { color: #8892b0; margin-bottom: 20px; line-height: 1.6; }

.service-features { margin-bottom: 30px; }
.service-features li { color: #ccd6f6; margin-bottom: 10px; }

/* --- VISUAIS CSS PURO --- */
.service-visual {
    height: 300px;
    background: #112240;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: center; align-items: center;
    position: relative;
    overflow: hidden;
}

/* Ícones e Animações */
.icon-overlay svg { width: 80px; height: 80px; color: var(--color-accent); opacity: 0.8; }

.oscilloscope { width: 100%; height: 100px; position: relative; overflow: hidden; }
.sine-wave {
    width: 200%; height: 100%;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 25' fill='none' stroke='%23f26522' stroke-width='2'%3e%3cpath d='M0 12.5 Q 12.5 0 25 12.5 T 50 12.5 T 75 12.5 T 100 12.5' /%3e%3c/svg%3e");
    animation: wave-move 2s linear infinite; opacity: 0.5;
}
@keyframes wave-move { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.map-dots { width: 100%; height: 100%; position: relative; }
.dot { width: 10px; height: 10px; background: var(--color-accent); border-radius: 50%; position: absolute; box-shadow: 0 0 10px var(--color-accent); }
.d1 { top: 30%; left: 20%; } .d2 { top: 70%; left: 80%; } .d3 { top: 50%; left: 50%; }
.connect-lines { position: absolute; width: 100%; height: 100%; top: 0; left: 0; opacity: 0.3; }

.stamp {
    border: 3px solid var(--color-accent); color: var(--color-accent);
    padding: 10px 20px; font-weight: 900; font-size: 1.5rem; letter-spacing: 2px;
    transform: rotate(-10deg); border-radius: 10px; opacity: 0.8;
}

/* Animação de Entrada */
.fade-up { opacity: 0; transform: translateY(40px); transition: 0.8s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }


/* ================= NOVO BLOCO: SERVIÇOS TÉCNICOS (GRID) ================= */
/* Esse bloco NÃO inverte (direction rtl) e ocupa a largura toda */
.service-block.full-width-block {
    display: block !important;
    text-align: left;
    direction: ltr !important;
}

.full-width-block .tech-header {
    margin-bottom: 40px;
    max-width: 800px;
}

/* O Grid de Cards */
.tech-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

/* Estilo do Cartão Técnico */
.tech-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tech-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: 0 10px 30px -10px rgba(242, 101, 34, 0.15);
}

.card-icon {
    font-size: 2rem; margin-bottom: 15px;
    background: rgba(242, 100, 34, 0.1);
    width: 50px; height: 50px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 8px; color: #fff;
}

.tech-card h4 { color: #fff; font-size: 1.1rem; margin-bottom: 5px; font-weight: 600; }

.tech-sub {
    font-size: 0.75rem; text-transform: uppercase;
    color: var(--color-accent); letter-spacing: 1px;
    margin-bottom: 12px; font-weight: 700; display: block;
}

.tech-card p { color: #8892b0; font-size: 0.9rem; line-height: 1.5; margin: 0; }


/* ============================================================
   RESPONSIVIDADE: SERVIÇOS ESPECIALIZADOS
   ============================================================ */

/* 1. MENU HAMBURGUER (Obrigatório) */
.mobile-menu-trigger { display: none; }

@media (max-width: 1024px) {

    /* --- CABEÇALHO --- */
    .header-cta { display: none !important; }
    
    .mobile-menu-trigger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px; height: 22px;
        cursor: pointer; z-index: 99999;
        margin-left: auto;
    }

    .mobile-menu-trigger .bar {
        width: 100%; height: 2px; 
        background: var(--color-accent) !important; transition: 0.3s;
    }
    
    .mobile-menu-trigger.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .mobile-menu-trigger.active .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-trigger.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    /* GAVETA DO MENU */
    .main-nav {
        position: fixed; top: 0; right: -100%;
        width: 85%; height: 100vh;
        background: #020610;
        border-left: 2px solid var(--color-accent);
        padding: 100px 20px;
        transition: 0.3s ease;
        display: flex !important; flex-direction: column;
        z-index: 9999;
    }
    .main-nav.menu-open { right: 0; }
    .nav-list { flex-direction: column; width: 100%; gap: 0; }
    .nav-link { display: block; padding: 15px 0; border-bottom: 1px solid #333; width: 100%; font-size: 1.1rem; }
    .dropdown-menu { display: none; background: #000; padding-left: 20px; }
    .dropdown-item.active-mobile .dropdown-menu { display: block; }


    /* --- HERO SECTION --- */
    .services-hero {
        padding: 100px 20px 40px !important;
        min-height: auto !important;
        height: auto !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .hero-content-serv h1 {
        font-size: 2rem !important;
        margin-top: 20px;
    }
    .hero-content-serv p { font-size: 1rem !important; padding: 0 10px !important; }


    /* --- LAYOUT GERAL DOS SERVIÇOS --- */
    .main-services-wrapper { padding: 40px 0 !important; }
    .services-layout { display: block !important; }

    .service-block {
        padding-top: 20px; /* Respiro para não colar na barra fixa ao clicar */
        margin-bottom: 80px !important;
    }

    .service-visual {
        height: 220px !important;
        margin-bottom: 25px;
    }

    .step-num {
        font-size: 3rem !important;
        margin-bottom: 0 !important;
    }

    .services-nav {
        display: block !important;
        position: sticky;
        top: 70px; /* Fica logo abaixo do header principal */
        left: 0;
        width: 100%;
        background: rgba(2, 12, 27, 0.95);
        backdrop-filter: blur(10px);
        z-index: 900;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 30px;
    }

    .sticky-menu {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important; /* Permite deslizar os tópicos */
        white-space: nowrap;
        gap: 10px;
        padding: 0 20px;
        scrollbar-width: none; /* Esconde barra no Firefox */
    }

    .sticky-menu::-webkit-scrollbar { display: none; } /* Esconde barra no Chrome/Safari */
    .sticky-menu li { margin-bottom: 0 !important; }


    .spy-link {
        font-size: 0.85rem !important;
        padding: 8px 18px !important;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 30px;
        color: #8892b0 !important;
        transition: 0.3s;
    }

    /* Tópico Ativo na barra */
    .spy-link.active {
        background: var(--color-accent) !important;
        color: #020c1b !important;
        border-color: var(--color-accent);
        padding-left: 18px !important; /* Reseta o padding do desktop */
    }

    .spy-link.active::before { display: none; } /* Remove a bolinha do desktop */

    /* --- BLOCOS DE SERVIÇO (CARDS) --- */
    .services-stream {
        display: flex !important; flex-direction: column !important; gap: 60px !important;
    }

    .service-block {
        display: flex !important; flex-direction: column !important;
        gap: 20px !important; margin-bottom: 0 !important; padding-bottom: 40px !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .service-block:last-child { border-bottom: none !important; }

    /* Remove a inversão dos blocos pares */
    .service-block:nth-child(even) { direction: ltr !important; }
    .service-block:nth-child(even) .service-info { direction: ltr !important; }


    /* --- VISUAIS --- */
    .service-visual { width: 100% !important; height: 180px !important; }
    .icon-overlay svg { width: 50px !important; height: 50px !important; }
    .stamp { font-size: 1rem !important; padding: 5px 15px !important; border-width: 2px !important; }


    /* --- TEXTOS E CONTEÚDO --- */
    .service-info { padding: 0 10px !important; }
    .step-num { font-size: 2.5rem !important; margin-bottom: -10px !important; opacity: 0.1 !important; }
    .service-info h2 { font-size: 1.6rem !important; margin-bottom: 10px !important; }
    .lead { font-size: 1rem !important; margin-bottom: 15px !important; }
    .service-info p { font-size: 0.95rem !important; line-height: 1.5 !important; }
    .service-features li { font-size: 0.9rem !important; }
    .service-info .btn { width: 100% !important; padding: 15px !important; text-align: center !important; }

    /* --- RESPONSIVIDADE DO NOVO GRID --- */
    .full-width-block .tech-header h2 { font-size: 1.8rem !important; }
    .tech-services-grid { grid-template-columns: 1fr 1fr; gap: 15px; } /* 2 colunas no tablet */
}

/* Ajuste fino para o Header não atropelar o Hero */
#main-header {
    background: rgba(2, 12, 27, 0.98);
}

/* --- TELA 320px (CELULAR PEQUENO) --- */
@media (max-width: 600px) {
    .tech-services-grid { grid-template-columns: 1fr !important; } /* 1 coluna no celular */
    .tech-card { padding: 20px !important; }
    .card-icon { width: 40px !important; height: 40px !important; font-size: 1.5rem !important; }
    
    .hero-content-serv h1 { font-size: 1.8rem !important; }
    .service-visual { height: 150px !important; }
    .service-info h2 { font-size: 1.4rem !important; }
}