/* Reset e Configuração Geral */
@font-face {
    font-family: 'hamster';
    src: url('fonts/hamster.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'carving';
    src: url('fonts/MADECarvingSoftPERSONALUSE-Medium.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'opensans';
    src: url('fonts/opensans.ttf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

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

html {
    font-size: 1.2vw;
    scroll-behavior: smooth;
}

body {
    margin: 0 auto;
    background-color: #f5f5f5;
    font-family: "carving";
    color: #333;
    line-height: 1.6;
  }
  
  h2 {
    font-size: 3.5vw;
    font-family: "opensans";
    text-align: left;
  }
  
  .logo {
    font-size: 2.7vw;
    color: #fff;
    font-family: "opensans";
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
  }
  
  .logo-container {
    width: 30vw; /* Largura fixa maior para suportar fontes largas */
    display: inline-block;
  }
  
  .logo-container:hover .logo-text {
    color: #0a66c2; /* Cor gerenciada por CSS */
  }
  
  .logo-text {
    display: inline-block;
    transition: font-family 0.3s ease;
  }
  
  .logo-text.typing {
    position: relative;
  }
  
  .logo-text.typing::after {
    content: '|';
    position: absolute;
    right: -1vw;
    color: #0a66c2;
    animation: blink 0.7s step-end infinite;
  }
  
  @keyframes blink {
    50% {
      opacity: 0;
    }
  }
  
  /* Header e Navegação */
  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5vh 5vw; /* Ajustado para vh/vw, manter se desejar ou usar valores fixos */
    height: 10vh; /* Ajustado para vh, manter se desejar ou usar valores fixos */
    background-color: #1c1f2a;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
  }
  
  .nav-menu {
    display: flex;
    list-style: none;
    align-items: center; /* Alinha verticalmente os itens do menu */
  }
  
  .nav-item {
    margin: 0 1.7vw; /* Espaçamento entre os itens principais */
    position: relative; /* Necessário para o posicionamento do dropdown */
  }
  
  .nav-item a {
    text-decoration: none;
    color: #fff;
    font-weight: 600;
    font-size: 1.6vw; /* Tamanho da fonte dos itens principais */
    padding: 10px 0; /* Adiciona um pouco de padding para facilitar o hover no item pai do dropdown */
    display: flex; /* Para alinhar o ícone da seta com o texto */
    align-items: center; /* Alinha o ícone da seta verticalmente */
    position: relative; /* Para o ::after */
    transition: color 0.3s;
  }

  .nav-item a .fa-caret-down { /* Estilo para a seta do dropdown */
    margin-left: 0.5vw;
    font-size: 1.2vw; /* Ajuste o tamanho da seta se necessário */
    transition: transform 0.3s ease;
  }
  
  .nav-item a:hover {
    color: #0a66c2;
  }
  
  .nav-item a::after { /* Linha de sublinhado no hover */
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #0a66c2;
    bottom: -1vh; /* Ajuste para a posição da linha */
    left: 0;
    transition: width 0.3s;
  }
  
  .nav-item a:hover::after {
    width: 100%;
  }

  /* Estilos para o Dropdown Menu */
  .nav-item.dropdown .dropdown-menu {
    display: none; /* Oculto por padrão */
    position: absolute;
    top: calc(100%); /* Posição abaixo do item pai, com um pequeno espaço */
    left: 50%; /* Começa no meio do item pai */
    transform: translateX(-50%); /* Centraliza o dropdown */
    background-color: #1c1f2a; /* Mesma cor de fundo do navbar */
    min-width: 220px; /* Largura mínima do dropdown, ajuste conforme necessário */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    border-radius: 5px; /* Bordas arredondadas */
    list-style: none;
    padding: 10px 0; /* Espaçamento interno vertical */
    z-index: 1001; /* Para ficar sobre outros elementos se necessário */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease; /* Transição suave */
    transform-origin: top center; /* Animação a partir do topo central */
  }

  .nav-item.dropdown:hover .dropdown-menu,
  .nav-item.dropdown.open .dropdown-menu { /* Adicionada classe .open para controle via JS se necessário */
    display: block; /* Ou flex se preferir controlar o layout interno com flex */
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0); /* Retorna à posição normal */
  }
  
  .nav-item.dropdown:hover > a .fa-caret-down,
  .nav-item.dropdown.open > a .fa-caret-down {
    transform: rotate(180deg); /* Gira a seta quando o dropdown está aberto */
  }

  .dropdown-menu .nav-item {
    margin: 0; /* Remove a margem lateral dos itens principais */
    width: 100%; /* Itens do dropdown ocupam toda a largura do dropdown */
  }

  .dropdown-menu .nav-item a {
    font-size: 1.4vw; /* Fonte um pouco menor para itens do dropdown */
    color: #ccc; /* Cor um pouco mais clara para diferenciar */
    padding: 12px 20px; /* Espaçamento interno dos links do dropdown */
    display: block; /* Para ocupar toda a largura e permitir padding */
    white-space: nowrap; /* Evita quebra de linha nos itens do dropdown */
    justify-content: flex-start; /* Alinha texto e ícone (se houver) à esquerda */
  }

  .dropdown-menu .nav-item a:hover {
    background-color: #0a66c2; /* Cor de fundo no hover para itens do dropdown */
    color: #fff; /* Texto branco no hover */
  }

  .dropdown-menu .nav-item a::after { /* Remove ou ajusta a linha de sublinhado para itens do dropdown */
    display: none; /* Ou ajuste a posição/tamanho se quiser manter */
  }

/* Sobre Mim */
#sobre-mim {
    position: relative;
    background: #1c1f2a;
    height: 100vh;
    color: white;
    z-index: 1;
  }
  
  .container {
    margin: 0 auto;
    height: 100%;
  }
  
  .about-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4vw;
    height: 100%;
  }
  
  .about-text {
    flex: 1;
    text-align: left;
    padding-left: 5vw;
  }
  
  .profile-img-container {
    float: left;
    width: 10vw;
    height: 10vw;
    position: relative;
    margin-right: 1.8vw;
  }
  
  .profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s ease, opacity 0.5s ease;
  }
  
  .profile-img-container:hover .profile-img {
    border-color: transparent;
  }
  
  .profile-img-container::before {
    content: '';
    position: absolute;
    top: -0px;
    left: -0px;
    right: -0px;
    bottom: -0px;
    border-radius: 50%;
    background: linear-gradient(45deg, #0a66c2, #4d94ff, #003c88, #007bff);
    background-size: 400%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    animation: rotateBorder 4s linear infinite;
    animation-play-state: paused;
  }
  
  .profile-img-container:hover::before {
    opacity: 1;
    animation-play-state: running;
  }
  
  @keyframes rotateBorder {
    0% {
      background-position: 0% 50%;
    }
    100% {
      background-position: 400% 50%;
    }
  }
  
  .about-text h2 {
    font-size: 3vw;
    color: #fff;
    font-family: "opensans";
    margin-bottom: 0.5vh;
    text-align: left;
  }
  
  .about-text h3 {
    font-size: 1.8vw;
    color: hsl(0, 0%, 87%);
    font-family: "opensans";
    margin-bottom: 1.5vh;
    text-align: left;
  }
  
  .about-text p {
    font-size: 1rem;
    color: #ddd;
    margin-bottom: 6vh;
  }
  
  .button-container {
    display: flex;
    align-items: center;
    gap: 2vw;
    margin-top: 2vh;
    clear: both;
  }
  
  .cta-button {
    display: inline-block;
    padding: 2vh 2vw;
    border: #fff solid 3px;
    color: #fff;
    font-family: "opensans", sans-serif;
    font-size: 1.5vw;
    font-weight: 600;
    text-decoration: none;
    border-radius: 1vw;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
  }
  
  .cta-button:hover {
    background-color: #0a66c2;
    transform: translateY(-1vh);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  }
  
  .cta-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  
  .linkedin-icon {
    font-size: 2.5vw;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
  }
  
  .linkedin-icon:hover {
    color: #0a66c2;
    transform: scale(1.1);
  }
  
  .about-image {
    flex: 1.5;
    height: 100%;
    display: flex;
    justify-content: flex-end;
    position: relative;
  }
  
  .about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #1c1f2a 0%, rgba(28, 31, 42, 0) 50%);
    z-index: 1;
  }

  .social-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4vw;
    height: 4vw;
    border: #fff solid 2px;
    border-radius: 20%;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
  }
  
  .social-button i {
    font-size: 2.5vw;
  }
  
  .social-button:hover {
    background-color: #0a66c2;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  }
  
  .social-button:active {
    transform: scale(1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  }
  
  .background-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    z-index: 0;
  }

#projetos {
    padding: 5vh 5vw;
    background: #14181c;
    position: relative;
}

#projects-title {
    margin-bottom: 5vh;
    color: #fff;
    text-align: left;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    margin: 0 auto;
}

.project-card {
    position: relative;
    width: 32vw;
    border: #444 solid 2px;
    height: 35vh;
    background: #1e2529;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-3vh);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.left-card {
    justify-self: start;
}

.right-card {
    justify-self: end;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 2;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.project-info {
    position: absolute;
    top: 0;
    width: 20vw;
    height: 100%;
    background: #1e2529;
    border: #444 solid 2px;
    padding: 2vw;
    transition: transform 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.left-card .project-info {
    left: 100%;
    transform: translateX(-100%);
}

.right-card .project-info {
    right: 100%;
    transform: translateX(100%);
}

.project-card.active .project-info {
    transform: translateX(0);
}

.project-card.active .project-overlay {
    opacity: 0;
}

.project-title {
    display: flex;
    align-items: center;
    gap: 1vw;
    margin-bottom: 10px;
}

.hero-lamp {
    font-size: 2.5vw;
    color: #fff;
    width: 2.5vw;
    text-align: center;
}

.project-card h3 {
    font-family: "opensans";
    color: #fff;
    font-size: 1.6vw;
    margin: 0;
}

.project-card p {
    font-size: 1.3vw;
    color: #ddd;
    
}

.project-link {
    color: #0a66c2;
    font-weight: 600;
    text-decoration: none;
}



.project-link:hover {
    text-decoration: underline;
}

.project-info .project-link {
    display: none;
}

.expanded-project .project-link {
    display: inline-block;
}

.expanded-project {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40vw;
    height: auto;
    max-height: 80vh;
    z-index: 1000;
    background: #222;
    border: 2px solid #444;
    border-radius: 1vw;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1vw;
    display: none; /* Oculto por padrão */
}

.expanded-content {
    width: 100%;
}

.expanded-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 1vw 1vw 0 0;
}

.expanded-title {
    font-family: "opensans";
    color: #fff;
    font-size: 1.8vw;
    margin: 0;
}

.full-desc {
    font-size: 1.1vw;
    color: #ddd;
    
    line-height: 1.5;
}

.project-header {
    flex-direction: row;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.overlay-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    display: none;
}
/* =================================== */
/* == NOVA SEÇÃO DE COMPETIÇÕES CSS == */
/* =================================== */

#competicoes {
    padding: 5vh 5vw;
    background: #1c1f2a;
    color: #fff;
}

#competitions-title {
    margin-bottom: 4vh;
    color: #fff;
    font-family: "opensans", sans-serif;
    text-align: left;
}

/* NOVO: Estilo para o painel principal que agrupa tudo */
.competitions-panel {
    background-color: #14181c; /* Cor de fundo do conteúdo */
    border-radius: 15px;
    overflow: hidden; /* Garante que os cantos arredondados sejam aplicados */
}

/* MODIFICADO: Container das abas agora usa Grid para ocupar 100% */
.competitions-tabs-container {
    display: grid;
    background-color: #1c1f2a;
    grid-template-columns: 1fr 1fr; /* Duas colunas de largura igual */
    gap: 0; /* Sem espaço entre as abas */
    
}

/* MODIFICADO: Estilo da aba individual */
.competition-tab-item {
    position: relative;
    cursor: pointer;
    background-color: #14181c;
    overflow: hidden; /* Essencial para a barra de progresso */
    transition: background-color 0.3s;
    text-align: center;
    border: 2px solid #444;
}

/* MODIFICADO: Barra de progresso para preencher o fundo */
.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* Inicia em 0 */
    background-color: #2c3e50; /* Fundo semi-transparente como na ref */
    border-radius: 0;
    z-index: 1;
    /* A animação será controlada por uma classe no JS */
    transition: width 0.1s linear; 
}

/* Animação que será adicionada via JS */
@keyframes fill-progress {
    from { width: 0%; }
    to { width: 100%; }
}

.competition-tab-item.is-filling .progress-bar {
    animation: fill-progress 16s linear forwards; /* 8 segundos de duração */
}


/* MODIFICADO: Conteúdo da aba (ícone e texto) */
.tab-content {
    position: relative;
    z-index: 2; /* Fica sobre a barra de progresso */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: transparent;
}

.tab-icon-wrapper {
    background-color: transparent; /* Fundo transparente */
    padding: 0;
    margin-right: 1vw;
    font-size: 1.5vw;
    color: #e0e0e0;
    transition: color 0.3s;
}

.tab-label {
    font-family: "opensans", sans-serif;
    font-size: 1.2vw;
    font-weight: 600;
    color: #e0e0e0;
    transition: color 0.3s;
}

/* MODIFICADO: Estilo da tab ativa */
.competition-tab-item.active {
    background-color: #14181c; /* Cor de fundo do painel, criando o efeito "grudado" */
}

.competition-tab-item.active .tab-icon-wrapper,
.competition-tab-item.active .tab-label {
    color: #fff; /* Cor mais viva para o texto e ícone ativos */
}

/* NOVO: Container para o conteúdo que aparece abaixo das abas */
.competition-content-wrapper {
    position: relative;
    
}

/* MODIFICADO: Visibilidade do conteúdo */
.competition-content {
    opacity: 0;
    visibility: hidden;
    position: absolute; /* Todos os conteúdos ocupam o mesmo espaço */
    top: 0;
    left: 0;
    
    width: 100%;
    transition: opacity 0.5s ease, visibility 0s linear 0.5s;
    display: block; /* Mantém como block para o position absolute funcionar */
}

.competition-content.visible {
    opacity: 1;
    visibility: visible;
    position: relative; /* Volta ao fluxo normal quando visível */
    transition-delay: 0s;
}

/* REMOVIDO: competition-card, pois o .competitions-panel já faz esse papel */

.competition-content .competition-info { /* Adicionado seletor para garantir especificidade */
    flex: 1;
    padding: 3vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Adicionado um display flex ao conteúdo para alinhar os itens */
.competition-content > div { /* Target .competition-card interno */
    display: flex;
   
}

/* Restante do CSS (company-logo, result, title, etc.) permanece o mesmo */
.company-logo {
    width: 100px;
    height: auto;
    margin-bottom: 2vh;
}
.competition-result {
    font-family: "opensans", sans-serif;
    font-size: 1.8vw;
    margin-bottom: 1vh;
}
.competition-result.winner { color: #ffd700; }
.competition-result.finalist { color: #ffd700; }
.competition-project-title {
    font-family: "opensans", sans-serif;
    font-size: 2.2vw;
    color: #fff;
    margin-bottom: 2vh;
}
.competition-description {
    font-family: "opensans", sans-serif;
    font-size: 1.1vw;
    color: #ddd;
    line-height: 1.6;
    margin-bottom: 4vh;
}
.tech-stack {
    margin-bottom: 4vh;
}
.tech-stack strong {
    font-family: "opensans", sans-serif;
    font-size: 1.2vw;
    color: #fff;
    display: block;
    margin-bottom: 1vh;
}
.tech-stack span {
    display: inline-block;
    background-color: #2c3e50;
    color: #eee;
    padding: 5px 15px;
    border-radius: 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 1vw;
    font-family: "opensans";
}
.competition-cta {
    align-self: flex-start;
    font-size: 1.3vw;
    padding: 1.5vh 1.8vw;
}
.competition-visual {
    flex: 0.8;
    align-items: flex-end;
    justify-content: flex-end;
}
.competition-image {
    width: 100%;
    height: 100%;
    
    object-fit: cover;
}
.competition-tab-item {
    position: relative;
    
    cursor: pointer;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1vh;
    transition: background-color 0.3s;
    
    /* text-align: left; <-- REMOVA ESTA LINHA SE ELA EXISTIR */
}

/* MODIFICADO: Conteúdo da aba (ícone e texto) alinhado à esquerda */
.tab-content {
    position: relative;
    z-index: 2; 
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Alinha os itens (ícone e texto) à esquerda */
    background-color: transparent;
    padding: 0;
}

/* MODIFICADO: Ícone agora dentro de um quadrado arredondado */
.tab-icon-wrapper {
    background-color: #38404a; /* Cor de fundo do quadrado do ícone */
    padding: 1.2vw;
    border-radius: 8px; /* Cantos arredondados */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1vw; /* Espaço entre o ícone e o texto */
    font-size: 2vw;
    color: #e0e0e0;
    transition: color 0.3s, background-color 0.3s;
}

/* MODIFICADO: Estilo da tab ativa */
.competition-tab-item.active {
    background-color: #14181c; 
}

/* NOVO: Efeito no ícone da aba ativa, mudando a cor do quadrado */
.competition-tab-item.active .tab-icon-wrapper {
    background-color: #0a66c2; /* Cor de destaque no ícone ativo */
    color: #fff;
}

.competition-tab-item.active .tab-label {
    color: #fff; 
}

/* Adicionado um display flex ao conteúdo para alinhar os itens (mantido da versão anterior) */
/* O nome da classe interna é .competition-card, então ajustei o seletor */
.competition-content > .competition-card { 
    display: flex;
    
}
.competitions-tabs-container {
    display: grid;
    background-color: #1c1f2a;
    grid-template-columns: 1fr 1fr 1fr; /* MUDANÇA AQUI: de 1fr 1fr para 1fr 1fr 1fr */
    align-items: baseline;
    gap: 0.5vw;
}

/* 2. Movi o estilo que estava no seu HTML para esta regra */
.competition-content-wrapper {
    position: relative;
    border-radius: 20px; /* Estilo que estava no HTML */
    border: solid 2px #444; /* Estilo que estava no HTML */
    overflow: hidden; /* Garante que as imagens internas não passem da borda */
}
#ensino {
    padding: 5vh 5vw;
    background: linear-gradient(#14181c 40%, #2c3e50 100%);
    position: relative;
}

#education-title {
    margin-bottom: 5vh;
    color: #fff;
    font-family: "opensans", sans-serif;
    text-align: left;
}

.education-wrapper {
    margin: 0 auto;
}

/* Parte Superior: Curso Maior e Contêiner de Coluna */
.education-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Alinha no topo */
    gap: 4vw;
    margin-bottom: 4vh;
}

.education-section.main-course-section {
    flex: 1;
    
}

.education-column {
    flex: 1.5; /* Coluna mais larga que o curso da esquerda */
    display: flex;
    flex-direction: column;
    gap: 4vh; /* Espaçamento entre os dois cursos na coluna */
    
}

.education-item.main-course-item {
    padding: 2vw; /* Maior padding para destacar */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); /* Sombra mais pronunciada */
}

.education-item.column-course-item {
   
    padding: 2vw;
}

/* Parte Inferior: Três Cursos em Linha */
.education-bottom {
    display: flex;
    flex-direction: column;
    gap: 2vw;
}

.courses-row {
    display: flex;
    justify-content: space-between;
    gap: 2vw;
}

/* Adicionar o pin vermelho no topo central de cada education-item */
.education-item {
    position: relative; /* Necessário para posicionar o pin e a animação */
    background: #1e2529;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 2vw;
    transition: all 0.3s ease;
    flex: 1;
    transform-origin: 50% 0; /* Ponto de origem da animação no topo (pin) */
}

/* Layout para imagem à esquerda e texto ao lado */
.education-content {
    display: flex;
    align-items: flex-start;
    gap: 1vw; /* Espaçamento entre imagem e texto */
}

.education-image-slot {
    height: 25vh; /* Altura padrão para o espaço da imagem */
    width: 100%; /* Largura fixa para a imagem */
    margin: 1vw 0; /* Espaçamento acima e abaixo */
    border-radius: 1vw;
    border: 2px solid #444;
    overflow: hidden; /* Garante que a imagem não ultrapasse o espaço */
    flex-shrink: 0; /* Impede que a imagem encolha */
}

.education-image-square {
    height: 10vw; /* Altura padrão para o espaço da imagem */
    width: 10vw; /* Largura fixa para a imagem */
    
    border-radius: 1vw;
    border: 2px solid #444;
    overflow: hidden; /* Garante que a imagem não ultrapasse o espaço */
    flex-shrink: 0; /* Impede que a imagem encolha */
}

.education-image-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta a imagem ao espaço */
    display: block; /* Remove espaços extras */
}

.education-image-square img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta a imagem ao espaço */
    display: block; /* Remove espaços extras */
}

.education-text {
    flex: 1; /* O texto ocupa o espaço restante */
}

/* Definição das animações de pêndulo */
@keyframes pendulumSwingLeft {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }  /* Começa para a direita */
    50% { transform: rotate(-5deg); } /* Balança para a esquerda */
    75% { transform: rotate(3deg); }  /* Volta com um balanço menor */
    100% { transform: rotate(0deg); } /* Retorna ao centro */
}

@keyframes pendulumSwingRight {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); } /* Começa para a esquerda */
    50% { transform: rotate(5deg); }  /* Balança para a direita */
    75% { transform: rotate(-3deg); } /* Volta com um balanço menor */
    100% { transform: rotate(0deg); } /* Retorna ao centro */
}

/* Adicionar o pin vermelho */
.education-item::before {
    content: '';
    position: absolute;
    top: -2.5vh; /* Posiciona o pin acima do topo do card */
    left: 50%; /* Centraliza horizontalmente */
    transform: translateX(-50%); /* Ajusta para o centro exato */
    width: 4vh; /* Tamanho do pin */
    height: 4vh;
    background: #e74c3c; /* Vermelho para o pin */
    border-radius: 50%; /* Formato circular */
    border: 2px solid #c0392b; /* Borda um pouco mais escura para contraste */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); /* Sombra para dar profundidade */
    z-index: 1; /* Garante que o pin fique acima do card */
}

/* Ajuste para o curso principal */
.education-item.main-course-item::before {
    width: 4vh; /* Um pouco maior para destacar */
    height: 4vh;
    top: -2.5vh; /* Ajuste para corresponder ao tamanho maior */
}

/* Ajuste para o hover e animação */
.education-item {
    animation: none; /* Remove animação inicial */
}

.education-item:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Estilos base */
.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1vh;
}

.education-header h4 {
    font-size: 1.6vw;
    color: #fff;
    font-family: "opensans", sans-serif;
    margin: 0;
}

.education-date {
    font-size: 1.3vw;
    color: #bbb;
    font-family: "opensans", sans-serif;
}

.education-institution {
    font-size: 1.4vw;
    color: #ddd;
    font-family: "opensans", sans-serif;
    margin-bottom: 1vh;
}

.education-description {
    font-size: 1vw;
    color: #b0b0b0;
    font-family: "opensans", sans-serif;
    
}

/* Habilidades */
#habilidades {
    background: #2c3e50;
    padding-bottom: 5vh;
    
}

#skills-title {
    color: #fff;
    font-family: "opensans", sans-serif;
    text-align: left;
    padding-left: 5vw;
    margin-bottom: 4vh;
    position: relative;
}

.skills-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4vw;
}

.skills-carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.skills-track {
    display: flex;
    width: 100%; /* Ajuste para largura total */
    animation: none;
}

.skill-item {
    flex: 0 0 auto;
    width: 10vw;
    text-align: center;
    background: #1e2529;
    border: 2px solid #444;
    border-radius: 1.5vw;
    padding: 1vw;
    margin: 0 1vw;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: #2c3e50;
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.skill-icon {
    width: 6vw;
    height: 6vw;
    margin-bottom: 1vh;
    transition: transform 0.3s ease;
}

.skill-item:hover .skill-icon {
    transform: scale(1.1);
}

.skill-item span {
    display: block;
    font-size: 1.4vw;
    color: #fff;
    font-family: "opensans", sans-serif;
    font-weight: 600;
}

.skill-item:hover span {
    color: #107be6;
}

/* Remover animações antigas e usar JavaScript */
@keyframes scrollRight {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%); /* Move metade da largura visível */
    }
}

@keyframes scrollLeft {
    0% {
        transform: translateX(-100%); /* Começa na metade */
    }
    100% {
        transform: translateX(0);
    }
}

/* Contato */
#contato {
    padding: 5vh 5vw;
    justify-content: space-between;
    color: #fff;
    display: flex;
    background:  #2e2e2e;
    align-items: flex-start;
    
}

.container-contato{
    flex: 1;
}

#contato h2 {
    margin-bottom: 2vh;
    text-align: left;
}

.contact-subtitle {
    font-size: 1.5vw;
    text-align: left;
    max-width: 40vw;
    margin-bottom: 4vh;
    color: #ddd;
}

.contact-form {
    display: flex;
    flex: 1;
    flex-direction: column;
    max-width: 45vw;
    margin: 0 auto;
    gap: 2vw;
}

.contact-input,
.contact-textarea {
    padding: 5vw;
    border: 2px solid #444;
    border-radius: 1vw;
    background: #1e2529;
    color: #fff;
    font-family: "opensans", sans-serif;
    transition: all 0.3s ease;
}

.contact-input:focus,
.contact-textarea:focus {
    
    outline: none;
    
}

.contact-textarea {

    resize: vertical;
}

.cta-button-contato {
    padding: 1vw 2vw;
    border: #fff solid 3px;
    color: #fff;
    background-color: transparent;
    font-family: "opensans", sans-serif;
    font-size: 1.4vw;
    font-weight: 600;
    text-decoration: none;
    border-radius: 1vw;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    
    cursor: pointer;
}

.cta-button-contato:hover {
    transform: translateY(-1vh);
    background: #0a66c2;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.cta-button-contato:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.contact-info {
    margin-top: 4vh;
    align-items: center;
    text-align: left;
}

.contact-info p {
    font-size: 1.4vw;
    margin-top: 5vh;
    align-items: center;
    justify-content: center;
    gap: 1vw;
}



.contact-info a:hover {
    text-decoration: underline;
}

.contact-link{
    color: #fff;
    text-decoration: none;
}

.whatsapp-button {
    background-color: #25D366;
    border: none;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 1vw;
}

.whatsapp-button:hover {
    background-color: #1ebd5a;
    transform: translateY(-1vh);
}


@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.2);
        opacity: 0.2;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5vw;
    background: #2e2e2e;
    border-top: solid 0.5px #b0b0b0;
    color: #fff;
}

.copyright {
    font-size: 1.4vw;
}

.production {
    font-size: 1.2vw; opacity: 0.6;
}

/* Responsividade para dispositivos móveis (até 768px) */
@media (max-width: 768px) {
    /* Reset e Configuração Geral */
    html {
        font-size: 4vw;

    }

    body {
        margin: 0;
        padding: 0;
    }

    h2 {
        font-size: 8vw;
    }

    /* Header e Navegação */
    .navbar {
        
        height: 9vh;
    }

    .logo-text {
        font-size: 6vw;
    }
    .logo-container {
        width: 70vw; /* Largura fixa maior para suportar fontes largas */
        display: inline-block;
      }

    .nav-menu {
        display: none; /* Oculta o menu por padrão */
        flex-direction: column;
        position: absolute;
        top: 9vh;
        left: 0;
        width: 100%;
        background: #1c1f2af2;
        backdrop-filter: blur(10px);
        padding: 0 3vw;
        box-shadow: 0 2px 10px #00000033;
    }

    .nav-menu.active {
        display: flex; /* Mostra o menu quando ativo */
    }

    .nav-item {
        margin: 10px 0;
        text-align: left;
    }

    .nav-item a {
        font-size: 1.2rem;
    }

    /* Adicionar ícone de hambúrguer */
    .navbar .menu-toggle {
        display: block; /* Mostra o botão de hambúrguer */
        font-size: 1.5rem;
        background: none;
        border: none;
        color: #2c3e50;
        cursor: pointer;
        padding: 5px;
    }

    /* Sobre Mim */
    #sobre-mim {
        padding-top: 10vh;
        height: auto;
        
    }

    .profile-img-container {
        float: left;
        width: 30vw;
        height: 30vw;
        position: relative;
      }

    .about-content {
        flex-direction: column;
        gap: 20px;
        
    }

    .social-button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 12vw;
        height: 12vw;
        border: #fff solid 2px;
        border-radius: 20%;
        color: #fff;
        text-decoration: none;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
        
      }

      .social-button i {
        font-size: 8vw;
      }
      .button-container {
        margin-bottom: 2vh;
      }

    .about-text {
        padding: 0 10px;
        text-align: left;
    }

    .about-text h2 {
        font-size: 10vw;
    }

    .about-text h3,
    .about-text p {
        max-width: 100%;
        font-size: 1rem;
    }

    .about-image {
        
        justify-content: center;
    }

    .background-img {
        width: 100%;
        height: auto;
    }

    .cta-button,
    .linkedin-icon {
        font-size: 4vw;
        border-radius: 2vw;
        padding: 10px 20px;
    }
    #projetos {
        padding: 5vh 5vw;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-card {
        width: 100%;
        height: auto;
        padding: 2vw;
        display: block;
        flex-direction: column;
        position: relative;
        overflow: hidden;
    }

    .project-img {
        width: 100%;
        height: 30vh;
        object-fit: cover;
    }

    .project-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0);
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 3;
    }

    .project-info {
        position: relative; /* Empilha abaixo da imagem */
        width: 100%;
        background: #1e2529;
        border: #444 solid 0px;

        transform: none;
        transition: opacity 0.3s ease;
        pointer-events: auto;
        z-index: 1;
        display: block; /* Mostra por padrão */
        box-sizing: border-box;
    }

    .project-title {
        display: block;
        
    }
    .project-title i {
        font-size: 8vw;
    }
    .project-title h3 {
        font-size: 5vw;
        
    }
    .project-info p {
        font-size: 3vw;
    }

    .hero-lamp {
        font-size: 2.5vw;
        color: #fff;
        width: 8vw;
        text-align: center;
    }

    .project-info .full-desc,
    .project-info .project-link {
        display: none; /* Oculta descrição completa e link */
    }

    .project-card.active .project-info {
        opacity: 1; /* Mantém visível, mas sem mudança (já visível) */
    }

    .project-card.active .project-overlay {
        opacity: 0;
    }

    .expanded-project {
        width: 90vw;
        padding: 2vw;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .expanded-img {
        height: 150px;
    }
    .expanded-content p {
        font-size: 3vw;
    }

    /* ==== CSS Responsivo para Competições ==== */
    .timeline-label { font-size: 3.5vw; }
    .competition-card { flex-direction: column; }
    .competition-visual { min-height: 250px; order: -1; } /* Imagem vai para cima */
    .competition-info { padding: 5vw; }
    .company-logo { width: 80px; }
    .competition-result { font-size: 4.5vw; }
    .competition-project-title { font-size: 6vw; }
    .competition-description { font-size: 3.5vw; }
    .tech-stack strong { font-size: 4vw; }
    .tech-stack span { font-size: 3vw; }
    .competition-cta { font-size: 3.8vw; padding: 2vh 4vw; }


    /* Ensino */
    #ensino {
        padding: 5vh 5vw;
    }

    .education-top,
    .courses-row {
        flex-direction: column;
        gap: 20px;
    }

    

    .education-section.main-course-section,
    .education-column,
    .education-item.column-course-item {
        max-width: 100%;
        min-width: 100%;
    }

    .education-content {
        flex-direction: column;
        gap: 10px;
    }

    .education-item, .education-item.main-course-item,.education-item.column-course-item {
        padding: 5vw;
    }

    .education-date {
        font-size: 3vw;
        color: #bbb;
        font-family: "opensans", sans-serif;
    }

    .education-institution {
        font-size: 4vw;
        color: #ddd;
        font-family: "opensans", sans-serif;
        margin-bottom: 1vh;
    }

    .education-image-slot,
    .education-image-square {
        width: 100%;
        height: 20vh;
    }

    .education-text {
        padding: 0;
    }

    .education-header h4 {
        font-size: 1rem;
    }

    .education-description {
        font-size: 0.7rem;
    }

    /* Habilidades */
    #habilidades {
        
    }

    .skills-wrapper {
        gap: 20px;
    }

    .skill-item {
        width: 100px;
    }

    .skill-icon {
        width: 70px;
        height: 70px;
    }

    .skill-item span {
        font-size: 0.9rem;
    }

    /* Contato */
    #contato {
        flex-direction: column;
        padding: 5vh 5vw;
        gap: 20px;
    }

    .contact-subtitle {
        max-width: 100%;
        font-size: 1rem;
    }

    .contact-form {
        max-width: 100%;
    }

    .contact-input,
    .contact-textarea {
        font-size: 0.9rem;
    }

    .cta-button-contato {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .contact-info {
        margin-top: 20px;
        text-align: left;
    }

    .contact-info p {
        font-size: 4vw;
        margin-bottom: 1.5vh;
        align-items: center;
        justify-content: center;
        gap: 1vw;
    }

    /* Footer */
    footer {
        padding: 10px;
    }

    .copyright {
        font-size: 0.8rem;
    }

    .production {
        font-size: 2vw; opacity: 0.6;
    }
}

/* =================================== */
/* ===== ESTILOS DO MODAL DE VÍDEO ===== */
/* =================================== */

.video-modal-overlay {
    display: none; /* Inicia oculto */
    position: fixed; /* Fica fixo na tela */
    z-index: 2000; /* Garante que fique sobre todo o conteúdo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Fundo preto semi-transparente */
    justify-content: center;
    align-items: center;
}

.video-modal-content {
    position: relative;
    background-color: #1e2529;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #444;
    width: 80%;
    max-width: 900px; /* Largura máxima do vídeo */
    max-height: 85vh; /* Altura máxima */
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-video-modal {
    position: absolute;
    top: -5px;
    right: 15px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-video-modal:hover {
    color: #0a66c2;
}

#w1VideoPlayer {
    width: 100%;
    max-height: 75vh; /* Garante que o vídeo caiba na tela */
    border-radius: 5px;
}

/* Responsividade para dispositivos móveis (até 768px) */
@media (max-width: 768px) {
    /* ... seu CSS responsivo existente ... */

    /* ==================================================== */
    /* == OTIMIZAÇÃO DAS ABAS DE COMPETIÇÕES PARA CELULAR == */
    /* ==================================================== */

    #competicoes {
        padding: 5vh 3vw; /* Leve ajuste no padding da seção */
    }

    /* Empilha as abas verticalmente */
    .competitions-tabs-container {
        grid-template-columns: 1fr; /* Muda o grid para apenas uma coluna */
        gap: 12px; /* Aumenta o espaço vertical entre as abas */
    }
    
    .competition-tab-item {
        border-radius: 10px; /* Adiciona bordas arredondadas para cada aba */
        background-color: #1c1f2a; /* Define um fundo para a aba inativa */
    }

    /* Ajusta o conteúdo interno da aba */
    .tab-content {
        padding: 12px 15px; /* Define um padding fixo para um bom espaçamento */
    }

    /* Aumenta o ícone */
    .tab-icon-wrapper {
        font-size: 1.6rem; /* Tamanho do ícone com unidade fixa */
        padding: 14px; /* Tamanho fixo para o contêiner do ícone */
        margin-right: 15px; /* Espaçamento entre ícone e texto */
    }

    /* Aumenta o texto da aba */
    .tab-label {
        font-size: 1rem; /* Tamanho de fonte legível com unidade fixa */
        line-height: 1.4;
    }

    /* Remove a animação da barra de progresso no celular */
    .competition-tab-item .progress-bar {
        display: none;
    }

    /* ... restante do seu CSS responsivo ... */
}
/* =================================== */
/* == NOVOS ESTILOS PARA SEÇÃO ENSINO == */
/* =================================== */

/* Contêiner para o logo e o nome da instituição */
.education-institution-logo {
    display: flex;
    align-items: center; /* Alinha verticalmente o logo e o texto */
    gap: 1vw; /* Espaço entre o logo e o texto */
    margin-top: 1.5vh;
    margin-bottom: 1.5vh;
}

/* Estilo para a imagem do logo */
.education-institution-logo .logo-img {
    height: 4vh; /* Altura fixa para os logos */
    width: auto; /* Largura se ajusta proporcionalmente */
    max-width: 10vw; /* Garante que logos muito largos não quebrem o layout */
    object-fit: contain; /* Garante que a imagem inteira apareça sem distorção */
}

/* Estilo para o nome da instituição */
.education-institution-logo .education-institution-name {
    font-size: 1.4vw;
    color: #ddd;
    font-family: "opensans", sans-serif;
    margin: 0; /* Remove margens padrão do parágrafo */
}

/* Remove a regra antiga que pode causar conflito */
.education-institution {
    display: none;
}

/* ============================================== */
/* == NOVOS ESTILOS PARA O MODAL (POP-UP) ====== */
/* ============================================== */
.expanded-project {
    color: #fff;
}
.expanded-content {
    padding: 2vw;
    width: 100%;
}
.expanded-img {
    width: 100%;
    height: 30vh; /* Altura da imagem no pop-up */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2vh;
    border: 1px solid #555;
}
.expanded-info {
    display: flex;
    flex-direction: column;
}
.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2vh;
}
.expanded-title-container {
    display: flex;
    align-items: center;
    gap: 1vw;
}
.expanded-title {
    margin: 0;
    font-family: "opensans";
    font-size: 1.8vw;
}
.expanded-project .cta-button {
    font-size: 1.2vw;
    padding: 1.5vh 1.8vw;
}
.expanded-project .full-desc {
    font-size: 1.1vw;
    line-height: 1.6;
    color: #ccc;
}

/* Ajustes para mobile */
@media (max-width: 768px) {
    .education-institution-logo .logo-img {
        height: 3.5vh;
    }
    .education-institution-logo .education-institution-name,
    .expanded-project .full-desc {
        font-size: 3.5vw;
    }
    .expanded-title {
        font-size: 5vw;
    }
    .expanded-project .cta-button {
        font-size: 3vw;
        padding: 1.5vh 3vw;
    }
}
/* ====== CHATBOT FIXO (versão alinhada ao resto do site) ====== */
#diogo-chatbot {
  position: fixed;
  bottom: 2.5vh;
  right: 2.5vw;
  z-index: 9999;
  font-family: "opensans", sans-serif; /* igual h2, botões, etc */
}

/* === botão padrão redondo (pode trocar a classe depois) === */
#diogo-chatbot-button {
  width: 10vw;
  height: 10vw;
  
  border-radius: 999px;
  border: none;
  background: linear-gradient(140deg, #0a66c2 0%, #1c1f2a 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1.4vh 3vh rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4vw;
  transition: transform .15s ease, box-shadow .15s ease;
}
#diogo-chatbot-button:hover {
  transform: translateY(-0.3vh);
  box-shadow: 0 1.6vh 3.4vh rgba(0,0,0,0.4);
}

/* janela */
#diogo-chatbot-window {
  position: absolute;
  bottom: calc(10vw + 1.5vh); /* sobe o tamanho do botão */
  right: 0;
  width: 30vw;
  
  background: #1c1f2a;
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 1vw;
  box-shadow: 0 1.4vh 3.5vh rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  gap: 0.7vw;
  overflow: hidden;
  transform-origin: bottom right;
  transition: opacity .15s ease, transform .15s ease;
}

#diogo-chatbot-window.chat-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(.9);
}
#diogo-chatbot-window:not(.chat-hidden) {
  opacity: 1;
  transform: scale(1);
}

/* header da janela */
#diogo-chatbot-window .chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(20,24,28,0.9);
  padding: 0.8vw 0.9vw;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}
.chat-title {
  font-weight: 600;
  color: #fff;
  font-size: 2vw;
  line-height: 1.1;
}
.chat-subtitle {
  font-size: 1.4vw;
  color: rgba(236,252,203,.8);
}

#diogo-chatbot-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.6vw;
  cursor: pointer;
  line-height: 1;
}

/* mensagens */
.chat-messages {
  max-height: 28vh;
  overflow-y: auto;
  padding: 0.75vw;
  display: flex;
  flex-direction: column;
  gap: 0.5vw;
}
.chat-message {
  max-width: 90%;
  padding: 0.5vw 0.7vw 0.55vw;
  border-radius: 0.7vw;
  font-size: 1vw;
  line-height: 1.35;
  white-space: pre-line;
  font-family: "carving", sans-serif;
}
.chat-message.bot {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148,163,184,0.12);
  color: #fff;
}
.chat-message.user {
  background: #0a66c2;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 0.3vw;
}

/* input */
.chat-input-area {
  display: flex;
  gap: 0.4vw;
  padding: 0.75vw;
  border-top: 1px solid rgba(255,255,255,0.02);
  background: rgba(28,31,42,0.95);
}
#diogo-chat-input {
  flex: 1;
  background: rgba(15,23,42,.25);
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 0.4vw;
  color: #fff;
  padding: 0.35vw 0.5vw;
  font-size: 1vw;
  font-family: "carving", sans-serif;
}
#diogo-chat-input:focus {
  outline: 1px solid rgba(10,102,194,.5);
}
.chat-input-area button[type="submit"] {
  border: none;
  background: #0a66c2;
  color: #fff;
  border-radius: 0.4vw;
  padding: 0.3vw 0.75vw;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* MOBILE */
@media (max-width: 768px) {
  #diogo-chatbot {
    right: 3vw;
    bottom: 3vh;
  }
  #diogo-chatbot-button {
    width: 16vw;
    height: 16vw;
    font-size: 8vw;
    max-width: none;
    max-height: none;
  }
  #diogo-chatbot-window {
    width: 90vw;
    bottom: calc(16vw + 2vh);
    right: 0;
  }
  .chat-title { font-size: 4vw; }
  .chat-subtitle { font-size: 3vw; }
  .chat-message { font-size: 3.2vw; }
  #diogo-chat-input { font-size: 3.2vw; }
}
.nav-menu .lang-switch {
  display: flex;
  gap: .4rem;
  align-items: center;
  margin-left: 1rem;
}

.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  opacity: .5;
  transition: .2s;
}

.lang-btn img {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: block;
}

.lang-btn.active,
.lang-btn:hover {
  opacity: 1;
  transform: scale(1.03);
}

/* se no mobile o menu ficar estranho, esconde ou joga pra baixo */
@media (max-width: 768px) {
  .nav-menu .lang-switch {
    margin-left: 0;
  }
}
/* MOBILE: melhorar chat */
@media (max-width: 768px) {
  /* o botão continua igual */
  #diogo-chatbot {
    right: 3vw;
    bottom: 3vh;
  }

  /* janela do chat fica FIXA na tela, não mais absoluta dentro do wrapper */
  #diogo-chatbot-window {
    position: fixed;
    left: 3vw;
    right: 3vw;
    bottom: calc(16vw + 1.5rem); /* sobe o tamanho do botão + um espaço */
    width: auto;
    max-height: calc(100dvh - 18vw - 2.5rem); /* altura útil da tela */
    border-radius: 1rem;
    gap: 0;
  }

  /* mais espaço no header */
  #diogo-chatbot-window .chat-header {
    padding: 0.9rem 1rem;
  }

  /* mensagens com padding maior */
  #diogo-chat-messages.chat-messages {
    padding: 1rem 1rem 0.5rem;
    gap: 0.6rem;
  }

  .chat-message {
    font-size: 3.4vw;
    padding: 0.6rem 0.75rem;
    border-radius: 0.9rem;
  }

  /* área do input mais confortável e com safe-area */
  .chat-input-area {
    padding: 0.5rem 0.6rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
    gap: 0.5rem;
  }

  #diogo-chat-input {
    font-size: 3.4vw;
    padding: 0.45rem 0.6rem;
    border-radius: 0.6rem;
  }

  .chat-input-area button[type="submit"] {
    padding: 0.45rem 0.7rem;
    border-radius: 0.6rem;
  }

  /* quando o teclado abre (JS coloca essa classe) */
  #diogo-chatbot-window.chat-on-keyboard {
    bottom: calc(0.6rem + env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 5.5rem); /* dá mais espaço pra msgs */
  }
}

