@import './preventivas.css';

/* Reset e Scroll Suave */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, sans-serif; }
html { scroll-behavior: smooth; }

:root {
  --bg-dark: #070a13;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --blue-light: #60a5fa;
  --glass-bg: rgba(15, 23, 42, 0.45);
  --glass-border: rgba(255, 255, 255, 0.06);
}

body { 
  background-color: var(--bg-dark); 
  color: var(--text-main); 
  overflow-x: hidden; 
  position: relative;
}

/* 1. Malha Digital Tech (Grade de dados sutil ao fundo) */
.bg-grid-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: -2;
  pointer-events: none;
}

/* 2. Luzes Flutuantes Tecnológicas (Animações suaves e leves) */
.bg-glow-1 {
  position: fixed; top: -10%; left: 10%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 70%);
  z-index: -1; pointer-events: none;
  animation: floatLight1 25s infinite alternate ease-in-out;
}

.bg-glow-2 {
  position: fixed; bottom: -10%; right: 5%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
  z-index: -1; pointer-events: none;
  animation: floatLight2 30s infinite alternate ease-in-out;
}

@keyframes floatLight1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(120px, 80px) scale(1.15); }
}

@keyframes floatLight2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-100px, -90px) scale(0.9); }
}

.container { max-width: 1200px; margin: 0 auto; padding: 120px 20px 40px; }

/* Efeito Glassmorphism Sofisticado */
.glass-panel {
  background: var(--glass-bg); 
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border); border-radius: 24px; 
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* NavBar Expandida e Adaptada */
.navbar {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
  width: 94%; max-width: 1050px; padding: 14px 28px; border-radius: 40px; z-index: 1000;
}
.nav-content { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 800; color: var(--blue-light); font-size: 1.3rem; letter-spacing: 0.5px; }
.nav-links { display: flex; gap: 16px; list-style: none; }
.nav-links a { color: var(--text-main); text-decoration: none; font-size: 0.84rem; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: var(--blue-light); }

/* =========================================
   Animações de Scroll (Reveal)
   ========================================= */
.reveal { 
  opacity: 0; 
  transform: translateY(60px); 
  transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1); 
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* =========================================
   Seções - Enquadramento Corrigido 
   ========================================= */
section { 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  min-height: 50vh; 
  margin-bottom: 70px; 
  padding-top: 60px; 
  position: relative;
  z-index: 1;
  /* Garante que não haja atraso no z-index da seção pai */
  transition: z-index 0s;
}

section:hover {
  z-index: 1002;
}

/* Apenas a primeira seção (Hero) ocupa a tela quase toda */
.hero { min-height: 80vh; }
.hero-content { padding: 50px 30px; text-align: center; }

/* Avatar Profile com Brilho Sutil */
.avatar-container { margin-bottom: 25px; }
.profile-avatar {
  width: 125px; height: 125px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(96, 165, 250, 0.3);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.2);
}

.hero h1 { font-size: 2.6rem; font-weight: 700; background: linear-gradient(135deg, #60a5fa, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 12px; }
.hero h2 { font-size: 1.25rem; color: var(--blue-light); font-weight: 400; margin-bottom: 24px; letter-spacing: 0.5px; }
.hero p { color: var(--text-muted); max-width: 680px; margin: 0 auto 30px; line-height: 1.65; font-size: 1.02rem; }

.badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.badges span { background: rgba(37, 99, 235, 0.08); border: 1px solid rgba(59, 130, 246, 0.25); color: var(--blue-light); padding: 6px 14px; border-radius: 30px; font-size: 0.82rem; font-weight: 500; }

.section-title { font-size: 1.45rem; margin-bottom: 30px; display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; }
.section-title svg { color: var(--blue-light); width: 22px; height: 22px; }

/* =========================================
   CONFIGURAÇÃO DOS CARDS E BALÃO (POP-OUT)
   ========================================= */
.projects-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 30px; 
}

.projects-grid--compact {
  grid-template-columns: repeat(2, minmax(280px, 350px));
  justify-content: center;
}

.project-card { 
  position: relative; 
  display: flex; 
  flex-direction: column; 
  /* Adicionado z-index 0s para reagir instantaneamente */
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.4s ease, z-index 0s; 
}

.project-card:hover { 
  transform: translateY(-6px); 
  border-color: rgba(96, 165, 250, 0.4); 
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.12); 
  z-index: 1001; 
}

.project-media { 
  width: 100%; 
  aspect-ratio: 16 / 9; 
  height: auto; 
  position: relative; 
  border-bottom: 1px solid var(--glass-border); 
  background: #0f1422; 
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.project-media img,
.project-media video { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  /* CORREÇÃO AQUI: z-index 0s tira o tempo de espera para a mídia ir para frente */
  transition: all 1.5s cubic-bezier(0.22, 1, 0.36, 1), z-index 0s; 
  transform-origin: center center; 
  position: relative;
  z-index: 1;
}

.project-media--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.8));
}

.project-media--logo img {
  object-fit: contain;
  padding: 24px;
}

/* =========================================
   EFEITO DO BALÃO NO HOVER
   ========================================= */
   .project-card:hover .project-media img,
   .project-card:hover .project-media video { 
     transform: scale(1.25) translateY(-5%); /* Aumenta 25%, tamanho ideal e não exagerado */
     object-fit: contain; /* Garante que a imagem fique 100% visível sem cortes */
     background: transparent; /* Remove o fundo escuro para não criar "molduras" nas sobras */
     border: none; /* Remove a borda para um aspecto mais limpo */
     /* Substituímos box-shadow por drop-shadow para que a sombra siga o formato real da imagem, ignorando o espaço vazio */
     filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.7)); 
     z-index: 100; 
   }
   /* ========================================= */

.project-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.project-content h3 { font-size: 1.2rem; margin-bottom: 12px; color: #fff; font-weight: 600; }
.project-content p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 22px; line-height: 1.6; }

.btn-link { color: var(--blue-light); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; }
.btn-link:hover { color: #fff; text-decoration: underline; }

/* Seção de Contato */
.contact-card { text-align: center; padding: 45px 30px; }
.contact-card p { color: var(--text-muted); margin-bottom: 30px; font-size: 1.05rem; }
.contact-links { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.btn-contact { display: flex; align-items: center; gap: 8px; background: var(--blue-light); color: #070a13; padding: 11px 22px; border-radius: 10px; text-decoration: none; font-weight: 600; font-size: 0.92rem; transition: opacity 0.3s; }
.btn-contact:hover { opacity: 0.85; }
.btn-contact.outline { background: transparent; color: var(--text-main); border: 1px solid var(--glass-border); }
.btn-contact.outline:hover { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.15); }

.feedback-empty {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 36px;
}

.feedback-empty > svg {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  color: var(--blue-light);
}

.feedback-empty h4 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.feedback-empty p {
  color: var(--text-muted);
  line-height: 1.65;
}

/* Responsividade Melhorada para Desktop/Celular */
@media (max-width: 800px) {
  .navbar { 
    padding: 15px; 
    width: 90%; 
    border-radius: 24px;
  }
  .nav-content {
    flex-direction: column;
    gap: 12px;
  }
  .nav-links { 
    gap: 12px; 
    flex-wrap: wrap; 
    justify-content: center;
  }
  .nav-links a { font-size: 0.85rem; }
  .hero h1 { font-size: 2.1rem; }
  .hero p { font-size: 0.95rem; }
  
  .project-card:hover .project-media img,
  .project-card:hover .project-media video { 
    transform: scale(1.1) translateY(-2%); /* Ajuste mais sutil para telas menores */
  }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  
  .project-card:hover .project-media img,
  .project-card:hover .project-media video { 
    transform: scale(1.05) translateY(0); /* Apenas um leve destaque no mobile */
  }

  .project-header h1 { font-size: 2rem; }
  .behance-wrapper iframe { min-height: 500px; }
  
  /* Novos ajustes mobile para preencher a tela */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .project-media {
    aspect-ratio: 4 / 3; 
  }
  
  .project-content {
    padding: 20px; 
  }
}

/* =========================================
   ESTILOS DA PÁGINA INTERNA DE PROJETO
   ========================================= */
  .project-header { 
    text-align: center; 
    margin-bottom: 60px; 
  }
  
  .project-header h1 { 
    font-size: 2.5rem; 
    margin-bottom: 15px; 
    background: linear-gradient(135deg, #60a5fa, #c084fc); 
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
  }
  
  .project-header p { 
    color: var(--text-muted); 
    font-size: 1.1rem; 
    max-width: 700px; 
    margin: 0 auto 20px; 
    line-height: 1.6;
  }
  
  .content-section { 
    margin-bottom: 60px; 
  }
  
  .content-section h2 { 
    font-size: 1.5rem; 
    color: #fff; 
    margin-bottom: 10px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
  }
  
.content-section h2 svg {
  color: var(--blue-light);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.info-card {
  padding: 22px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.38);
  border: 1px solid rgba(96, 165, 250, 0.13);
}

.info-card h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 10px;
}

.info-card h3 svg {
  width: 18px;
  color: var(--blue-light);
}

.info-card p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.94rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.feature-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(96, 165, 250, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.14);
  color: var(--text-muted);
  line-height: 1.55;
}

.feature-item svg {
  color: var(--blue-light);
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  margin-top: 2px;
}
  
  /* Container do App Interativo */
  .demo-container { 
    width: 100%; 
    min-height: 500px; 
    border-radius: 16px; 
    overflow: hidden; 
    background: rgba(0, 0, 0, 0.4); 
    padding: 20px;
  }
  
  /* Iframe do Behance Fluido */
  .behance-wrapper {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px;
  }
  
  .behance-wrapper iframe {
    width: 100%;
    min-height: 700px; /* Altura ajustada para leitura confortável */
    border-radius: 8px;
  }

  /* Splash Screen */
.splash-screen {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--bg-dark);
  display: flex; justify-content: center; align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease, visibility 0.8s;
}

.splash-content { text-align: center; color: var(--text-main); }
.splash-content h1 { font-size: 3rem; margin-bottom: 10px; }
.splash-content p { font-size: 1.5rem; color: var(--blue-light); }

/* Cada frase da abertura aparece uma única vez */
.splash-phrase {
  display: inline-block;
  min-width: 280px;
  color: var(--blue-light);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.splash-phrase.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Classe para sumir */
.splash-hidden { opacity: 0; visibility: hidden; }

.skills-container {
  display: flex; flex-wrap: wrap; gap: 15px; justify-content: center;
  padding: 20px;
}

.skill-tag {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: 50px;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: default;
}

.skill-tag:hover {
  background: rgba(96, 165, 250, 0.1);
  border-color: var(--blue-light);
  color: #fff;
  /* Efeito de brilho "Neon" */
  box-shadow: 0 0 15px rgba(96, 165, 250, 0.3);
  transform: scale(1.1);
}

.cert-gallery {
  display: flex; gap: 30px; justify-content: center; flex-wrap: wrap;
}

.cert-item {
  position: relative;
  width: 120px; height: 120px;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
}

.cert-item img {
  width: 60%; transition: transform 0.3s;
}

.cert-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(7, 10, 19, 0.95);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 10px; opacity: 0; transition: opacity 0.3s;
  text-align: center;
}

.cert-item:hover .cert-overlay { opacity: 1; }
.cert-item:hover img { transform: scale(0.8) blur(4px); }

/* Container de grade ajustado */
.cert-grid-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 15px; /* Menor gap */
  justify-content: center;
  margin-top: 0;
}

#certifications {
  min-height: auto;
  margin-bottom: 30px;
  padding-top: 35px;
}

#certifications .section-title {
  margin-bottom: 14px;
}

@media (max-width: 700px) {
  .projects-grid--compact {
    grid-template-columns: 1fr;
  }
}

.cert-node {
  position: relative;
  width: 150px;  /* Ajustado para 150px: destaque total */
  height: 150px;
  background: #0b101d;
  border-radius: 20px; /* Aumentei o raio para acompanhar a proporção */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
}

/* A Borda Giratória (A Mágica) */
.cert-node::before {
  content: "";
  position: absolute;
  width: 200%; /* Maior que o pai para girar */
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--blue-light) 360deg);
  animation: rotate 3s linear infinite;
}

/* Máscara interna para criar o efeito de borda */
.cert-node::after {
  content: "";
  position: absolute;
  inset: 2px; /* Espessura da borda */
  background: #0b101d;
  border-radius: 10px;
}

/* Animação de rotação */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cert-node img {
  width: 78%;
  max-height: 92px;
  object-fit: contain;
  z-index: 1; /* Garante que a imagem fique acima da luz */
  filter: drop-shadow(0 0 5px rgba(96, 165, 250, 0.5));
}

.cert-node span {
  position: relative;
  z-index: 1;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: center;
}

/* Efeito Hover (Brilho intensificado) */
.cert-node:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px var(--blue-light);
}
