/* --- CORES & VARIAVEIS --- */
:root {
    --bg-dark: #02040a;
    --bg-card: rgba(10, 25, 40, 0.92); /* Levemente mais opaco para leitura */
    --text-light: #f0f0f0;
    --text-dim: #cbd5e1; 
    --text-body: #e2e8f0; 
    --accent: #FFC107;
    --accent-glow: rgba(255, 193, 7, 0.5);
    --cyan: #00aaff;
    --cyan-glow: rgba(0, 170, 255, 0.4);
    --success: #00e676;
    --danger: #ff1744;
    --sidebar-width: 70px;
    --sidebar-width-expanded: 280px;
    --section-padding: 80px 40px;
}

/* --- TIPOGRAFIA --- */
body { font-family: 'Montserrat', sans-serif; background-color: var(--bg-dark); color: var(--text-light); margin: 0; overflow-x: hidden; }
.eng-mono { font-family: 'Fira Code', monospace; letter-spacing: -0.5px; } 

/* --- BACKGROUND 3D --- */
#bg-3d { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.bg-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(2,4,10,0.4) 0%, rgba(2,4,10,0.95) 100%);
    z-index: -1; pointer-events: none;
}

/* --- SIDEBAR --- */
.eng-sidebar {
    width: var(--sidebar-width);
    background-color: rgba(5, 10, 15, 0.95);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    height: 100vh; position: fixed; left: 0; top: 0; z-index: 1000;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.1s; 
    overflow: hidden; display: flex; flex-direction: column; padding-top: 20px;
}

.eng-sidebar::after {
    content: ''; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 30px; background: rgba(255,255,255,0.15); border-radius: 2px;
    transition: 0.3s; pointer-events: none;
}
.eng-sidebar:hover::after { opacity: 0; }

@media (hover: hover) {
    .eng-sidebar:hover { width: var(--sidebar-width-expanded); border-right-color: var(--accent-glow); }
    .eng-sidebar:hover .eng-sidebar-content { opacity: 1; visibility: visible; }
}

.eng-sidebar-content { 
    opacity: 0; visibility: hidden; transition: opacity 0.2s ease 0.1s; 
    width: 220px; padding: 0 25px 30px; display: flex; flex-direction: column; height: 100%; 
}

.eng-menu-trigger { width: var(--sidebar-width); text-align: center; font-size: 1.4rem; margin-bottom: 30px; color: var(--text-dim); }
.eng-brand { color: #fff; font-weight: 800; text-transform: uppercase; margin-bottom: 40px; white-space: nowrap; }

.eng-nav-menu { display: flex; flex-direction: column; gap: 5px; }
.eng-nav-link { color: var(--text-dim); text-decoration: none; font-size: 0.85rem; text-transform: uppercase; font-weight: 600; display: flex; align-items: center; gap: 15px; padding: 12px 0; transition: 0.3s; }
.eng-nav-link:hover { color: var(--accent); transform: translateX(5px); }

/* --- BOTÕES DO SISTEMA --- */
.eng-system-area { margin-top: auto; width: 100%; padding-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }

.eng-divider-text {
    font-size: 0.65rem; color: #666; text-transform: uppercase; margin-bottom: 5px;
    letter-spacing: 1px; padding-left: 2px; font-weight: 700;
}

.eng-system-btn {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px;
    width: 100%; padding: 12px 15px; text-decoration: none;
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px; color: var(--text-dim); font-size: 0.75rem;
    font-weight: 600; text-transform: uppercase; font-family: 'Fira Code', monospace;
    transition: all 0.3s ease; box-sizing: border-box;
}

.eng-system-btn:hover {
    background: var(--bg-dark); border-color: var(--cyan); color: #fff;
    transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0, 170, 255, 0.15);
}

.eng-hint { position: absolute; left: 26px; bottom: 30px; font-size: 0.7rem; color: #444; transform: rotate(-90deg); transform-origin: left bottom; letter-spacing: 3px; pointer-events: none; }

/* --- HERO & CONTEÚDO --- */
.eng-main-content { margin-left: var(--sidebar-width); transition: margin 0.3s; }

.eng-hero-section { min-height: 80vh; display: flex; align-items: center; padding: 0 5% 0 5%; position: relative;}
.eng-hero-text { display: flex; flex-direction: column; justify-content: center; max-width: 800px; }

.main-title { 
    font-size: 4.5rem; line-height: 1; margin-bottom: 25px; font-weight: 800; letter-spacing: -2px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.9); 
}
.main-title span { color: transparent; -webkit-text-stroke: 1px var(--accent); position: relative; } 
.main-description { 
    font-size: 1.1rem; color: var(--text-body); max-width: 600px; 
    border-left: 2px solid var(--accent); padding-left: 20px; 
    background: linear-gradient(90deg, rgba(255,193,7,0.08) 0%, transparent 100%); 
    padding: 20px; backdrop-filter: blur(5px);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* --- SECTIONS --- */
.eng-section { padding: var(--section-padding); position: relative; z-index: 2; border-top: 1px solid rgba(255,255,255,0.02); }
.eng-section-title { 
    text-align: center; font-size: 2rem; margin-bottom: 60px; 
    text-transform: uppercase; letter-spacing: 3px; 
    text-shadow: 0 5px 15px rgba(0,0,0,0.8);
}

.eng-services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; max-width: 1400px; margin: 0 auto; }

.eng-card {
    background: var(--bg-card);
    padding: 35px 25px;
    border: 1px solid rgba(255, 255, 255, 0.08); 
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0,0,0,0.4);
    border-radius: 8px; backdrop-filter: blur(15px);
    transition: all 0.4s ease; cursor: pointer; position: relative; overflow: hidden;
}

.eng-card::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 0%; background: var(--accent); transition: 0.4s; }
.eng-card p { color: #d1d5db; font-size: 0.95rem; line-height: 1.6; }

.eng-card:hover, .eng-card:focus { 
    transform: translateY(-8px); background: rgba(15, 30, 45, 0.95);
    box-shadow: 0 15px 40px rgba(0, 170, 255, 0.1); border-color: var(--cyan); outline: none;
}
.eng-card:hover::before, .eng-card:focus::before { height: 100%; }

.card-icon { font-size: 2rem; color: var(--accent); margin-bottom: 20px; display: block; text-shadow: 0 0 15px rgba(255,193,7,0.3); }
.card-cta { font-size: 0.75rem; color: var(--cyan); margin-top: 20px; display: block; text-transform: uppercase; font-weight: 700; }
.eng-card:hover .card-cta { color: #fff; }

/* --- BLOG & COMPONENTES --- */
.eng-blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; }
.eng-blog-card { background: #0a0a0a; border: 1px solid #222; border-radius: 8px; overflow: hidden; transition: 0.3s; }
.eng-blog-card:hover { border-color: var(--accent); transform: scale(1.02); }
.eng-blog-img { width: 100%; height: 180px; object-fit: cover; filter: grayscale(90%); transition: 0.4s; }
.eng-blog-card:hover .eng-blog-img { filter: grayscale(0%); }
.eng-blog-content { padding: 20px; }
.eng-blog-tag { font-size: 0.65rem; color: var(--accent); border: 1px solid var(--accent); padding: 2px 6px; border-radius: 3px; text-transform: uppercase; }
.eng-blog-link { cursor: pointer; display: inline-block; margin-top: 10px; font-size: 0.8rem; color: var(--cyan); }

/* --- FORM & FOOTER --- */
.eng-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 50px; max-width: 1200px; margin: 0 auto; }

.eng-input-group { margin-bottom: 15px; }
.eng-input-group input, .eng-input-group textarea {
    width: 100%; box-sizing: border-box; padding: 15px; 
    background: rgba(10, 15, 20, 0.7); 
    backdrop-filter: blur(5px);
    border: 1px solid #333; 
    color: #fff; border-radius: 4px; font-family: 'Fira Code', monospace; font-size: 0.9rem;
    transition: 0.3s;
}
.eng-input-group input:focus, .eng-input-group textarea:focus { 
    border-color: var(--accent); outline: none; background: rgba(255,193,7,0.05); 
    box-shadow: 0 0 15px var(--accent-glow); transform: translateX(5px);
}

.eng-submit-btn {
    width: 100%; padding: 15px; background: var(--accent); border: none;
    font-weight: 800; text-transform: uppercase; letter-spacing: 1px; cursor: pointer;
    border-radius: 4px; color: #000; transition: 0.3s;
}
.eng-submit-btn:hover { background: #fff; box-shadow: 0 0 20px var(--accent-glow); }

/* --- CALCULADORA & MODAL --- */
.eng-modal { display: none; position: fixed; z-index: 5000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); backdrop-filter: blur(10px); overflow-y: auto; }
.eng-modal-content { 
    background: #0f1215; margin: 10vh auto; padding: 40px; 
    border: 1px solid #333; width: 90%; max-width: 600px; 
    border-radius: 8px; position: relative; box-shadow: 0 0 50px rgba(0,0,0,0.8); 
    color: #e0e0e0;
}
.eng-modal-content h2 { color: var(--accent); margin-top: 0; }
.eng-modal-content ul { padding-left: 20px; line-height: 1.6; }
.eng-close-btn { position: absolute; top: 15px; right: 20px; font-size: 30px; cursor: pointer; color: #666; transition: 0.3s; }
.eng-close-btn:hover { color: #fff; }

.eng-calc-input { 
    background: #000; border: 1px solid #333; color: var(--success); 
    padding: 15px; width: 100%; box-sizing: border-box; 
    font-family: 'Fira Code', monospace; font-size: 1.2rem; text-align: right;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}
.eng-calc-btn { 
    width: 100%; padding: 15px; background: linear-gradient(45deg, var(--cyan), #0077cc);
    border: none; font-weight: 800; margin-top: 20px; cursor: pointer; 
    color: #fff; text-transform: uppercase; letter-spacing: 2px;
}
.eng-calc-btn:hover { filter: brightness(1.2); }
.eng-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.eng-result-box { display: none; margin-top: 20px; background: #050a10; padding: 20px; border-radius: 4px; border: 1px solid #222; }
.eng-bar-container { height: 10px; background: #222; margin-top: 10px; border-radius: 5px; overflow: hidden; }
.eng-bar-fill { height: 100%; background: var(--danger); width: 0%; transition: width 0.5s; }
.eng-bar-fill.green { background: var(--success); }

/* --- ANIMAÇÃO & ACESSIBILIDADE --- */
.pulse-anim { position: relative; z-index: 1; }
.pulse-anim::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit; box-shadow: 0 0 0 10px rgba(255, 193, 7, 0);
    animation: pulse-gpu 2s infinite; z-index: -1;
}
@keyframes pulse-gpu {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.5); opacity: 0; }
}

.eng-whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background: #25d366; color: #fff; border-radius: 50%; display: flex;
    justify-content: center; align-items: center; font-size: 30px; z-index: 2000;
    text-decoration: none; transition: 0.3s;
}
.eng-whatsapp-float:hover { transform: scale(1.1); }

/* Classe para leitores de tela (Oculta visualmente mas mantem acessivel) */
.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;
}

/* --- LOADER --- */
#loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #02040a; z-index: 9999; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: opacity 0.5s; pointer-events: none; }
.loader-spinner { width: 40px; height: 40px; border: 3px solid #333; border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- RESPONSIVIDADE --- */
@media (max-width: 768px) {
    .eng-sidebar { 
        width: 100%; 
        height: calc(70px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        bottom: 0; top: auto; 
        flex-direction: row; padding-top: 0; justify-content: space-around; 
        border-top: 1px solid #333; border-right: none; align-items: center;
        background: rgba(2, 4, 10, 0.98);
    }
    .eng-sidebar:hover { width: 100%; }
    .eng-sidebar-content, .eng-hint, .eng-menu-trigger { display: none; }
    
    .eng-main-content { margin-left: 0; margin-bottom: 90px; padding-left: 0; }
    .eng-hero-section { padding: 40px 20px; text-align: center; height: auto; min-height: 60vh; }
    .eng-section { padding: 50px 20px; }
    .main-title { font-size: 2.5rem; }
    
    .mobile-only { 
        display: flex; align-items: center; justify-content: center;
        color: #666; font-size: 1.5rem; width: 100%; height: 100%;
        text-decoration: none; transition: 0.2s;
    }
    .mobile-only:hover, .mobile-only.active { 
        color: var(--accent); 
        background: radial-gradient(circle, rgba(255,193,7,0.05) 0%, transparent 70%);
    }
    .eng-calc-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) { .mobile-only { display: none; } }