/* =======================================================
 * === GLOBAL & RESET ===
 * =======================================================
 */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  list-style: none;
  text-decoration: none;
  color: #ffffff;
  scroll-behavior: smooth;
}

/* =======================================================
 * === VARIÁVEIS & CONFIGURAÇÕES ===
 * =======================================================
 */
:root {
  --cor-principal: #1e90ff;
  --cor-secundaria: #222e4e;
  --cor-textos: #ffffff;
  --cor-secundaria-textos: #bbb;
  --cor-fundo: #0a0a0a;
  --cor-borda: rgba(255, 255, 255, 0.1);

  /* Cores redes sociais */
  --cor-linkedin: #0077b5;
  --cor-instagram: #c00ea8;
  --cor-email: #5612d4;
  --cor-whatsapp: #25d366;

  /* Animações e Efeitos */
  --transition-easing: cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-speed: 0.3s;
  --glow-shadow: 0 0 15px 3px rgba(30, 144, 255, 0.2);
  --glow-shadow-hover: 0 0 25px 5px rgba(30, 144, 255, 0.4);
}

body {
  position: relative;
  background: var(--cor-fundo);
  overflow-x: hidden; /* Evita rolagem lateral indesejada */
}

/* Styles fundo video */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.2;
  object-fit: cover;
}

/* Styles seção genérica */
.secao {
  padding: 100px 5%;
}

/* =======================================================
 * === HEADER & NAVEGAÇÃO ===
 * =======================================================
 */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1px 5%;
  z-index: 100;
  transition: background-color 0.5s var(--transition-easing), 
              backdrop-filter 0.5s var(--transition-easing);
}

header.rolagem-header {
   background-color: rgba(6, 41, 77, 0.808);
   backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(10px);
   border-bottom: 1px solid rgba(6, 41, 77, 0.808);
}

.logo {
  font-family: 'Poppins', sans-serif; 
  font-weight: 700; 
  font-size: 2.3rem; 
  color: var(--cor-textos); 
  z-index: 5; 
}

.logo span {
  color: var(--cor-principal);
  display: inline-block;
  transition: transform 0.3s var(--transition-easing),
              text-shadow 0.3s var(--transition-easing);
}

.logo:hover span {
  transform: translateY(-3px); 
  text-shadow: 0 0 5px var(--cor-principal), 0 0 10px var(--cor-principal);
}

/* Nav Desktop */
.nav-desktop {
  display: flex;
  justify-content: center;
  padding: 8px 5%;
}

.nav-desktop ul {
  display: flex;
  align-items: center;
  gap: 50px;
}

.nav-desktop ul li a {
  display: flex; 
  align-items: center; 
  gap: 8px; 
  padding: 10px 15px; 
  color: var(--cor-textos);
  font-weight: 500;
  opacity: 0.8;
  position: relative;
  transition: all var(--transition-speed) var(--transition-easing);
}

.nav-desktop .menu-links a::after {
  content: '';
  position: absolute;
  bottom: 5px; 
  left: 50%;
  transform: translateX(-50%);
  width: 0; 
  height: 2px;
  background-color: var(--cor-principal);
  transition: width 0.4s var(--transition-easing); 
}

.nav-desktop .menu-links a:hover::after {
  width: 80%; 
}

.nav-desktop .menu-links a.active-link {
    opacity: 1;
    color: var(--cor-principal); 
}
.nav-desktop .menu-links a.active-link i {
    color: var(--cor-principal); 
}
.nav-desktop .menu-links a.active-link::after {
   display: none;
}

/* Menu Mobile Botão */
.btn-menu-mobile {
  display: none; /* Oculto no desktop */
  cursor: pointer;
}

.btn-menu-mobile div {
  height: 3px;
  margin: 10px 0;
  background-color: var(--cor-secundaria-textos); /* Ajustado para melhor visibilidade */
  transition: 0.3s;
}

.btn-menu-mobile .line-menu-mobile-1 { width: 30px; }
.btn-menu-mobile .line-menu-mobile-2 { width: 20px; }

.btn-menu-mobile .line-menu-mobile-1.active1 {
  transform: rotate(45deg) translate(7px, 7px); /* Ajuste fino da rotação */
}

.btn-menu-mobile .line-menu-mobile-2.active2 {
  transform: rotate(-45deg) translate(7px, -6px); /* Ajuste fino da rotação */
  width: 30px;
}

/* Nav Mobile Container */
.nav-mobile {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed; /* Mudado para fixed para cobrir tudo */
  top: 0;
  left: 0;
  width: 0;
  height: 100vh;
  background-color: var(--cor-secundaria);
  overflow: hidden;
  transition: width 0.5s ease;
  z-index: 99; /* Abaixo do header mas acima do resto */
}

.nav-mobile.abrir-menu {
  width: 100%;
}

.nav-mobile ul {
  width: 100%;
  text-align: center;
}

.nav-mobile a {
  display: block;
  font-size: 20px;
  font-weight: 500;
  padding: 20px 0;
  transition: 0.3s;
}

.nav-mobile a:hover {
  background-color: rgba(255,255,255,0.1);
  color: var(--cor-principal);
}

body.overflow-no {
  overflow: hidden;
}

/* =======================================================
 * === BOTÃO TOPO ===
 * =======================================================
 */
.btntopo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
  position: fixed;
  right: 20px;
  bottom: 70px;
  z-index: 100;
  opacity: 0; 
  visibility: hidden;
  border: none;
  background: transparent;
}

.btntopo i {
  font-size: 2.5rem; 
  color: var(--cor-principal);
  transition: 0.3s;
}

.btntopo.active {
  opacity: 1;
  visibility: visible;
}

.btntopo:hover {
  width: 140px; 
  border-radius: 50px;
  background-color: var(--cor-principal); 
}


.btntopo::before {
  position: absolute;
  content: "TOPO"; 
  color: white;
  font-family: 'Poppins', sans-serif; 
  font-size: 14px; 
  opacity: 0;
  transition: 0.3s;
}

.btntopo:hover::before {
  opacity: 1;
}

/* =======================================================
 * === SEÇÃO PRINCIPAL (HERO) ===
 * =======================================================
 */
.principal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  margin: 0 4%;
  padding-top: 80px; /* Compensar header fixo */
}

.redes-sociais {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  margin-bottom: 20px;
}

.redes-sociais a i {
  font-size: 25px;
  color: var(--cor-principal);
  transition: color var(--transition-speed), transform var(--transition-speed);
}

.redes-sociais a:hover i {
  color: var(--cor-textos);
  transform: scale(1.1) translateY(-3px);
}

.principal h1 {
  font-size: 48px;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -2px;
}

.animacao-digitando {
  display: inline-block;
  border-right: 4px solid var(--cor-principal);
  white-space: nowrap;
  overflow: hidden;
  padding-bottom: 5px;
  animation: typing 2.5s steps(40, end) 1s 1 normal both,
             blink-caret 0.75s step-end infinite;
}

@keyframes typing { from { width: 0; } to { width: 100%; } }
@keyframes blink-caret { from, to { border-color: transparent; } 50% { border-color: var(--cor-principal); } }

.principal h1 span { color: var(--cor-principal); }

.principal p {
  font-size: 17px;
  margin-bottom: 20px;
  max-width: 500px;
  color: var(--cor-secundaria-textos);
}

.principal p span { font-weight: bold; color: var(--cor-principal); }

.img-principal img {
  display: none; /* Padrão mobile */
  mask-image: linear-gradient(to bottom, #000000 25%, rgba(0, 0, 0, 0.01) 95%);
  animation: flutuante 3s ease-in-out infinite;
}

@keyframes flutuante {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(15px); }
}

/* Botão Link Genérico */
.btn-link {
  display: inline-block;
  padding: 12px 30px;
  font-weight: bold;
  border-radius: 4px;
  color: #ffffff;
  background: linear-gradient(145deg, #2a9bff, var(--cor-principal));
  box-shadow: var(--glow-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.btn-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-shadow-hover);
}

/* =======================================================
 * === SEÇÃO SERVIÇOS ===
 * =======================================================
 */
.titulo-secao {
  font-size: 30px;
  margin-bottom: 60px;
  position: relative;
  display: inline-block;
}

.titulo-secao::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 80px;
  height: 3px;
  background-color: var(--cor-principal);
}

.grade-projetos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.card-projeto {
  border-radius: 10px;
  background-color: var(--cor-secundaria);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card-projeto:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-shadow);
}

.img-projeto {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.info-projeto {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.info-projeto h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.info-projeto p {
  font-size: 15px;
  color: var(--cor-secundaria-textos);
  margin-bottom: 15px;
  flex-grow: 1;
}

.link-projeto {
  display: flex;
  justify-content: center;
  margin-top: auto;
}

.info-projeto a {
  display: inline-block;
  padding: 8px 20px;
  color: var(--cor-textos);
  background-color: rgba(77, 124, 254, 0.2);
  box-shadow: 2px 2px 1px var(--cor-principal);
  border-radius: 4px;
  transition: 0.3s;
}

.info-projeto a:hover {
  transform: translateY(-3px); 
  background-color: var(--cor-principal); 
  box-shadow: var(--glow-shadow-hover);
}

/* =======================================================
 * === SEÇÃO PROJETOS (CARROSSEL SLIDER) ===
 * =======================================================
 */
.slider-container {
    position: relative;
    width: 100%;
    margin: 100px auto;
    overflow: hidden; 
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.slider-track {
    display: flex;
    align-items: flex-start; 
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
}

.slide {
    flex: 0 0 33.33%; /* Desktop: 3 por vez */
    max-width: 33.33%;
    padding: 0 15px; 
    min-height: 550px; 
    cursor: pointer;
    transform: scale(0.8);
    opacity: 0.4;
    filter: blur(3px); 
    transition: transform 0.5s, opacity 0.5s, filter 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slide.active {
    transform: scale(1);
    opacity: 1;
    filter: blur(0); 
}

.slide-image {
    width: 100%;
    height: 250px; 
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--cor-borda);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
}

.slide-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.4s ease 0.1s;
    text-align: center; /* Centralizar texto */
    width: 100%;
}

.slide.active .slide-content {
    max-height: 500px; 
    opacity: 1;
    margin-top: 20px; 
}

.projeto-tag {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--cor-principal);
    color: var(--cor-fundo);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.slide h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.slide p {
    color: var(--cor-secundaria-textos);
    line-height: 1.6;
}

/* Botões de Seta do Slider */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: rgba(17, 26, 51, 0.8); 
    border: 1px solid var(--cor-borda);
    color: var(--cor-principal);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    background-color: var(--cor-principal);
    color: var(--cor-fundo);
    box-shadow: var(--glow-shadow);
}

.slider-arrow.prev-slide { left: 10px; }
.slider-arrow.next-slide { right: 10px; }

/* =======================================================
 * === SEÇÃO SOBRE ===
 * =======================================================
 */
.sobre {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
}

.container-logo-sobre {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.logo-sobre {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: clamp(5rem, 15vw, 10rem);
  line-height: 1;
  color: var(--cor-textos);
  transition: transform 0.3s;
}

.logo-sobre span {
  color: var(--cor-principal);
  display: inline-block;
  transition: transform 0.3s, text-shadow 0.3s;
}

.container-logo-sobre:hover .logo-sobre { transform: scale(1.02); }
.container-logo-sobre:hover .logo-sobre span {
  transform: translateY(-0.15em);
  text-shadow: 0 0 25px var(--cor-principal);
}

.tag-habilidades {
  font-size: 14px;
  font-weight: 500;
  padding: 8px 15px;
  margin: 0 10px 10px 0;
  border-radius: 5px;
  background-color: var(--cor-secundaria);
  display: inline-block;
  transition: 0.3s;
}

.tag-habilidades:hover {
  background-color: var(--cor-principal);
  transform: scale(1.05);
}

/* =======================================================
 * === SEÇÃO POR QUE TTS ===
 * =======================================================
 */
.porque-tts {
  background-color: #0b0c10;
  padding: 80px 5%;
  text-align: center;
  margin-top: 80px;
  margin-bottom: 50px;
}

.porque-tts .titulo-secao {
  border-left: 6px solid #1e90ff;
  padding-left: 12px;
  margin-bottom: 50px;
}

.porque-tts .titulo-secao::after { display: none; } 
.porque-tts .titulo-secao span { color: var(--cor-principal); }

.grid-porque {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.card-porque {
  background-color: #14161c;
  border-radius: 12px;
  padding: 25px 20px;
  text-align: left;
  box-shadow: var(--glow-shadow);
  transition: 0.3s;
}

.card-porque:hover {
  transform: translateY(-5px);
  box-shadow: var(--glow-shadow-hover);
}

.card-porque h3 {
  color: var(--cor-principal);
  margin-bottom: 10px;
}

.card-porque p {
  color: #cfcfcf;
  line-height: 1.6;
}

/* =======================================================
 * === SEÇÃO CONTATOS & FOOTER ===
 * =======================================================
 */
.botoes-contatos {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 0 auto;
  max-width: 900px;
}

.botao-contato {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 30px;
  font-weight: 600;
  border-radius: 8px;
  min-width: 200px;
  background-color: var(--cor-secundaria);
  border: 1px solid var(--cor-borda);
  transition: 0.3s;
}

.botao-contato:hover {
  transform: translateY(-5px);
}

/* Cores específicas no hover */
.linkedin:hover { background-color: var(--cor-linkedin); border-color: var(--cor-linkedin); }
.instagram:hover { background-color: var(--cor-instagram); border-color: var(--cor-instagram); }
.email:hover { background-color: var(--cor-email); border-color: var(--cor-email); }

footer {
  text-align: center;
  padding: 20px 5%;
  border-top: solid 1px var(--cor-secundaria);
  margin-top: 50px;
}

/* =======================================================
 * === RESPONSIVIDADE (MEDIA QUERIES) ===
 * =======================================================
 */

/* Desktop Grande */
@media (min-width: 900px) {
  .principal h1 { font-size: 58px; }
  .sobre { grid-template-columns: 1fr 1fr; gap: 80px; }
  .slide { flex: 0 0 33.33%; max-width: 33.33%; } /* Garante 3 colunas */
}

@media (min-width: 1280px) {
  .principal h1 { font-size: 65px; }
  .img-principal img { display: block; width: 100%; max-width: 500px; }
}

/* Tablet (Entre 769px e 899px) */
@media (max-width: 900px) {
  .slide {
    flex: 0 0 50%; /* 2 Slides por vez */
    max-width: 50%;
  }
}

/* Mobile (Abaixo de 768px) */
@media (max-width: 768px) {
  /* Menu */
  .nav-desktop { display: none; }
  .btn-menu-mobile { display: block; }

  /* Hero Section - Ajuste para coluna */
  .principal {
    flex-direction: column;
    text-align: center;
    padding-top: 120px;
    min-height: auto;
  }

  .principal h1.animacao-digitando {
    font-size: clamp(2rem, 8vw, 2.5rem);
    white-space: normal;
    overflow: visible;
    border-right: none;
    animation: none;
    text-align: center;
    width: 100%;
  }
  
  .img-principal img {
    display: block; 
    max-width: 250px; 
    margin: 40px auto 0; 
  }

  /* --- CORREÇÃO CRÍTICA DO CARROSSEL MOBILE --- */
  .slider-container {
    position: relative;
    padding-top: 20px; /* Espaço fixo no topo */
  }

  .slide {
    flex: 0 0 100%; /* 1 Slide por vez */
    max-width: 100%;
    transform: scale(0.95);
    opacity: 1;
    min-height: unset;
    padding: 0 10px;
    filter: blur(0); /* Remove blur para melhor performance e clareza */
  }

  .slide.active { transform: scale(1); }

  /* Fixa altura da imagem para alinhar setas */
  .slide-image {
     height: 200px; 
     object-fit: cover; /* Garante que não distorça */
  }

  .slide.active .slide-content {
     max-height: 1000px; /* Espaço suficiente para texto */
     margin-top: 15px;
  }

  /* SETAS FIXAS NA IMAGEM */
  .slider-arrow {
    /* Calculo: padding-top (20px) + metade da imagem (100px) = 120px */
    top: 120px; 
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    background-color: rgba(17, 26, 51, 0.9); 
    
    /* Remove piscada no toque */
    -webkit-tap-highlight-color: transparent; 
    outline: none;
  }

  .slider-arrow.prev-slide { left: 5px; }
  .slider-arrow.next-slide { right: 5px; }
}

/* Mobile Pequeno (Abaixo de 480px) */
@media (max-width: 480px) {
  .slide-image {
    height: 180px; /* Imagem um pouco menor */
  }

  /* Reajuste da seta para a nova altura da imagem */
  .slider-arrow {
    top: 110px; /* 20px + 90px */
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .titulo-secao { font-size: 24px; }
}

