/*------------
  Formatação padrão da página
------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto Flex";
}

/*------------
Header e navegação
------------*/
header {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  background-color: #99e300;
}

.logo {
  width: 200px;
  padding: 10px;
}

nav {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: end;
  width: 50%;
}
.navbar:hover {
  color: #8130cd;
  transition: all ease 0.5s;
  font-weight: bolder;
  font-size: x-large;
}
.idiomas-container {
  margin-left: 35px;
}
.alt-idioma {
  width: 30px;
  margin-left: 10px;
  cursor: pointer;
}

nav,
a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: larger;
}

/*------------
Página Principal
------------*/

.home-text {
  margin: 50px;
}

i:hover {
  color: #8130cd;
  transition: all ease 0.5s;
}
.h2-home {
  font-size: 2.5rem;
  font-weight: 600;
  color: white;
}
.h1-home {
  font-size: 6rem;
  font-weight: bold;
  color: #99e300;
  letter-spacing: -2px;
  word-spacing: -2px;
  margin-top: -20px;
}
.p-home {
  font-size: 1.5rem;
  font-weight: 400;
  color: white;
  margin-top: -15px;
}

.home-content {
  background: linear-gradient(35deg, #99e300, #8130cd);
  background-size: 180% 180%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  gap: 10%;
  animation: gradient-animation 8s ease infinite;
}

@keyframes gradient-animation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/*Simbolo de </> da Home*/
.typing-container {
  color: white;
  margin: 10px 0;
  font-size: 30rem;
  white-space: nowrap;
  animation: typing 2s steps(4, end) infinite;
}
/*container das redes sociais */
.social-links {
  font-size: 40px;
  margin-top: 50px;
  margin-bottom: 30px;
}
.sobrenome {
  display: block;
  text-indent: 3.6ch; /* Isso empurra o texto 3,6 caracteres para frente */
  margin-top: -35px;
}

.download-button {
  font-size: 25px;
}
.download-button:hover {
  color: #8130cd;
  transition: all ease 0.5s;
}

/*------------
Página Sobre Mim
------------*/

.sobre {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 80px 10%; /* Adiciona espaçamento lateral para alinhar com o restante da página */
  background-color: zhsl(0, 100%, 50%); /* opcional: para destacar a seção */
}
.text-box {
  flex: 1;
  max-width: 80vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
h2 {
  color: #7dd02f;
  font-size: 52px;
  text-align: center;
  align-items: flex-start;
  margin-bottom: 10px;
  text-shadow: #8230cf 2px 2px;
}
.descricao {
  font-size: 28px;
  text-align: center;
  color: #8130cd;
  max-width: 70ch;
  font-weight: 400;
  margin-top: 35px;
}

span {
  color: #99e300;
}

.profile {
  width: 100%;
  max-width: 500px;
  border-radius: 280px;
  flex: 1;
}
.box {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%; /* garante que ocupe toda a largura disponível */
  gap: 40px; /* espaço entre imagem e texto */
  flex-wrap: wrap; /* evita quebra em telas pequenas */
}

footer {
  background-color: #8130cd;
  color: white;
  text-align: center;
  padding: 15px;
}

/*------------
Página Skills
------------*/
.container-skills {
  padding: 80px 10%;
  text-align: center;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.div-skills {
  flex: 0 0 calc((90% - 40px) / 3); /* 40px = 2 gaps de 20px entre 3 itens */
  height: 250px;
}
.div-skills img {
  width: 100px;
  margin-top: 40px;
}
.div-skills p {
  color: #7dd02f;
  font-size: 25px;
  padding: 10px;
  font-weight: 600;
}
.div-skills:hover {
  filter: invert(100%);
  transition: filter 0.3s ease;
}

/* Imagem cresce ao passar o mouse na div */
.div-skills:hover img {
  transform: scale(1.3);
  transition: transform 0.3s ease;
}

/* Texto cresce ao passar o mouse na div */
.div-skills:hover p {
  transform: scale(1.2);
  transition: transform 0.3s ease;
}

/*------------
Página Idiomas
------------*/

.idiomas {
  background-color: #f9f9f9; /* para destacar a seção */
  padding: 80px 10%; /* Adiciona espaçamento lateral para alinhar com o restante da página */
}

.card-main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px;
}

.container {
  width: 1000px;
  position: relative;
  display: flex;
  justify-content: space-between;
}

.container .card {
  position: relative;
  cursor: pointer;
}

.container .card .face {
  width: 300px;
  height: 200px;
  border-radius: 15px;
  transition: 0.5s;
}

.container .card .face.face1 {
  position: relative;
  background: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
  transform: translateY(100px);
}

.container .card:hover .face.face1 {
  background: #8130cd;
  transform: translateY(0);
}

.container .card .face.face1 .content {
  opacity: 0.7;
  transition: 0.5s;
}

.container .card .face.face1 .content img {
  max-width: 100px;
}

.container .card .face.face1 .content h3 {
  /*opacity está escondendo o h3 quando não estiver com o mouse sobre o card*/
  margin: 10px 0 0;
  opacity: 0;
  padding: 0;
  color: #fff;
  text-align: center;
  font-size: 1.5em;
}
.container .card:hover .face.face1 .content h3 {
  /* faz o texto h3 aparecer só quando o mouse estiver em cima da div card*/
  opacity: 1;
  transform: translateY(0);
}
.container .card .face.face2 {
  position: relative;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  transform: translateY(-100px);
}

.container .card:hover .face.face2 {
  transform: translateY(0);
}

.container .card .face.face2 .content p {
  margin: 0;
  color: #8130cd;
  font-size: 1.2rem;
  line-height: 1.5rem;
  font-weight: 500;
  padding: 0;
}

.container .card .face.face2 .content a {
  margin: 15px 0 0;
  display: inline-block;
  text-decoration: none;
  font-weight: 900;
  color: #333;
  padding: 5px;
  border: 1px solid #333;
}

.container .card .face.face2 .content a:hover {
  background: #333;
  color: #fff;
}

.container .card:nth-child(1) .face1 {
  background-image: url("assets/ingles.png");
  background-size: cover;
  background-position: center;
}

.container .card:nth-child(2) .face1 {
  background-image: url("assets/france.png");
  background-size: cover;
  background-position: center;
}

.container .card:nth-child(3) .face1 {
  background-image: url("assets/brpt.png");
  background-size: cover;
  background-position: center;
}

.container .card .face .content {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.container .card:hover .face .content {
  opacity: 1;
}

/*------------
Página Projetos
------------*/
@import url("https://fonts.googleapis.com/css2?family=Righteous&display=swap");

.botoes-projeto {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-projeto {
  background-color: #7dd02f;
  color: #fff;
  padding: 8px 14px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
}

.btn-projeto:hover {
  background-color: #5fa226;
}
.projetos {
  margin-top: 45px;
}
.container-projetos {
  max-width: 100vw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 35px;
  margin: 100px auto;
  padding: 40px 0;

  .card-projeto {
    position: relative;
    width: 418px;
    height: 236px;
    margin: 0 auto;
    background: #8130cd;
    border-radius: 15px;
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.5);

    .face-projeto {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;

      &.face1-projeto {
        box-sizing: border-box;
        padding: 10px;
        align-items: start;

        h2 {
          margin: 0;
          padding: 0;
        }
        .text-project {
          color: #7dd02f;
          text-shadow: #8130cd 2px 2px;
          text-align: center;
          font-size: 1.5rem;
        }
        .p-project {
          color: #fff;
          text-align: center;
          font: 0.9rem Arial, sans-serif;
          margin-top: 5px;
        }

        .python {
          background-color: #00fffc;
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
        }

        .cSharp {
          background-color: #fc00ff;
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
        }
      }

      &.face2-projeto {
        transition: 0.5s;

        h2 {
          margin: 0;
          padding: 0;
          font-size: 10em;
          color: #fff;
          transition: 0.5s;
          text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
          z-index: 10;
        }
      }
    }

    &:hover .face2-projeto {
      height: 60px;

      h2 {
        font-size: 2em;
      }
    }
  }

  .card-projeto:nth-child(1) .face2-projeto {
    background-image: url("assets/devrats.gif");
    background-size: contain; /* Ajusta a imagem ao container */
    background-position: center; /* Centraliza a imagem */
    background-repeat: no-repeat;
    border-radius: 15px;
  }

  .card-projeto:nth-child(2) .face2-projeto {
    background-image: url("assets/spotidados.gif");
    background-size: contain; /* Ajusta a imagem ao container */
    background-position: center; /* Centraliza a imagem */
    background-repeat: no-repeat;
    border-radius: 15px;
  }

  .card-projeto:nth-child(3) .face2-projeto {
    background-image: url("assets/wlist.gif");
    background-size: contain; /* Ajusta a imagem ao container */
    background-position: center; /* Centraliza a imagem */
    background-repeat: no-repeat;
    border-radius: 15px;
  }
  .card-projeto:nth-child(4) .face2-projeto {
    background-image: url("assets/plantaaqui.gif");
    background-size: contain; /* Ajusta a imagem ao container */
    background-position: center; /* Centraliza a imagem */
    background-repeat: no-repeat;
    border-radius: 15px;
  }
  .card-projeto:nth-child(5) .face2-projeto {
    background-image: url("assets/bytes4coolors.gif");
    background-size: contain; /* Ajusta a imagem ao container */
    background-position: center; /* Centraliza a imagem */
    background-repeat: no-repeat;
    border-radius: 15px;
  }
  .card-projeto:nth-child(6) .face2-projeto {
    background-image: url("assets/barber.gif");
    background-size: contain; /* Ajusta a imagem ao container */
    background-position: center; /* Centraliza a imagem */
    background-repeat: no-repeat;
    border-radius: 15px;
  }
}

/*------------
Página Contato
------------*/
#contato {
  padding: 60px 20px;
  background-color: #1e1e1e;
  color: #fff;
  font-family: "Righteous", cursive;
  text-align: center;
}

#contato h2 {
  font-size: 2.2rem;
  margin-bottom: 30px;
  color: #7dd02f;
  letter-spacing: 1px;
}

#contato form {
  max-width: 500px;
  margin: 0 auto;
  background-color: #2e2e2e;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 15px 60px rgba(0, 0, 0, 0.5);
  text-align: left;
}

#contato fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

#contato label {
  display: block;
  margin-bottom: 6px;
  color: #7dd02f;
  font-size: 1rem;
}

#contato input[type="text"],
#contato input[type="email"],
#contato input[type="tel"],
#contato textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: none;
  border-radius: 8px;
  background-color: #444;
  color: #fff;
  font-size: 0.95rem;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
}

#contato input[type="text"]:focus,
#contato input[type="email"]:focus,
#contato input[type="tel"]:focus,
#contato textarea:focus {
  outline: 2px solid #7dd02f;
}

#contato textarea {
  resize: vertical;
  min-height: 100px;
}

#contato input[type="submit"],
#contato input[type="reset"] {
  padding: 10px 25px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 10px;
  transition: background 0.3s ease;
  font-family: "Righteous", cursive;
}

#contato input[type="submit"] {
  background-color: #8130cd;
  color: #fff;
}

#contato input[type="submit"]:hover {
  background-color: #5d1c9a;
}

#contato input[type="reset"] {
  background-color: #666;
  color: #fff;
}

#contato input[type="reset"]:hover {
  background-color: #444;
}

/*TODA ESSA SEÇÃO PARA BAIXO É APENAS UM TESTE, FEITO INICIALMENTE COM INTELIGÊNCIA ARTIFICIAL PARA UMA TENTATIVA DE OTIMIZAÇÃO EM DISPOSITIVOS MÓVEIS E NÃO DEVERÁ SER CONSIDERADA COMO PARTE INTEGRANTE DO PROJETO*/

/* Media queries for mobile devices */

/* Smartphones portrait (up to 600px) */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
  }

  .logo {
    width: 150px;
    padding: 5px 0;
  }

  nav {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .navbar {
    font-size: 1rem;
  }

  .idiomas-container {
    margin-left: 0;
    margin-top: 10px;
  }

  .alt-idioma {
    width: 25px;
    margin-left: 5px;
  }

  .home-text {
    margin: 20px 10px;
    text-align: center;
  }

  .h2-home {
    font-size: 1.8rem;
  }

  .h1-home {
    font-size: 3rem;
    margin-top: -10px;
  }

  .p-home {
    font-size: 1.1rem;
    margin-top: -10px;
  }

  .social-links {
    font-size: 30px;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .typing-container {
    font-size: 12rem;
  }

  .download-button {
    font-size: 18px;
  }

  .sobre {
    padding: 40px 5%;
  }

  h2 {
    font-size: 36px;
  }

  .descricao {
    font-size: 18px;
    max-width: 90vw;
  }

  .profile {
    max-width: 300px;
    margin-bottom: 20px;
  }

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

  .container-skills {
    padding: 40px 5%;
  }

  .div-skills {
    flex: 0 0 45%;
    height: 180px;
  }

  .div-skills img {
    width: 70px;
    margin-top: 20px;
  }

  .div-skills p {
    font-size: 18px;
  }

  .idiomas {
    padding: 40px 5%;
  }

  .card-main {
    padding: 50px 20px;
  }

  .container {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .container .card {
    width: 90%;
  }

  .container .card .face {
    width: 100%;
    height: auto !important;
  }

  .container .card .face.face1 {
    transform: translateY(0) !important;
  }

  .container .card .face.face1 .content h3 {
    font-size: 1.2em;
  }

  .container .card .face.face2 {
    transform: translateY(0) !important;
    padding: 15px;
    box-shadow: none;
  }

  .projetos {
    margin-top: 25px;
  }

  .container-projetos {
    grid-template-columns: 1fr !important;
    grid-gap: 20px;
    margin: 50px auto 20px auto;
    padding: 20px 5%;
  }

  #contato {
    padding: 30px 10px;
  }

  #contato form {
    width: 90%;
    padding: 20px;
  }

  #contato h2 {
    font-size: 1.6rem;
  }

  #contato label {
    font-size: 0.9rem;
  }

  #contato input[type="text"],
  #contato input[type="email"],
  #contato input[type="tel"],
  #contato textarea {
    font-size: 0.85rem;
  }

  #contato input[type="submit"],
  #contato input[type="reset"] {
    font-size: 0.85rem;
    padding: 8px 20px;
  }
}

/* Smartphones landscape and small tablets (601px to 768px) */
@media (min-width: 601px) and (max-width: 768px) {
  header {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 5%;
  }

  .logo {
    width: 180px;
    padding: 5px 0;
  }

  nav {
    width: 60%;
    gap: 12px;
  }

  .navbar {
    font-size: 1.1rem;
  }

  .alt-idioma {
    width: 28px;
  }

  .home-text {
    margin: 40px 20px;
  }

  .h2-home {
    font-size: 2rem;
  }

  .h1-home {
    font-size: 4rem;
  }

  .p-home {
    font-size: 1.2rem;
  }

  .social-links {
    font-size: 35px;
    margin-top: 30px;
    margin-bottom: 25px;
  }

  .typing-container {
    font-size: 18rem;
  }

  .download-button {
    font-size: 22px;
  }

  .sobre {
    padding: 50px 8%;
  }

  h2 {
    font-size: 42px;
  }

  .descricao {
    font-size: 22px;
    max-width: 75ch;
  }

  .profile {
    max-width: 400px;
  }

  .box {
    gap: 30px;
  }

  .container-skills {
    padding: 50px 8%;
  }

  .div-skills {
    flex: 0 0 30%;
    height: 220px;
  }

  .div-skills img {
    width: 85px;
    margin-top: 30px;
  }

  .div-skills p {
    font-size: 20px;
  }

  .idiomas {
    padding: 50px 8%;
  }

  .card-main {
    padding: 80px 40px;
  }

  .container {
    width: 100%;
    gap: 30px;
  }

  .container .card {
    width: 320px;
  }

  .container .card .face {
    width: 320px;
    height: 180px;
  }

  .projetos {
    margin-top: 35px;
  }

  .container-projetos {
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 30px;
    padding: 40px 8%;
    margin: 80px auto;
  }

  #contato {
    padding: 40px 20px;
  }

  #contato form {
    width: 400px;
    padding: 25px;
  }

  #contato h2 {
    font-size: 1.8rem;
  }

  #contato label {
    font-size: 1rem;
  }

  #contato input[type="text"],
  #contato input[type="email"],
  #contato input[type="tel"],
  #contato textarea {
    font-size: 0.9rem;
  }

  #contato input[type="submit"],
  #contato input[type="reset"] {
    font-size: 0.9rem;
    padding: 10px 22px;
  }
}

/* ---------- HOME SECTION: Ajustando o símbolo </> e centralização --------- */
@media (max-width: 600px) {
  .home-content {
    flex-direction: column;
    gap: 30px;
    min-height: unset;
    padding: 30px 0 50px 0;
    text-align: center;
  }

  .typing-container {
    font-size: 5rem !important;
    margin: 0 auto 20px auto;
    animation: none; /* remova animação se ela bagunçar a proporção no mobile */
  }

  .home-text {
    margin: 10px 10px 0 10px;
    text-align: center;
  }

  .h1-home {
    font-size: 2.5rem;
    margin-top: -5px;
  }
  .h2-home {
    font-size: 1.1rem;
  }
  .p-home {
    font-size: 1rem;
  }
}

/* ---------- SEÇÃO IDIOMAS: Cards responsivos, empilhados --------- */
@media (max-width: 900px) {
  .container {
    flex-direction: column !important;
    align-items: center;
    width: 100% !important;
    gap: 25px;
  }
  .card-main {
    padding: 30px 0 !important;
  }
  .container .card,
  .container .card .face {
    width: 95vw !important;
    min-width: unset;
    max-width: 380px;
    margin: 0 auto;
    border-radius: 15px;
    height: auto !important;
  }

  .container .card .face.face1,
  .container .card .face.face2 {
    transform: none !important;
    min-height: 100px;
    padding: 10px 0;
  }
  .container .card .face.face2 .content p {
    font-size: 1rem;
    line-height: 1.4rem;
  }
}

/* ---------- SEÇÃO PROJETOS: Grid em coluna no mobile --------- */
@media (max-width: 1000px) {
  .container-projetos {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    align-items: center;
    padding: 20px 0 40px 0 !important;
    margin: 25px 0 !important;
  }
  .h1-home {
    line-height: 4rem;
  }
  .card-projeto {
    width: 95vw !important;
    max-width: 370px !important;
    min-width: unset;
    height: auto !important;
    margin: 0 auto;
  }
  .h1-home {
    line-height: 4rem;
  }
  .face-projeto {
    position: relative !important;
    width: 100% !important;
    min-height: 230px;
    height: auto !important;
    border-radius: 15px;
  }
  .face-projeto.face2-projeto {
    background-size: cover !important;
    background-position: center !important;
    min-height: 120px;
  }
}

@media (max-width: 600px) {
  .container-projetos {
    padding: 8px 0 30px 0 !important;
    gap: 18px !important;
    margin: 0 !important;
  }
  .h1-home {
    line-height: 4rem;
  }
  .card-projeto {
    max-width: 98vw !important;
    min-width: 0;
  }
  .face-projeto.face2-projeto {
    min-height: 60px;
  }
  .text-project {
    font-size: 1.1rem;
  }
  .p-project {
    font-size: 0.93rem;
  }
}

/* CORRIGINDO OVERFLOW/SCROLL QUEBRA DE PALAVRA */
.p-project,
.descricao {
  word-break: break-word;
  overflow-wrap: break-word;
}
