/* --- 1. Variáveis e Reset (Base Sólida) --- */
:root {
    --color-bg: #050505;
    --color-surface: #0F0F0F;
    --color-surface-hover: #18181b;
    
    --color-accent: #2563EB; /* Azul Royal Profundo */
    --color-accent-hover: #1D4ED8;
    
    --color-text: #E4E4E7; /* Zinco Claro */
    --color-text-muted: #A1A1AA; /* Zinco Médio */
    --color-border: rgba(255, 255, 255, 0.08); /* Borda ultra sutil */
    
    /* Tipografia */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Layout */
    --container-width: 1280px;
    --radius: 8px;
    --header-height: 80px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { 
    scroll-behavior: smooth; 
    font-size: 16px;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--color-accent);
    color: white;
}

/* --- 2. Utilitários de Layout --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.grid-3-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.grid-4-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }

@media (max-width: 900px) {
    .grid-2-col { grid-template-columns: 1fr; gap: 3rem; }
    .reverse-mobile { display: flex; flex-direction: column-reverse; } /* Mapa em cima no mobile, texto embaixo */
}

.section-pad { padding: 6rem 0; }
.bg-surface { background-color: var(--color-surface); }
.border-y { border-block: 1px solid var(--color-border); }
.border-top { border-top: 1px solid var(--color-border); }
.relative { position: relative; }
.text-center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.align-end { align-items: flex-end; }
.mb-large { margin-bottom: 4rem; }
.mb-base { margin-bottom: 2rem; }

/* --- 3. Tipografia --- */
h1, h2, h3, h4 { 
    font-family: var(--font-display); 
    color: white; 
    font-weight: 700; 
    letter-spacing: -0.02em; 
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h5 { color: white; font-weight: 700; font-size: 1rem; }

.mono-tag { 
    font-family: var(--font-mono); 
    color: var(--color-accent); 
    font-size: 0.75rem; 
    font-weight: 700;
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    display: block; 
    margin-bottom: 1rem; 
}

.text-gradient { 
    background: linear-gradient(135deg, #fff 30%, var(--color-accent) 100%); 
    -webkit-background-clip: text; 
    color: transparent; 
}

.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: 0.875rem; }

/* --- 4. Navegação --- */
.glass-nav {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(5, 5, 5, 0.85); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height); 
    display: flex; align-items: center;
}

.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.logo-img { height: 40px; width: auto; object-fit: contain; }
.logo-text { font-family: var(--font-display); font-weight: bold; color: white; font-size: 1.5rem; }

.nav-links { list-style: none; display: flex; gap: 2.5rem; }
.nav-links a { 
    text-decoration: none; 
    color: var(--color-text-muted); 
    font-size: 0.875rem; 
    font-weight: 500; 
    transition: var(--transition);
    position: relative;
}
.nav-links a:hover { color: white; }
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px;
    background: var(--color-accent); transition: var(--transition);
}
.nav-links a:hover::after { width: 100%; }

@media (max-width: 768px) {
    .nav-links { display: none; } 
}

/* --- 5. Botões --- */
.btn-primary, .btn-outline, .btn-outline-light {
    padding: 0.875rem 1.75rem; 
    border-radius: var(--radius); 
    font-weight: 600;
    text-decoration: none; 
    display: inline-flex; align-items: center; justify-content: center; gap: 0.75rem;
    transition: var(--transition); 
    cursor: pointer; 
    border: 1px solid transparent; 
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.btn-primary { 
    background: var(--color-accent); 
    color: white; 
    /* Reduzimos o tamanho do blur para 10px e a opacidade para 0.15 para ficar mais sutil */
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.05);
}
.btn-primary:hover { 
    background: var(--color-accent-hover); 
    transform: translateY(-2px); 
    /* O brilho ao passar o mouse também foi reduzido para acompanhar o estilo discreto */
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.05);
}

.btn-outline { border-color: rgba(255,255,255,0.2); color: white; background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,0.05); border-color: white; }

.btn-outline-light { 
    border-color: rgba(255,255,255,0.15); 
    color: white; 
    background: transparent;
    padding: 0.6rem 1.25rem;
    font-size: 0.8rem;
}
.btn-outline-light:hover { background: white; color: black; border-color: white; }

.full-width { width: 100%; }

/* --- 6. Formulário --- */
.contact-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

.contact-header-center {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-list-horizontal {
    list-style: none;
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.contact-list-horizontal li {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.form-container.centered-form {
    width: 100%;
    max-width: 640px; 
    margin: 0 auto;
    background: #0A0A0A; 
    border: 1px solid var(--color-border); 
    padding: 3rem; 
    border-radius: var(--radius); 
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5);
}

.form-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
}

.neo-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }

.input-group label { 
    display: block; 
    font-size: 0.875rem; 
    font-weight: 500; 
    color: var(--color-text);
    margin-bottom: 0.5rem; 
}

.input-dark, select.input-dark, textarea.input-dark {
    width: 100%; 
    background-color: #121212; 
    border: 1px solid var(--color-border);
    color: var(--color-text); 
    padding: 0.875rem 1rem;
    border-radius: var(--radius); 
    outline: none;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    color-scheme: dark; 
}

.input-dark:focus, select.input-dark:focus, textarea.input-dark:focus { 
    border-color: var(--color-accent); 
}

select.input-dark { cursor: pointer; padding-right: 2rem; }
textarea.input-dark { resize: vertical; min-height: 120px; }

/* --- 7. Hero Section --- */
.hero-section { 
    position: relative; 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    padding-top: var(--header-height); 
    overflow: hidden; 
}

#hero-canvas { position: absolute; inset: 0; z-index: 0; opacity: 0.6; }
.hero-overlay { 
    position: absolute; inset: 0; z-index: 1; 
    background: radial-gradient(circle at center, transparent 0%, var(--color-bg) 90%);
    pointer-events: none; 
}

.hero-content { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 4rem; align-items: center; }
@media (max-width: 900px) { 
    .hero-content { grid-template-columns: 1fr; text-align: center; } 
    .hero-actions { justify-content: center; } 
    .hero-desc { margin: 0 auto 2rem; } 
}

.hero-desc { font-size: 1.125rem; color: var(--color-text-muted); max-width: 540px; margin-bottom: 2.5rem; line-height: 1.7; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.badge-tech {
    display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.35rem 1rem;
    background: rgba(37, 99, 235, 0.1); border: 1px solid rgba(37, 99, 235, 0.2);
    color: #60A5FA; border-radius: 99px; font-size: 0.75rem; font-family: var(--font-mono);
    font-weight: 700; text-transform: uppercase; margin-bottom: 2rem;
}
.dot-pulse { width: 8px; height: 8px; background: #3B82F6; border-radius: 50%; box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); animation: pulse 2s infinite; }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.hero-features { display: grid; gap: 1.25rem; }
.feature-box {
    background: rgba(255,255,255,0.02); backdrop-filter: blur(8px);
    border: 1px solid var(--color-border); padding: 1.5rem; border-radius: var(--radius);
    display: flex; flex-direction: column; transition: var(--transition);
    position: relative; overflow: hidden;
}
.feature-box:hover { border-color: rgba(255,255,255,0.1); transform: translateX(5px); }

.feature-box i { font-size: 1.75rem; margin-bottom: 0.75rem; }
.feature-box strong { color: white; display: block; font-size: 1.1rem; margin-bottom: 0.25rem; }
.feature-box span { font-size: 0.75rem; color: var(--color-text-muted); text-transform: uppercase; font-family: var(--font-mono); letter-spacing: 0.05em; }
.icon-accent { color: var(--color-accent); }
.icon-success { color: #10B981; }

/* --- 8. Parceiros --- */
.partners-strip { 
    border-block: 1px solid var(--color-border); 
    background: #080808; 
    padding: 3rem 0; 
}

.section-tag { 
    font-family: var(--font-mono); 
    font-weight: 700; 
    /* Cor ajustada para ficar mais uniforme com o resto do site */
    color: var(--color-text-muted); 
    text-transform: uppercase; 
    letter-spacing: 0.15em; 
    margin-bottom: 3rem; 
    /* Fonte do título aumentada */
    font-size: 1.1rem; 
}

.partners-logos { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 4rem; 
    flex-wrap: wrap; 
    /* Removemos a opacidade e grayscale daqui para não afetar o grupo todo */
}

.partners-logos img { 
    /* Tamanho das logos aumentado de 40px para 60px */
    height: 60px; 
    width: auto; 
    object-fit: contain; 
    
    /* Efeito base para todas as logos */
    opacity: 0.6; /* Opacidade base aumentada para o branco da Unifesp não sumir */
    filter: grayscale(100%); 
    transition: var(--transition); 
    cursor: pointer;
}

/* Efeito ativado ISOLADAMENTE em cada logo ao passar o mouse */
.partners-logos img:hover { 
    opacity: 1; 
    filter: grayscale(0); 
    transform: scale(1.05); /* Dá um pequeno "salto" para destacar ainda mais */
}

.fallback-partner { 
    font-family: var(--font-display); 
    font-weight: bold; 
    font-size: 1.5rem; 
    color: white; 
    display: none; 
}

/* --- 9. NOVO CSS DA SESSÃO SOBRE --- */

/* Badge Layout (Para Origem e Expertise) */
.specs-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.spec-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.spec-badge i {
    font-size: 2rem;
    color: var(--color-accent);
}

.spec-badge small {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.spec-badge strong {
    color: white;
    font-size: 0.95rem;
}

/* Container do Mapa Limpo */
.map-clean-frame {
    width: 100%;
    height: 400px; /* Altura generosa para visualização */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    background: #111;
    position: relative;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5);
}

.map-clean-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    
}

.link-underline { color: white; font-weight: 700; border-bottom: 1px solid var(--color-accent); text-decoration: none; display: inline-block; margin-top: 1rem; }

/* --- 10. Tech Cards --- */
.tech-card {
    background: linear-gradient(180deg, var(--color-surface) 0%, rgba(15,15,15,0.5) 100%); 
    border: 1px solid var(--color-border);
    padding: 2.5rem; border-radius: var(--radius); transition: var(--transition);
    position: relative;
}
.tech-card:hover { transform: translateY(-8px); border-color: rgba(37, 99, 235, 0.3); }
.icon-box { 
    width: 56px; height: 56px; 
    background: rgba(37, 99, 235, 0.05); 
    border: 1px solid rgba(37, 99, 235, 0.1); 
    border-radius: 12px; 
    display: flex; align-items: center; justify-content: center; 
    color: var(--color-accent); margin-bottom: 1.5rem; font-size: 1.75rem; 
}
.tech-card h4 { font-size: 1.25rem; margin-bottom: 1rem; }
.tech-card p { font-size: 0.95rem; color: var(--color-text-muted); }

/* --- 11. Applications --- */
.app-card {
    height: 280px; background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: var(--radius); position: relative; overflow: hidden; 
    transition: var(--transition);
}
.app-card:hover { border-color: var(--color-accent); }
.app-card::after {
    content: ''; position: absolute; inset: 0;
    /* Invertemos o gradiente de 'to top' para 'to bottom' para acompanhar o texto no topo */
    background: linear-gradient(to bottom, rgba(0,0,0,0.95) 10%, rgba(0,0,0,0.4) 60%, transparent 100%);
    z-index: 1;
}
.app-content { 
    position: absolute; 
    top: 0; /* Mudamos de 'bottom: 0' para 'top: 0' para alinhar por cima */
    left: 0; 
    padding: 1.75rem; 
    z-index: 2; 
    width: 100%; 
}
.app-content i { font-size: 2rem; color: var(--color-accent); margin-bottom: 1rem; display: block; transition: var(--transition); }
.app-card:hover i { transform: translateY(-5px) scale(1.1); color: white; }
.app-content h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.app-content p { font-size: 0.85rem; color: var(--color-text-muted); opacity: 0.8; line-height: 1.5; }

.link-accent { font-size: 0.8rem; font-weight: 700; color: var(--color-accent); text-decoration: none; letter-spacing: 0.05em; text-transform: uppercase; }
.link-accent:hover { color: white; text-decoration: underline; }

/* --- 12. Extras: Contact Icons & Modal --- */
.icon-circle { 
    width: 48px; height: 48px; flex-shrink: 0;
    background: rgba(255,255,255,0.03); border: 1px solid var(--color-border);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    color: var(--color-accent); 
}
.link-small { font-size: 0.75rem; font-weight: bold; color: var(--color-accent); text-decoration: none; display: block; margin-top: 0.5rem; }

/* Footer */
.main-footer { background: #020202; padding: 4rem 0; border-top: 1px solid var(--color-border); font-size: 0.875rem; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 1rem; color: #52525B; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { color: #71717A; text-decoration: none; }
.footer-links a:hover { color: white; }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 1; transition: opacity 0.3s; }
.modal.hidden { opacity: 0; pointer-events: none; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(8px); }
.modal-content { 
    position: relative; background: #0A0A0A; border: 1px solid var(--color-border); 
    padding: 2.5rem; width: 100%; max-width: 420px; border-radius: 12px; 
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.7); 
    transform: translateY(0); transition: transform 0.3s;
}
.modal.hidden .modal-content { transform: translateY(20px); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h3 { font-size: 1.5rem; color: white; margin: 0; }
.btn-close { background: none; border: none; color: #71717A; cursor: pointer; font-size: 1.5rem; transition: 0.2s; }
.btn-close:hover { color: white; transform: rotate(90deg); }
.input-wrapper { margin-bottom: 1rem; }
.input-wrapper label { font-family: var(--font-mono); font-size: 0.75rem; color: #71717A; display: block; margin-bottom: 0.25rem; }

@media (max-width: 768px) {
    .contact-list-horizontal { flex-direction: column; align-items: center; gap: 1.5rem; }
    .form-container.centered-form { padding: 1.5rem; max-width: 100%; }
}
/* Inverte a cor SOMENTE da imagem que tem "unifesp" no nome */
.partners-logos img[src*="unifesp"] {
    filter: grayscale(100%) invert(1);
}

/* Mantém a UNIFESP branca e aplica o efeito de crescimento ao passar o mouse */
.partners-logos img[src*="unifesp"]:hover {
    filter: grayscale(0) invert(1);
    opacity: 1;
    transform: scale(1.05);
}